CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
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 
31  //constructors
32  EgammaRecHitIsolation (double extRadius,
33  double intRadius,
34  double etaSlice,
35  double etLow,
36  double eLow,
38  const EcalRecHitCollection&,
39  const EcalSeverityLevelAlgo*,
40  DetId::Detector detector);
41 
42  double getEtSum(const reco::Candidate * emObject) const {return getSum_(emObject,true);}
43  double getEnergySum(const reco::Candidate * emObject) const{ return getSum_(emObject,false);}
44 
45  double getEtSum(const reco::SuperCluster* emObject ) const {return getSum_(emObject,true);}
46  double getEnergySum(const reco::SuperCluster * emObject) const{ return getSum_(emObject,false);}
47 
48  void setUseNumCrystals(bool b=true) { useNumCrystals_ = b; }
49  void setVetoClustered(bool b=true) { vetoClustered_ = b; }
50  void doSeverityChecks(const EcalRecHitCollection *const recHits,
51  const std::vector<int>& v) {
52  ecalBarHits_ = recHits;
53  severitiesexcl_.clear();
54  severitiesexcl_.insert(severitiesexcl_.begin(), v.begin(), v.end());
56  }
57 
58  void doFlagChecks(const std::vector<int>& v) {
59  flags_.clear();
60  flags_.insert(flags_.begin(), v.begin(), v.end());
61  std::sort(flags_.begin(), flags_.end() );
62  }
63 
64  //destructor
66 
67  private:
68  double getSum_(const reco::Candidate *, bool returnEt ) const;
69  double getSum_(const reco::SuperCluster *, bool returnEt ) const;
70 
71  double extRadius_ ;
72  double intRadius_ ;
73  double etaSlice_;
74  double etLow_ ;
75  double eLow_ ;
76 
77 
81 
85  //const EcalChannelStatus *chStatus_;
86  std::vector<int> severitiesexcl_;
87  //int severityLevelCut_;
88  //float severityRecHitThreshold_;
89  //EcalSeverityLevelAlgo::SpikeId spId_;
90  //float spIdThreshold_;
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_
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:120
double getEnergySum(const reco::SuperCluster *emObject) const
void setVetoClustered(bool b=true)
const EcalSeverityLevelAlgo * sevLevel_
const EcalRecHitCollection & caloHits_