ATLAS Offline Software
Loading...
Searching...
No Matches
LArG4EC/src/CryostatCalibrationLArCalculator.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// LArG4::EndcapCryostat::CalibrationLArCalculator
6// Prepared 19-Aug-2004 Bill Seligman
7
8// This class calculates the values needed for calibration hits in the
9// simulation.
10
11// A "calculator" is used in much the same way as a hand-held
12// calculator might be. The user supplies a value and hits 'Enter'
13// (i.e., invokes the Process() method). Then they read off whatever
14// values are of interest.
15
16// This particular class is meant to be be used for general LAr
17// regions within the endcap cryostat. The liquid-argon volumes
18// typically "fill in the cracks" between all other volumes; this
19// calculator determines the identifiers for such "cracks".
20
21#ifndef LArG4_EndcapCryostat_CalibrationLArCalculator_H
22#define LArG4_EndcapCryostat_CalibrationLArCalculator_H
23
28
29#include "globals.hh"
30
31#include <vector>
32
33// Forward declaractions:
34class G4Step;
35
36// Note the use of nested namespaces (mainly to prevent long names
37// like LArG4HECCalibrationCalculator). This class is contained in
38// the namespace LArG4::EndcapCryostat.
39
40namespace LArG4 {
41
42 namespace EndcapCryostat {
43
45 public:
46
47 CalibrationLArCalculator(const std::string& name, ISvcLocator *pSvcLocator);
48 StatusCode initialize() override final;
49 virtual ~CalibrationLArCalculator() = default;
50
51 // The Process method returns a boolean value. If it's true, the
52 // hit can be used by Geant4; if it's false, there's something wrong
53 // with the energy deposit and it should be ignored.
54
55 // For calibration work, most of the time we want the calculator
56 // to determine both the energy and the identifier. However,
57 // sometimes we want it calculate only the identifier (for
58 // escaped energy), or only the energy (no known application
59 // yet, but you can never tell). Use the enum (defined in
60 // VCalibrationCalculator.h) to control any special processing.
61
62 virtual G4bool Process (const G4Step* step, LArG4Identifier & identifier,
63 std::vector<G4double> & energies,
65
66 private:
67
68 // Energy calculator
69 CaloG4::SimulationEnergies m_energyCalculator{};
70
71 // Access to parameters.
73
74 // For the default calculator (hopefully temporary).
75 ServiceHandle<ILArCalibCalculatorSvc> m_defaultCalculator{this, "CalibrationDefaultCalculator", "CalibrationDefaultCalculator"};
76
77 double m_rhoOutOfEmecHec{0.}; // used as const after init
78 double m_zInFrontOfPresampler{0.}; // used as const after init
79 double m_zEMECRefPoint{0.}; // used as const after init
80 double m_zInFrontOfSpanishFan{0.}; // used as const after init
81 double m_zInFrontOfHEC{0.}; // used as const after init
82 double m_zBehindTile{0.}; // used as const after init
83 double m_endZHEC1Wheel{0.}; // used as const after init
84 double m_startZHEC2Wheel{0.}; // used as const after init
85 inline double rhoOutOfEmecHec() const { return m_rhoOutOfEmecHec; };
86 inline double zInFrontOfPresampler() const { return m_zInFrontOfPresampler; };
87 inline double zEMECRefPoint() const { return m_zEMECRefPoint; };
88 inline double zInFrontOfSpanishFan() const { return m_zInFrontOfSpanishFan; };
89 inline double zInFrontOfHEC() const { return m_zInFrontOfHEC; };
90 inline double zBehindTile() const { return m_zBehindTile; };
91 inline double endZHEC1Wheel() const { return m_endZHEC1Wheel; };
92 inline double startZHEC2Wheel() const { return m_startZHEC2Wheel; };
93 };
94
95 } // namespace EndcapCryostat
96
97} // namespace LArG4
98
99#endif // LArG4_EndcapCryostat_CalibrationLArCalculator_H
LArGeo::VDetectorParameters LArVG4DetectorParameters
LArCalibCalculatorSvcImp(const std::string &name, ISvcLocator *pSvcLocator)
CalibrationLArCalculator(const std::string &name, ISvcLocator *pSvcLocator)
virtual G4bool Process(const G4Step *step, LArG4Identifier &identifier, std::vector< G4double > &energies, const eCalculatorProcessing p=kEnergyAndID) const override final
eCalculatorProcessing
@ kEnergyAndID
STL namespace.
#define private