|
LDMX Software
|
Base class for nuclear interaction DQM analyzers. More...
#include <NuclearDQM.h>
Public Types | |
| enum class | EventType { nothing_hard = 0 , single_neutron = 1 , two_neutrons = 2 , three_or_more_neutrons = 3 , single_charged_pion = 4 , two_charged_pions = 5 , single_neutral_pion = 6 , single_charged_pion_and_nucleon = 7 , single_charged_pion_and_two_nucleons = 8 , two_charged_pions_and_nucleon = 9 , single_neutral_pion_and_nucleon = 10 , single_neutral_pion_and_two_nucleons = 11 , single_neutral_pion_charged_pion_and_nucleon = 12 , single_proton = 13 , two_protons = 14 , proton_neutron = 15 , klong = 16 , charged_kaon = 17 , kshort = 18 , exotics = 19 , multibody = 20 } |
| Classification of PN/EN events by the hard particles produced above a kinetic-energy threshold. More... | |
| enum class | CompactEventType { single_neutron = 0 , single_charged_kaon = 1 , single_neutral_kaon = 2 , two_neutrons = 3 , soft = 4 , other = 5 } |
| Compact classification focusing on very-high-energy single particles. More... | |
Public Member Functions | |
| NuclearDQM (const std::string &name, framework::Process &process) | |
| void | configure (framework::config::Parameters ¶meters) override |
| Read common configuration parameters: sim_particles_coll_name, sim_particles_passname, count_light_ions. | |
Public Member Functions inherited from framework::Analyzer | |
| Analyzer (const std::string &name, Process &process) | |
| Class constructor. | |
| virtual void | process (Event &event) final |
| Processing an event for an Analyzer is calling analyze. | |
| virtual void | beforeNewRun (ldmx::RunHeader &run_header) final |
| Don't allow Analyzers to add parameters to the run header. | |
| virtual void | analyze (const Event &event)=0 |
| Process the event and make histograms or summaries. | |
Public Member Functions inherited from framework::EventProcessor | |
| DECLARE_FACTORY (EventProcessor, EventProcessor *, const std::string &, Process &) | |
| declare that we have a factory for this class | |
| EventProcessor (const std::string &name, Process &process) | |
| Class constructor. | |
| virtual | ~EventProcessor ()=default |
| Class destructor. | |
| virtual void | onNewRun (const ldmx::RunHeader &run_header) |
| Callback for the EventProcessor to take any necessary action when the run being processed changes. | |
| virtual void | onFileOpen (EventFile &event_file) |
| Callback for the EventProcessor to take any necessary action when a new event input ROOT file is opened. | |
| virtual void | onFileClose (EventFile &event_file) |
| Callback for the EventProcessor to take any necessary action when a event input ROOT file is closed. | |
| virtual void | onProcessStart () |
| Callback for the EventProcessor to take any necessary action when the processing of events starts, such as creating histograms. | |
| virtual void | onProcessEnd () |
| Callback for the EventProcessor to take any necessary action when the processing of events finishes, such as calculating job-summary quantities. | |
| template<class T > | |
| const T & | getCondition (const std::string &condition_name) |
| Access a conditions object for the current event. | |
| TDirectory * | getHistoDirectory () |
| Access/create a directory in the histogram file for this event processor to create histograms and analysis tuples. | |
| void | setStorageHint (framework::StorageControl::Hint hint) |
| Mark the current event as having the given storage control hint from this module_. | |
| void | setStorageHint (framework::StorageControl::Hint hint, const std::string &purposeString) |
| Mark the current event as having the given storage control hint from this module and the given purpose string. | |
| int | getLogFrequency () const |
| Get the current logging frequency from the process. | |
| int | getRunNumber () const |
| Get the run number from the process. | |
| std::string | getName () const |
| Get the processor name. | |
| void | createHistograms (const std::vector< framework::config::Parameters > &histos) |
| Internal function which is used to create histograms passed from the python configuration @parma histos vector of Parameters that configure histograms to create. | |
Protected Member Functions | |
| std::vector< const ldmx::SimParticle * > | findDaughters (const std::map< int, ldmx::SimParticle > &particleMap, const ldmx::SimParticle *parent, int require_process_type=-1) const |
Return daughters of parent that pass PDG-based filtering: | |
| void | findParticleKinematics (const std::vector< const ldmx::SimParticle * > &daughters, const std::string &prefix) |
| Fill kinematic histograms for the nuclear interaction products. | |
| void | findExtendedKinematics (const std::vector< const ldmx::SimParticle * > &daughters, const std::string &prefix) |
| Fill extended kinematic histograms for EN interactions: hardest_pi_ke/theta (π± only), hardest_pi0_ke/theta, {prefix}_proton_mult, {prefix}_charged_pion_mult, {prefix}_neutral_pion_mult, leading_particle_type. | |
| void | findSubleadingKinematics (const ldmx::SimParticle *initiator, const std::vector< const ldmx::SimParticle * > &daughters, EventType eventType) |
| Fill subleading-kinematics histograms for 1n, 2n, charged-kaon and neutral-kaon event types. | |
| EventType | classifyEvent (const std::vector< const ldmx::SimParticle * > &daughters, double threshold) |
Classify the event by the number and type of hard daughters above threshold [MeV] of kinetic energy. | |
| CompactEventType | classifyCompactEvent (const ldmx::SimParticle *initiator, const std::vector< const ldmx::SimParticle * > &daughters, double threshold) |
Compact classification: looks for a single particle carrying >= 80% of the initiator energy, or two neutrons each above threshold [MeV]. | |
| constexpr bool | isLightIon (int pdgCode) const |
Return true if pdgCode is a light ion (Z <= 4). | |
Protected Member Functions inherited from framework::EventProcessor | |
| void | abortEvent () |
| Abort the event immediately. | |
Protected Attributes | |
| std::string | sim_particles_coll_name_ |
| std::string | sim_particles_passname_ |
| bool | count_light_ions_ {true} |
Protected Attributes inherited from framework::EventProcessor | |
| HistogramPool | histograms_ |
| helper object for making and filling histograms | |
| NtupleManager & | ntuple_ {NtupleManager::getInstance()} |
| Manager for any ntuples. | |
| logging::logger | the_log_ |
| The logger for this EventProcessor. | |
Base class for nuclear interaction DQM analyzers.
Provides shared event classification, daughter finding, and kinematics methods reused by PhotoNuclearDQM and ElectroNuclearDQM.
Definition at line 24 of file NuclearDQM.h.
|
strong |
Compact classification focusing on very-high-energy single particles.
Definition at line 58 of file NuclearDQM.h.
|
strong |
Classification of PN/EN events by the hard particles produced above a kinetic-energy threshold.
Neutral pions are a separate category from charged pions throughout.
Definition at line 31 of file NuclearDQM.h.
| dqm::NuclearDQM::NuclearDQM | ( | const std::string & | name, |
| framework::Process & | process ) |
Definition at line 6 of file NuclearDQM.cxx.
|
protected |
Compact classification: looks for a single particle carrying >= 80% of the initiator energy, or two neutrons each above threshold [MeV].
Definition at line 313 of file NuclearDQM.cxx.
References ldmx::SimParticle::getEnergy().
|
protected |
Classify the event by the number and type of hard daughters above threshold [MeV] of kinetic energy.
Assumes daughters sorted by KE.
Definition at line 240 of file NuclearDQM.cxx.
|
overridevirtual |
Read common configuration parameters: sim_particles_coll_name, sim_particles_passname, count_light_ions.
Reimplemented from framework::EventProcessor.
Reimplemented in dqm::PhotoNuclearDQM.
Definition at line 9 of file NuclearDQM.cxx.
References framework::config::Parameters::get().
|
protected |
Return daughters of parent that pass PDG-based filtering:
If require_process_type >= 0, only daughters whose processType matches are kept. Pass -1 (default) to disable process-type filtering.
Results are sorted by kinetic energy in descending order.
Definition at line 17 of file NuclearDQM.cxx.
References ldmx::SimParticle::getDaughters().
|
protected |
Fill extended kinematic histograms for EN interactions: hardest_pi_ke/theta (π± only), hardest_pi0_ke/theta, {prefix}_proton_mult, {prefix}_charged_pion_mult, {prefix}_neutral_pion_mult, leading_particle_type.
leading_particle_type bins: 0=π±+X, 1=π⁰+X, 2=K±+X, 3=KS/KL+X, 4=p+X, 5=n+X, 6=other+X
Definition at line 109 of file NuclearDQM.cxx.
|
protected |
Fill kinematic histograms for the nuclear interaction products.
Generic (no-prefix) histograms filled: hardest_ke, hardest_theta, h_ke_h_theta, hardest_p_ke, hardest_p_theta, hardest_n_ke, hardest_n_theta, hardest_pi_ke, hardest_pi_theta, (charged pions only) hardest_pi0_ke, hardest_pi0_theta (neutral pions separately)
Prefixed histograms filled (using prefix, e.g. "pn" or "en"): {prefix}_neutron_mult, {prefix}_proton_mult, {prefix}_charged_pion_mult, {prefix}_neutral_pion_mult, {prefix}_total_ke, {prefix}_total_neutron_ke
Definition at line 48 of file NuclearDQM.cxx.
|
protected |
Fill subleading-kinematics histograms for 1n, 2n, charged-kaon and neutral-kaon event types.
Assumes daughters are sorted by KE descending.
initiator is the particle that underwent the nuclear reaction (pn gamma or en electron); its energy is the reference for fractions.
Definition at line 201 of file NuclearDQM.cxx.
References ldmx::SimParticle::getEnergy().
|
inlineconstexprprotected |
Return true if pdgCode is a light ion (Z <= 4).
Nuclear PDG code convention: +-10LZZZAAAI
Definition at line 156 of file NuclearDQM.h.
|
protected |
Definition at line 165 of file NuclearDQM.h.
|
protected |
Definition at line 163 of file NuclearDQM.h.
|
protected |
Definition at line 164 of file NuclearDQM.h.