ATLAS Offline Software
Loading...
Searching...
No Matches
LArG4Barrel/src/CryostatCalibrationCalculator.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::BarrelCryostat::CalibrationCalculator
6// Prepared 24-Feb-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 a "generic" calculator for
17// dead materials. It's assumed that for most dead volumes, the
18// detector_system/subdet/type/sampling/region of the identifier will
19// remain constant (except that subdet will be +/- depending on z).
20// The only portions that will change are the eta and phi identifiers.
21
22#ifndef LArG4_BarrelCryostat_CalibrationCalculator_H
23#define LArG4_BarrelCryostat_CalibrationCalculator_H
24
27
29
30#include "globals.hh"
31
32#include <vector>
33
34// Forward declaractions:
35class G4Step;
36
37// Note the use of nested namespaces (mainly to prevent long names
38// like LArG4HECCalibrationCalculator). This class is contained in
39// the namespace LArG4::BarrelCryostat.
40
41namespace LArG4 {
42
43 namespace BarrelCryostat {
44
46 public:
47
48 CalibrationCalculator(const std::string& name, ISvcLocator *pSvcLocator);
49 StatusCode initialize() override final;
50 virtual ~CalibrationCalculator() = default;
51
52 // The Process method returns a boolean value. If it's true, the
53 // hit can be used by Geant4; if it's false, there's something wrong
54 // with the energy deposit and it should be ignored.
55
56 // For calibration work, most of the time we want the calculator
57 // to determine both the energy and the identifier. However,
58 // sometimes we want it calculate only the identifier (for
59 // escaped energy), or only the energy (no known application
60 // yet, but you can never tell). Use the enum (defined in
61 // VCalibrationCalculator.h) to control any special processing.
62
63
64 virtual G4bool Process (const G4Step* step, LArG4Identifier & identifier,
65 std::vector<G4double> & energies,
66 const eCalculatorProcessing process = kEnergyAndID) const override final;
67
68 private:
69 // Energy calculator
71
72 // If we can't find the volume in this calculator, try a
73 // "backup" calculator.
74 ServiceHandle<ILArCalibCalculatorSvc> m_backupCalculator{this, "BackupCalculator", "BarrelCryostatCalibrationLArCalculator"};
75 };
76
77 } // namespace BarrelCryostat
78
79} // namespace LArG4
80
81#endif // LArG4_BarrelCryostat_CalibrationCalculator_H
This class implements the calculations requires to categorize the energies deposited during the simul...
LArCalibCalculatorSvcImp(const std::string &name, ISvcLocator *pSvcLocator)
virtual G4bool Process(const G4Step *step, LArG4Identifier &identifier, std::vector< G4double > &energies, const eCalculatorProcessing process=kEnergyAndID) const override final
CalibrationCalculator(const std::string &name, ISvcLocator *pSvcLocator)
const std::string process
eCalculatorProcessing
@ kEnergyAndID