ATLAS Offline Software
Loading...
Searching...
No Matches
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>
15class G4VSensitiveDetector;
16
17// For the identifier helpers
18class LArEM_ID;
19class LArFCAL_ID;
20class LArHEC_ID;
21class CaloDM_ID;
22class LArG4SimpleSD;
23class LArG4CalibSD;
24
35{
36 public:
38 LArG4SDTool(const std::string& type, const std::string& name, const IInterface *parent);
39
41 virtual ~LArG4SDTool() = default;
42
43 StatusCode initialize() override final;
44
45 virtual StatusCode initializeCalculators(){ return StatusCode::SUCCESS; }
46
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
Helper class for Calo Dead Material offline identifiers.
Definition CaloDM_ID.h:102
Helper class for LArEM offline identifiers.
Definition LArEM_ID.h:111
Helper class for LArFCAL offline identifiers.
Definition LArFCAL_ID.h:49
A specialized SD class for saving LAr calibration hits.
Gaudi::Property< G4bool > m_useFrozenShowers
Is there going to be a fast simulation coming into this SD?
Definition LArG4SDTool.h:63
Gaudi::Property< float > m_timeBinWidth
What time bin width for regular hits?
Definition LArG4SDTool.h:61
G4VSensitiveDetector * makeSD() const override final
Definition LArG4SDTool.h:54
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:
Gaudi::Property< std::string > m_timeBinType
What time binning type for regular hits?
Definition LArG4SDTool.h:59
void setupHelpers(LArG4SimpleSD *) const
Helper method to pass the ID helper pointers to the SDs.
Gaudi::Property< G4bool > m_doPID
Are we set up to run with PID hits?
Definition LArG4SDTool.h:57
bool match(const char *first, const char *second) const
Helper function for matching strings with wildcards.
virtual ~LArG4SDTool()=default
Destructor.
const LArEM_ID * m_larEmID
Pointers to the identifier helpers.
Definition LArG4SDTool.h:71
virtual StatusCode initializeCalculators()
Definition LArG4SDTool.h:45
StatusCode initialize() override final
void setupHelpers(LArG4CalibSD *) const
Overload of the above method for calib SDs.
LArG4SDTool(const std::string &type, const std::string &name, const IInterface *parent)
Constructor.
const LArFCAL_ID * m_larFcalID
Definition LArG4SDTool.h:72
const CaloDM_ID * m_caloDmID
Definition LArG4SDTool.h:74
const LArHEC_ID * m_larHecID
Definition LArG4SDTool.h:73
Common sensitive detector class for LAr systems.
Helper class for LArHEC offline identifiers.
Definition LArHEC_ID.h:76
SensitiveDetectorBase(const std::string &type, const std::string &name, const IInterface *parent)
Standard constructor.