ATLAS Offline Software
Loading...
Searching...
No Matches
SimpleSDTool.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_SIMPLESDTOOL_H
6#define LARG4CODE_SIMPLESDTOOL_H
7
14
15// System includes
16#include <string>
17#include <vector>
18
19// G4Atlas includes
21
23
24// Local includes
25#include "LArG4SimpleSD.h"
26
27// External includes
28#include "CLHEP/Units/SystemOfUnits.h"
29
30// Forward declarations
32class LArEM_ID;
33class LArFCAL_ID;
34class LArHEC_ID;
35class LArG4SimpleSD;
36
37namespace LArG4
38{
39
50 {
51
52 public:
53
55 SimpleSDTool(const std::string& type, const std::string& name,
56 const IInterface* parent);
57
59 StatusCode initialize() override final;
60
62 StatusCode initializeSD() override final;
63
65 StatusCode SetupEvent(HitCollectionMap&) override final;
66
68 StatusCode Gather(HitCollectionMap&) override final;
69
71
73 virtual StatusCode initializeCalculators() { return StatusCode::SUCCESS; }
74
77 makeOneSD(const std::string& name, ILArCalculatorSvc* calc,
78 const std::vector<std::string>& volumes) const;
79
81 bool useFrozenShowers() const { return m_useFrozenShowers; }
82
84 virtual std::string hitCollectionName() const;
85
86 protected:
87
90
92 Gaudi::Property<std::string> m_timeBinType{this, "TimeBinType", "Default"};
94 Gaudi::Property<float> m_timeBinWidth{this, "TimeBinWidth", 2.5*CLHEP::ns};
96 Gaudi::Property<G4bool> m_useFrozenShowers{this, "UseFrozenShowers", false};
97
99
102 const LArEM_ID* m_larEmID{nullptr};
103 const LArFCAL_ID* m_larFcalID{nullptr};
104 const LArHEC_ID* m_larHecID{nullptr};
106
107 }; // class SimpleSDTool
108
109} // namespace LArG4
110
111#endif
#define protected
Small wrapper around hit collection map to facilitate accessing the hit collection.
Helper class for LArEM offline identifiers.
Definition LArEM_ID.h:111
Helper class for LArFCAL offline identifiers.
Definition LArFCAL_ID.h:49
Common sensitive detector class for LAr systems.
const LArHEC_ID * m_larHecID
SimpleSDTool(const std::string &type, const std::string &name, const IInterface *parent)
Constructor.
StatusCode initializeSD() override final
Create and register all SDs for the current thread.
virtual StatusCode initializeCalculators()
Initialize Calculator Services.
LArG4SimpleSD * makeOneSD(const std::string &name, ILArCalculatorSvc *calc, const std::vector< std::string > &volumes) const
Helper method to create one SD.
Gaudi::Property< float > m_timeBinWidth
What time bin width for regular hits?
StatusCode Gather(HitCollectionMap &) override final
Finalize and record event-owned hit collections.
const LArEM_ID * m_larEmID
const LArFCAL_ID * m_larFcalID
Gaudi::Property< std::string > m_timeBinType
What time binning type for regular hits?
bool useFrozenShowers() const
Are we handling frozen shower fast sim?
StatusCode SetupEvent(HitCollectionMap &) override final
Create event-owned hit collections.
Gaudi::Property< G4bool > m_useFrozenShowers
Is there going to be a fast simulation coming into this SD?
StatusCode initialize() override final
Initialize the tool.
virtual std::string hitCollectionName() const
Collection receiving the hits for this tool.
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.