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 
32 
35 
36 // sum helper functions
37 double scaleToE(const double &eta);
38 double scaleToEt(const double &eta);
39 
41 public:
43  using arrayHB = std::array<double, 4>;
44  using arrayHE = std::array<double, 7>;
45 
46  // constructors
48  double extRadius,
49  InclusionRule intIncRule,
50  double intRadius,
51  const arrayHB &eThresHB,
52  const arrayHB &etThresHB,
53  int maxSeverityHB,
54  const arrayHE &eThresHE,
55  const arrayHE &etThresHE,
56  int maxSeverityHE,
57  const HBHERecHitCollection &mhbhe,
58  edm::ESHandle<CaloGeometry> caloGeometry,
59  edm::ESHandle<HcalTopology> hcalTopology,
63 
65  double extRadius,
66  InclusionRule intIncRule,
67  double intRadius,
68  const arrayHB &eThresHB,
69  const arrayHB &etThresHB,
70  int maxSeverityHB,
71  const arrayHE &eThresHE,
72  const arrayHE &etThresHE,
73  int maxSeverityHE,
74  const HBHERecHitCollection &mhbhe,
75  const CaloGeometry &caloGeometry,
76  const HcalTopology &hcalTopology,
77  const HcalChannelQuality &hcalChStatus,
78  const HcalSeverityLevelComputer &hcalSevLvlComputer,
79  const CaloTowerConstituentsMap &towerMap);
80 
81  double getHcalESum(const reco::Candidate *c, int depth, const HcalPFCuts *hcalCuts) const {
82  return getHcalESum(c->get<reco::SuperClusterRef>().get(), depth, hcalCuts);
83  }
84  double getHcalEtSum(const reco::Candidate *c, int depth, const HcalPFCuts *hcalCuts) const {
85  return getHcalEtSum(c->get<reco::SuperClusterRef>().get(), depth, hcalCuts);
86  }
87  double getHcalESum(const reco::SuperCluster *sc, int depth, const HcalPFCuts *hcalCuts) const {
88  return getHcalESum(sc->position(), depth, hcalCuts);
89  }
90  double getHcalEtSum(const reco::SuperCluster *sc, int depth, const HcalPFCuts *hcalCuts) const {
91  return getHcalEtSum(sc->position(), depth, hcalCuts);
92  }
93  double getHcalESum(const math::XYZPoint &p, int depth, const HcalPFCuts *hcalCuts) const {
94  return getHcalESum(GlobalPoint(p.x(), p.y(), p.z()), depth, hcalCuts);
95  }
96  double getHcalEtSum(const math::XYZPoint &p, int depth, const HcalPFCuts *hcalCuts) const {
97  return getHcalEtSum(GlobalPoint(p.x(), p.y(), p.z()), depth, hcalCuts);
98  }
99  double getHcalESum(const GlobalPoint &pclu, int depth, const HcalPFCuts *hcalCuts) const {
100  return getHcalSum(pclu, depth, 0, 0, 0, &scaleToE, hcalCuts);
101  }
102  double getHcalEtSum(const GlobalPoint &pclu, int depth, const HcalPFCuts *hcalCuts) const {
103  return getHcalSum(pclu, depth, 0, 0, 0, &scaleToEt, hcalCuts);
104  }
105 
106  double getHcalESumBc(const reco::Candidate *c, int depth, const HcalPFCuts *hcalCuts) const {
107  return getHcalESumBc(c->get<reco::SuperClusterRef>().get(), depth, hcalCuts);
108  }
109  double getHcalEtSumBc(const reco::Candidate *c, int depth, const HcalPFCuts *hcalCuts) const {
110  return getHcalEtSumBc(c->get<reco::SuperClusterRef>().get(), depth, hcalCuts);
111  }
112  double getHcalESumBc(const reco::SuperCluster *sc, int depth, const HcalPFCuts *hcalCuts) const {
113  const auto tower = egamma::towerOf(*(sc->seed()), towerMap_);
114 
116  return getHcalESumBc(sc->position(), depth, tower.ieta(), tower.iphi(), -1, hcalCuts);
119  return getHcalESumBc(sc->position(), depth, tower.ieta(), tower.iphi(), 1, hcalCuts);
120 
121  return getHcalESumBc(sc->position(), depth, tower.ieta(), tower.iphi(), 0, hcalCuts);
122  }
123  double getHcalEtSumBc(const reco::SuperCluster *sc, int depth, const HcalPFCuts *hcalCuts) const {
124  const auto tower = egamma::towerOf(*(sc->seed()), towerMap_);
125 
127  return getHcalEtSumBc(sc->position(), depth, tower.ieta(), tower.iphi(), -1, hcalCuts);
130  return getHcalEtSumBc(sc->position(), depth, tower.ieta(), tower.iphi(), 1, hcalCuts);
131 
132  return getHcalEtSumBc(sc->position(), depth, tower.ieta(), tower.iphi(), 0, hcalCuts);
133  }
135  int depth,
136  int ieta,
137  int iphi,
138  int include_or_exclude,
139  const HcalPFCuts *hcalCuts) const {
140  return getHcalESumBc(GlobalPoint(p.x(), p.y(), p.z()), depth, ieta, iphi, include_or_exclude, hcalCuts);
141  }
143  int depth,
144  int ieta,
145  int iphi,
146  int include_or_exclude,
147  const HcalPFCuts *hcalCuts) const {
148  return getHcalEtSumBc(GlobalPoint(p.x(), p.y(), p.z()), depth, ieta, iphi, include_or_exclude, hcalCuts);
149  }
150  double getHcalESumBc(const GlobalPoint &pclu,
151  int depth,
152  int ieta,
153  int iphi,
154  int include_or_exclude,
155  const HcalPFCuts *hcalCuts) const {
156  return getHcalSum(pclu, depth, ieta, iphi, include_or_exclude, &scaleToE, hcalCuts);
157  }
158  double getHcalEtSumBc(const GlobalPoint &pclu,
159  int depth,
160  int ieta,
161  int iphi,
162  int include_or_exclude,
163  const HcalPFCuts *hcalCuts) const {
164  return getHcalSum(pclu, depth, ieta, iphi, include_or_exclude, &scaleToEt, hcalCuts);
165  }
166 
167 private:
168  double goodHitEnergy(float pcluEta,
169  float pcluPhi,
170  const HBHERecHit &hit,
171  int depth,
172  int ieta,
173  int iphi,
174  int include_or_exclude,
175  double (*scale)(const double &),
176  const HcalPFCuts *hcalCuts) const;
177 
178  double getHcalSum(const GlobalPoint &pclu,
179  int depth,
180  int ieta,
181  int iphi,
182  int include_or_exclude,
183  double (*scale)(const double &),
184  const HcalPFCuts *hcalCuts) const;
185 
187  double extRadius_;
189  double intRadius_;
190 
194 
198 
205 };
206 
207 #endif
const math::XYZPoint & position() const
cluster centroid position
Definition: CaloCluster.h:153
const CaloGeometry & caloGeometry_
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)
double goodHitEnergy(float pcluEta, float pcluPhi, const HBHERecHit &hit, int depth, int ieta, int iphi, int include_or_exclude, double(*scale)(const double &), const HcalPFCuts *hcalCuts) const
Global3DPoint GlobalPoint
Definition: GlobalPoint.h:10
double getHcalESumBc(const reco::Candidate *c, int depth, const HcalPFCuts *hcalCuts) const
double getHcalEtSum(const math::XYZPoint &p, int depth, const HcalPFCuts *hcalCuts) const
const HcalChannelQuality & hcalChStatus_
double getHcalEtSumBc(const math::XYZPoint &p, int depth, int ieta, int iphi, int include_or_exclude, const HcalPFCuts *hcalCuts) const
double getHcalEtSumBc(const reco::Candidate *c, int depth, const HcalPFCuts *hcalCuts) const
const HBHERecHitCollection & mhbhe_
double getHcalEtSumBc(const GlobalPoint &pclu, int depth, int ieta, int iphi, int include_or_exclude, const HcalPFCuts *hcalCuts) const
double getHcalESum(const math::XYZPoint &p, int depth, const HcalPFCuts *hcalCuts) const
double getHcalEtSumBc(const reco::SuperCluster *sc, int depth, const HcalPFCuts *hcalCuts) const
double getHcalESum(const reco::SuperCluster *sc, int depth, const HcalPFCuts *hcalCuts) const
CaloTowerDetId towerOf(reco::CaloCluster const &cluster, CaloTowerConstituentsMap const &towerMap)
double getHcalESum(const reco::Candidate *c, int depth, const HcalPFCuts *hcalCuts) const
double getHcalEtSum(const GlobalPoint &pclu, int depth, const HcalPFCuts *hcalCuts) const
XYZPointD XYZPoint
point in space with cartesian internal representation
Definition: Point3D.h:12
const CaloTowerConstituentsMap & towerMap_
double getHcalESumBc(const GlobalPoint &pclu, int depth, int ieta, int iphi, int include_or_exclude, const HcalPFCuts *hcalCuts) const
double getHcalESumBc(const math::XYZPoint &p, int depth, int ieta, int iphi, int include_or_exclude, const HcalPFCuts *hcalCuts) const
double scaleToEt(const double &eta)
double scaleToE(const double &eta)
const CaloClusterPtr & seed() const
seed BasicCluster
Definition: SuperCluster.h:79
double getHcalEtSum(const reco::Candidate *c, int depth, const HcalPFCuts *hcalCuts) const
double getHcalESum(const GlobalPoint &pclu, int depth, const HcalPFCuts *hcalCuts) const
T const * get() const
Returns C++ pointer to the item.
Definition: Ref.h:232
const HcalTopology & hcalTopology_
const HcalSeverityLevelComputer & hcalSevLvlComputer_
double getHcalSum(const GlobalPoint &pclu, int depth, int ieta, int iphi, int include_or_exclude, double(*scale)(const double &), const HcalPFCuts *hcalCuts) const
double getHcalESumBc(const reco::SuperCluster *sc, int depth, const HcalPFCuts *hcalCuts) const
std::array< double, 4 > arrayHB
double getHcalEtSum(const reco::SuperCluster *sc, int depth, const HcalPFCuts *hcalCuts) const
std::array< double, 7 > arrayHE