CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
PhotonSelectorAlgo.cc
Go to the documentation of this file.
1 //
2 // Original Authors: Nicholas Wardle, Florian Beaudette
3 //
5 
7  float choice,
8  float c_Et,
9  float c_iso_track_a, float c_iso_track_b,
10  float c_iso_ecal_a, float c_iso_ecal_b,
11  float c_iso_hcal_a, float c_iso_hcal_b,
12  float c_hoe,
13  float comb_iso,
14  float loose_hoe
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 }
27 
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:340
bool passPhotonSelection(const reco::Photon &) const
float hcalTowerSumEtConeDR03() const
Hcal isolation sum.
Definition: Photon.h:363
float ecalRecHitSumEtConeDR04() const
Definition: Photon.h:338
float trkSumPtHollowConeDR03() const
Definition: Photon.h:377
float hadronicOverEm() const
the total hadronic over electromagnetic fraction
Definition: Photon.h:167
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)
virtual double pt() const
transverse momentum
float trkSumPtHollowConeDR04() const
Definition: Photon.h:354
float ecalRecHitSumEtConeDR03() const
Isolation variables in cone dR=0.3.
Definition: Photon.h:361