5#ifndef G4ATLASTOOLS_SENSITIVEDETECTORBASE_H
6#define G4ATLASTOOLS_SENSITIVEDETECTORBASE_H
13#include "G4VSensitiveDetector.hh"
15#include <GaudiKernel/StatusCode.h>
23class G4VSensitiveDetector;
45 const IInterface *parent);
60 return StatusCode::SUCCESS;
67 return StatusCode::SUCCESS;
74 StatusCode
assignSD(std::unique_ptr<G4VSensitiveDetector> sd,
75 const std::vector<std::string>& volumes)
const;
78 Gaudi::Property<std::vector<std::string> >
m_volumeNames{
this,
"LogicalVolumeNames", {}};
92 static bool matchStrings(
const char *first,
const char * second);
Small wrapper around hit collection map to facilitate accessing the hit collection.
StatusCode assignSD(std::unique_ptr< G4VSensitiveDetector > sd, const std::vector< std::string > &volumes) const
Assign SD to a list of volumes.
virtual StatusCode SetupEvent(HitCollectionMap &) override
Beginning of an athena event.
Gaudi::Property< std::vector< std::string > > m_volumeNames
All the volumes to which this SD is assigned.
StatusCode initializeSD() override
Setup an SD in the current thread.
virtual ~SensitiveDetectorBase()=default
Empty virtual destructor.
Gaudi::Property< bool > m_noVolumes
This SensitiveDetector has no volumes associated with it.
Gaudi::Property< std::vector< std::string > > m_outputCollectionNames
Names of all output collections written out by this SD.
SensitiveDetectorBase(const std::string &type, const std::string &name, const IInterface *parent)
Standard constructor.
static bool matchStrings(const char *first, const char *second)
Match two strings with wildcard support.
void SetSensitiveDetector(G4LogicalVolume *, G4VSensitiveDetector *) const
Method stolen from G4VUserDetectorConstruction in G4 10.2.
virtual StatusCode Gather(HitCollectionMap &) override
End of an athena event.