![]() |
ATLAS Offline Software
|
A base class for tools that manage LArG4SimpleSDs. More...
#include <SimpleSDTool.h>
Public Member Functions | |
| SimpleSDTool (const std::string &type, const std::string &name, const IInterface *parent) | |
| Constructor. | |
| StatusCode | initialize () override final |
| Initialize the tool. | |
| StatusCode | initializeSD () override final |
| Create and register all SDs for the current thread. | |
| StatusCode | SetupEvent (HitCollectionMap &) override final |
| Create event-owned hit collections. | |
| StatusCode | Gather (HitCollectionMap &) override final |
| Finalize and record event-owned hit collections. | |
| virtual StatusCode | SetupEvent () override |
| Beginning of an athena event. | |
| virtual StatusCode | Gather () override |
| End of an athena event. | |
Protected Member Functions | |
| virtual StatusCode | initializeCalculators () |
| Initialize Calculator Services. | |
| LArG4SimpleSD * | makeOneSD (const std::string &name, ILArCalculatorSvc *calc, const std::vector< std::string > &volumes) const |
| Helper method to create one SD. | |
| bool | useFrozenShowers () const |
| Are we handling frozen shower fast sim? | |
| virtual std::string | hitCollectionName () const |
| Collection receiving the hits for this tool. | |
| StatusCode | assignSD (std::unique_ptr< G4VSensitiveDetector > sd, const std::vector< std::string > &volumes) const |
| Assign SD to a list of volumes. | |
| G4VSensitiveDetector * | getSD () |
| Retrieve the current SD. | |
| void | SetSensitiveDetector (G4LogicalVolume *, G4VSensitiveDetector *) const |
| Method stolen from G4VUserDetectorConstruction in G4 10.2. | |
Protected Attributes | |
| Gaudi::Property< std::vector< std::string > > | m_volumeNames {this, "LogicalVolumeNames", {}} |
| All the volumes to which this SD is assigned. | |
| Gaudi::Property< std::vector< std::string > > | m_outputCollectionNames {this, "OutputCollectionNames", {}} |
| Names of all output collections written out by this SD. | |
| Gaudi::Property< bool > | m_noVolumes {this, "NoVolumes", false} |
| This SensitiveDetector has no volumes associated with it. | |
configuration properties | |
| Gaudi::Property< std::string > | m_timeBinType {this, "TimeBinType", "Default"} |
| What time binning type for regular hits? | |
| Gaudi::Property< float > | m_timeBinWidth {this, "TimeBinWidth", 2.5*CLHEP::ns} |
| What time bin width for regular hits? | |
| Gaudi::Property< G4bool > | m_useFrozenShowers {this, "UseFrozenShowers", false} |
| Is there going to be a fast simulation coming into this SD? | |
Calo identifier helpers | |
| const LArEM_ID * | m_larEmID {nullptr} |
| const LArFCAL_ID * | m_larFcalID {nullptr} |
| const LArHEC_ID * | m_larHecID {nullptr} |
Private Member Functions | |
| void | setSD (G4VSensitiveDetector *) |
| Set the current SD. | |
Static Private Member Functions | |
| static bool | matchStrings (const char *first, const char *second) |
| Match two strings with wildcard support. | |
Private Attributes | |
| G4VSensitiveDetector * | m_SD {} |
| The sensitive detector to which this thing corresponds. | |
A base class for tools that manage LArG4SimpleSDs.
The tool owns only the Athena-event lifecycle of the output collection. Geant4 SD instances write through LArHitContainerBuilder, which carries all per-event merge state and the ordered regular-SD partitions.
Definition at line 49 of file SimpleSDTool.h.
| LArG4::SimpleSDTool::SimpleSDTool | ( | const std::string & | type, |
| const std::string & | name, | ||
| const IInterface * | parent ) |
Constructor.
|
protectedinherited |
Assign SD to a list of volumes.
This method supports wild card matching
Definition at line 64 of file SensitiveDetectorBase.cxx.
|
finaloverridevirtual |
Finalize and record event-owned hit collections.
Reimplemented from SensitiveDetectorBase.
|
inlineoverridevirtualinherited |
End of an athena event.
Store the output collection in SG at this point. If we are using a WriteHandle, then this can be empty!
Reimplemented in AFP_SensitiveDetectorTool, AFP_SiDSensitiveDetectorTool, AFP_TDSensitiveDetectorTool, ALFA_SensitiveDetectorTool, FCS_Param::FCS_StepInfoSDTool, ZDC_FiberSDTool, and ZDC_G4CalibSDTool.
Definition at line 78 of file SensitiveDetectorBase.h.
|
protectedinherited |
Retrieve the current SD.
In AthenaMT, this means the thread-local SD. Otherwise, it is simply the single SD.
Definition at line 122 of file SensitiveDetectorBase.cxx.
|
protectedvirtual |
Collection receiving the hits for this tool.
|
finaloverride |
Initialize the tool.
|
inlineprotectedvirtual |
Initialize Calculator Services.
Reimplemented in LArG4::EMBSDTool, LArG4::EMECSDTool, LArG4::FCALSDTool, and LArG4::HECSDTool.
Definition at line 73 of file SimpleSDTool.h.
|
finaloverride |
Create and register all SDs for the current thread.
|
protected |
Helper method to create one SD.
|
staticprivateinherited |
Match two strings with wildcard support.
Compares two strings character by character with optional * wildcard in the first argument
Definition at line 149 of file SensitiveDetectorBase.cxx.
|
privateinherited |
Set the current SD.
In hive, this gets assigned as the thread-local SD.
Definition at line 136 of file SensitiveDetectorBase.cxx.
|
protectedinherited |
Method stolen from G4VUserDetectorConstruction in G4 10.2.
Definition at line 176 of file SensitiveDetectorBase.cxx.
|
finaloverridevirtual |
Create event-owned hit collections.
Reimplemented from SensitiveDetectorBase.
|
inlineoverridevirtualinherited |
Beginning of an athena event.
This is where collection initialization should happen. If we are using a WriteHandle, then this could be empty.
Reimplemented in AFP_SensitiveDetectorTool, AFP_SiDSensitiveDetectorTool, AFP_TDSensitiveDetectorTool, and ALFA_SensitiveDetectorTool.
Definition at line 70 of file SensitiveDetectorBase.h.
|
inlineprotected |
Are we handling frozen shower fast sim?
Definition at line 81 of file SimpleSDTool.h.
Definition at line 102 of file SimpleSDTool.h.
|
protected |
Definition at line 103 of file SimpleSDTool.h.
Definition at line 104 of file SimpleSDTool.h.
|
protectedinherited |
This SensitiveDetector has no volumes associated with it.
Definition at line 101 of file SensitiveDetectorBase.h.
|
protectedinherited |
Names of all output collections written out by this SD.
Definition at line 98 of file SensitiveDetectorBase.h.
|
privateinherited |
The sensitive detector to which this thing corresponds.
Definition at line 125 of file SensitiveDetectorBase.h.
|
protected |
What time binning type for regular hits?
Definition at line 92 of file SimpleSDTool.h.
|
protected |
What time bin width for regular hits?
Definition at line 94 of file SimpleSDTool.h.
|
protected |
Is there going to be a fast simulation coming into this SD?
Definition at line 96 of file SimpleSDTool.h.
|
protectedinherited |
All the volumes to which this SD is assigned.
Definition at line 96 of file SensitiveDetectorBase.h.