|
LDMX Software
|
This class is meant to filter for events that produce a dark brem occuring within the ECal and producing an A' of a minimum energy threshold [MeV]. More...
#include <EcalDarkBremFilter.h>
Public Member Functions | |
| EcalDarkBremFilter (const std::string &name, framework::config::Parameters ¶meters) | |
| Class constructor. | |
| ~EcalDarkBremFilter () | |
| Class destructor. | |
| std::vector< simcore::TYPE > | getTypes () override |
| Get the types of actions this class can do. | |
| void | beginOfEventAction (const G4Event *event) override |
| Reset flag on if A' has been found. | |
| G4ClassificationOfNewTrack | classifyNewTrack (const G4Track *aTrack, const G4ClassificationOfNewTrack ¤tTrackClass) override |
| We return the classification of the track done by the PartialEnergySorter, but we can check here if the A' has been created above the required energy. | |
| void | newStage () override |
| When using the PartialEnergySorter, the first time that a new stage begins is when all particles are now below the threshold. | |
| void | postUserTrackingAction (const G4Track *track) override |
| Make sure A' is saved. | |
Public Member Functions inherited from simcore::UserAction | |
| UserAction (const std::string &name, framework::config::Parameters ¶meters) | |
| Constructor. | |
| DECLARE_FACTORY (UserAction, std::shared_ptr< UserAction >, const std::string &, framework::config::Parameters &) | |
| factory for user actions | |
| virtual | ~UserAction ()=default |
| Destructor. | |
| 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 | stepping (const G4Step *) |
| Method called after each simulation step. | |
| virtual void | prepareNewEvent () |
| Method called at the beginning of a new event. | |
Private Member Functions | |
| bool | inDesiredVolume (const G4Track *) const |
| Check if input volume is in the desired volume name. | |
Private Attributes | |
| double | threshold_ |
| Minimum energy [MeV] that the A' should have to keep the event. | |
| std::vector< G4LogicalVolume * > | volumes_ |
| The volumes that the filter will be applied to. | |
| bool | found_ap_ |
| Have we found the A' yet? | |
Additional Inherited Members | |
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. | |
| void | abortEvent (const std::string &reason) const |
| Helper to abort an event with a message. | |
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. | |
| mutable::framework::logging::logger | the_log_ |
the logging channel user actions can use ldmx_log with | |
This class is meant to filter for events that produce a dark brem occuring within the ECal and producing an A' of a minimum energy threshold [MeV].
Definition at line 51 of file EcalDarkBremFilter.h.
| EcalDarkBremFilter::EcalDarkBremFilter | ( | const std::string & | name, |
| framework::config::Parameters & | parameters ) |
Class constructor.
Retrieve the necessary configuration parameters
Definition at line 14 of file EcalDarkBremFilter.cxx.
References framework::config::Parameters::get(), threshold_, and volumes_.
|
inline |
|
overridevirtual |
Reset flag on if A' has been found.
| event | unused |
Reimplemented from simcore::UserAction.
Definition at line 41 of file EcalDarkBremFilter.cxx.
References found_ap_.
|
overridevirtual |
We return the classification of the track done by the PartialEnergySorter, but we can check here if the A' has been created above the required energy.
Checks a new track for being an A' above threshold_ if it is an A', sets the found_ap_ member
| aTrack | The Geant4 track. |
| currentTrackClass | The current track classification. |
Reimplemented from simcore::UserAction.
Definition at line 46 of file EcalDarkBremFilter.cxx.
References simcore::UserAction::abortEvent(), found_ap_, and threshold_.
|
inlineoverridevirtual |
Get the types of actions this class can do.
Implements simcore::UserAction.
Definition at line 71 of file EcalDarkBremFilter.h.
|
private |
Check if input volume is in the desired volume name.
| pointer | to track to check |
Comparing the pointers to logical volumes isn't very robust. TODO find a better way to do this
Definition at line 97 of file EcalDarkBremFilter.cxx.
References volumes_.
Referenced by postUserTrackingAction().
|
overridevirtual |
When using the PartialEnergySorter, the first time that a new stage begins is when all particles are now below the threshold.
We take this opportunity to make sure that the A' has been found.
Reimplemented from simcore::UserAction.
Definition at line 67 of file EcalDarkBremFilter.cxx.
References simcore::UserAction::abortEvent(), and found_ap_.
|
overridevirtual |
Make sure A' is saved.
If passed track is A', set save status to true Aborts event if A' does not originate in desired volume. This is the last check that the event needs to pass to be kept.
| track | G4Track to check if it is an A' |
Reimplemented from simcore::UserAction.
Definition at line 73 of file EcalDarkBremFilter.cxx.
References simcore::UserAction::abortEvent(), simcore::UserTrackInformation::get(), inDesiredVolume(), and simcore::UserTrackInformation::setSaveFlag().
|
private |
Have we found the A' yet?
Reset to false in beginOfEventAction
Definition at line 154 of file EcalDarkBremFilter.h.
Referenced by beginOfEventAction(), classifyNewTrack(), and newStage().
|
private |
Minimum energy [MeV] that the A' should have to keep the event.
Also used by PartialEnergySorter to determine which tracks should be processed first.
Parameter Name: 'threshold'
Definition at line 142 of file EcalDarkBremFilter.h.
Referenced by classifyNewTrack(), and EcalDarkBremFilter().
|
private |
The volumes that the filter will be applied to.
Definition at line 147 of file EcalDarkBremFilter.h.
Referenced by EcalDarkBremFilter(), and inDesiredVolume().