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 
25 
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) const { return getSum_(emObject, true); }
42  double getEnergySum(const reco::Candidate* emObject) const { return getSum_(emObject, false); }
43 
44  double getEtSum(const reco::SuperCluster* emObject) const { return getSum_(emObject, true); }
45  double getEnergySum(const reco::SuperCluster* emObject) const { return getSum_(emObject, false); }
46 
47  void setUseNumCrystals(bool b = true) { useNumCrystals_ = b; }
48  void setVetoClustered(bool b = true) { vetoClustered_ = b; }
49  void doSeverityChecks(const EcalRecHitCollection* const recHits, const std::vector<int>& v) {
51  severitiesexcl_.clear();
52  severitiesexcl_.insert(severitiesexcl_.begin(), v.begin(), v.end());
53  std::sort(severitiesexcl_.begin(), severitiesexcl_.end());
54  }
55 
56  void doFlagChecks(const std::vector<int>& v) {
57  flags_.clear();
58  flags_.insert(flags_.begin(), v.begin(), v.end());
59  std::sort(flags_.begin(), flags_.end());
60  }
61 
62  //destructor
64 
65 private:
66  double getSum_(const reco::Candidate*, bool returnEt) const;
67  double getSum_(const reco::SuperCluster*, bool returnEt) const;
68 
69  double extRadius_;
70  double intRadius_;
71  double etaSlice_;
72  double etLow_;
73  double eLow_;
74 
78 
82  //const EcalChannelStatus *chStatus_;
83  std::vector<int> severitiesexcl_;
84  //int severityLevelCut_;
85  //float severityRecHitThreshold_;
86  //EcalSeverityLevelAlgo::SpikeId spId_;
87  //float spIdThreshold_;
88  std::vector<int> flags_;
89 
90  const CaloSubdetectorGeometry* subdet_[2]; // barrel+endcap
91 };
92 
93 #endif
const CaloSubdetectorGeometry * subdet_[2]
edm::ESHandle< CaloGeometry > theCaloGeom_
std::vector< int > flags_
double getEtSum(const reco::Candidate *emObject) const
std::vector< int > severitiesexcl_
double getEnergySum(const reco::Candidate *emObject) const
void doFlagChecks(const std::vector< int > &v)
double getSum_(const reco::Candidate *, bool returnEt) const
void setUseNumCrystals(bool b=true)
double getEtSum(const reco::SuperCluster *emObject) 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_
Detector
Definition: DetId.h:24
double b
Definition: hdecay.h:118
double getEnergySum(const reco::SuperCluster *emObject) const
void setVetoClustered(bool b=true)
const EcalSeverityLevelAlgo * sevLevel_
const EcalRecHitCollection & caloHits_