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
22 
26 
28  public:
29 
30  //constructors
31  EgammaRecHitIsolation (double extRadius,
32  double intRadius,
33  double etaSlice,
34  double etLow,
35  double eLow,
38  const EcalSeverityLevelAlgo*,
39  DetId::Detector detector);
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,
50  const std::vector<int>& v) {
51  ecalBarHits_ = recHits;
52  severitiesexcl_.clear();
53  severitiesexcl_.insert(severitiesexcl_.begin(), v.begin(), v.end());
55  }
56 
57  void doFlagChecks(const std::vector<int>& v) {
58  flags_.clear();
59  flags_.insert(flags_.begin(), v.begin(), v.end());
60  std::sort(flags_.begin(), flags_.end() );
61  }
62 
63  //destructor
65 
66  private:
67  double getSum_(const reco::Candidate *, bool returnEt ) const;
68  double getSum_(const reco::SuperCluster *, bool returnEt ) const;
69 
70  double extRadius_ ;
71  double intRadius_ ;
72  double etaSlice_;
73  double etLow_ ;
74  double eLow_ ;
75 
76 
80 
84  //const EcalChannelStatus *chStatus_;
85  std::vector<int> severitiesexcl_;
86  //int severityLevelCut_;
87  //float severityRecHitThreshold_;
88  //EcalSeverityLevelAlgo::SpikeId spId_;
89  //float spIdThreshold_;
90  std::vector<int> flags_;
91 
92  const CaloSubdetectorGeometry* subdet_[2]; // barrel+endcap
93 };
94 
95 #endif
const CaloSubdetectorGeometry * subdet_[2]
edm::ESHandle< CaloGeometry > theCaloGeom_
std::vector< int > flags_
CaloRecHitMetaCollectionV * caloHits_
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
void doSeverityChecks(const EcalRecHitCollection *const recHits, const std::vector< int > &v)
EgammaRecHitIsolation(double extRadius, double intRadius, double etaSlice, double etLow, double eLow, edm::ESHandle< CaloGeometry >, CaloRecHitMetaCollectionV *, const EcalSeverityLevelAlgo *, DetId::Detector detector)
const EcalRecHitCollection * ecalBarHits_
Detector
Definition: DetId.h:26
double b
Definition: hdecay.h:120
double getEnergySum(const reco::SuperCluster *emObject) const
void setVetoClustered(bool b=true)
const EcalSeverityLevelAlgo * sevLevel_