PFIsolation

Macros

Line Code
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32
#ifndef DataFormats_PatCandidates_interface_PFIsolation_h
#define DataFormats_PatCandidates_interface_PFIsolation_h

/*
  \class    pat::PFIsolation PFIsolation.h "DataFormats/PatCandidates/interface/PFIsolation.h"
  \brief Basic class to store components of pf-isolation for pf candidates
  \author   Bennett Marsh
*/

namespace pat {

  class PFIsolation {
  public:
    PFIsolation() : chiso_(9999.), nhiso_(9999.), phiso_(9999.), puiso_(9999.) {}

    PFIsolation(float ch, float nh, float ph, float pu) : chiso_(ch), nhiso_(nh), phiso_(ph), puiso_(pu) {}

    float chargedHadronIso() const { return chiso_; }
    float neutralHadronIso() const { return nhiso_; }
    float photonIso() const { return phiso_; }
    float puChargedHadronIso() const { return puiso_; }

  private:
    float chiso_;  // charged hadrons from PV
    float nhiso_;  // neutral hadrons
    float phiso_;  // photons
    float puiso_;  // pileup contribution (charged hadrons not from PV)
  };

}  // namespace pat

#endif