CMS 3D CMS Logo

List of all members | Public Member Functions | Private Attributes
PhotonSelectorAlgo Class Reference

#include <PhotonSelectorAlgo.h>

Public Member Functions

bool passPhotonSelection (const reco::Photon &) const
 
 PhotonSelectorAlgo (float choice, float c_Et_, float c_iso_track_a, float c_iso_track_b, float c_iso_ecal_a, float c_iso_ecal_b, float c_iso_hcal_a, float c_hcal_b, float c_hoe_, float comb_iso, float loose_hoe)
 
 ~PhotonSelectorAlgo ()
 

Private Attributes

float c_Et_
 
float c_hoe_
 
float c_iso_ecal_a_
 
float c_iso_ecal_b_
 
float c_iso_hcal_a_
 
float c_iso_hcal_b_
 
float c_iso_track_a_
 
float c_iso_track_b_
 
int choice_
 
float comb_iso_
 
float loose_hoe_
 

Detailed Description

Definition at line 9 of file PhotonSelectorAlgo.h.

Constructor & Destructor Documentation

PhotonSelectorAlgo::PhotonSelectorAlgo ( float  choice,
float  c_Et_,
float  c_iso_track_a,
float  c_iso_track_b,
float  c_iso_ecal_a,
float  c_iso_ecal_b,
float  c_iso_hcal_a,
float  c_hcal_b,
float  c_hoe_,
float  comb_iso,
float  loose_hoe 
)

Definition at line 6 of file PhotonSelectorAlgo.cc.

15  :
16  choice_(choice),
17  c_Et_(c_Et),
18  c_iso_track_a_(c_iso_track_a), c_iso_track_b_(c_iso_track_b),
19  c_iso_ecal_a_(c_iso_ecal_a), c_iso_ecal_b_(c_iso_ecal_b),
20  c_iso_hcal_a_(c_iso_hcal_a), c_iso_hcal_b_(c_iso_hcal_b),
21  c_hoe_(c_hoe),
22  comb_iso_(comb_iso),
23  loose_hoe_(loose_hoe)
24 {
25  ;
26 }
PhotonSelectorAlgo::~PhotonSelectorAlgo ( )
inline

Definition at line 24 of file PhotonSelectorAlgo.h.

References passPhotonSelection().

24 {};

Member Function Documentation

bool PhotonSelectorAlgo::passPhotonSelection ( const reco::Photon photon) const

Definition at line 28 of file PhotonSelectorAlgo.cc.

References c_Et_, c_hoe_, c_iso_ecal_a_, c_iso_ecal_b_, c_iso_hcal_a_, c_iso_hcal_b_, c_iso_track_a_, c_iso_track_b_, choice_, comb_iso_, reco::Photon::ecalRecHitSumEtConeDR03(), reco::Photon::ecalRecHitSumEtConeDR04(), reco::Photon::hadronicOverEm(), reco::Photon::hcalTowerSumEtConeDR03(), reco::Photon::hcalTowerSumEtConeDR04(), loose_hoe_, reco::LeafCandidate::pt(), reco::Photon::trkSumPtHollowConeDR03(), and reco::Photon::trkSumPtHollowConeDR04().

Referenced by ~PhotonSelectorAlgo().

28  {
29 
30  // Photon ET
31  float photonPt=photon.pt();
32  if( photonPt < c_Et_ ) return false;
33  if(choice_<0.1) //EGM Loose
34  {
35  //std::cout<<"Cuts:"<<c_Et_<<" H/E "<<c_hoe_<<"ECal Iso "<<c_iso_ecal_a_<<"HCal Iso "<<c_iso_hcal_a_<<"Track Iso "<<c_iso_track_a_<<std::endl;
36  // HoE
37  if (photon.hadronicOverEm() > c_hoe_ ) return false;
38 
39  // Track iso
40  if( photon.trkSumPtHollowConeDR04() > c_iso_track_a_ + c_iso_track_b_*photonPt) return false;
41 
42  // ECAL iso
43  if (photon.ecalRecHitSumEtConeDR04() > c_iso_ecal_a_ + c_iso_ecal_b_*photonPt) return false;
44 
45  // HCAL iso
46  if (photon.hcalTowerSumEtConeDR04() > c_iso_hcal_a_ + c_iso_hcal_b_*photonPt) return false ;
47  }
48  if(choice_>0.99)
49  {
50 
51  //std::cout<<"Cuts "<<comb_iso_<<" H/E "<<loose_hoe_<<std::endl;
52  if (photon.hadronicOverEm() >loose_hoe_ ) return false;
53  //Isolation variables in 0.3 cone combined
54  if(photon.trkSumPtHollowConeDR03()+photon.ecalRecHitSumEtConeDR03()+photon.hcalTowerSumEtConeDR03()>comb_iso_)return false;
55  }
56 
57  return true;
58 }
float hcalTowerSumEtConeDR04() const
Hcal isolation sum.
Definition: Photon.h:418
float hcalTowerSumEtConeDR03() const
Hcal isolation sum.
Definition: Photon.h:441
double pt() const final
transverse momentum
float ecalRecHitSumEtConeDR04() const
Definition: Photon.h:416
float trkSumPtHollowConeDR03() const
Definition: Photon.h:455
float hadronicOverEm() const
the total hadronic over electromagnetic fraction
Definition: Photon.h:212
float trkSumPtHollowConeDR04() const
Definition: Photon.h:432
float ecalRecHitSumEtConeDR03() const
Isolation variables in cone dR=0.3.
Definition: Photon.h:439

Member Data Documentation

float PhotonSelectorAlgo::c_Et_
private

Definition at line 33 of file PhotonSelectorAlgo.h.

Referenced by passPhotonSelection().

float PhotonSelectorAlgo::c_hoe_
private

Definition at line 40 of file PhotonSelectorAlgo.h.

Referenced by passPhotonSelection().

float PhotonSelectorAlgo::c_iso_ecal_a_
private

Definition at line 37 of file PhotonSelectorAlgo.h.

Referenced by passPhotonSelection().

float PhotonSelectorAlgo::c_iso_ecal_b_
private

Definition at line 37 of file PhotonSelectorAlgo.h.

Referenced by passPhotonSelection().

float PhotonSelectorAlgo::c_iso_hcal_a_
private

Definition at line 39 of file PhotonSelectorAlgo.h.

Referenced by passPhotonSelection().

float PhotonSelectorAlgo::c_iso_hcal_b_
private

Definition at line 39 of file PhotonSelectorAlgo.h.

Referenced by passPhotonSelection().

float PhotonSelectorAlgo::c_iso_track_a_
private

Definition at line 35 of file PhotonSelectorAlgo.h.

Referenced by passPhotonSelection().

float PhotonSelectorAlgo::c_iso_track_b_
private

Definition at line 35 of file PhotonSelectorAlgo.h.

Referenced by passPhotonSelection().

int PhotonSelectorAlgo::choice_
private

Definition at line 30 of file PhotonSelectorAlgo.h.

Referenced by passPhotonSelection().

float PhotonSelectorAlgo::comb_iso_
private

Definition at line 43 of file PhotonSelectorAlgo.h.

Referenced by passPhotonSelection().

float PhotonSelectorAlgo::loose_hoe_
private

Definition at line 44 of file PhotonSelectorAlgo.h.

Referenced by passPhotonSelection().