|
LDMX Software
|
Class defining a sensitive detector of type HCal. More...
#include <HcalSD.h>
Public Member Functions | |
| HcalSD (const std::string &name, simcore::ConditionsInterface &ci, const framework::config::Parameters ¶ms) | |
| Constructor. | |
| virtual | ~HcalSD ()=default |
| Destructor. | |
| bool | isSensDet (G4LogicalVolume *volume) const override |
| Check if the input logical volume is a part of the hcal sensitive volumes. | |
| ldmx::HcalID | decodeCopyNumber (const std::uint32_t copyNumber, const G4ThreeVector &localPosition, const G4Box *scint) |
| Decode copy number of scintillator bar. | |
| virtual G4bool | ProcessHits (G4Step *aStep, G4TouchableHistory *ROhist) override |
| Create a hit out of the energy deposition deposited during a step. | |
| virtual void | saveHits (framework::Event &event) override |
| Add our hits to the event bus 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. | |
Static Public Attributes | |
| static const std::string | COLLECTION_NAME = "HcalSimHits" |
| name of collection to be added to event bus | |
Private Attributes | |
| std::vector< std::string > | gdml_identifiers_ |
| double | birksc1_ |
| double | birksc2_ |
| std::vector< ldmx::SimCalorimeterHit > | hits_ |
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. | |
| simcore::HcalSD::HcalSD | ( | 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 HcalSD.cxx.
References framework::config::Parameters::get().
| ldmx::HcalID simcore::HcalSD::decodeCopyNumber | ( | const std::uint32_t | copyNumber, |
| const G4ThreeVector & | localPosition, | ||
| const G4Box * | scint ) |
Decode copy number of scintillator bar.
| copyNumber | The copy number of the scintillator volume. |
| localPosition | The position of the hit (step mid-point). |
| scint | The G4Box of the scintillator volume. |
Definition at line 28 of file HcalSD.cxx.
References ldmx::HcalGeometry::CONDITIONS_OBJECT_NAME, and simcore::SensitiveDetector::getCondition().
Referenced by ProcessHits().
|
inlineoverridevirtual |
Check if the input logical volume is a part of the hcal sensitive volumes.
Implements simcore::SensitiveDetector.
Definition at line 49 of file HcalSD.h.
|
inlineoverridevirtual |
Cleanup SD and prepare a new-event state.
Implements simcore::SensitiveDetector.
Definition at line 90 of file HcalSD.h.
|
overridevirtual |
Create a hit out of the energy deposition deposited during a step.
| [in] | step | The current step. |
| [in] | history | The readout history. |
Implements simcore::SensitiveDetector.
Definition at line 56 of file HcalSD.cxx.
References ldmx::HcalGeometry::CONDITIONS_OBJECT_NAME, decodeCopyNumber(), simcore::SensitiveDetector::getCondition(), simcore::SensitiveDetector::getTrackMap(), simcore::SensitiveDetector::isGeantino(), and ldmx::SimCalorimeterHit::setPosition().
|
inlineoverridevirtual |
Add our hits to the event bus and then reset the container.
Implements simcore::SensitiveDetector.
Definition at line 86 of file HcalSD.h.
References COLLECTION_NAME.
|
static |
name of collection to be added to event bus
Definition at line 26 of file HcalSD.h.
Referenced by saveHits().
|
private |
|
private |