|
LDMX Software
|
Class defining a basic sensitive detector for scoring planes. More...
#include <ScoringPlaneSD.h>
Public Member Functions | |
| ScoringPlaneSD (const std::string &name, simcore::ConditionsInterface &ci, const framework::config::Parameters ¶ms) | |
| Constructor. | |
| virtual | ~ScoringPlaneSD ()=default |
| Destructor. | |
| bool | isSensDet (G4LogicalVolume *volume) const override |
| Check if the input logical volume is a scoring plane we should include. | |
| virtual G4bool | ProcessHits (G4Step *step, G4TouchableHistory *hist) override |
| This is Geant4's handle to tell us that a particle has stepped through our sensitive detector and we should process its interaction with us. | |
| virtual void | saveHits (framework::Event &event) override |
| We are given the event bus here and we must decide now what to persist into the event. | |
| virtual void | onFinishedEvent () override |
| Cleanup SD and prepare a new-event state. | |
Public Member Functions inherited from simcore::SensitiveDetector | |
| SensitiveDetector (const std::string &name, simcore::ConditionsInterface &ci, const framework::config::Parameters ¶meters) | |
| Constructor. | |
| DECLARE_FACTORY_WITH_WAREHOUSE (SensitiveDetector, SensitiveDetector *, const std::string &, simcore::ConditionsInterface &, const framework::config::Parameters &) | |
| The SD Factory. | |
| virtual | ~SensitiveDetector ()=default |
| Destructor. | |
| virtual void | EndOfEvent (G4HCofThisEvent *) override |
| This is Geant4's handle to tell us the event is ending. | |
Private Attributes | |
| std::string | match_substr_ |
| Substring to match to logical volumes. | |
| std::string | collection_name_ |
| Name of output collection to add. | |
| std::vector< ldmx::SimTrackerHit > | hits_ |
| The actual output collection. | |
Additional Inherited Members | |
Protected Member Functions inherited from simcore::SensitiveDetector | |
| template<class T > | |
| const T & | getCondition (const std::string &condition_name) |
| Record the configuration of this detector into the run header. | |
| bool | isGeantino (const G4Step *step) const |
| Check if the passed step is a step of a geantino. | |
| const TrackMap & | getTrackMap () const |
| Get a handle to the current track map. | |
| enableLogging ("SensitiveDetector") | |
| Enable logging for this class. | |
Class defining a basic sensitive detector for scoring planes.
Definition at line 13 of file ScoringPlaneSD.h.
| simcore::ScoringPlaneSD::ScoringPlaneSD | ( | const std::string & | name, |
| simcore::ConditionsInterface & | ci, | ||
| const framework::config::Parameters & | params ) |
Constructor.
| name | The name of the sensitive detector. |
| ci | Conditions interface handle |
| params | python configuration parameters |
Definition at line 22 of file ScoringPlaneSD.cxx.
References collection_name_, framework::config::Parameters::get(), and match_substr_.
|
inlineoverridevirtual |
Check if the input logical volume is a scoring plane we should include.
Implements simcore::SensitiveDetector.
Definition at line 31 of file ScoringPlaneSD.h.
References match_substr_.
|
inlineoverridevirtual |
Cleanup SD and prepare a new-event state.
Implements simcore::SensitiveDetector.
Definition at line 53 of file ScoringPlaneSD.h.
References hits_.
|
overridevirtual |
This is Geant4's handle to tell us that a particle has stepped through our sensitive detector and we should process its interaction with us.
| [in] | step | the step that happened within one of our logical volumes |
| [in] | hist | the touchable history of the step |
Implements simcore::SensitiveDetector.
Definition at line 30 of file ScoringPlaneSD.cxx.
References hits_, ldmx::SimSpecialID::scoringPlaneId(), and ldmx::SimTrackerHit::setTrackID().
|
overridevirtual |
We are given the event bus here and we must decide now what to persist into the event.
| [in,out] | event | event bus to add thing(s) to |
Implements simcore::SensitiveDetector.
Definition at line 81 of file ScoringPlaneSD.cxx.
References collection_name_, and hits_.
|
private |
Name of output collection to add.
Definition at line 60 of file ScoringPlaneSD.h.
Referenced by saveHits(), and ScoringPlaneSD().
|
private |
The actual output collection.
Definition at line 63 of file ScoringPlaneSD.h.
Referenced by onFinishedEvent(), ProcessHits(), and saveHits().
|
private |
Substring to match to logical volumes.
Definition at line 57 of file ScoringPlaneSD.h.
Referenced by isSensDet(), and ScoringPlaneSD().