|
ATLAS Offline Software
|
Go to the documentation of this file.
5 #ifndef G4ATLASTOOLS_SENSITIVEDETECTORBASE_H
6 #define G4ATLASTOOLS_SENSITIVEDETECTORBASE_H
13 #include "G4VSensitiveDetector.hh"
15 #ifdef G4MULTITHREADED
16 # include "tbb/concurrent_unordered_map.h"
25 class G4LogicalVolume;
26 class G4VSensitiveDetector;
74 const std::vector<std::string>& volumes)
const;
79 G4VSensitiveDetector*
getSD();
82 Gaudi::Property<std::vector<std::string> >
m_volumeNames{
this,
"LogicalVolumeNames", {}};
96 void setSD(G4VSensitiveDetector*);
103 #ifdef G4MULTITHREADED
104 using SDThreadMap_t = tbb::concurrent_unordered_map
106 <
std::thread::id, G4VSensitiveDetector*, std::hash<std::thread::id> >;
108 SDThreadMap_t m_sdThreadMap;
110 G4VSensitiveDetector*
m_SD{};
virtual StatusCode SetupEvent() override
Beginning of an athena event.
G4VSensitiveDetector * m_SD
The sensitive detector to which this thing corresponds.
virtual ~SensitiveDetectorBase()
Empty virtual destructor.
Common base class for tools that create and manage Geant4 sensitive detectors.
SensitiveDetectorBase(const std::string &type, const std::string &name, const IInterface *parent)
Standard constructor.
G4VSensitiveDetector * getSD()
Retrieve the current SD.
::StatusCode StatusCode
StatusCode definition for legacy code.
StatusCode initializeSD() override
Setup an SD in the current thread.
Gaudi::Property< std::vector< std::string > > m_outputCollectionNames
Names of all output collections written out by this SD.
void SetSensitiveDetector(G4LogicalVolume *, G4VSensitiveDetector *) const
Method stolen from G4VUserDetectorConstruction in G4 10.2.
static bool matchStrings(const char *first, const char *second)
Match two strings with wildcard support.
Gaudi::Property< std::vector< std::string > > m_volumeNames
All the volumes to which this SD is assigned.
Gaudi::Property< bool > m_noVolumes
This SensitiveDetector has no volumes associated with it.
virtual StatusCode Gather() override
End of an athena event.
void setSD(G4VSensitiveDetector *)
Set the current SD.
StatusCode assignSD(G4VSensitiveDetector *sd, const std::vector< std::string > &volumes) const
Assign SD to a list of volumes.