LDMX Software
|
Class defining a sensitive detector of type trigger scintillator. More...
#include <TrigScintSD.h>
Public Member Functions | |
TrigScintSD (const std::string &name, simcore::ConditionsInterface &ci, const framework::config::Parameters &p) | |
Class constructor. | |
virtual | ~TrigScintSD ()=default |
Destructor. | |
virtual bool | isSensDet (G4LogicalVolume *vol) const override |
Should the input logical volume be included in this sensitive detector? | |
G4bool | ProcessHits (G4Step *step, G4TouchableHistory *history) override |
Process steps to create hits. | |
virtual void | saveHits (framework::Event &event) override |
Save our hits collection into the event bus and reset it. | |
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. | |
virtual | ~SensitiveDetector ()=default |
Destructor. | |
virtual void | EndOfEvent (G4HCofThisEvent *) override |
This is Geant4's handle to tell us the event is ending. | |
Private Attributes | |
std::vector< ldmx::SimCalorimeterHit > | hits_ |
our collection of hits in this SD | |
std::string | collection_name_ |
name of the hit collection for this SD | |
std::string | vol_name_ |
name of trigger pad volume this SD is capturing | |
int | module_id_ |
the ID number for the module we are gathering hits from | |
Additional Inherited Members | |
Public Types inherited from simcore::SensitiveDetector | |
using | Factory = ::simcore::Factory< SensitiveDetector, SensitiveDetector *, const std::string &, simcore::ConditionsInterface &, const framework::config::Parameters & > |
The SD Factory. | |
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. | |
Class defining a sensitive detector of type trigger scintillator.
Definition at line 12 of file TrigScintSD.h.
simcore::TrigScintSD::TrigScintSD | ( | const std::string & | name, |
simcore::ConditionsInterface & | ci, | ||
const framework::config::Parameters & | p | ||
) |
Class constructor.
[in] | name | The name of the sensitive detector. |
[in] | ci | interface to conditions objects |
[in] | p | python configuration parameters |
Definition at line 16 of file TrigScintSD.cxx.
References collection_name_, framework::config::Parameters::getParameter(), module_id_, and vol_name_.
|
inlineoverridevirtual |
Should the input logical volume be included in this sensitive detector?
In order to avoid attaching to both 'target' and 'sp_target', we intentionally exclude volumes with the string 'sp_' in their names.
Implements simcore::SensitiveDetector.
Definition at line 37 of file TrigScintSD.h.
References vol_name_.
|
inlineoverridevirtual |
Cleanup SD and prepare a new-event state.
Implements simcore::SensitiveDetector.
Definition at line 57 of file TrigScintSD.h.
References hits_.
|
overridevirtual |
Process steps to create hits.
[in] | step | The step information. |
[in] | history | The readout history. |
Implements simcore::SensitiveDetector.
Definition at line 25 of file TrigScintSD.cxx.
References ldmx::SimCalorimeterHit::addContrib(), hits_, simcore::SensitiveDetector::isGeantino(), module_id_, ldmx::SimCalorimeterHit::setID(), ldmx::SimCalorimeterHit::setPathLength(), ldmx::SimCalorimeterHit::setPosition(), ldmx::SimCalorimeterHit::setPostStepPosition(), ldmx::SimCalorimeterHit::setPostStepTime(), ldmx::SimCalorimeterHit::setPreStepPosition(), ldmx::SimCalorimeterHit::setPreStepTime(), and ldmx::SimCalorimeterHit::setVelocity().
|
inlineoverridevirtual |
Save our hits collection into the event bus and reset it.
Implements simcore::SensitiveDetector.
Definition at line 53 of file TrigScintSD.h.
References collection_name_, and hits_.
|
private |
name of the hit collection for this SD
Definition at line 63 of file TrigScintSD.h.
Referenced by saveHits(), and TrigScintSD().
|
private |
our collection of hits in this SD
Definition at line 61 of file TrigScintSD.h.
Referenced by OnFinishedEvent(), ProcessHits(), and saveHits().
|
private |
the ID number for the module we are gathering hits from
Definition at line 67 of file TrigScintSD.h.
Referenced by ProcessHits(), and TrigScintSD().
|
private |
name of trigger pad volume this SD is capturing
Definition at line 65 of file TrigScintSD.h.
Referenced by isSensDet(), and TrigScintSD().