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