|
LDMX Software
|
Basic sensitive detector for trackers. More...
#include <TrackerSD.h>
Public Member Functions | |
| TrackerSD (const std::string &name, simcore::ConditionsInterface &ci, const framework::config::Parameters &p) | |
| Class constructor. | |
| virtual | ~TrackerSD ()=default |
| Destructor. | |
| virtual bool | isSensDet (G4LogicalVolume *volume) const override |
| Should the input logical volume be attached to this sensitive detector? | |
| G4bool | ProcessHits (G4Step *step, G4TouchableHistory *history) override |
| Process a step by creating a hit. | |
| virtual void | saveHits (framework::Event &event) override |
| Add the hits to the event and then reset the container. | |
| 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 | subsystem_ |
| The name of the subsystem we are apart of. | |
| std::string | collection_name_ |
| The name of the output collection. | |
| std::vector< ldmx::SimTrackerHit > | hits_ |
| The collection of hits_. | |
| ldmx::SubdetectorIDType | sub_det_id_ |
| The detector ID. | |
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. | |
Basic sensitive detector for trackers.
Definition at line 14 of file TrackerSD.h.
| simcore::TrackerSD::TrackerSD | ( | const std::string & | name, |
| simcore::ConditionsInterface & | ci, | ||
| const framework::config::Parameters & | p ) |
Class constructor.
| [in] | name | The name of the sensitive detector. |
| [in] | ci | conditions interface handle |
| [in] | p | parameters to configure sensitive detector |
Definition at line 11 of file TrackerSD.cxx.
References collection_name_, framework::config::Parameters::get(), sub_det_id_, and subsystem_.
|
inlineoverridevirtual |
Should the input logical volume be attached to this sensitive detector?
Implements simcore::SensitiveDetector.
Definition at line 34 of file TrackerSD.h.
References subsystem_.
|
inlineoverridevirtual |
Cleanup SD and prepare a new-event state.
Implements simcore::SensitiveDetector.
Definition at line 54 of file TrackerSD.h.
References hits_.
|
overridevirtual |
Process a step by creating a hit.
| step | The step information |
| history | The readout history. |
Implements simcore::SensitiveDetector.
Definition at line 20 of file TrackerSD.cxx.
References hits_, simcore::SensitiveDetector::isGeantino(), ldmx::SimTrackerHit::setTrackID(), and sub_det_id_.
|
inlineoverridevirtual |
Add the hits to the event and then reset the container.
Implements simcore::SensitiveDetector.
Definition at line 50 of file TrackerSD.h.
References collection_name_, and hits_.
|
private |
The name of the output collection.
Definition at line 61 of file TrackerSD.h.
Referenced by saveHits(), and TrackerSD().
|
private |
The collection of hits_.
Definition at line 64 of file TrackerSD.h.
Referenced by onFinishedEvent(), ProcessHits(), and saveHits().
|
private |
The detector ID.
Definition at line 67 of file TrackerSD.h.
Referenced by ProcessHits(), and TrackerSD().
|
private |
The name of the subsystem we are apart of.
Definition at line 58 of file TrackerSD.h.
Referenced by isSensDet(), and TrackerSD().