1#ifndef DQM_PHOTONUCLEARDQM_H
2#define DQM_PHOTONUCLEARDQM_H
8#include "Framework/Configure/Parameters.h"
11#include "SimCore/Event/SimParticle.h"
24 enum class CompactEventType {
26 single_charged_kaon = 1,
27 single_neutral_kaon = 2,
32 enum class EventType {
36 three_or_more_neutrons = 3,
37 single_charged_pion = 4,
38 two_charged_pions = 5,
39 single_neutral_pion = 6,
40 single_charged_pion_and_nucleon = 7,
41 single_charged_pion_and_two_nucleons = 8,
42 two_charged_pions_and_nucleon = 9,
43 single_neutral_pion_and_nucleon = 10,
44 single_neutral_pion_and_two_nucleons = 11,
45 single_neutral_pion_charged_pion_and_nucleon = 12,
82 const std::vector<std::string> &labels);
91 const std::vector<const ldmx::SimParticle *> daughters,
double threshold);
96 const std::vector<const ldmx::SimParticle *> daughters,
double threshold);
116 const std::map<int, ldmx::SimParticle> &particleMap,
125 const std::vector<const ldmx::SimParticle *> &pnDaughters);
135 const std::vector<const ldmx::SimParticle *> &pnDaughters,
136 const EventType eventType);
150 if (pdgCode > 1000000000) {
152 return ((pdgCode / 10) % 1000) <= 4;
157 bool count_light_ions_;
Collection of utility functions useful for analysis.
Base classes for all user event processing components to extend.
Class implementing an event buffer system for storing event data.
PhotoNuclearDQM(const std::string &name, framework::Process &process)
Constructor.
void findSubleadingKinematics(const ldmx::SimParticle *pnGamma, const std::vector< const ldmx::SimParticle * > &pnDaughters, const EventType eventType)
Fill histograms related to the kinematics and subleading particles for 1n, kaon, and 2n type events.
constexpr bool isLightIon(const int pdgCode) const
Check if the PDG code corresponds to a light ion.
std::vector< const ldmx::SimParticle * > findDaughters(const std::map< int, ldmx::SimParticle > &particleMap, const ldmx::SimParticle *parent) const
Find all daughter particles of a parent.
void analyze(const framework::Event &event) override
Process the event and create the histogram summaries.
EventType classifyEvent(const std::vector< const ldmx::SimParticle * > daughters, double threshold)
Method used to classify events.
void setHistLabels(const std::string &name, const std::vector< std::string > &labels)
Helper function to label categorical histos.
void onProcessStart() override
Method executed before processing of events begins.
CompactEventType classifyCompactEvent(const ldmx::SimParticle *pnGamma, const std::vector< const ldmx::SimParticle * > daughters, double threshold)
Method used to classify events in a compact manner.
void findRecoilProperties(const ldmx::SimParticle *recoil)
Fill the recoil electron-histograms.
void findParticleKinematics(const std::vector< const ldmx::SimParticle * > &pnDaughters)
Fill histograms related to kinematics of PN products.
virtual ~PhotoNuclearDQM()=default
Destructor.
void configure(framework::config::Parameters ¶meters) override
Configure this analyzer using the user specified parameters.
Base class for a module which does not produce a data product.
Implements an event buffer system for storing event data.
Class which represents the process under execution.
Class encapsulating parameters for configuring a processor.
Class representing a simulated particle.