LDMX Software
|
ECal sensitive detector that uses an EcalHexReadout to create the hits. More...
#include <EcalSD.h>
Public Member Functions | |
EcalSD (const std::string &name, simcore::ConditionsInterface &ci, const framework::config::Parameters &p) | |
Class constructor. | |
virtual | ~EcalSD ()=default |
Class destructor. | |
virtual bool | isSensDet (G4LogicalVolume *vol) const override |
Should the input volume be consider apart of this sensitive detector? | |
G4bool | ProcessHits (G4Step *aStep, G4TouchableHistory *ROhist) override |
Process steps to create hits. | |
virtual void | saveHits (framework::Event &event) override |
Add our hits to the event bus. | |
virtual void | OnFinishedEvent () override |
Clear the map of hits we have accumulated. | |
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. | |
Static Public Attributes | |
static const std::string | COLLECTION_NAME = "EcalSimHits" |
Name of output collection of hits. | |
Private Attributes | |
std::map< ldmx::EcalID, ldmx::SimCalorimeterHit > | hits_ |
map of hits to add to the event (will be squashed) | |
bool | enableHitContribs_ |
enable hit contribs | |
bool | compressHitContribs_ |
compress hit contribs | |
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. | |
ECal sensitive detector that uses an EcalHexReadout to create the hits.
simcore::EcalSD::EcalSD | ( | const std::string & | name, |
simcore::ConditionsInterface & | ci, | ||
const framework::config::Parameters & | p | ||
) |
Class constructor.
name | The name of the sensitive detector. |
theCollectionName | The name of the hits collection. |
subDetID | The subdetector ID. |
Definition at line 19 of file EcalSD.cxx.
References compressHitContribs_, enableHitContribs_, and framework::config::Parameters::getParameter().
|
inlineoverridevirtual |
Should the input volume be consider apart of this sensitive detector?
Implements simcore::SensitiveDetector.
Definition at line 54 of file EcalSD.h.
|
inlineoverridevirtual |
Clear the map of hits we have accumulated.
Implements simcore::SensitiveDetector.
Definition at line 77 of file EcalSD.h.
References hits_.
|
overridevirtual |
Process steps to create hits.
aStep | The step information. |
ROhist | The readout history. |
DEBUG this printout is helpful when developing the GDML and/or EcalGeometry since Geant4 will probe where exactly the GDML sensitive volumes are std::cout << "(" << position[0] << ", " << position[1] << ", " << position[2] << ") " << cpynum << " -> layer " << layerNumber << " module " << module_position << std::endl;
convert position to center of cell position
This is the behavior that has been done in the past, although it is completely redundant with the ID information already deduced. It would probably help us more if we persisted the actual simulated position of the hit rather than the cell center; however, that is up for more discussion.
Implements simcore::SensitiveDetector.
Definition at line 26 of file EcalSD.cxx.
References compressHitContribs_, enableHitContribs_, simcore::TrackMap::findIncident(), simcore::SensitiveDetector::getTrackMap(), hits_, and simcore::SensitiveDetector::isGeantino().
|
overridevirtual |
Add our hits to the event bus.
Implements simcore::SensitiveDetector.
Definition at line 139 of file EcalSD.cxx.
References COLLECTION_NAME, and hits_.
|
static |
Name of output collection of hits.
Definition at line 33 of file EcalSD.h.
Referenced by saveHits().
|
private |
compress hit contribs
Definition at line 85 of file EcalSD.h.
Referenced by EcalSD(), and ProcessHits().
|
private |
enable hit contribs
Definition at line 83 of file EcalSD.h.
Referenced by EcalSD(), and ProcessHits().
|
private |
map of hits to add to the event (will be squashed)
Definition at line 81 of file EcalSD.h.
Referenced by OnFinishedEvent(), ProcessHits(), and saveHits().