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  public:
28 
29  //constructors
30  EgammaRecHitIsolation (double extRadius,
31  double intRadius,
32  double etaSlice,
33  double etLow,
34  double eLow,
37  const EcalSeverityLevelAlgo*,
38  DetId::Detector detector);
39 
40  double getEtSum(const reco::Candidate * emObject) const {return getSum_(emObject,true);}
41  double getEnergySum(const reco::Candidate * emObject) const{ return getSum_(emObject,false);}
42  void setUseNumCrystals(bool b=true) { useNumCrystals_ = b; }
43  void setVetoClustered(bool b=true) { vetoClustered_ = b; }
44  void doSpikeRemoval(const EcalRecHitCollection *const recHits,
45  const EcalChannelStatus *const chStatus,
46  const int &severityLevelCut = 3 /*0 - 4*/
47  //const float &sevRecHitThresh = 5.0, /*GeV*/
48  //const EcalSeverityLevelAlgo::SpikeId &id = EcalSeverityLevelAlgo::kSwissCross, /*kE1OverE9=0 or kSwissCross=1*/
49  //const float &spIdThresh = 0.95
50  ) {
51  ecalBarHits_ = recHits;
52  chStatus_ = chStatus;
53  severityLevelCut_ = severityLevelCut;
54  //severityRecHitThreshold_ = sevRecHitThresh;
55  //spId_ = id;
56  //spIdThreshold_ = spIdThresh;
57  }
58 
59  void doFlagChecks(const std::vector<int> v) {
60  v_chstatus_.clear();
61  v_chstatus_.insert(v_chstatus_.begin(),v.begin(),v.end());
62  std::sort( v_chstatus_.begin(), v_chstatus_.end() );
63  }
64 
65  //destructor
67 
68  private:
69  double getSum_(const reco::Candidate *,bool returnEt )const;
70 
71  double extRadius_ ;
72  double intRadius_ ;
73  double etaSlice_;
74  double etLow_ ;
75  double eLow_ ;
76 
77 
81 
87  //float severityRecHitThreshold_;
88  //EcalSeverityLevelAlgo::SpikeId spId_;
89  //float spIdThreshold_;
90  std::vector<int> v_chstatus_;
91 
92  const CaloSubdetectorGeometry* subdet_[2]; // barrel+endcap
93 };
94 
95 #endif
const CaloSubdetectorGeometry * subdet_[2]
edm::ESHandle< CaloGeometry > theCaloGeom_
CaloRecHitMetaCollectionV * caloHits_
double getEtSum(const reco::Candidate *emObject) const
const EcalChannelStatus * chStatus_
void doFlagChecks(const std::vector< int > v)
double getEnergySum(const reco::Candidate *emObject) const
double getSum_(const reco::Candidate *, bool returnEt) const
void setUseNumCrystals(bool b=true)
EgammaRecHitIsolation(double extRadius, double intRadius, double etaSlice, double etLow, double eLow, edm::ESHandle< CaloGeometry >, CaloRecHitMetaCollectionV *, const EcalSeverityLevelAlgo *, DetId::Detector detector)
const EcalRecHitCollection * ecalBarHits_
std::vector< int > v_chstatus_
Detector
Definition: DetId.h:26
double b
Definition: hdecay.h:120
void setVetoClustered(bool b=true)
const EcalSeverityLevelAlgo * sevLevel_
void doSpikeRemoval(const EcalRecHitCollection *const recHits, const EcalChannelStatus *const chStatus, const int &severityLevelCut=3)
mathSSE::Vec4< T > v