CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
PhotonSelectorAlgo.cc
Go to the documentation of this file.
1 //
2 // Original Authors: Nicholas Wardle, Florian Beaudette
3 //
5 
7  float c_Et,
8  float c_iso_track_a,
9  float c_iso_track_b,
10  float c_iso_ecal_a,
11  float c_iso_ecal_b,
12  float c_iso_hcal_a,
13  float c_iso_hcal_b,
14  float c_hoe,
15  float comb_iso,
16  float loose_hoe)
17  : choice_(choice),
18  c_Et_(c_Et),
19  c_iso_track_a_(c_iso_track_a),
20  c_iso_track_b_(c_iso_track_b),
21  c_iso_ecal_a_(c_iso_ecal_a),
22  c_iso_ecal_b_(c_iso_ecal_b),
23  c_iso_hcal_a_(c_iso_hcal_a),
24  c_iso_hcal_b_(c_iso_hcal_b),
25  c_hoe_(c_hoe),
26  comb_iso_(comb_iso),
27  loose_hoe_(loose_hoe) {
28  ;
29 }
30 
32  // Photon ET
33  float photonPt = photon.pt();
34  if (photonPt < c_Et_)
35  return false;
36  if (choice_ < 0.1) //EGM Loose
37  {
38  //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;
39  // HoE
40  if (photon.hadronicOverEm() > c_hoe_)
41  return false;
42 
43  // Track iso
44  if (photon.trkSumPtHollowConeDR04() > c_iso_track_a_ + c_iso_track_b_ * photonPt)
45  return false;
46 
47  // ECAL iso
48  if (photon.ecalRecHitSumEtConeDR04() > c_iso_ecal_a_ + c_iso_ecal_b_ * photonPt)
49  return false;
50 
51  // HCAL iso
52  if (photon.hcalTowerSumEtConeDR04() > c_iso_hcal_a_ + c_iso_hcal_b_ * photonPt)
53  return false;
54  }
55  if (choice_ > 0.99) {
56  //std::cout<<"Cuts "<<comb_iso_<<" H/E "<<loose_hoe_<<std::endl;
57  if (photon.hadronicOverEm() > loose_hoe_)
58  return false;
59  //Isolation variables in 0.3 cone combined
60  if (photon.trkSumPtHollowConeDR03() + photon.ecalRecHitSumEtConeDR03() + photon.hcalTowerSumEtConeDR03() >
61  comb_iso_)
62  return false;
63  }
64 
65  return true;
66 }
bool passPhotonSelection(const reco::Photon &) const
double pt() const final
transverse momentum
float hcalTowerSumEtConeDR04(int depth=0) const
Definition: Photon.h:472
float ecalRecHitSumEtConeDR04() const
Definition: Photon.h:454
float trkSumPtHollowConeDR03() const
Definition: Photon.h:509
float hadronicOverEm(int depth=0) const
Definition: Photon.h:233
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)
float trkSumPtHollowConeDR04() const
Definition: Photon.h:494
float ecalRecHitSumEtConeDR03() const
Isolation variables in cone dR=0.3.
Definition: Photon.h:501
float hcalTowerSumEtConeDR03(int depth=0) const
Hcal isolation sum for each depth excluding the region containing the rechits used for hcalOverEcal()...
Definition: Photon.h:503