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());
51  std::sort(severitiesexcl_.begin(), severitiesexcl_.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
EcalSeverityLevelAlgo
Definition: EcalSeverityLevelAlgo.h:33
EgammaRecHitIsolation::theCaloGeom_
edm::ESHandle< CaloGeometry > theCaloGeom_
Definition: EgammaRecHitIsolation.h:73
EgammaRecHitIsolation::vetoClustered_
bool vetoClustered_
Definition: EgammaRecHitIsolation.h:78
EgammaRecHitIsolation::caloHits_
const EcalRecHitCollection & caloHits_
Definition: EgammaRecHitIsolation.h:74
ESHandle.h
EgammaRecHitIsolation::eLow_
double eLow_
Definition: EgammaRecHitIsolation.h:71
reco::SuperCluster
Definition: SuperCluster.h:18
EgammaRecHitIsolation::severitiesexcl_
std::vector< int > severitiesexcl_
Definition: EgammaRecHitIsolation.h:80
EgammaRecHitIsolation::intRadius_
double intRadius_
Definition: EgammaRecHitIsolation.h:68
EgammaRecHitIsolation::extRadius_
double extRadius_
Definition: EgammaRecHitIsolation.h:67
EgammaRecHitIsolation::etLow_
double etLow_
Definition: EgammaRecHitIsolation.h:70
electronEcalRecHitIsolationLcone_cfi.extRadius
extRadius
Definition: electronEcalRecHitIsolationLcone_cfi.py:18
EgammaRecHitIsolation::getEnergySum
double getEnergySum(const reco::Candidate *emObject) const
Definition: EgammaRecHitIsolation.h:40
EgammaRecHitIsolation::setUseNumCrystals
void setUseNumCrystals(bool b=true)
Definition: EgammaRecHitIsolation.h:45
EgammaRecHitIsolation::useNumCrystals_
bool useNumCrystals_
Definition: EgammaRecHitIsolation.h:77
edm::SortedCollection< EcalRecHit >
EgammaRecHitIsolation::setVetoClustered
void setVetoClustered(bool b=true)
Definition: EgammaRecHitIsolation.h:46
EgammaRecHitIsolation
Definition: EgammaRecHitIsolation.h:26
findQualityFiles.v
v
Definition: findQualityFiles.py:179
EcalRecHitCollections.h
EgammaRecHitIsolation::sevLevel_
const EcalSeverityLevelAlgo * sevLevel_
Definition: EgammaRecHitIsolation.h:75
EgammaRecHitIsolation::etaSlice_
double etaSlice_
Definition: EgammaRecHitIsolation.h:69
EgammaRecHitIsolation::getEtSum
double getEtSum(const reco::Candidate *emObject) const
Definition: EgammaRecHitIsolation.h:39
EgammaRecHitIsolation::getEtSum
double getEtSum(const reco::SuperCluster *emObject) const
Definition: EgammaRecHitIsolation.h:42
edm::ESHandle< CaloGeometry >
b
double b
Definition: hdecay.h:118
EcalSeverityLevelAlgo.h
EgammaRecHitIsolation::doSeverityChecks
void doSeverityChecks(const EcalRecHitCollection *const recHits, const std::vector< int > &v)
Definition: EgammaRecHitIsolation.h:47
EgammaRecHitIsolation::flags_
std::vector< int > flags_
Definition: EgammaRecHitIsolation.h:81
FastTrackerRecHitMaskProducer_cfi.recHits
recHits
Definition: FastTrackerRecHitMaskProducer_cfi.py:8
EgammaRecHitIsolation::ecalBarHits_
const EcalRecHitCollection * ecalBarHits_
Definition: EgammaRecHitIsolation.h:79
CaloSubdetectorGeometry.h
DetId::Detector
Detector
Definition: DetId.h:24
EgammaRecHitIsolation::doFlagChecks
void doFlagChecks(const std::vector< int > &v)
Definition: EgammaRecHitIsolation.h:54
reco::Candidate
Definition: Candidate.h:27
electronHcalTowerIsolationLcone_cfi.intRadius
intRadius
Definition: electronHcalTowerIsolationLcone_cfi.py:5
SuperCluster.h
CaloGeometry.h
EgammaRecHitIsolation::getEnergySum
double getEnergySum(const reco::SuperCluster *emObject) const
Definition: EgammaRecHitIsolation.h:43
EgammaRecHitIsolation::subdet_
const CaloSubdetectorGeometry * subdet_[2]
Definition: EgammaRecHitIsolation.h:83
CaloSubdetectorGeometry
Definition: CaloSubdetectorGeometry.h:22
EgammaRecHitIsolation::getSum_
double getSum_(const reco::Candidate *, bool returnEt) const
Definition: EgammaRecHitIsolation.cc:67
hgcalTestNeighbor_cfi.detector
detector
Definition: hgcalTestNeighbor_cfi.py:6
EgammaRecHitIsolation::EgammaRecHitIsolation
EgammaRecHitIsolation(double extRadius, double intRadius, double etaSlice, double etLow, double eLow, edm::ESHandle< CaloGeometry >, const EcalRecHitCollection &, const EcalSeverityLevelAlgo *, DetId::Detector detector)
Definition: EgammaRecHitIsolation.cc:32
Candidate.h
EgammaRecHitIsolation::~EgammaRecHitIsolation
~EgammaRecHitIsolation()
Definition: EgammaRecHitIsolation.cc:65