LDMX Software
|
This class is meant to filter for events that produce a dark brem matching originating in the target and matching the following parameters. More...
#include <TargetDarkBremFilter.h>
Public Member Functions | |
TargetDarkBremFilter (const std::string &name, framework::config::Parameters ¶meters) | |
Class constructor. | |
~TargetDarkBremFilter ()=default | |
Class destructor. | |
std::vector< simcore::TYPE > | getTypes () override |
Get the types of actions this class can do. | |
void | BeginOfEventAction (const G4Event *e) override |
Reset flag signaling finding of A' to false. | |
void | stepping (const G4Step *step) override |
Looking for A' while primary is stepping. | |
void | EndOfEventAction (const G4Event *event) override |
Check flag signaling finding of A', if false, abort the event so it isn't saved. | |
![]() | |
UserAction (const std::string &name, framework::config::Parameters ¶meters) | |
Constructor. | |
virtual | ~UserAction ()=default |
Destructor. | |
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. | |
Private Member Functions | |
bool | isOutsideTargetRegion (const G4VPhysicalVolume *vol) const |
Check if the volume is outside the target region. | |
bool | isOutsideTargetRegion (const G4LogicalVolume *vol) const |
Check if the volume is outside the target region. | |
void | AbortEvent (const std::string &reason) const |
Helper to abort an event with a message. | |
Private Attributes | |
double | threshold_ |
Minimum energy [MeV] that the A' should have to keep the event. | |
bool | found_aprime_ |
flag to signal that we saw an A' | |
Additional Inherited Members | |
![]() | |
using | Factory |
factory for user actions | |
![]() | |
UserEventInformation * | getEventInfo () const |
Get a handle to the event information. | |
const std::map< int, ldmx::SimParticle > & | getCurrentParticleMap () const |
Get the current particle map. | |
![]() | |
std::string | name_ {""} |
Name of the UserAction. | |
framework::config::Parameters | parameters_ |
The set of parameters used to configure this class. | |
mutable::framework::logging::logger | theLog_ |
the logging channel user actions can use ldmx_log with | |
This class is meant to filter for events that produce a dark brem matching originating in the target and matching the following parameters.
threshold: minimum energy [MeV] A' needs to have
Definition at line 50 of file TargetDarkBremFilter.h.
TargetDarkBremFilter::TargetDarkBremFilter | ( | const std::string & | name, |
framework::config::Parameters & | parameters ) |
Class constructor.
Retrieve the necessary configuration parameters
Definition at line 18 of file TargetDarkBremFilter.cxx.
References threshold_.
|
private |
Helper to abort an event with a message.
Tells the RunManger to abort the current event after displaying the input message.
[in] | reason | reason for aborting the event |
Definition at line 128 of file TargetDarkBremFilter.cxx.
Referenced by EndOfEventAction(), and stepping().
|
overridevirtual |
Reset flag signaling finding of A' to false.
[in] | e | event being started, unused |
Reimplemented from simcore::UserAction.
Definition at line 24 of file TargetDarkBremFilter.cxx.
References found_aprime_.
|
overridevirtual |
Check flag signaling finding of A', if false, abort the event so it isn't saved.
[in] | event | being ended, check if it is already aborted |
Reimplemented from simcore::UserAction.
Definition at line 122 of file TargetDarkBremFilter.cxx.
References AbortEvent(), and found_aprime_.
|
inlineoverridevirtual |
Get the types of actions this class can do.
Implements simcore::UserAction.
Definition at line 70 of file TargetDarkBremFilter.h.
|
inlineprivate |
Check if the volume is outside the target region.
[in] | vol | G4LogicalVolume to check region |
Definition at line 124 of file TargetDarkBremFilter.h.
|
inlineprivate |
Check if the volume is outside the target region.
[in] | vol | G4VPhysicalVolume to check region |
Definition at line 111 of file TargetDarkBremFilter.h.
References isOutsideTargetRegion().
Referenced by isOutsideTargetRegion(), and stepping().
|
overridevirtual |
Looking for A' while primary is stepping.
We make sure that the current track is the primary electron that is within the target region. Then if the track is either stopped or leaving the target region, we look through its secondaries for a good A'.
[in] | step | current G4Step |
check on first step of A' to see if it originated in correct volume this needs to be here because sometimes the electron dark brems in the tagger and misses the target completely std::cout << "[ TargetDarkBremFilter ] : " << "(" << G4EventManager::GetEventManager() ->GetConstCurrentEvent() ->GetEventID() << ") " << "A' originated in " << track->GetLogicalVolumeAtVertex()->GetName() << std::endl;
Reimplemented from simcore::UserAction.
Definition at line 28 of file TargetDarkBremFilter.cxx.
References AbortEvent(), found_aprime_, isOutsideTargetRegion(), and threshold_.
|
private |
flag to signal that we saw an A'
Definition at line 158 of file TargetDarkBremFilter.h.
Referenced by BeginOfEventAction(), EndOfEventAction(), and stepping().
|
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 153 of file TargetDarkBremFilter.h.
Referenced by stepping(), and TargetDarkBremFilter().