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 8 of file PhotonSelectorAlgo.h.

Constructor & Destructor Documentation

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

Definition at line 22 of file PhotonSelectorAlgo.h.

22 {};

Member Function Documentation

◆ passPhotonSelection()

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_, loose_hoe_, displacedMuons_cfi::photon, and HLTObjectMonitor_cfi::photonPt.

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 }

Member Data Documentation

◆ c_Et_

float PhotonSelectorAlgo::c_Et_
private

Definition at line 31 of file PhotonSelectorAlgo.h.

Referenced by passPhotonSelection().

◆ c_hoe_

float PhotonSelectorAlgo::c_hoe_
private

Definition at line 38 of file PhotonSelectorAlgo.h.

Referenced by passPhotonSelection().

◆ c_iso_ecal_a_

float PhotonSelectorAlgo::c_iso_ecal_a_
private

Definition at line 35 of file PhotonSelectorAlgo.h.

Referenced by passPhotonSelection().

◆ c_iso_ecal_b_

float PhotonSelectorAlgo::c_iso_ecal_b_
private

Definition at line 35 of file PhotonSelectorAlgo.h.

Referenced by passPhotonSelection().

◆ c_iso_hcal_a_

float PhotonSelectorAlgo::c_iso_hcal_a_
private

Definition at line 37 of file PhotonSelectorAlgo.h.

Referenced by passPhotonSelection().

◆ c_iso_hcal_b_

float PhotonSelectorAlgo::c_iso_hcal_b_
private

Definition at line 37 of file PhotonSelectorAlgo.h.

Referenced by passPhotonSelection().

◆ c_iso_track_a_

float PhotonSelectorAlgo::c_iso_track_a_
private

Definition at line 33 of file PhotonSelectorAlgo.h.

Referenced by passPhotonSelection().

◆ c_iso_track_b_

float PhotonSelectorAlgo::c_iso_track_b_
private

Definition at line 33 of file PhotonSelectorAlgo.h.

Referenced by passPhotonSelection().

◆ choice_

int PhotonSelectorAlgo::choice_
private

Definition at line 28 of file PhotonSelectorAlgo.h.

Referenced by passPhotonSelection().

◆ comb_iso_

float PhotonSelectorAlgo::comb_iso_
private

Definition at line 41 of file PhotonSelectorAlgo.h.

Referenced by passPhotonSelection().

◆ loose_hoe_

float PhotonSelectorAlgo::loose_hoe_
private

Definition at line 42 of file PhotonSelectorAlgo.h.

Referenced by passPhotonSelection().