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"
30
31#include <map>
32#include <vector>
33#include <string>
34
35
36class 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
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;
85 float corr;
86 float edm_wrong;
87 };
88
89 StatusCode prepare_for_cluster(const xAOD::CaloCluster* theCluster,
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;
157
161};
162
163
164#endif
char data[hepevt_bytes_allocation_ATLAS]
Definition HepEvt.cxx:11
AthAlgTool(const std::string &type, const std::string &name, const IInterface *parent)
Constructor with parameters:
Helper class for offline cell identifiers.
Definition CaloCell_ID.h:34
virtual StatusCode weight(xAOD::CaloCluster *theCluster, const EventContext &ctx) const override
method to weight the cells in a cluster
int m_recoStatus
Required Reco Status for the clusters in order to be calibrated.
std::vector< int > m_interpolateDimensionsFit
actual set of dimension id's to interpolate (in the DM areas corrected with TProfile approach)
dm_area_keys
Dead Material area number.
bool m_absOpt
In Abs Option case, DM calculation has to be handled in a slightly different way.
bool m_useHadProbability
calculate DM energy using em-probability moment
std::vector< int > m_interpolateDimensionsSampling
actual set of dimension id's to interpolate (in the DM areas corrected with sampling weight approach)
bool m_updateSamplingVars
update also sampling variables
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
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
SG::ReadCondHandleKey< CaloLocalHadCoeff > m_key
name of the key for DM cell weights
float m_MaxChangeInCellWeight
maximum allowed change in cell weights
int m_MinLookupBinNentry
minimum number of events in one lookup bin to use
float m_MinClusterEnergyToDeal
Minimum energy of clusters to apply correction.
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...
int m_weightModeDM
method of assignment of DM energy to cluster
virtual ~CaloLCDeadMaterialTool() override
float m_MinCellEnergyToDeal
minimum cell energy to deal
CaloLCDeadMaterialTool(const std::string &type, const std::string &name, const IInterface *parent)
bool m_interpolate
interpolate correction coefficients
Hold binned correction data for local hadronic calibration procedure.
Interface class for tools weighting cells in CaloCluster objects.
CaloCluster_v1 CaloCluster
Define the latest version of the calorimeter cluster class.