CMS 3D CMS Logo

PFPhotonIsolationCalculator.h
Go to the documentation of this file.
1 //--------------------------------------------------------------------------------------------------
2 // $Id $
3 //
4 // PFPhotonIsolationCalculator
5 //
6 // Class for calculating PFIsolation for Photons.
7 //This class takes
8 // PF Particle collection and the reconstructed vertex collection as input.
9 //
10 // Authors: Vasundhara Chetluru
11 // Modified specifically for Photons, to be used as configurable plug-in
12 // algorithm in the gedPhotonProducer, by N. Marinelli
13 //--------------------------------------------------------------------------------------------------
14 
15 #ifndef PFPhotonIsolationCalculator_H
16 #define PFPhotonIsolationCalculator_H
17 
28 
31 
34 
36 public:
39 
40  void setup(const edm::ParameterSet& conf);
41 
42 public:
43  void calculate(const reco::Photon*,
44  const edm::Handle<reco::PFCandidateCollection> pfCandidateHandle,
46  const edm::Event& e,
47  const edm::EventSetup& es,
49 
50 private:
51  enum VetoType {
52  kElectron = -1, // MVA for non-triggering electrons
53  kPhoton = 1 // MVA for triggering electrons
54  };
55 
56  void initializeRings(int iNumberOfRings, float fRingSize);
57 
60  return fIsolationPhoton_;
61  };
64  return fIsolationNeutral_;
65  };
68  return fIsolationCharged_;
69  };
71 
72  std::vector<float> getIsolationInRingsPhoton() { return fIsolationInRingsPhoton_; };
73  std::vector<float> getIsolationInRingsNeutral() { return fIsolationInRingsNeutral_; };
74  std::vector<float> getIsolationInRingsCharged() { return fIsolationInRingsCharged_; };
76 
77  //Veto implementation
78  float isPhotonParticleVetoed(const reco::PFCandidateRef pfIsoCand);
79  float isPhotonParticleVetoed(const reco::PFCandidate* pfIsoCand);
80  //
81  float isNeutralParticleVetoed(const reco::PFCandidate* pfIsoCand);
82  float isNeutralParticleVetoed(const reco::PFCandidateRef pfIsoCand);
83  //
85  float isChargedParticleVetoed(const reco::PFCandidate* pfIsoCand,
88  float isChargedParticleVetoed(const reco::PFCandidateRef pfIsoCand,
89  reco::VertexRef vtx,
91 
93 
94  int matchPFObject(const reco::Photon* photon, const reco::PFCandidateCollection* pfParticlesColl);
95  int matchPFObject(const reco::GsfElectron* photon, const reco::PFCandidateCollection* pfParticlesColl);
96 
97  float fGetIsolation(const reco::Photon* photon,
98  const edm::Handle<reco::PFCandidateCollection> pfCandidateHandle,
99  reco::VertexRef vtx,
101  std::vector<float> fGetIsolationInRings(const reco::Photon* photon,
103  reco::VertexRef vtx,
105 
107 
109  float fIsolation_;
114 
115  std::vector<float> fIsolationInRings_;
116  std::vector<float> fIsolationInRingsPhoton_;
117  std::vector<float> fIsolationInRingsNeutral_;
118  std::vector<float> fIsolationInRingsCharged_;
119  std::vector<float> fIsolationInRingsChargedAll_;
120 
122  float fConeSize_;
123  Bool_t bApplyVeto_;
128 
131 
134 
138 
142 
144 
148 
152 
156 
160 
163 
164  float fRingSize_;
165  // float fDeltaR_;
166  // float fDeltaEta_;
167  //float fDeltaPhi_;
168 
169  float fEta_;
170  float fPhi_;
171  float fEtaSC_;
172  float fPhiSC_;
173 
174  float fPt_;
175  float fVx_;
176  float fVy_;
177  float fVz_;
178 
181 };
182 
183 #endif
float isNeutralParticleVetoed(const reco::PFCandidate *pfIsoCand)
int matchPFObject(const reco::Photon *photon, const reco::PFCandidateCollection *pfParticlesColl)
std::vector< float > fGetIsolationInRings(const reco::Photon *photon, edm::Handle< reco::PFCandidateCollection > pfCandidateHandle, reco::VertexRef vtx, edm::Handle< reco::VertexCollection > vertices)
void setup(const edm::ParameterSet &conf)
std::vector< float > fIsolationInRingsChargedAll_
reco::VertexRef chargedHadronVertex(edm::Handle< reco::VertexCollection > verticies, const reco::PFCandidate &pfcand)
std::vector< float > getIsolationInRingsCharged()
std::vector< reco::PFCandidate > PFCandidateCollection
collection of PFCandidates
std::vector< float > fIsolationInRingsNeutral_
std::vector< float > getIsolationInRingsPhoton()
Particle reconstructed by the particle flow algorithm.
Definition: PFCandidate.h:40
std::vector< float > getIsolationInRingsChargedAll()
float fGetIsolation(const reco::Photon *photon, const edm::Handle< reco::PFCandidateCollection > pfCandidateHandle, reco::VertexRef vtx, edm::Handle< reco::VertexCollection > vertices)
float isPhotonParticleVetoed(const reco::PFCandidateRef pfIsoCand)
void initializeRings(int iNumberOfRings, float fRingSize)
float isChargedParticleVetoed(const reco::PFCandidate *pfIsoCand, edm::Handle< reco::VertexCollection > vertices)
std::vector< float > getIsolationInRingsNeutral()
void calculate(const reco::Photon *, const edm::Handle< reco::PFCandidateCollection > pfCandidateHandle, edm::Handle< reco::VertexCollection > &vertices, const edm::Event &e, const edm::EventSetup &es, reco::Photon::PflowIsolationVariables &phoisol03)
std::vector< float > fIsolationInRingsCharged_