ATLAS Offline Software
LArG4SDTool.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2025 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 #ifndef LARG4CODE_LARG4SDTOOL_H
6 #define LARG4CODE_LARG4SDTOOL_H
7 
8 // Base class
10 // Units!
11 #include "CLHEP/Units/SystemOfUnits.h"
12 
13 #include <string>
14 #include <vector>
15 class G4VSensitiveDetector;
16 
17 // For the identifier helpers
18 class LArEM_ID;
19 class LArFCAL_ID;
20 class LArHEC_ID;
21 class CaloDM_ID;
22 class LArG4SimpleSD;
23 class LArG4CalibSD;
24 
35 {
36  public:
38  LArG4SDTool(const std::string& type, const std::string& name, const IInterface *parent);
39 
41  virtual ~LArG4SDTool() = default;
42 
44 
45  virtual StatusCode initializeCalculators(){ return StatusCode::SUCCESS; }
46 
48  void setupHelpers( LArG4SimpleSD* ) const;
50  void setupHelpers( LArG4CalibSD* ) const;
51 
52  protected:
53 
54  G4VSensitiveDetector* makeSD() const override final { return nullptr; }
55 
57  Gaudi::Property<G4bool> m_doPID{this, "ParticleID", false};
59  Gaudi::Property<std::string> m_timeBinType{this, "TimeBinType", "Default"};
61  Gaudi::Property<float> m_timeBinWidth{this, "TimeBinWidth", 2.5*CLHEP::ns};
63  Gaudi::Property<G4bool> m_useFrozenShowers{this, "UseFrozenShowers", false};
64 
68  void setupAllSDs(const std::map<G4VSensitiveDetector*,std::vector<std::string>*>& configuration) const;
69 
71  const LArEM_ID* m_larEmID{nullptr};
72  const LArFCAL_ID* m_larFcalID{nullptr};
73  const LArHEC_ID* m_larHecID{nullptr};
74  const CaloDM_ID* m_caloDmID{nullptr};
75 
77  bool match(const char *first, const char * second) const;
78 
79 };
80 
81 #endif
LArG4SDTool::initialize
StatusCode initialize() override final
LArG4SDTool::m_doPID
Gaudi::Property< G4bool > m_doPID
Are we set up to run with PID hits?
Definition: LArG4SDTool.h:57
LArG4SDTool::m_larFcalID
const LArFCAL_ID * m_larFcalID
Definition: LArG4SDTool.h:72
LArG4SDTool::m_caloDmID
const CaloDM_ID * m_caloDmID
Definition: LArG4SDTool.h:74
python.SystemOfUnits.second
float second
Definition: SystemOfUnits.py:135
LArG4SimpleSD
Common sensitive detector class for LAr systems.
Definition: LArG4SimpleSD.h:36
LArHEC_ID
Helper class for LArHEC offline identifiers.
Definition: LArHEC_ID.h:85
SensitiveDetectorBase
Common base class for tools that create and manage Geant4 sensitive detectors.
Definition: SensitiveDetectorBase.h:50
LArG4SDTool
A base class for tools that manage LAr SDs.
Definition: LArG4SDTool.h:35
LArG4SDTool::m_useFrozenShowers
Gaudi::Property< G4bool > m_useFrozenShowers
Is there going to be a fast simulation coming into this SD?
Definition: LArG4SDTool.h:63
const
bool const RAWDATA *ch2 const
Definition: LArRodBlockPhysicsV0.cxx:560
LArG4SDTool::setupHelpers
void setupHelpers(LArG4SimpleSD *) const
Helper method to pass the ID helper pointers to the SDs.
python.CaloAddPedShiftConfig.type
type
Definition: CaloAddPedShiftConfig.py:42
LArG4SDTool::~LArG4SDTool
virtual ~LArG4SDTool()=default
Destructor.
LArG4SDTool::makeSD
G4VSensitiveDetector * makeSD() const override final
Definition: LArG4SDTool.h:54
LArG4SDTool::setupHelpers
void setupHelpers(LArG4CalibSD *) const
Overload of the above method for calib SDs.
LArG4SDTool::m_larEmID
const LArEM_ID * m_larEmID
Pointers to the identifier helpers.
Definition: LArG4SDTool.h:71
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
LArG4SDTool::m_timeBinWidth
Gaudi::Property< float > m_timeBinWidth
What time bin width for regular hits?
Definition: LArG4SDTool.h:61
LArG4CalibSD
A specialized SD class for saving LAr calibration hits.
Definition: LArG4CalibSD.h:38
test_pyathena.parent
parent
Definition: test_pyathena.py:15
columnar::final
CM final
Definition: ColumnAccessor.h:106
LArG4SDTool::initializeCalculators
virtual StatusCode initializeCalculators()
Definition: LArG4SDTool.h:45
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:240
LArG4SDTool::match
bool match(const char *first, const char *second) const
Helper function for matching strings with wildcards.
SensitiveDetectorBase.h
LArG4SDTool::setupAllSDs
void setupAllSDs(const std::map< G4VSensitiveDetector *, std::vector< std::string > * > &configuration) const
Method actually doing the work to assign all of these SDs FIXME: this argument type is nasty:
CaloDM_ID
Helper class for Calo Dead Material offline identifiers.
Definition: CaloDM_ID.h:102
DeMoScan.first
bool first
Definition: DeMoScan.py:534
LArG4SDTool::m_timeBinType
Gaudi::Property< std::string > m_timeBinType
What time binning type for regular hits?
Definition: LArG4SDTool.h:59
LArEM_ID
Helper class for LArEM offline identifiers.
Definition: LArEM_ID.h:118
LArFCAL_ID
Helper class for LArFCAL offline identifiers.
Definition: LArFCAL_ID.h:60
LArG4SDTool::m_larHecID
const LArHEC_ID * m_larHecID
Definition: LArG4SDTool.h:73
LArG4SDTool::LArG4SDTool
LArG4SDTool(const std::string &type, const std::string &name, const IInterface *parent)
Constructor.
python.SystemOfUnits.ns
float ns
Definition: SystemOfUnits.py:146