Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-02-14 12:54:21

0001 #ifndef DataFormats_PatCandidates_interface_PFIsolation_h
0002 #define DataFormats_PatCandidates_interface_PFIsolation_h
0003 
0004 /*
0005   \class    pat::PFIsolation PFIsolation.h "DataFormats/PatCandidates/interface/PFIsolation.h"
0006   \brief Basic class to store components of pf-isolation for pf candidates
0007   \author   Bennett Marsh
0008 */
0009 
0010 namespace pat {
0011 
0012   class PFIsolation {
0013   public:
0014     PFIsolation() : chiso_(9999.), nhiso_(9999.), phiso_(9999.), puiso_(9999.) {}
0015 
0016     PFIsolation(float ch, float nh, float ph, float pu) : chiso_(ch), nhiso_(nh), phiso_(ph), puiso_(pu) {}
0017 
0018     ~PFIsolation() {}
0019 
0020     PFIsolation& operator=(const PFIsolation& iso) {
0021       chiso_ = iso.chiso_;
0022       nhiso_ = iso.nhiso_;
0023       phiso_ = iso.phiso_;
0024       puiso_ = iso.puiso_;
0025       return *this;
0026     }
0027 
0028     float chargedHadronIso() const { return chiso_; }
0029     float neutralHadronIso() const { return nhiso_; }
0030     float photonIso() const { return phiso_; }
0031     float puChargedHadronIso() const { return puiso_; }
0032 
0033   private:
0034     float chiso_;  // charged hadrons from PV
0035     float nhiso_;  // neutral hadrons
0036     float phiso_;  // photons
0037     float puiso_;  // pileup contribution (charged hadrons not from PV)
0038   };
0039 
0040 }  // namespace pat
0041 
0042 #endif