CMS 3D CMS Logo

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 }
muons2muons_cfi.photon
photon
Definition: muons2muons_cfi.py:28
PhotonSelectorAlgo.h
PhotonSelectorAlgo::c_iso_hcal_a_
float c_iso_hcal_a_
Definition: PhotonSelectorAlgo.h:37
PhotonSelectorAlgo::c_iso_hcal_b_
float c_iso_hcal_b_
Definition: PhotonSelectorAlgo.h:37
PhotonSelectorAlgo::c_Et_
float c_Et_
Definition: PhotonSelectorAlgo.h:31
PhotonSelectorAlgo::c_iso_ecal_a_
float c_iso_ecal_a_
Definition: PhotonSelectorAlgo.h:35
PhotonSelectorAlgo::c_iso_track_b_
float c_iso_track_b_
Definition: PhotonSelectorAlgo.h:33
PhotonSelectorAlgo::c_iso_ecal_b_
float c_iso_ecal_b_
Definition: PhotonSelectorAlgo.h:35
PhotonSelectorAlgo::comb_iso_
float comb_iso_
Definition: PhotonSelectorAlgo.h:41
PhotonSelectorAlgo::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: PhotonSelectorAlgo.cc:6
PhotonSelectorAlgo::c_hoe_
float c_hoe_
Definition: PhotonSelectorAlgo.h:38
PhotonSelectorAlgo::c_iso_track_a_
float c_iso_track_a_
Definition: PhotonSelectorAlgo.h:33
reco::Photon
Definition: Photon.h:21
PhotonSelectorAlgo::loose_hoe_
float loose_hoe_
Definition: PhotonSelectorAlgo.h:42
PhotonSelectorAlgo::choice_
int choice_
Definition: PhotonSelectorAlgo.h:28
PhotonSelectorAlgo::passPhotonSelection
bool passPhotonSelection(const reco::Photon &) const
Definition: PhotonSelectorAlgo.cc:31
HLTObjectMonitor_cfi.photonPt
photonPt
Definition: HLTObjectMonitor_cfi.py:52