CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
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 
16 #ifndef PFPhotonIsolationCalculator_H
17 #define PFPhotonIsolationCalculator_H
18 
19 
30 
33 
34 
37 
38 
39 
41  public:
44 
45 
46  void setup(const edm::ParameterSet& conf);
47 
48 
49 
50  public:
51 
52 
53 
54  void calculate(const reco::Photon*,
55  const edm::Handle<reco::PFCandidateCollection> pfCandidateHandle,
57  const edm::Event& e, const edm::EventSetup& es,
59 
60 
61 
62 
63  private:
64 
65 
66  enum VetoType {
67  kElectron = -1, // MVA for non-triggering electrons
68  kPhoton = 1 // MVA for triggering electrons
69  };
70 
71 
72  void initializeRings(int iNumberOfRings, float fRingSize);
73 
74 
79 
80  std::vector<float > getIsolationInRingsPhoton(){ return fIsolationInRingsPhoton_; };
81  std::vector<float > getIsolationInRingsNeutral(){ return fIsolationInRingsNeutral_; };
82  std::vector<float > getIsolationInRingsCharged(){ return fIsolationInRingsCharged_; };
84 
85 
86  //Veto implementation
87  float isPhotonParticleVetoed( const reco::PFCandidateRef pfIsoCand );
88  float isPhotonParticleVetoed( const reco::PFCandidate* pfIsoCand );
89  //
90  float isNeutralParticleVetoed( const reco::PFCandidate* pfIsoCand );
91  float isNeutralParticleVetoed( const reco::PFCandidateRef pfIsoCand );
92  //
96 
97 
98 
100 
101  int matchPFObject(const reco::Photon* photon, const reco::PFCandidateCollection* pfParticlesColl );
102  int matchPFObject(const reco::GsfElectron* photon, const reco::PFCandidateCollection* pfParticlesColl );
103 
106 
107 
109 
111  float fIsolation_;
116 
117  std::vector<float > fIsolationInRings_;
118  std::vector<float > fIsolationInRingsPhoton_;
119  std::vector<float > fIsolationInRingsNeutral_;
120  std::vector<float > fIsolationInRingsCharged_;
121  std::vector<float > fIsolationInRingsChargedAll_;
122 
124  float fConeSize_;
125  Bool_t bApplyVeto_;
130 
133 
136 
140 
144 
146 
150 
154 
158 
162 
165 
166  float fRingSize_;
167  // float fDeltaR_;
168  // float fDeltaEta_;
169  //float fDeltaPhi_;
170 
171  float fEta_;
172  float fPhi_;
173  float fEtaSC_;
174  float fPhiSC_;
175 
176  float fPt_;
177  float fVx_;
178  float fVy_;
179  float fVz_;
180 
183 
184 
185 
186 };
187 
188 #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)
std::vector< float > fIsolationInRingsCharged_
void setup(const edm::ParameterSet &conf)
std::vector< float > fIsolationInRingsChargedAll_
std::vector< float > getIsolationInRingsPhoton()
reco::VertexRef chargedHadronVertex(edm::Handle< reco::VertexCollection > verticies, const reco::PFCandidate &pfcand)
std::vector< float > getIsolationInRingsChargedAll()
tuple conf
Definition: dbtoconf.py:185
std::vector< reco::PFCandidate > PFCandidateCollection
collection of PFCandidates
Particle reconstructed by the particle flow algorithm.
Definition: PFCandidate.h:39
std::vector< float > fIsolationInRingsNeutral_
float fGetIsolation(const reco::Photon *photon, const edm::Handle< reco::PFCandidateCollection > pfCandidateHandle, reco::VertexRef vtx, edm::Handle< reco::VertexCollection > vertices)
std::vector< float > getIsolationInRingsCharged()
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)