Go to the documentation of this file.00001
00002
00003
00004 #include "RecoParticleFlow/PFProducer/interface/PhotonSelectorAlgo.h"
00005
00006 PhotonSelectorAlgo::PhotonSelectorAlgo(
00007 float choice,
00008 float c_Et,
00009 float c_iso_track_a, float c_iso_track_b,
00010 float c_iso_ecal_a, float c_iso_ecal_b,
00011 float c_iso_hcal_a, float c_iso_hcal_b,
00012 float c_hoe,
00013 float comb_iso,
00014 float loose_hoe
00015 ):
00016 choice_(choice),
00017 c_Et_(c_Et),
00018 c_iso_track_a_(c_iso_track_a), c_iso_track_b_(c_iso_track_b),
00019 c_iso_ecal_a_(c_iso_ecal_a), c_iso_ecal_b_(c_iso_ecal_b),
00020 c_iso_hcal_a_(c_iso_hcal_a), c_iso_hcal_b_(c_iso_hcal_b),
00021 c_hoe_(c_hoe),
00022 comb_iso_(comb_iso),
00023 loose_hoe_(loose_hoe)
00024 {
00025 ;
00026 }
00027
00028 bool PhotonSelectorAlgo::passPhotonSelection(const reco::Photon & photon) const {
00029
00030
00031 float photonPt=photon.pt();
00032 if( photonPt < c_Et_ ) return false;
00033 if(choice_<0.1)
00034 {
00035
00036
00037 if (photon.hadronicOverEm() > c_hoe_ ) return false;
00038
00039
00040 if( photon.trkSumPtHollowConeDR04() > c_iso_track_a_ + c_iso_track_b_*photonPt) return false;
00041
00042
00043 if (photon.ecalRecHitSumEtConeDR04() > c_iso_ecal_a_ + c_iso_ecal_b_*photonPt) return false;
00044
00045
00046 if (photon.hcalTowerSumEtConeDR04() > c_iso_hcal_a_ + c_iso_hcal_b_*photonPt) return false ;
00047 }
00048 if(choice_>0.99)
00049 {
00050
00051
00052 if (photon.hadronicOverEm() >loose_hoe_ ) return false;
00053
00054 if(photon.trkSumPtHollowConeDR03()+photon.ecalRecHitSumEtConeDR03()+photon.hcalTowerSumEtConeDR03()>comb_iso_)return false;
00055 }
00056
00057 return true;
00058 }