ATLAS Offline Software
CaloLCDeadMaterialTool.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 #ifndef CALOUTILS_CALOLCDEADMATERIALTOOL_H
6 #define CALOUTILS_CALOLCDEADMATERIALTOOL_H
7 
26 #include "GaudiKernel/ToolHandle.h"
27 #include "CaloGeoHelpers/CaloSampling.h"
29 #include "GaudiKernel/EventContext.h"
30 
31 #include <map>
32 #include <vector>
33 #include <string>
34 
35 
36 class CaloCell_ID;
37 
38 
40 {
41  public:
48  {
49  sDM_EMB0_EMB1, // 0 before PreSamplerB, between PreSamplerB and EMB1
50  sDM_EMB3_TILE0, // 1 between barrel and tile
51  sDM_SCN, // 2 before TileGap3 (scintillator)
52  sDM_EME0_EME12, // 3 before PreSamplerE, between PreSamplerE and EME1
53  sDM_EME3_HEC0, // 4 between EME3 and HEC0
54  sDM_FCAL, // 5 between HEC and FCAL, before FCAL
55  sDM_LEAKAGE, // 6 leakage behind calorimeter
56  sDM_UNCLASS, // 7 unclassified DM enegry
57  sDM
58  };
59 
60  virtual ~CaloLCDeadMaterialTool() override;
61 
62  virtual StatusCode weight(xAOD::CaloCluster* theCluster, const EventContext& ctx) const override;
63  virtual StatusCode initialize() override;
64 
65  CaloLCDeadMaterialTool(const std::string& type,
66  const std::string& name,
67  const IInterface* parent);
68 
69  private:
70  // Hold information about one cell.
71  struct Cell
72  {
73  int dm;
74  float energy;
75  float weight;
76  };
77 
78  // Hold information about one dead material area.
79  struct Area
80  {
81  Area() : eprep(0), erec(0), sub_ener_old(0), corr(0), edm_wrong(0) {}
82  float eprep;
83  float erec;
84  float sub_ener_old;
85  float corr;
86  float edm_wrong;
87  };
88 
90  std::vector<Area>& areas,
91  std::vector<Cell>& cells,
92  float* smp_energy,
93  float& cls_unweighted_energy, const CaloLocalHadCoeff* data) const;
94 
98 
102 
110 
114 
118 
122 
126 
135 
139 
143 
146  std::map<std::string, std::vector<std::string > > m_interpolateDimensionNames;
147 
150  std::vector<int > m_interpolateDimensionsFit;
153  std::vector<int > m_interpolateDimensionsLookup;
157 
160  bool m_absOpt;
161 };
162 
163 
164 #endif
RunTileCalibRec.cells
cells
Definition: RunTileCalibRec.py:271
data
char data[hepevt_bytes_allocation_ATLAS]
Definition: HepEvt.cxx:11
CaloLCDeadMaterialTool::m_useHadProbability
bool m_useHadProbability
calculate DM energy using em-probability moment
Definition: CaloLCDeadMaterialTool.h:134
CaloLCDeadMaterialTool::sDM
@ sDM
Definition: CaloLCDeadMaterialTool.h:57
CaloLCDeadMaterialTool::m_MinCellEnergyToDeal
float m_MinCellEnergyToDeal
minimum cell energy to deal
Definition: CaloLCDeadMaterialTool.h:121
CaloLCDeadMaterialTool::weight
virtual StatusCode weight(xAOD::CaloCluster *theCluster, const EventContext &ctx) const override
method to weight the cells in a cluster
Definition: CaloLCDeadMaterialTool.cxx:138
CaloLCDeadMaterialTool::m_updateSamplingVars
bool m_updateSamplingVars
update also sampling variables
Definition: CaloLCDeadMaterialTool.h:142
CaloLCDeadMaterialTool::sDM_EMB3_TILE0
@ sDM_EMB3_TILE0
Definition: CaloLCDeadMaterialTool.h:50
CaloLCDeadMaterialTool::Cell::dm
int dm
Definition: CaloLCDeadMaterialTool.h:73
CaloLCDeadMaterialTool::m_MaxChangeInCellWeight
float m_MaxChangeInCellWeight
maximum allowed change in cell weights
Definition: CaloLCDeadMaterialTool.h:125
CaloLCDeadMaterialTool::sDM_EMB0_EMB1
@ sDM_EMB0_EMB1
Definition: CaloLCDeadMaterialTool.h:49
CaloLCDeadMaterialTool::Cell::energy
float energy
Definition: CaloLCDeadMaterialTool.h:74
CaloLCDeadMaterialTool::m_absOpt
bool m_absOpt
In Abs Option case, DM calculation has to be handled in a slightly different way.
Definition: CaloLCDeadMaterialTool.h:160
CaloLCDeadMaterialTool::m_recoStatus
int m_recoStatus
Required Reco Status for the clusters in order to be calibrated.
Definition: CaloLCDeadMaterialTool.h:101
CaloLCDeadMaterialTool::sDM_EME3_HEC0
@ sDM_EME3_HEC0
Definition: CaloLCDeadMaterialTool.h:53
CaloLCDeadMaterialTool::Cell
Definition: CaloLCDeadMaterialTool.h:72
CaloLCDeadMaterialTool::Area
Definition: CaloLCDeadMaterialTool.h:80
CaloLCDeadMaterialTool::m_key
SG::ReadCondHandleKey< CaloLocalHadCoeff > m_key
name of the key for DM cell weights
Definition: CaloLCDeadMaterialTool.h:97
xAOD::CaloCluster_v1
Description of a calorimeter cluster.
Definition: CaloCluster_v1.h:59
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
CaloLocalHadCoeff
Hold binned correction data for local hadronic calibration procedure.
Definition: CaloLocalHadCoeff.h:41
IClusterCellWeightTool
Interface class for tools weighting cells in CaloCluster objects.
Definition: IClusterCellWeightTool.h:25
CaloLCDeadMaterialTool::~CaloLCDeadMaterialTool
virtual ~CaloLCDeadMaterialTool() override
CaloLCDeadMaterialTool::Area::erec
float erec
Definition: CaloLCDeadMaterialTool.h:83
AthAlgTool.h
test_pyathena.parent
parent
Definition: test_pyathena.py:15
CaloLCDeadMaterialTool::m_interpolateDimensionsLookup
std::vector< int > m_interpolateDimensionsLookup
actual set of dimension id's to interpolate (in the DM areas corrected with lookup approach)
Definition: CaloLCDeadMaterialTool.h:153
CaloCell_ID
Helper class for offline cell identifiers.
Definition: CaloCell_ID.h:34
CaloLCDeadMaterialTool::sDM_UNCLASS
@ sDM_UNCLASS
Definition: CaloLCDeadMaterialTool.h:56
ReadCondHandleKey.h
CaloLCDeadMaterialTool::m_interpolate
bool m_interpolate
interpolate correction coefficients
Definition: CaloLCDeadMaterialTool.h:138
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:228
CaloLCDeadMaterialTool::Area::Area
Area()
Definition: CaloLCDeadMaterialTool.h:81
CaloLCDeadMaterialTool::Cell::weight
float weight
Definition: CaloLCDeadMaterialTool.h:75
SG::ReadCondHandleKey< CaloLocalHadCoeff >
CaloLocalHadCoeff.h
CaloLCDeadMaterialTool::Area::corr
float corr
Definition: CaloLCDeadMaterialTool.h:85
CaloLCDeadMaterialTool::m_interpolateDimensionsFit
std::vector< int > m_interpolateDimensionsFit
actual set of dimension id's to interpolate (in the DM areas corrected with TProfile approach)
Definition: CaloLCDeadMaterialTool.h:150
python.CaloScaleNoiseConfig.type
type
Definition: CaloScaleNoiseConfig.py:78
CaloLCDeadMaterialTool::sDM_LEAKAGE
@ sDM_LEAKAGE
Definition: CaloLCDeadMaterialTool.h:55
CaloLCDeadMaterialTool::sDM_FCAL
@ sDM_FCAL
Definition: CaloLCDeadMaterialTool.h:54
CaloLCDeadMaterialTool::CaloLCDeadMaterialTool
CaloLCDeadMaterialTool(const std::string &type, const std::string &name, const IInterface *parent)
Definition: CaloLCDeadMaterialTool.cxx:32
CaloLCDeadMaterialTool::sDM_SCN
@ sDM_SCN
Definition: CaloLCDeadMaterialTool.h:51
CaloLCDeadMaterialTool::m_weightModeDM
int m_weightModeDM
method of assignment of DM energy to cluster
Definition: CaloLCDeadMaterialTool.h:109
CaloLCDeadMaterialTool::m_MinLookupBinNentry
int m_MinLookupBinNentry
minimum number of events in one lookup bin to use
Definition: CaloLCDeadMaterialTool.h:117
CaloLCDeadMaterialTool::m_interpolateDimensionNames
std::map< std::string, std::vector< std::string > > m_interpolateDimensionNames
vector of names of dimensions to interpolate (for different correction types different set of dimensi...
Definition: CaloLCDeadMaterialTool.h:146
CaloLCDeadMaterialTool::m_MinClusterEnergyToDeal
float m_MinClusterEnergyToDeal
Minimum energy of clusters to apply correction.
Definition: CaloLCDeadMaterialTool.h:113
AthAlgTool
Definition: AthAlgTool.h:26
CaloLCDeadMaterialTool
dead material correction tool for local hadronic calibration
Definition: CaloLCDeadMaterialTool.h:40
CaloLCDeadMaterialTool::dm_area_keys
dm_area_keys
Dead Material area number.
Definition: CaloLCDeadMaterialTool.h:48
CaloLCDeadMaterialTool::prepare_for_cluster
StatusCode prepare_for_cluster(const xAOD::CaloCluster *theCluster, std::vector< Area > &areas, std::vector< Cell > &cells, float *smp_energy, float &cls_unweighted_energy, const CaloLocalHadCoeff *data) const
Definition: CaloLCDeadMaterialTool.cxx:532
CaloLCDeadMaterialTool::Area::edm_wrong
float edm_wrong
Definition: CaloLCDeadMaterialTool.h:86
CaloLCDeadMaterialTool::Area::eprep
float eprep
Definition: CaloLCDeadMaterialTool.h:82
CaloLCDeadMaterialTool::sDM_EME0_EME12
@ sDM_EME0_EME12
Definition: CaloLCDeadMaterialTool.h:52
CaloLCDeadMaterialTool::initialize
virtual StatusCode initialize() override
Definition: CaloLCDeadMaterialTool.cxx:90
CaloLCDeadMaterialTool::Area::sub_ener_old
float sub_ener_old
Definition: CaloLCDeadMaterialTool.h:84
IClusterCellWeightTool.h
CaloLCDeadMaterialTool::m_interpolateDimensionsSampling
std::vector< int > m_interpolateDimensionsSampling
actual set of dimension id's to interpolate (in the DM areas corrected with sampling weight approach)
Definition: CaloLCDeadMaterialTool.h:156