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,
65 LArG4Identifier& identifier,
66 LArG4Identifier& identifier_sr,
67 std::vector<double>& energies,
68 const LArG4::eCalculatorProcessing process) const override final;
69
70 private:
71 // Energy calculator
73
74 // If we can't find the volume in this calculator, try a
75 // "backup" calculator.
76 ServiceHandle<ILArCalibCalculatorSvc> m_backupCalculator{this, "BackupCalculator", "BarrelCryostatCalibrationLArCalculator"};
77 };
78
79 } // namespace BarrelCryostat
80
81} // namespace LArG4
82
83#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, LArG4Identifier &identifier_sr, std::vector< double > &energies, const LArG4::eCalculatorProcessing process) const override final
CalibrationCalculator(const std::string &name, ISvcLocator *pSvcLocator)
const std::string process
eCalculatorProcessing