ATLAS Offline Software
Loading...
Searching...
No Matches
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
14
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
34class Identifier;
35class LArEM_ID;
36class LArHEC_ID;
37class TileID;
38
39namespace 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
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
Scalar eta() const
pseudorapidity method
Scalar phi() const
phi method
Definition of CaloDetDescrManager.
Property holding a SG store/key/clid from which a ReadHandle is made.
AthAlgTool(const std::string &type, const std::string &name, const IInterface *parent)
Constructor with parameters:
Container class for CaloCell.
Data object for each calorimeter readout cell.
Definition CaloCell.h:57
This class provides the client interface for accessing the detector description information common to...
Helper class for LArEM offline identifiers.
Definition LArEM_ID.h:111
Helper class for LArHEC offline identifiers.
Definition LArHEC_ID.h:76
Base class for MuidCaloEnergyMeas AlgTool.
std::atomic_int m_totalCoreCellsEM
std::atomic_int m_totalSelectedTile
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,...
MuidCaloEnergyMeas(const std::string &type, const std::string &name, const IInterface *parent)
SG::ReadCondHandleKey< CaloDetDescrManager > m_caloMgrKey
std::atomic_int m_totalCoreCellsHEC
SubCaloId
Helper enum to select which cells should be read from the container.
double energyInLArEM(const CaloCellContainer *cellContainer, const CaloDetDescrManager *detMgr, const CaloNoise *noiseCDO, double eta, double phi, int, int) const
SG::ReadHandleKey< CaloCellContainer > m_cellContainerLocation
std::atomic_int m_totalCoreCellsTile
void energyInCalo(CaloMeas &caloMeas, const CaloCellContainer *cellContainer, const CaloDetDescrManager *detMgr, const CaloNoise *noiseCDO, double eta, double phi, int iSubCalo) const
std::atomic_int m_totalSelectedEM
StatusCode finalize() override
double energyInTile(const CaloCellContainer *cellContainer, const CaloDetDescrManager *detMgr, const CaloNoise *noiseCDO, double eta, double phi, int, int) const
double energyInLArHEC(const CaloCellContainer *cellContainer, const CaloDetDescrManager *detMgr, const CaloNoise *noiseCDO, double eta, double phi, int, int) const
std::atomic_int m_totalSelectedHEC
ToolHandle< IMuidCaloEnergyParam > m_caloParamTool
StatusCode initialize() override
int cellCounting(const CaloCellContainer *cellContainer, const CaloDetDescrManager *detMgr, const CaloNoise *noiseCDO, double eta, double phi) const
int samplingID(const CaloCell *cell, int iSubCalo) const
void isolationEnergy(CaloMeas &caloMeas, const CaloCellContainer *cellContainer, const CaloDetDescrManager *detMgr, const CaloNoise *noiseCDO, double eta, double phi, int iSubCalo) const
SG::ReadCondHandleKey< CaloNoise > m_noiseCDOKey
Property holding a SG store/key/clid from which a ReadHandle is made.
Helper class for TileCal offline identifiers.
Definition TileID.h:67
Gaudi Tools.