ATLAS Offline Software
Loading...
Searching...
No Matches
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
21
22
26#include "GaudiKernel/ToolHandle.h"
27#include "CaloGeoHelpers/CaloSampling.h"
29#include "GaudiKernel/EventContext.h"
31#include "CLHEP/Units/SystemOfUnits.h"
32
33#include <map>
34#include <vector>
35#include <string>
36
37
38class CaloCell_ID;
39
40
41//class CaloLCDeadMaterialTool : public AthAlgTool, virtual public IClusterCellWeightTool
42class CaloLCDeadMaterialTool : public extends<AthAlgTool, IClusterCellWeightTool>
43{
44 public:
45 using base_class::base_class;
46
53 {
54 sDM_EMB0_EMB1, // 0 before PreSamplerB, between PreSamplerB and EMB1
55 sDM_EMB3_TILE0, // 1 between barrel and tile
56 sDM_SCN, // 2 before TileGap3 (scintillator)
57 sDM_EME0_EME12, // 3 before PreSamplerE, between PreSamplerE and EME1
58 sDM_EME3_HEC0, // 4 between EME3 and HEC0
59 sDM_FCAL, // 5 between HEC and FCAL, before FCAL
60 sDM_LEAKAGE, // 6 leakage behind calorimeter
61 sDM_UNCLASS, // 7 unclassified DM enegry
63 };
64
65 virtual ~CaloLCDeadMaterialTool() override;
66
67 virtual StatusCode weight(xAOD::CaloCluster* theCluster, const EventContext& ctx) const override;
68 virtual StatusCode initialize() override;
69
70 private:
71 // Hold information about one cell.
72 struct Cell
73 {
74 int dm;
75 float energy;
76 float weight;
77 };
78
79 // Hold information about one dead material area.
80 struct Area
81 {
82 Area() : eprep(0), erec(0), sub_ener_old(0), corr(0), edm_wrong(0) {}
83 float eprep;
84 float erec;
86 float corr;
87 float edm_wrong;
88 };
89
90 StatusCode prepare_for_cluster(const xAOD::CaloCluster* theCluster,
91 std::vector<Area>& areas,
92 std::vector<Cell>& cells,
93 float* smp_energy,
94 float& cls_unweighted_energy, const CaloLocalHadCoeff* data) const;
95
98 SG::ReadCondHandleKey<CaloLocalHadCoeff> m_key{this, "HadDMCoeffKey", "HadDMCoeff2"};
99
102 Gaudi::Property<int> m_recoStatus{this, "ClusterRecoStatus", CaloRecoStatus::UNKNOWNSTATUS};
103
110 Gaudi::Property<int> m_weightModeDM{this, "WeightModeDM", 1};
111
114 Gaudi::Property<float> m_MinClusterEnergyToDeal{this, "MinClusterEnergyToDeal", 200.0*CLHEP::MeV};
115
118 Gaudi::Property<int> m_MinLookupBinNentry{this, "MinLookupBinNentry", 40};
119
122 Gaudi::Property<float> m_MinCellEnergyToDeal{this, "MinCellEnergyToDeal", 0.0};
123
126 Gaudi::Property<float> m_MaxChangeInCellWeight{this, "MaxChangeInCellWeight", 30.0};
127
135 Gaudi::Property<bool> m_useHadProbability{this, "UseHadProbability", false};
136
139 Gaudi::Property<bool> m_interpolate{this, "Interpolate", false};
140
143 Gaudi::Property<bool> m_updateSamplingVars{this, "UpdateSamplingVars", false};
144
147 Gaudi::Property<std::map<std::string, std::vector<std::string>>> m_interpolateDimensionNames {this
148 , "InterpolateDimensionNames"
149 , {
150 {"AREA_DMFIT" , {"DIMD_ETA", "DIMD_ENER"}}
151 , {"AREA_DMLOOKUP" , {"DIMD_ETA", "DIMD_ENER", "DIMD_LAMBDA"}}
152 , {"AREA_DMSMPW" , {"DIMD_ETA", "DIMD_LAMBDA"}}
153 }
154 };
155
158 std::vector<int > m_interpolateDimensionsFit;
165
168 Gaudi::Property<bool> m_absOpt{this, "WeightingOfNegClusters", false};
169
170};
171
172
173#endif
char data[hepevt_bytes_allocation_ATLAS]
Definition HepEvt.cxx:11
Helper class for offline cell identifiers.
Definition CaloCell_ID.h:34
dead material correction tool for local hadronic calibration
virtual StatusCode weight(xAOD::CaloCluster *theCluster, const EventContext &ctx) const override
std::vector< int > m_interpolateDimensionsFit
actual set of dimension id's to interpolate (in the DM areas corrected with TProfile approach)
Gaudi::Property< bool > m_updateSamplingVars
update also sampling variables
dm_area_keys
Dead Material area number.
std::vector< int > m_interpolateDimensionsSampling
actual set of dimension id's to interpolate (in the DM areas corrected with sampling weight approach)
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
Gaudi::Property< int > m_weightModeDM
method of assignment of DM energy to cluster
std::vector< int > m_interpolateDimensionsLookup
actual set of dimension id's to interpolate (in the DM areas corrected with lookup approach)
virtual StatusCode initialize() override
Gaudi::Property< float > m_MaxChangeInCellWeight
maximum allowed change in cell weights
SG::ReadCondHandleKey< CaloLocalHadCoeff > m_key
name of the key for DM cell weights
Gaudi::Property< bool > m_absOpt
In Abs Option case, DM calculation has to be handled in a slightly different way.
Gaudi::Property< float > m_MinClusterEnergyToDeal
Minimum energy of clusters to apply correction.
Gaudi::Property< int > m_MinLookupBinNentry
minimum number of events in one lookup bin to use
virtual ~CaloLCDeadMaterialTool() override
Gaudi::Property< bool > m_interpolate
interpolate correction coefficients
Gaudi::Property< int > m_recoStatus
Required Reco Status for the clusters in order to be calibrated.
Gaudi::Property< 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...
Gaudi::Property< bool > m_useHadProbability
calculate DM energy using em-probability moment
Gaudi::Property< float > m_MinCellEnergyToDeal
minimum cell energy to deal
Hold binned correction data for local hadronic calibration procedure.
CaloCluster_v1 CaloCluster
Define the latest version of the calorimeter cluster class.