CMS 3D CMS Logo

PFIsolation.h
Go to the documentation of this file.
1 #ifndef DataFormats_PatCandidates_interface_PFIsolation_h
2 #define DataFormats_PatCandidates_interface_PFIsolation_h
3 
4 /*
5  \class pat::PFIsolation PFIsolation.h "DataFormats/PatCandidates/interface/PFIsolation.h"
6  \brief Basic class to store components of pf-isolation for pf candidates
7  \author Bennett Marsh
8 */
9 
10 namespace pat {
11 
12  class PFIsolation {
13  public:
14  PFIsolation() : chiso_(9999.), nhiso_(9999.), phiso_(9999.), puiso_(9999.) {}
15 
16  PFIsolation(float ch, float nh, float ph, float pu) : chiso_(ch), nhiso_(nh), phiso_(ph), puiso_(pu) {}
17 
19 
21  chiso_ = iso.chiso_;
22  nhiso_ = iso.nhiso_;
23  phiso_ = iso.phiso_;
24  puiso_ = iso.puiso_;
25  return *this;
26  }
27 
28  float chargedHadronIso() const { return chiso_; }
29  float neutralHadronIso() const { return nhiso_; }
30  float photonIso() const { return phiso_; }
31  float puChargedHadronIso() const { return puiso_; }
32 
33  private:
34  float chiso_; // charged hadrons from PV
35  float nhiso_; // neutral hadrons
36  float phiso_; // photons
37  float puiso_; // pileup contribution (charged hadrons not from PV)
38  };
39 
40 } // namespace pat
41 
42 #endif
PFIsolation & operator=(const PFIsolation &iso)
Definition: PFIsolation.h:20
PFIsolation(float ch, float nh, float ph, float pu)
Definition: PFIsolation.h:16
Definition: HeavyIon.h:7
float puChargedHadronIso() const
Definition: PFIsolation.h:31
float chargedHadronIso() const
Definition: PFIsolation.h:28
float photonIso() const
Definition: PFIsolation.h:30
float neutralHadronIso() const
Definition: PFIsolation.h:29