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 
25 
27 public:
28  //constructors
30  double intRadius,
31  double etaSlice,
32  double etLow,
33  double eLow,
35  const EcalRecHitCollection&,
36  const EcalSeverityLevelAlgo*,
38 
39  double getEtSum(const reco::Candidate* emObject) const { return getSum_(emObject, true); }
40  double getEnergySum(const reco::Candidate* emObject) const { return getSum_(emObject, false); }
41 
42  double getEtSum(const reco::SuperCluster* emObject) const { return getSum_(emObject, true); }
43  double getEnergySum(const reco::SuperCluster* emObject) const { return getSum_(emObject, false); }
44 
45  void setUseNumCrystals(bool b = true) { useNumCrystals_ = b; }
46  void setVetoClustered(bool b = true) { vetoClustered_ = b; }
47  void doSeverityChecks(const EcalRecHitCollection* const recHits, const std::vector<int>& v) {
49  severitiesexcl_.clear();
50  severitiesexcl_.insert(severitiesexcl_.begin(), v.begin(), v.end());
52  }
53 
54  void doFlagChecks(const std::vector<int>& v) {
55  flags_.clear();
56  flags_.insert(flags_.begin(), v.begin(), v.end());
57  std::sort(flags_.begin(), flags_.end());
58  }
59 
60  //destructor
62 
63 private:
64  double getSum_(const reco::Candidate*, bool returnEt) const;
65  double getSum_(const reco::SuperCluster*, bool returnEt) const;
66 
67  double extRadius_;
68  double intRadius_;
69  double etaSlice_;
70  double etLow_;
71  double eLow_;
72 
76 
80  std::vector<int> severitiesexcl_;
81  std::vector<int> flags_;
82 
83  const CaloSubdetectorGeometry* subdet_[2]; // barrel+endcap
84 };
85 
86 #endif
const CaloSubdetectorGeometry * subdet_[2]
edm::ESHandle< CaloGeometry > theCaloGeom_
std::vector< int > flags_
double getSum_(const reco::Candidate *, bool returnEt) const
std::vector< int > severitiesexcl_
void doFlagChecks(const std::vector< int > &v)
double getEnergySum(const reco::SuperCluster *emObject) const
void setUseNumCrystals(bool b=true)
double getEtSum(const reco::Candidate *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:120
void setVetoClustered(bool b=true)
double getEnergySum(const reco::Candidate *emObject) const
const EcalSeverityLevelAlgo * sevLevel_
const EcalRecHitCollection & caloHits_
double getEtSum(const reco::SuperCluster *emObject) const