ATLAS Offline Software
MuidCaloEnergyMeas.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
3 */
4 
6 
13 
15 #ifndef MUIDCALOENERGYTOOLS_MUIDCALOENERGYMEAS_H
16 #define MUIDCALOENERGYTOOLS_MUIDCALOENERGYMEAS_H
17 
18 //<<<<<< INCLUDES >>>>>>
19 
20 #include <atomic>
21 
25 #include "GaudiKernel/ToolHandle.h"
30 
31 //<<<<<< CLASS DECLARATIONS >>>>>>
32 
33 class CaloCellContainer;
34 class Identifier;
35 class LArEM_ID;
36 class LArHEC_ID;
37 class TileID;
38 
39 namespace Rec {
40 
41  class caloMeas;
42  class IMuidCaloEnergyParam;
43 
44  class MuidCaloEnergyMeas : public AthAlgTool, virtual public IMuidCaloEnergyMeas {
45  public:
46  MuidCaloEnergyMeas(const std::string& type, const std::string& name, const IInterface* parent);
47  virtual ~MuidCaloEnergyMeas(); // destructor
48 
49  StatusCode initialize() override;
50  StatusCode finalize() override;
51 
55  std::unique_ptr<CaloMeas> energyMeasurement(const EventContext& ctx, double etaEM, double phiEM, double etaHad,
56  double phiHad) const override;
57 
58  private:
61  enum SubCaloId {
62  TILE = 0,
63  LARHEC = 1,
64  LAREM = 2,
65  };
66  // private methods
67  void energyInCalo(CaloMeas& caloMeas, const CaloCellContainer* cellContainer, const CaloDetDescrManager* detMgr,
68  const CaloNoise* noiseCDO, double eta, double phi, int iSubCalo) const;
69 
70  void isolationEnergy(CaloMeas& caloMeas, const CaloCellContainer* cellContainer, const CaloDetDescrManager* detMgr,
71  const CaloNoise* noiseCDO, double eta, double phi, int iSubCalo) const;
72 
73  double energyInTile(const CaloCellContainer* cellContainer, const CaloDetDescrManager* detMgr, const CaloNoise* noiseCDO,
74  double eta, double phi, int, int) const;
75 
76  double energyInLArHEC(const CaloCellContainer* cellContainer, const CaloDetDescrManager* detMgr, const CaloNoise* noiseCDO,
77  double eta, double phi, int, int) const;
78 
79  double energyInLArEM(const CaloCellContainer* cellContainer, const CaloDetDescrManager* detMgr, const CaloNoise* noiseCDO,
80  double eta, double phi, int, int) const;
81 
82  int cellCounting(const CaloCellContainer* cellContainer, const CaloDetDescrManager* detMgr, const CaloNoise* noiseCDO,
83  double eta, double phi) const;
84 
85  //
86  int samplingID(const CaloCell* cell, int iSubCalo) const;
87 
88  // helpers, managers, tools
90  this,
91  "CaloNoiseKey",
92  "totalNoise",
93  "SG Key of CaloNoise data object",
94  };
95  ToolHandle<IMuidCaloEnergyParam> m_caloParamTool{
96  this,
97  "CaloParamTool",
98  "",
99  };
100 
101  const TileID* m_tileID;
102  const LArEM_ID* m_emID;
105  this,
106  "CellContainerLocation",
107  "AllCalo",
108  "calo cell container location",
109  };
110 
111  SG::ReadCondHandleKey<CaloDetDescrManager> m_caloMgrKey{this,"CaloDetDescrManager", "CaloDetDescrManager"};
112 
119 
120  double m_sigmasAboveNoise; // The minimum sigmas above the noise tool rms
121  double m_sigmasAboveNoiseCore; // The minimum sigmas above the noise tool rms
122 
123  mutable std::atomic_int m_totalCoreCellsEM{0};
124  mutable std::atomic_int m_totalCoreCellsHEC{0};
125  mutable std::atomic_int m_totalCoreCellsTile{0};
126  mutable std::atomic_int m_totalSelectedEM{0};
127  mutable std::atomic_int m_totalSelectedHEC{0};
128  mutable std::atomic_int m_totalSelectedTile{0};
129  };
130 
131 } // namespace Rec
132 
133 #endif // MUIDCALOENERGYTOOLS_MUIDCALOENERGYMEAS_H
ReadHandleKey.h
Property holding a SG store/key/clid from which a ReadHandle is made.
Rec::MuidCaloEnergyMeas::m_measurementConeLArHEC
double m_measurementConeLArHEC
Definition: MuidCaloEnergyMeas.h:114
Rec::MuidCaloEnergyMeas::m_isolationConeLArEM
double m_isolationConeLArEM
Definition: MuidCaloEnergyMeas.h:118
Rec::MuidCaloEnergyMeas::m_totalSelectedTile
std::atomic_int m_totalSelectedTile
Definition: MuidCaloEnergyMeas.h:128
Rec::MuidCaloEnergyMeas::m_isolationConeTile
double m_isolationConeTile
Definition: MuidCaloEnergyMeas.h:116
Rec::MuidCaloEnergyMeas::SubCaloId
SubCaloId
Helper enum to select which cells should be read from the container.
Definition: MuidCaloEnergyMeas.h:61
ReadCellNoiseFromCool.cell
cell
Definition: ReadCellNoiseFromCool.py:53
Rec::MuidCaloEnergyMeas::m_totalCoreCellsEM
std::atomic_int m_totalCoreCellsEM
Definition: MuidCaloEnergyMeas.h:123
phi
Scalar phi() const
phi method
Definition: AmgMatrixBasePlugin.h:64
Rec::MuidCaloEnergyMeas::initialize
StatusCode initialize() override
Definition: MuidCaloEnergyMeas.cxx:58
Rec::MuidCaloEnergyMeas::energyInLArHEC
double energyInLArHEC(const CaloCellContainer *cellContainer, const CaloDetDescrManager *detMgr, const CaloNoise *noiseCDO, double eta, double phi, int, int) const
Definition: MuidCaloEnergyMeas.cxx:477
eta
Scalar eta() const
pseudorapidity method
Definition: AmgMatrixBasePlugin.h:79
Rec::MuidCaloEnergyMeas::m_isolationConeLArHEC
double m_isolationConeLArHEC
Definition: MuidCaloEnergyMeas.h:117
LArHEC_ID
Helper class for LArHEC offline identifiers.
Definition: LArHEC_ID.h:85
Rec::MuidCaloEnergyMeas::m_measurementConeTile
double m_measurementConeTile
Definition: MuidCaloEnergyMeas.h:113
SG::ReadHandleKey< CaloCellContainer >
Rec::MuidCaloEnergyMeas::MuidCaloEnergyMeas
MuidCaloEnergyMeas(const std::string &type, const std::string &name, const IInterface *parent)
Definition: MuidCaloEnergyMeas.cxx:35
Rec::MuidCaloEnergyMeas::m_hecID
const LArHEC_ID * m_hecID
Definition: MuidCaloEnergyMeas.h:103
Rec::MuidCaloEnergyMeas::energyMeasurement
std::unique_ptr< CaloMeas > energyMeasurement(const EventContext &ctx, double etaEM, double phiEM, double etaHad, double phiHad) const override
IMuidCaloEnergyMeas interface: get the muon energy loss measurement from the calorimeter,...
Definition: MuidCaloEnergyMeas.cxx:87
CaloDetDescrManager.h
Definition of CaloDetDescrManager.
Rec::MuidCaloEnergyMeas::m_noiseCDOKey
SG::ReadCondHandleKey< CaloNoise > m_noiseCDOKey
Definition: MuidCaloEnergyMeas.h:89
Rec::MuidCaloEnergyMeas::cellCounting
int cellCounting(const CaloCellContainer *cellContainer, const CaloDetDescrManager *detMgr, const CaloNoise *noiseCDO, double eta, double phi) const
Definition: MuidCaloEnergyMeas.cxx:140
Rec::MuidCaloEnergyMeas
Definition: MuidCaloEnergyMeas.h:44
Rec::MuidCaloEnergyMeas::TILE
@ TILE
Definition: MuidCaloEnergyMeas.h:62
Rec::MuidCaloEnergyMeas::~MuidCaloEnergyMeas
virtual ~MuidCaloEnergyMeas()
Rec::CaloMeas
Definition: CaloMeas.h:19
Rec::MuidCaloEnergyMeas::m_sigmasAboveNoise
double m_sigmasAboveNoise
Definition: MuidCaloEnergyMeas.h:120
Rec
Name: MuonSpContainer.h Package : offline/Reconstruction/MuonIdentification/muonEvent.
Definition: FakeTrackBuilder.h:10
TileID
Helper class for TileCal offline identifiers.
Definition: TileID.h:68
Identifier
Definition: DetectorDescription/Identifier/Identifier/Identifier.h:32
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
Rec::MuidCaloEnergyMeas::samplingID
int samplingID(const CaloCell *cell, int iSubCalo) const
Definition: MuidCaloEnergyMeas.cxx:162
AthAlgTool.h
Rec::MuidCaloEnergyMeas::m_measurementConeLArEM
double m_measurementConeLArEM
Definition: MuidCaloEnergyMeas.h:115
Rec::MuidCaloEnergyMeas::m_tileID
const TileID * m_tileID
Definition: MuidCaloEnergyMeas.h:101
test_pyathena.parent
parent
Definition: test_pyathena.py:15
Rec::MuidCaloEnergyMeas::m_caloMgrKey
SG::ReadCondHandleKey< CaloDetDescrManager > m_caloMgrKey
Definition: MuidCaloEnergyMeas.h:111
Rec::MuidCaloEnergyMeas::m_sigmasAboveNoiseCore
double m_sigmasAboveNoiseCore
Definition: MuidCaloEnergyMeas.h:121
Rec::MuidCaloEnergyMeas::energyInTile
double energyInTile(const CaloCellContainer *cellContainer, const CaloDetDescrManager *detMgr, const CaloNoise *noiseCDO, double eta, double phi, int, int) const
Definition: MuidCaloEnergyMeas.cxx:429
Rec::MuidCaloEnergyMeas::m_totalCoreCellsHEC
std::atomic_int m_totalCoreCellsHEC
Definition: MuidCaloEnergyMeas.h:124
ReadCondHandleKey.h
CaloNoise
Definition: CaloNoise.h:16
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:192
Rec::MuidCaloEnergyMeas::energyInLArEM
double energyInLArEM(const CaloCellContainer *cellContainer, const CaloDetDescrManager *detMgr, const CaloNoise *noiseCDO, double eta, double phi, int, int) const
Definition: MuidCaloEnergyMeas.cxx:527
CaloNoise.h
Rec::MuidCaloEnergyMeas::energyInCalo
void energyInCalo(CaloMeas &caloMeas, const CaloCellContainer *cellContainer, const CaloDetDescrManager *detMgr, const CaloNoise *noiseCDO, double eta, double phi, int iSubCalo) const
Definition: MuidCaloEnergyMeas.cxx:174
Rec::IMuidCaloEnergyMeas
Definition: IMuidCaloEnergyMeas.h:30
Rec::MuidCaloEnergyMeas::finalize
StatusCode finalize() override
Definition: MuidCaloEnergyMeas.cxx:80
CaloCellContainer.h
CaloCellContainer
Container class for CaloCell.
Definition: CaloCellContainer.h:55
Rec::MuidCaloEnergyMeas::m_caloParamTool
ToolHandle< IMuidCaloEnergyParam > m_caloParamTool
Definition: MuidCaloEnergyMeas.h:95
SG::ReadCondHandleKey< CaloNoise >
CaloDetDescrManager
This class provides the client interface for accessing the detector description information common to...
Definition: CaloDetDescrManager.h:473
CaloCell
Data object for each calorimeter readout cell.
Definition: CaloCell.h:57
python.CaloScaleNoiseConfig.type
type
Definition: CaloScaleNoiseConfig.py:78
Rec::MuidCaloEnergyMeas::m_totalSelectedEM
std::atomic_int m_totalSelectedEM
Definition: MuidCaloEnergyMeas.h:126
Rec::MuidCaloEnergyMeas::m_emID
const LArEM_ID * m_emID
Definition: MuidCaloEnergyMeas.h:102
Rec::MuidCaloEnergyMeas::LARHEC
@ LARHEC
Definition: MuidCaloEnergyMeas.h:63
LArEM_ID
Helper class for LArEM offline identifiers.
Definition: LArEM_ID.h:118
Rec::MuidCaloEnergyMeas::m_totalCoreCellsTile
std::atomic_int m_totalCoreCellsTile
Definition: MuidCaloEnergyMeas.h:125
Rec::MuidCaloEnergyMeas::m_cellContainerLocation
SG::ReadHandleKey< CaloCellContainer > m_cellContainerLocation
Definition: MuidCaloEnergyMeas.h:104
Rec::MuidCaloEnergyMeas::m_totalSelectedHEC
std::atomic_int m_totalSelectedHEC
Definition: MuidCaloEnergyMeas.h:127
AthAlgTool
Definition: AthAlgTool.h:26
Rec::MuidCaloEnergyMeas::isolationEnergy
void isolationEnergy(CaloMeas &caloMeas, const CaloCellContainer *cellContainer, const CaloDetDescrManager *detMgr, const CaloNoise *noiseCDO, double eta, double phi, int iSubCalo) const
Definition: MuidCaloEnergyMeas.cxx:354
IMuidCaloEnergyMeas.h
Rec::MuidCaloEnergyMeas::LAREM
@ LAREM
Definition: MuidCaloEnergyMeas.h:64