ATLAS Offline Software
CaloEstimatedGainTool.h
Go to the documentation of this file.
1 // This file's extension implies that it's C, but it's really -*- C++ -*-.
2 /*
3  Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
4  */
13 #ifndef CALOTOOLS_CALOESTIMATEDGAINTOOL_H
14 #define CALOTOOLS_CALOESTIMATEDGAINTOOL_H
15 
16 
25 #include "GaudiKernel/ToolHandle.h"
26 
27 
28 class LArEM_ID;
29 class TileInfo;
30 
31 
33  : public extends<AthAlgTool, ICaloEstimatedGainTool>
34 {
35 public:
36  using base_class::base_class;
37 
38 
40 
41 
42  virtual StatusCode initialize() override;
43 
44 
45  virtual CaloGain::CaloGain estimatedGain (const EventContext& ctx,
46  const CaloCell& caloCell,
47  const Step step) const override;
48 
49  virtual CaloGain::CaloGain estimatedGain (const EventContext& ctx,
50  const CaloCell& caloCell,
51  const CaloDetDescrElement& caloDDE,
52  const Step step) const override;
53 
54  virtual CaloGain::CaloGain estimatedGain (const EventContext& ctx,
55  const CaloDetDescrElement& caloDDE,
56  const float energy,
57  const Step step) const override;
58 
59 
60 private:
61  CaloGain::CaloGain estimatedLArGain (const EventContext& ctx,
62  const CaloCell_ID::SUBCALO iCalo,
63  const CaloDetDescrElement& caloDDE,
64  const float energy,
65  const Step step) const;
66 
67 
68  CaloGain::CaloGain estimatedTileGain (const EventContext& ctx,
69  const CaloCell& caloCell,
70  const CaloDetDescrElement& caloDDE,
71  const Step /*step*/) const;
72 
73 
74  float adc2mev (const EventContext& ctx,
75  const CaloDetDescrElement& caloDDE,
76  const CaloGain::CaloGain gain) const;
77 
79  { this, "ADC2MeVKey", "LArADC2MeV", "SG Key of the LArADC2MeV CDO" };
80 
81 
82  static const int m_nCalos=4;// number of calorimeters
83 
84  float m_LowGainThresh[m_nCalos] = {0};
85  float m_HighGainThresh[m_nCalos] = {0};
86 
87  const LArEM_ID* m_lar_em_id = nullptr;
89 
90  ToolHandle<TileCondIdTransforms> m_tileIdTransforms
91  { this, "TileCondIdTransforms", "TileCondIdTransforms",
92  "Tile tool to translate hardware identifiers to the drawerIdx, channel, and adc" };
93 
94  ToolHandle<TileCondToolEmscale> m_tileToolEmscale
95  { this, "TileCondToolEmscale", "TileCondToolEmscale",
96  "Tile EM scale calibration tool" };
97 
98  ToolHandle<TileCondToolNoiseSample> m_tileToolNoiseSample
99  { this, "TileCondToolNoiseSample", "TileCondToolNoiseSample",
100  "Tile sample noise tool" };
101 };
102 
103 
104 #endif // not CALOTOOLS_CALOESTIMATEDGAINTOOL_H
CaloEstimatedGainTool::estimatedGain
virtual CaloGain::CaloGain estimatedGain(const EventContext &ctx, const CaloCell &caloCell, const Step step) const override
Definition: CaloEstimatedGainTool.cxx:49
CaloEstimatedGainTool::m_nCalos
static const int m_nCalos
Definition: CaloEstimatedGainTool.h:82
CaloEstimatedGainTool::m_adc2mevKey
SG::ReadCondHandleKey< LArADC2MeV > m_adc2mevKey
Definition: CaloEstimatedGainTool.h:79
CaloDetDescrElement
This class groups all DetDescr information related to a CaloCell. Provides a generic interface for al...
Definition: Calorimeter/CaloDetDescr/CaloDetDescr/CaloDetDescrElement.h:66
CaloCondBlobAlgs_fillNoiseFromASCII.gain
gain
Definition: CaloCondBlobAlgs_fillNoiseFromASCII.py:110
CaloEstimatedGainTool::m_HighGainThresh
float m_HighGainThresh[m_nCalos]
Definition: CaloEstimatedGainTool.h:85
CaloEstimatedGainTool::m_tileIdTransforms
ToolHandle< TileCondIdTransforms > m_tileIdTransforms
Definition: CaloEstimatedGainTool.h:91
TileInfo
Definition: TileInfo.h:49
CaloCell_ID.h
CaloEstimatedGainTool::m_tileToolEmscale
ToolHandle< TileCondToolEmscale > m_tileToolEmscale
Definition: CaloEstimatedGainTool.h:95
LArADC2MeV.h
CaloEstimatedGainTool::m_tileInfo
const TileInfo * m_tileInfo
Definition: CaloEstimatedGainTool.h:88
CaloEstimatedGainTool
Definition: CaloEstimatedGainTool.h:34
CaloEstimatedGainTool::adc2mev
float adc2mev(const EventContext &ctx, const CaloDetDescrElement &caloDDE, const CaloGain::CaloGain gain) const
Definition: CaloEstimatedGainTool.cxx:240
TileCondToolNoiseSample.h
ParticleGun_FastCalo_ChargeFlip_Config.energy
energy
Definition: ParticleGun_FastCalo_ChargeFlip_Config.py:78
ICaloEstimatedGainTool::Step
Step
Definition: ICaloEstimatedGainTool.h:36
TileCondToolEmscale.h
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
CaloEstimatedGainTool::m_tileToolNoiseSample
ToolHandle< TileCondToolNoiseSample > m_tileToolNoiseSample
Definition: CaloEstimatedGainTool.h:99
CaloCell_Base_ID::SUBCALO
SUBCALO
enumeration of sub calorimeters
Definition: CaloCell_Base_ID.h:46
AthAlgTool.h
CaloEstimatedGainTool::initialize
virtual StatusCode initialize() override
Definition: CaloEstimatedGainTool.cxx:21
ReadCondHandleKey.h
CaloEstimatedGainTool::m_lar_em_id
const LArEM_ID * m_lar_em_id
Definition: CaloEstimatedGainTool.h:87
TileCondIdTransforms.h
CaloEstimatedGainTool::estimatedTileGain
CaloGain::CaloGain estimatedTileGain(const EventContext &ctx, const CaloCell &caloCell, const CaloDetDescrElement &caloDDE, const Step) const
Definition: CaloEstimatedGainTool.cxx:169
CaloGain::CaloGain
CaloGain
Definition: CaloGain.h:11
SG::ReadCondHandleKey< LArADC2MeV >
CaloCell
Data object for each calorimeter readout cell.
Definition: CaloCell.h:57
CaloEstimatedGainTool::m_LowGainThresh
float m_LowGainThresh[m_nCalos]
Definition: CaloEstimatedGainTool.h:84
CaloEstimatedGainTool::Step
ICaloEstimatedGainTool::Step Step
Definition: CaloEstimatedGainTool.h:39
LArCellBinning.step
step
Definition: LArCellBinning.py:158
CaloEstimatedGainTool::estimatedLArGain
CaloGain::CaloGain estimatedLArGain(const EventContext &ctx, const CaloCell_ID::SUBCALO iCalo, const CaloDetDescrElement &caloDDE, const float energy, const Step step) const
Definition: CaloEstimatedGainTool.cxx:115
LArEM_ID
Helper class for LArEM offline identifiers.
Definition: LArEM_ID.h:118
ICaloEstimatedGainTool.h