LDMX Software
|
Abstract base class for a user action used to filter out photo-nuclear events that don't match the topology the user is interested in studying. More...
#include <PhotoNuclearTopologyFilters.h>
Public Member Functions | |
PhotoNuclearTopologyFilter (const std::string &name, framework::config::Parameters ¶meters) | |
Constructor. | |
~PhotoNuclearTopologyFilter ()=default | |
Destructor. | |
void | stepping (const G4Step *step) override |
Callback that allows a user to take some actions at the end of a step. | |
virtual bool | rejectEvent (const std::vector< G4Track * > &secondaries) const =0 |
std::vector< simcore::TYPE > | getTypes () override |
Retrieve the type of actions this class defines. | |
Public Member Functions inherited from simcore::UserAction | |
UserAction (const std::string &name, framework::config::Parameters ¶meters) | |
Constructor. | |
virtual | ~UserAction ()=default |
Destructor. | |
virtual void | BeginOfEventAction (const G4Event *) |
Method called at the beginning of every event. | |
virtual void | EndOfEventAction (const G4Event *) |
Method called at the end of every event. | |
virtual void | BeginOfRunAction (const G4Run *) |
Method called at the beginning of a run. | |
virtual void | EndOfRunAction (const G4Run *) |
Method called at the end of a run. | |
virtual void | PreUserTrackingAction (const G4Track *) |
Method called before the UserTrackingAction. | |
virtual void | PostUserTrackingAction (const G4Track *) |
Method called after the UserTrackingAction. | |
virtual G4ClassificationOfNewTrack | ClassifyNewTrack (const G4Track *, const G4ClassificationOfNewTrack &cl) |
Method called when a track is updated. | |
virtual void | NewStage () |
Method called at the beginning of a new stage. | |
virtual void | PrepareNewEvent () |
Method called at the beginning of a new event. | |
Protected Member Functions | |
constexpr bool | isLightIon (const int pdgCode) const |
Check if the PDG code corresponds to a light ion nucleus. | |
constexpr bool | skipCountingParticle (const int pdgcode) const |
Whether or not to include a particular particle type in any counting. | |
constexpr bool | isNeutron (const int pdgID) const |
Protected Member Functions inherited from simcore::UserAction | |
UserEventInformation * | getEventInfo () const |
Get a handle to the event information. | |
const std::map< int, ldmx::SimParticle > & | getCurrentParticleMap () const |
Get the current particle map. | |
Protected Attributes | |
bool | count_light_ions_ |
double | hard_particle_threshold_ |
Protected Attributes inherited from simcore::UserAction | |
std::string | name_ {""} |
Name of the UserAction. | |
framework::config::Parameters | parameters_ |
The set of parameters used to configure this class. | |
Additional Inherited Members | |
Public Types inherited from simcore::UserAction | |
using | Factory = ::simcore::Factory< UserAction, std::shared_ptr< UserAction >, const std::string &, framework::config::Parameters & > |
factory for user actions | |
Abstract base class for a user action used to filter out photo-nuclear events that don't match the topology the user is interested in studying.
Derived classes implement the event rejection
Similar to the PhotoNuclearProductsFilter, this user action will only process steps whose associated track has been tagged as a "PN Gamma". This tag is currently only set in ECalProcessFilter and needs to be placed in the UserAction pipeline before this class.
Definition at line 31 of file PhotoNuclearTopologyFilters.h.
biasing::PhotoNuclearTopologyFilter::PhotoNuclearTopologyFilter | ( | const std::string & | name, |
framework::config::Parameters & | parameters | ||
) |
Constructor.
[in] | name | The name of this class instance. |
[in] | parameters | The parameters used to configure this class. |
Definition at line 44 of file PhotoNuclearTopologyFilters.cxx.
|
inlineoverridevirtual |
Retrieve the type of actions this class defines.
Implements simcore::UserAction.
Definition at line 57 of file PhotoNuclearTopologyFilters.h.
|
inlineconstexprprotected |
Check if the PDG code corresponds to a light ion nucleus.
Nuclear PDG codes are given by ±10LZZZAAAI So to find the atomic number, we first divide by 10 (to lose the I-component) and then take the modulo with 1000.
TODO: Repeated code from SimCore, could probably live elsewhere.
Definition at line 72 of file PhotoNuclearTopologyFilters.h.
Referenced by skipCountingParticle().
|
inlineconstexprprotected |
Definition at line 97 of file PhotoNuclearTopologyFilters.h.
|
inlineconstexprprotected |
Whether or not to include a particular particle type in any counting.
Unless count_light_ions_ is set, we don't count anything with a nuclear PDG code. This is consistent with the counting behaviour used in the PhotoNuclearDQM.
If count_light_ions_ is set, we also match PDG codes for nuclei with atomic number < 4.
TODO: Repeated code from SimCore, could probably live elsewhere.
Definition at line 93 of file PhotoNuclearTopologyFilters.h.
References isLightIon().
|
overridevirtual |
Callback that allows a user to take some actions at the end of a step.
[in] | step | The Geant4 step containing transient information about the step taken by a track. |
Reimplemented from simcore::UserAction.
Definition at line 51 of file PhotoNuclearTopologyFilters.cxx.
References simcore::UserTrackInformation::get(), and simcore::UserTrackInformation::tagPNGamma().
|
protected |
Definition at line 99 of file PhotoNuclearTopologyFilters.h.
|
protected |
Definition at line 100 of file PhotoNuclearTopologyFilters.h.