CMS 3D CMS Logo

EgammaRecHitIsolation.h
Go to the documentation of this file.
1 #ifndef EgammaIsolationProducers_EgammaRecHitIsolation_h
2 #define EgammaIsolationProducers_EgammaRecHitIsolation_h
3 //*****************************************************************************
4 // File: EgammaRecHitIsolation.h
5 // ----------------------------------------------------------------------------
6 // OrigAuth: Matthias Mozer, adapted from EgammaHcalIsolation by S. Harper
7 // Institute: IIHE-VUB, RAL
8 //=============================================================================
9 //*****************************************************************************
10 
11 //C++ includes
12 #include <vector>
13 #include <functional>
14 
15 //CMSSW includes
21 
23 
27 
29 public:
30  //constructors
32  double intRadius,
33  double etaSlice,
34  double etLow,
35  double eLow,
37  const EcalRecHitCollection&,
38  const EcalSeverityLevelAlgo*,
40 
41  double getEtSum(const reco::Candidate* emObject, EcalPFRecHitThresholds const* thresholds) const {
42  return getSum_(emObject, true, thresholds);
43  }
44  double getEnergySum(const reco::Candidate* emObject, EcalPFRecHitThresholds const* thresholds) const {
45  return getSum_(emObject, false, thresholds);
46  }
47 
48  double getEtSum(const reco::SuperCluster* emObject, EcalPFRecHitThresholds const* thresholds) const {
49  return getSum_(emObject, true, thresholds);
50  }
51  double getEnergySum(const reco::SuperCluster* emObject, EcalPFRecHitThresholds const* thresholds) const {
52  return getSum_(emObject, false, thresholds);
53  }
54 
55  void setUseNumCrystals(bool b = true) { useNumCrystals_ = b; }
56  void setVetoClustered(bool b = true) { vetoClustered_ = b; }
57  void doSeverityChecks(const EcalRecHitCollection* const recHits, const std::vector<int>& v) {
59  severitiesexcl_.clear();
60  severitiesexcl_.insert(severitiesexcl_.begin(), v.begin(), v.end());
62  }
63 
64  void doFlagChecks(const std::vector<int>& v) {
65  flags_.clear();
66  flags_.insert(flags_.begin(), v.begin(), v.end());
67  std::sort(flags_.begin(), flags_.end());
68  }
69 
70  //destructor
72 
73 private:
74  double getSum_(const reco::Candidate*, bool returnEt, const EcalPFRecHitThresholds* thresholds) const;
75  double getSum_(const reco::SuperCluster*, bool returnEt, const EcalPFRecHitThresholds* thresholds) const;
76 
77  double extRadius_;
78  double intRadius_;
79  double etaSlice_;
80  double etLow_;
81  double eLow_;
82 
86 
90  std::vector<int> severitiesexcl_;
91  std::vector<int> flags_;
92 
93  const CaloSubdetectorGeometry* subdet_[2]; // barrel+endcap
94 };
95 
96 #endif
const CaloSubdetectorGeometry * subdet_[2]
edm::ESHandle< CaloGeometry > theCaloGeom_
std::vector< int > flags_
std::vector< int > severitiesexcl_
void doFlagChecks(const std::vector< int > &v)
void setUseNumCrystals(bool b=true)
double getEtSum(const reco::SuperCluster *emObject, EcalPFRecHitThresholds const *thresholds) const
EgammaRecHitIsolation(double extRadius, double intRadius, double etaSlice, double etLow, double eLow, edm::ESHandle< CaloGeometry >, const EcalRecHitCollection &, const EcalSeverityLevelAlgo *, DetId::Detector detector)
void doSeverityChecks(const EcalRecHitCollection *const recHits, const std::vector< int > &v)
const EcalRecHitCollection * ecalBarHits_
double getEnergySum(const reco::SuperCluster *emObject, EcalPFRecHitThresholds const *thresholds) const
Detector
Definition: DetId.h:24
double b
Definition: hdecay.h:120
void setVetoClustered(bool b=true)
const EcalSeverityLevelAlgo * sevLevel_
double getEtSum(const reco::Candidate *emObject, EcalPFRecHitThresholds const *thresholds) const
double getSum_(const reco::Candidate *, bool returnEt, const EcalPFRecHitThresholds *thresholds) const
const EcalRecHitCollection & caloHits_
double getEnergySum(const reco::Candidate *emObject, EcalPFRecHitThresholds const *thresholds) const