CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
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 8 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.

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 }
PhotonSelectorAlgo::~PhotonSelectorAlgo ( )
inline

Definition at line 22 of file PhotonSelectorAlgo.h.

22 {};

Member Function Documentation

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

Definition at line 31 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().

31  {
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 }
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
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

Member Data Documentation

float PhotonSelectorAlgo::c_Et_
private

Definition at line 31 of file PhotonSelectorAlgo.h.

Referenced by passPhotonSelection().

float PhotonSelectorAlgo::c_hoe_
private

Definition at line 38 of file PhotonSelectorAlgo.h.

Referenced by passPhotonSelection().

float PhotonSelectorAlgo::c_iso_ecal_a_
private

Definition at line 35 of file PhotonSelectorAlgo.h.

Referenced by passPhotonSelection().

float PhotonSelectorAlgo::c_iso_ecal_b_
private

Definition at line 35 of file PhotonSelectorAlgo.h.

Referenced by passPhotonSelection().

float PhotonSelectorAlgo::c_iso_hcal_a_
private

Definition at line 37 of file PhotonSelectorAlgo.h.

Referenced by passPhotonSelection().

float PhotonSelectorAlgo::c_iso_hcal_b_
private

Definition at line 37 of file PhotonSelectorAlgo.h.

Referenced by passPhotonSelection().

float PhotonSelectorAlgo::c_iso_track_a_
private

Definition at line 33 of file PhotonSelectorAlgo.h.

Referenced by passPhotonSelection().

float PhotonSelectorAlgo::c_iso_track_b_
private

Definition at line 33 of file PhotonSelectorAlgo.h.

Referenced by passPhotonSelection().

int PhotonSelectorAlgo::choice_
private

Definition at line 28 of file PhotonSelectorAlgo.h.

Referenced by passPhotonSelection().

float PhotonSelectorAlgo::comb_iso_
private

Definition at line 41 of file PhotonSelectorAlgo.h.

Referenced by passPhotonSelection().

float PhotonSelectorAlgo::loose_hoe_
private

Definition at line 42 of file PhotonSelectorAlgo.h.

Referenced by passPhotonSelection().