ATLAS Offline Software
CalibrationDefaultCalculator.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 // CalibrationDefaultCalculator
6 // Prepared 04-Mar-2004 William Seligman
7 
8 // The calibration studies rely on every volume in the simulation
9 // being made into a sensitive detector. There is a practical
10 // problem: What if we're still in the middle of developing code, and
11 // not every volume has been made sensitive yet? What if we've
12 // overlooked a volume?
13 
14 // This class provides a "default behavior" for all energy deposits
15 // that are not made in a volume that's been made sensitive for
16 // calibration studies.
17 
18 #ifndef LArG4_CalibrationDefaultCalculator_H
19 #define LArG4_CalibrationDefaultCalculator_H
20 
23 
25 
26 #include "globals.hh"
27 
28 #include <vector>
29 
30 // Forward declaractions:
31 class G4Step;
32 
33 namespace LArG4 {
34 
36  public:
37 
38  CalibrationDefaultCalculator(const std::string& name, ISvcLocator *pSvcLocator);
39  virtual StatusCode initialize() override {return StatusCode::SUCCESS;}
40  virtual StatusCode finalize() override {return StatusCode::SUCCESS;}
42 
43  // The Process method returns a boolean value. If it's true, the
44  // hit can be used by Geant4; if it's false, there's something wrong
45  // with the energy deposit and it should be ignored.
46 
47  // For calibration work, most of the time we want the calculator
48  // to determine both the energy and the identifier. However,
49  // sometimes we want it calculate only the identifier (for escaped
50  // energy), or only the energy (no known application yet, but you
51  // can never tell). Use the enum to control any special
52  // processing.
53 
54  virtual G4bool Process (const G4Step* step, LArG4Identifier & identifier,
55  std::vector<G4double> & energies,
56  const eCalculatorProcessing p = kEnergyAndID) const override final;
57 
58  private:
59 
60 
61  // The usual calibration energy calculator.
63 
64  // hardcoded numbers
65  const double m_oneOverDeta = 10.; // 1/Deta = 1./0.1 = 10.
66  const double m_oneOverDphi = 32./M_PI; // 1/Dphi
67  const int m_phiBinMax = 63;
68  const double m_rhoAlignmentSafety = 50.*CLHEP::mm;
69  const double m_zAlignmentSafety = 100.*CLHEP::mm;
71  const double m_zCalorOut = 6100.*CLHEP::mm - m_zAlignmentSafety;
73  const double m_zInDetOut = 3511.*CLHEP::mm + m_zAlignmentSafety;
74  const double m_startZFCal1 = 4668.5 - m_zAlignmentSafety;
75  const double m_z1BeforeFCal = 4225.5 + m_zAlignmentSafety; //
76  const double m_z2BeforeFCal = 4557.5 + m_zAlignmentSafety; //
77 
78 
79  };
80 
81 } // namespace LArG4
82 
83 #endif // LArG4_CalibrationDefaultCalculator_H
LArG4::CalibrationDefaultCalculator::m_oneOverDeta
const double m_oneOverDeta
Definition: CalibrationDefaultCalculator.h:65
LArG4::CalibrationDefaultCalculator::m_phiBinMax
const int m_phiBinMax
Definition: CalibrationDefaultCalculator.h:67
LArG4::CalibrationDefaultCalculator::m_rhoAlignmentSafety
const double m_rhoAlignmentSafety
Definition: CalibrationDefaultCalculator.h:68
LArG4Identifier
Definition: LArG4Identifier.h:121
LArCalibCalculatorSvcImp
Definition: LArCalibCalculatorSvcImp.h:12
LArG4::CalibrationDefaultCalculator::m_zCalorOut
const double m_zCalorOut
Definition: CalibrationDefaultCalculator.h:71
CaloG4::SimulationEnergies
Definition: SimulationEnergies.h:47
M_PI
#define M_PI
Definition: ActiveFraction.h:11
xAOD::identifier
identifier
Definition: UncalibratedMeasurement_v1.cxx:15
LArG4::CalibrationDefaultCalculator::CalibrationDefaultCalculator
CalibrationDefaultCalculator(const std::string &name, ISvcLocator *pSvcLocator)
LArG4
Definition: LArWheelCalculatorEnums.h:8
LArG4::CalibrationDefaultCalculator::initialize
virtual StatusCode initialize() override
Definition: CalibrationDefaultCalculator.h:39
LArG4::CalibrationDefaultCalculator::m_oneOverDphi
const double m_oneOverDphi
Definition: CalibrationDefaultCalculator.h:66
LArG4::CalibrationDefaultCalculator::Process
virtual G4bool Process(const G4Step *step, LArG4Identifier &identifier, std::vector< G4double > &energies, const eCalculatorProcessing p=kEnergyAndID) const override final
python.utils.AtlRunQueryDQUtils.p
p
Definition: AtlRunQueryDQUtils.py:210
LArCalibCalculatorSvcImp.h
LArG4::CalibrationDefaultCalculator::~CalibrationDefaultCalculator
virtual ~CalibrationDefaultCalculator()
LArG4::CalibrationDefaultCalculator::m_rhoInDetOut
const double m_rhoInDetOut
Definition: CalibrationDefaultCalculator.h:72
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
LArG4::CalibrationDefaultCalculator::m_zInDetOut
const double m_zInDetOut
Definition: CalibrationDefaultCalculator.h:73
LArG4Identifier.h
LArG4::CalibrationDefaultCalculator::m_zAlignmentSafety
const double m_zAlignmentSafety
Definition: CalibrationDefaultCalculator.h:69
LArG4::CalibrationDefaultCalculator::finalize
virtual StatusCode finalize() override
Definition: CalibrationDefaultCalculator.h:40
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:221
LArG4::CalibrationDefaultCalculator::m_energyCalculator
CaloG4::SimulationEnergies m_energyCalculator
Definition: CalibrationDefaultCalculator.h:62
python.SystemOfUnits.mm
int mm
Definition: SystemOfUnits.py:83
LArG4::CalibrationDefaultCalculator::m_rhoCalorOut
const double m_rhoCalorOut
Definition: CalibrationDefaultCalculator.h:70
LArCellBinning.step
step
Definition: LArCellBinning.py:158
LArG4::kEnergyAndID
@ kEnergyAndID
Definition: LArG4EnumDefs.h:10
LArG4::CalibrationDefaultCalculator::m_z1BeforeFCal
const double m_z1BeforeFCal
Definition: CalibrationDefaultCalculator.h:75
SimulationEnergies.h
LArG4::eCalculatorProcessing
eCalculatorProcessing
Definition: LArG4EnumDefs.h:10
LArG4::CalibrationDefaultCalculator::m_startZFCal1
const double m_startZFCal1
Definition: CalibrationDefaultCalculator.h:74
LArG4::CalibrationDefaultCalculator::m_z2BeforeFCal
const double m_z2BeforeFCal
Definition: CalibrationDefaultCalculator.h:76
LArG4::CalibrationDefaultCalculator
Definition: CalibrationDefaultCalculator.h:35