![]() |
ATLAS Offline Software
|
Baseline MuonSensitive detector tool to store the sim hits. More...
#include <MuonSensitiveDetectorTool.h>
Public Member Functions | |
| ~MuonSensitiveDetectorTool ()=default | |
| Default the destructor. | |
| virtual StatusCode | initialize () override final |
| virtual StatusCode | SetupEvent (HitCollectionMap &hitCollections) override final |
| Beginning of an athena event. | |
| virtual StatusCode | Gather (HitCollectionMap &hitCollections) override final |
| End of an athena event. | |
| SensitiveDetectorBase (const std::string &type, const std::string &name, const IInterface *parent) | |
| Use the standard AthAlgTool constructors. | |
| StatusCode | initializeSD () override |
| Setup an SD in the current thread. | |
| virtual StatusCode | SetupEvent () override |
| Beginning of an athena event. | |
| virtual StatusCode | Gather () override |
| End of an athena event. | |
Protected Member Functions | |
| 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 | |
| const MuonGMR4::MuonDetectorManager * | m_detMgr {nullptr} |
| The muon detector manager to retrieve the sensitive elements. | |
| Gaudi::Property< std::string > | m_alignStoreKey {this, "AlignStoreKey", ""} |
| : Key to the alignment / transform store per event. | |
| 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. | |
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. | |
Baseline MuonSensitive detector tool to store the sim hits.
The individual implementations need to inherit from this tool. The tool takes care to write the SimHit container into the G4 HitCollection and to retrieve the detector manager and to initialize the alignment key pointing to the alignment store with all local -> global transformations of each sensitive volume
Definition at line 23 of file MuonSensitiveDetectorTool.h.
|
default |
Default the destructor.
|
protectedinherited |
Assign SD to a list of volumes.
This method supports wild card matching
Definition at line 64 of file SensitiveDetectorBase.cxx.
|
finaloverridevirtual |
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 from SensitiveDetectorBase.
Definition at line 20 of file MuonSensitiveDetectorTool.cxx.
|
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, MinBiasScintillatorSDTool, MuonWallSDTool, 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.
|
finaloverridevirtual |
Definition at line 10 of file MuonSensitiveDetectorTool.cxx.
|
overrideinherited |
Setup an SD in the current thread.
Separate from the AthAlgTool initialize() method because it needs to be called once per worker thread in AthenaMT. Don't confuse this with the G4 SD method Initialize which is called at the beginning of every G4 event.
Definition at line 25 of file SensitiveDetectorBase.cxx.
|
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.
| SensitiveDetectorBase::SensitiveDetectorBase | ( | const std::string & | type, |
| const std::string & | name, | ||
| const IInterface * | parent ) |
Use the standard AthAlgTool constructors.
Definition at line 55 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 |
Beginning of an athena event.
This is where collection initialization should happen. If we are using a WriteHandle, then this could be empty.
Reimplemented from SensitiveDetectorBase.
Definition at line 15 of file MuonSensitiveDetectorTool.cxx.
|
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, ALFA_SensitiveDetectorTool, and MuonWallSDTool.
Definition at line 70 of file SensitiveDetectorBase.h.
|
protected |
: Key to the alignment / transform store per event.
Definition at line 40 of file MuonSensitiveDetectorTool.h.
|
protected |
The muon detector manager to retrieve the sensitive elements.
Definition at line 38 of file MuonSensitiveDetectorTool.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.
|
protectedinherited |
All the volumes to which this SD is assigned.
Definition at line 96 of file SensitiveDetectorBase.h.