CMS 3D CMS Logo

EgammaHcalIsolation.h
Go to the documentation of this file.
1 #ifndef EgammaIsolationAlgos_EgammaHcalIsolation_h
2 #define EgammaIsolationAlgos_EgammaHcalIsolation_h
3 //*****************************************************************************
4 // File: EgammaHcalIsolation.h
5 // ----------------------------------------------------------------------------
6 // OrigAuth: Matthias Mozer
7 // Institute: IIHE-VUB
8 //=============================================================================
9 //*****************************************************************************
10 
11 //C++ includes
12 #include <array>
13 
14 //CMSSW includes
20 
23 
30 
33 
34 // sum helper functions
35 double scaleToE(const double &eta);
36 double scaleToEt(const double &eta);
37 
39 public:
41  using arrayHB = std::array<double, 4>;
42  using arrayHE = std::array<double, 7>;
43 
44  // constructors
46  double extRadius,
47  InclusionRule intIncRule,
48  double intRadius,
49  const arrayHB &eThresHB,
50  const arrayHB &etThresHB,
51  int maxSeverityHB,
52  const arrayHE &eThresHE,
53  const arrayHE &etThresHE,
54  int maxSeverityHE,
55  const HBHERecHitCollection &mhbhe,
56  edm::ESHandle<CaloGeometry> caloGeometry,
57  edm::ESHandle<HcalTopology> hcalTopology,
61 
63  double extRadius,
64  InclusionRule intIncRule,
65  double intRadius,
66  const arrayHB &eThresHB,
67  const arrayHB &etThresHB,
68  int maxSeverityHB,
69  const arrayHE &eThresHE,
70  const arrayHE &etThresHE,
71  int maxSeverityHE,
72  const HBHERecHitCollection &mhbhe,
73  const CaloGeometry &caloGeometry,
74  const HcalTopology &hcalTopology,
75  const HcalChannelQuality &hcalChStatus,
76  const HcalSeverityLevelComputer &hcalSevLvlComputer,
77  const CaloTowerConstituentsMap &towerMap);
78 
79  double getHcalESum(const reco::Candidate *c, int depth) const {
80  return getHcalESum(c->get<reco::SuperClusterRef>().get(), depth);
81  }
82  double getHcalEtSum(const reco::Candidate *c, int depth) const {
83  return getHcalEtSum(c->get<reco::SuperClusterRef>().get(), depth);
84  }
85  double getHcalESum(const reco::SuperCluster *sc, int depth) const { return getHcalESum(sc->position(), depth); }
86  double getHcalEtSum(const reco::SuperCluster *sc, int depth) const { return getHcalEtSum(sc->position(), depth); }
87  double getHcalESum(const math::XYZPoint &p, int depth) const {
88  return getHcalESum(GlobalPoint(p.x(), p.y(), p.z()), depth);
89  }
90  double getHcalEtSum(const math::XYZPoint &p, int depth) const {
91  return getHcalEtSum(GlobalPoint(p.x(), p.y(), p.z()), depth);
92  }
93  double getHcalESum(const GlobalPoint &pclu, int depth) const { return getHcalSum(pclu, depth, 0, 0, 0, &scaleToE); }
94  double getHcalEtSum(const GlobalPoint &pclu, int depth) const { return getHcalSum(pclu, depth, 0, 0, 0, &scaleToEt); }
95 
96  double getHcalESumBc(const reco::Candidate *c, int depth) const {
97  return getHcalESumBc(c->get<reco::SuperClusterRef>().get(), depth);
98  }
99  double getHcalEtSumBc(const reco::Candidate *c, int depth) const {
100  return getHcalEtSumBc(c->get<reco::SuperClusterRef>().get(), depth);
101  }
102  double getHcalESumBc(const reco::SuperCluster *sc, int depth) const {
103  const auto tower = egamma::towerOf(*(sc->seed()), towerMap_);
104 
106  return getHcalESumBc(sc->position(), depth, tower.ieta(), tower.iphi(), -1);
109  return getHcalESumBc(sc->position(), depth, tower.ieta(), tower.iphi(), 1);
110 
111  return getHcalESumBc(sc->position(), depth, tower.ieta(), tower.iphi(), 0);
112  }
113  double getHcalEtSumBc(const reco::SuperCluster *sc, int depth) const {
114  const auto tower = egamma::towerOf(*(sc->seed()), towerMap_);
115 
117  return getHcalEtSumBc(sc->position(), depth, tower.ieta(), tower.iphi(), -1);
120  return getHcalEtSumBc(sc->position(), depth, tower.ieta(), tower.iphi(), 1);
121 
122  return getHcalEtSumBc(sc->position(), depth, tower.ieta(), tower.iphi(), 0);
123  }
124  double getHcalESumBc(const math::XYZPoint &p, int depth, int ieta, int iphi, int include_or_exclude) const {
125  return getHcalESumBc(GlobalPoint(p.x(), p.y(), p.z()), depth, ieta, iphi, include_or_exclude);
126  }
127  double getHcalEtSumBc(const math::XYZPoint &p, int depth, int ieta, int iphi, int include_or_exclude) const {
128  return getHcalEtSumBc(GlobalPoint(p.x(), p.y(), p.z()), depth, ieta, iphi, include_or_exclude);
129  }
130  double getHcalESumBc(const GlobalPoint &pclu, int depth, int ieta, int iphi, int include_or_exclude) const {
131  return getHcalSum(pclu, depth, ieta, iphi, include_or_exclude, &scaleToE);
132  }
133  double getHcalEtSumBc(const GlobalPoint &pclu, int depth, int ieta, int iphi, int include_or_exclude) const {
134  return getHcalSum(pclu, depth, ieta, iphi, include_or_exclude, &scaleToEt);
135  }
136 
137 private:
138  double goodHitEnergy(const GlobalPoint &pclu,
139  const HBHERecHit &hit,
140  int depth,
141  int ieta,
142  int iphi,
143  int include_or_exclude,
144  double (*scale)(const double &)) const;
145 
146  double getHcalSum(const GlobalPoint &pclu,
147  int depth,
148  int ieta,
149  int iphi,
150  int include_or_exclude,
151  double (*scale)(const double &)) const;
152 
154  double extRadius_;
156  double intRadius_;
157 
161 
165 
172 };
173 
174 #endif
EgammaHcalIsolation::getHcalESumBc
double getHcalESumBc(const GlobalPoint &pclu, int depth, int ieta, int iphi, int include_or_exclude) const
Definition: EgammaHcalIsolation.h:130
EgammaHcalIsolation::getHcalESum
double getHcalESum(const reco::Candidate *c, int depth) const
Definition: EgammaHcalIsolation.h:79
EgammaHcalIsolation::intIncRule_
InclusionRule intIncRule_
Definition: EgammaHcalIsolation.h:155
EgammaHcalIsolation::etThresHB_
arrayHB etThresHB_
Definition: EgammaHcalIsolation.h:159
EgammaHcalIsolation::getHcalESumBc
double getHcalESumBc(const reco::SuperCluster *sc, int depth) const
Definition: EgammaHcalIsolation.h:102
EgammaHcalIsolation::getHcalESumBc
double getHcalESumBc(const math::XYZPoint &p, int depth, int ieta, int iphi, int include_or_exclude) const
Definition: EgammaHcalIsolation.h:124
L1EGammaCrystalsEmulatorProducer_cfi.scale
scale
Definition: L1EGammaCrystalsEmulatorProducer_cfi.py:10
EgammaHcalIsolation::getHcalEtSumBc
double getHcalEtSumBc(const reco::SuperCluster *sc, int depth) const
Definition: EgammaHcalIsolation.h:113
EgammaHcalIsolation::extIncRule_
InclusionRule extIncRule_
Definition: EgammaHcalIsolation.h:153
ESHandle.h
EgammaHcalIsolation::InclusionRule::withinConeAroundCluster
reco::SuperCluster
Definition: SuperCluster.h:18
EgammaHcalIsolation::getHcalEtSum
double getHcalEtSum(const GlobalPoint &pclu, int depth) const
Definition: EgammaHcalIsolation.h:94
EgammaHcalIsolation::arrayHB
std::array< double, 4 > arrayHB
Definition: EgammaHcalIsolation.h:41
CaloTowerConstituentsMap.h
electronEcalRecHitIsolationLcone_cfi.extRadius
extRadius
Definition: electronEcalRecHitIsolationLcone_cfi.py:16
HBHERecHit
Definition: HBHERecHit.h:13
HcalTopology
Definition: HcalTopology.h:26
hgcalTowerProducer_cfi.tower
tower
Definition: hgcalTowerProducer_cfi.py:4
edm::Ref::get
T const * get() const
Returns C++ pointer to the item.
Definition: Ref.h:232
edm::SortedCollection
Definition: SortedCollection.h:49
HcalChannelQuality
Definition: HcalChannelQuality.h:17
EgammaHcalIsolation::hcalChStatus_
const HcalChannelQuality & hcalChStatus_
Definition: EgammaHcalIsolation.h:169
EgammaHcalIsolation::etThresHE_
arrayHE etThresHE_
Definition: EgammaHcalIsolation.h:163
RecoCandidate.h
EgammaHcalIsolation::caloGeometry_
const CaloGeometry & caloGeometry_
Definition: EgammaHcalIsolation.h:167
EgammaHadTower.h
edm::Ref< SuperClusterCollection >
LEDCalibrationChannels.iphi
iphi
Definition: LEDCalibrationChannels.py:64
EgammaHcalIsolation::getHcalEtSum
double getHcalEtSum(const reco::Candidate *c, int depth) const
Definition: EgammaHcalIsolation.h:82
EgammaHcalIsolation
Definition: EgammaHcalIsolation.h:38
CaloGeometry
Definition: CaloGeometry.h:21
PVValHelper::eta
Definition: PVValidationHelpers.h:70
EgammaHcalIsolation::extRadius_
double extRadius_
Definition: EgammaHcalIsolation.h:154
HcalSeverityLevelComputer
Definition: HcalSeverityLevelComputer.h:24
CaloTowerConstituentsMap
Definition: CaloTowerConstituentsMap.h:18
edm::ESHandle< CaloGeometry >
GlobalPoint
Global3DPoint GlobalPoint
Definition: GlobalPoint.h:10
Point3DBase< float, GlobalTag >
EgammaHcalIsolation::getHcalESum
double getHcalESum(const GlobalPoint &pclu, int depth) const
Definition: EgammaHcalIsolation.h:93
egamma::towerOf
CaloTowerDetId towerOf(reco::CaloCluster const &cluster, CaloTowerConstituentsMap const &towerMap)
Definition: EgammaHadTower.cc:10
EgammaHcalIsolation::maxSeverityHE_
int maxSeverityHE_
Definition: EgammaHcalIsolation.h:164
LEDCalibrationChannels.depth
depth
Definition: LEDCalibrationChannels.py:65
HcalSeverityLevelComputerRcd.h
EgammaHcalIsolation::towerMap_
const CaloTowerConstituentsMap & towerMap_
Definition: EgammaHcalIsolation.h:171
LEDCalibrationChannels.ieta
ieta
Definition: LEDCalibrationChannels.py:63
math::XYZPoint
XYZPointD XYZPoint
point in space with cartesian internal representation
Definition: Point3D.h:12
reco::SuperCluster::seed
const CaloClusterPtr & seed() const
seed BasicCluster
Definition: SuperCluster.h:77
AlCaHLTBitMon_ParallelJobs.p
def p
Definition: AlCaHLTBitMon_ParallelJobs.py:153
EgammaHcalIsolation::InclusionRule::isBehindClusterSeed
EgammaHcalIsolation::InclusionRule
InclusionRule
Definition: EgammaHcalIsolation.h:40
EgammaHcalIsolation::getHcalESum
double getHcalESum(const reco::SuperCluster *sc, int depth) const
Definition: EgammaHcalIsolation.h:85
createfilelist.int
int
Definition: createfilelist.py:10
EgammaHcalIsolation::getHcalSum
double getHcalSum(const GlobalPoint &pclu, int depth, int ieta, int iphi, int include_or_exclude, double(*scale)(const double &)) const
Definition: EgammaHcalIsolation.cc:171
EgammaHcalIsolation::getHcalEtSum
double getHcalEtSum(const reco::SuperCluster *sc, int depth) const
Definition: EgammaHcalIsolation.h:86
HcalChannelQualityRcd.h
EgammaHcalIsolation::getHcalESumBc
double getHcalESumBc(const reco::Candidate *c, int depth) const
Definition: EgammaHcalIsolation.h:96
reco::CaloCluster::position
const math::XYZPoint & position() const
cluster centroid position
Definition: CaloCluster.h:154
reco::Candidate
Definition: Candidate.h:27
HcalChannelQuality.h
EgammaHcalIsolation::intRadius_
double intRadius_
Definition: EgammaHcalIsolation.h:156
EgammaHcalIsolation::EgammaHcalIsolation
EgammaHcalIsolation(InclusionRule extIncRule, double extRadius, InclusionRule intIncRule, double intRadius, const arrayHB &eThresHB, const arrayHB &etThresHB, int maxSeverityHB, const arrayHE &eThresHE, const arrayHE &etThresHE, int maxSeverityHE, const HBHERecHitCollection &mhbhe, edm::ESHandle< CaloGeometry > caloGeometry, edm::ESHandle< HcalTopology > hcalTopology, edm::ESHandle< HcalChannelQuality > hcalChStatus, edm::ESHandle< HcalSeverityLevelComputer > hcalSevLvlComputer, edm::ESHandle< CaloTowerConstituentsMap > towerMap)
EgammaHcalIsolation::getHcalEtSumBc
double getHcalEtSumBc(const GlobalPoint &pclu, int depth, int ieta, int iphi, int include_or_exclude) const
Definition: EgammaHcalIsolation.h:133
scaleToE
double scaleToE(const double &eta)
Definition: EgammaHcalIsolation.cc:20
HcalTopology.h
EgammaHcalIsolation::eThresHB_
arrayHB eThresHB_
Definition: EgammaHcalIsolation.h:158
SuperClusterFwd.h
EgammaHcalIsolation::maxSeverityHB_
int maxSeverityHB_
Definition: EgammaHcalIsolation.h:160
EgammaHcalIsolation::getHcalEtSumBc
double getHcalEtSumBc(const math::XYZPoint &p, int depth, int ieta, int iphi, int include_or_exclude) const
Definition: EgammaHcalIsolation.h:127
scaleToEt
double scaleToEt(const double &eta)
Definition: EgammaHcalIsolation.cc:21
electronHcalTowerIsolationLcone_cfi.intRadius
intRadius
Definition: electronHcalTowerIsolationLcone_cfi.py:5
SuperCluster.h
CaloGeometry.h
EgammaHcalIsolation::getHcalEtSum
double getHcalEtSum(const math::XYZPoint &p, int depth) const
Definition: EgammaHcalIsolation.h:90
GlobalVector.h
EgammaHcalIsolation::hcalSevLvlComputer_
const HcalSeverityLevelComputer & hcalSevLvlComputer_
Definition: EgammaHcalIsolation.h:170
HcalRecHitCollections.h
HcalSeverityLevelComputer.h
EgammaHcalIsolation::mhbhe_
const HBHERecHitCollection & mhbhe_
Definition: EgammaHcalIsolation.h:166
EgammaHcalIsolation::eThresHE_
arrayHE eThresHE_
Definition: EgammaHcalIsolation.h:162
EgammaHcalIsolation::getHcalEtSumBc
double getHcalEtSumBc(const reco::Candidate *c, int depth) const
Definition: EgammaHcalIsolation.h:99
EgammaHcalIsolation::hcalTopology_
const HcalTopology & hcalTopology_
Definition: EgammaHcalIsolation.h:168
EgammaHcalIsolation::getHcalESum
double getHcalESum(const math::XYZPoint &p, int depth) const
Definition: EgammaHcalIsolation.h:87
EgammaHcalIsolation::goodHitEnergy
double goodHitEnergy(const GlobalPoint &pclu, const HBHERecHit &hit, int depth, int ieta, int iphi, int include_or_exclude, double(*scale)(const double &)) const
Definition: EgammaHcalIsolation.cc:121
c
auto & c
Definition: CAHitNtupletGeneratorKernelsImpl.h:56
GlobalPoint.h
EgammaHcalIsolation::arrayHE
std::array< double, 7 > arrayHE
Definition: EgammaHcalIsolation.h:42
hit
Definition: SiStripHitEffFromCalibTree.cc:88