#include <MonoPhotonSkimmer/MonoPhotonSkimmer/src/MonoPhotonSkimmer.cc>
Public Member Functions | |
MonoPhotonSkimmer (const edm::ParameterSet &) | |
~MonoPhotonSkimmer () | |
Private Member Functions | |
virtual void | beginJob () |
virtual void | endJob () |
virtual bool | filter (edm::Event &, const edm::EventSetup &) |
Private Attributes | |
double | _ecalisoOffsetEB |
double | _ecalisoOffsetEE |
double | _ecalisoSlopeEB |
double | _ecalisoSlopeEE |
double | _etawidthEB |
double | _etawidthEE |
double | _hadoveremEB |
double | _hadoveremEE |
double | _hcalisoOffsetEB |
double | _hcalisoOffsetEE |
double | _hcalisoSlopeEB |
double | _hcalisoSlopeEE |
double | _minPhoEtEB |
double | _minPhoEtEE |
edm::InputTag | _phoTag |
bool | _selectEE |
double | _trackisoOffsetEB |
double | _trackisoOffsetEE |
double | _trackisoSlopeEB |
double | _trackisoSlopeEE |
Description: [one line class summary]
Implementation: [Notes on implementation]
Definition at line 43 of file MonoPhotonSkimmer.cc.
MonoPhotonSkimmer::MonoPhotonSkimmer | ( | const edm::ParameterSet & | iConfig | ) | [explicit] |
Definition at line 96 of file MonoPhotonSkimmer.cc.
References _ecalisoOffsetEB, _ecalisoOffsetEE, _ecalisoSlopeEB, _ecalisoSlopeEE, _etawidthEB, _etawidthEE, _hadoveremEB, _hadoveremEE, _hcalisoOffsetEB, _hcalisoOffsetEE, _hcalisoSlopeEB, _hcalisoSlopeEE, _minPhoEtEB, _minPhoEtEE, _phoTag, _selectEE, _trackisoOffsetEB, _trackisoOffsetEE, _trackisoSlopeEB, _trackisoSlopeEE, and edm::ParameterSet::getParameter().
{ //now do what ever initialization is needed _phoTag = iConfig.getParameter<edm::InputTag>("phoTag"); _selectEE = iConfig.getParameter<bool>("selectEE"); _ecalisoOffsetEB = iConfig.getParameter<double>("ecalisoOffsetEB"); _ecalisoSlopeEB = iConfig.getParameter<double>("ecalisoSlopeEB"); _hcalisoOffsetEB = iConfig.getParameter<double>("hcalisoOffsetEB"); _hcalisoSlopeEB = iConfig.getParameter<double>("hcalisoSlopeEB"); _hadoveremEB = iConfig.getParameter<double>("hadoveremEB"); _minPhoEtEB = iConfig.getParameter<double>("minPhoEtEB"); _trackisoOffsetEB= iConfig.getParameter<double>("trackIsoOffsetEB"); _trackisoSlopeEB= iConfig.getParameter<double>("trackIsoSlopeEB"); _etawidthEB=iConfig.getParameter<double>("etaWidthEB"); _ecalisoOffsetEE = iConfig.getParameter<double>("ecalisoOffsetEE"); _ecalisoSlopeEE = iConfig.getParameter<double>("ecalisoSlopeEE"); _hcalisoOffsetEE = iConfig.getParameter<double>("hcalisoOffsetEE"); _hcalisoSlopeEE = iConfig.getParameter<double>("hcalisoSlopeEE"); _hadoveremEE = iConfig.getParameter<double>("hadoveremEE"); _minPhoEtEE = iConfig.getParameter<double>("minPhoEtEE"); _trackisoOffsetEE= iConfig.getParameter<double>("trackIsoOffsetEE"); _trackisoSlopeEE= iConfig.getParameter<double>("trackIsoSlopeEE"); _etawidthEE= iConfig.getParameter<double>("etaWidthEE"); }
MonoPhotonSkimmer::~MonoPhotonSkimmer | ( | ) |
Definition at line 134 of file MonoPhotonSkimmer.cc.
{ // do anything here that needs to be done at desctruction time // (e.g. close files, deallocate resources etc.) }
void MonoPhotonSkimmer::beginJob | ( | void | ) | [private, virtual] |
void MonoPhotonSkimmer::endJob | ( | void | ) | [private, virtual] |
bool MonoPhotonSkimmer::filter | ( | edm::Event & | iEvent, |
const edm::EventSetup & | iSetup | ||
) | [private, virtual] |
Implements edm::EDFilter.
Definition at line 149 of file MonoPhotonSkimmer.cc.
References _ecalisoOffsetEB, _ecalisoOffsetEE, _ecalisoSlopeEB, _ecalisoSlopeEE, _etawidthEB, _etawidthEE, _hadoveremEB, _hadoveremEE, _hcalisoOffsetEB, _hcalisoOffsetEE, _hcalisoSlopeEB, _hcalisoSlopeEE, _minPhoEtEB, _minPhoEtEE, _phoTag, _selectEE, _trackisoOffsetEB, _trackisoOffsetEE, _trackisoSlopeEB, _trackisoSlopeEE, edm::Event::getByLabel(), and interactiveExample::photons.
{ using namespace edm; Handle<reco::PhotonCollection> photonColl; iEvent.getByLabel(_phoTag, photonColl); const reco::PhotonCollection *photons = photonColl.product(); //Iterate over photon collection. // std::vector<reco::Photon> PreselPhotons; int PreselPhotons=0; reco::PhotonCollection::const_iterator pho; for (pho = (*photons).begin(); pho!= (*photons).end(); pho++){ if (!pho->isEB() && !_selectEE) continue; double ecalisocut = 0; double hcalisocut = 0; double hadoverem = 0; double minphoet = 0; double trackiso = 0; double etawidth = 0; if (pho->isEB()){ ecalisocut = _ecalisoOffsetEB + _ecalisoSlopeEB * pho->pt(); hcalisocut = _hcalisoOffsetEB + _hcalisoSlopeEB * pho->pt(); hadoverem = _hadoveremEB; minphoet = _minPhoEtEB; trackiso = _trackisoOffsetEB + _trackisoSlopeEB * pho->pt(); etawidth = _etawidthEB; } else{ ecalisocut = _ecalisoOffsetEE + _ecalisoSlopeEE * pho->pt(); hcalisocut = _hcalisoOffsetEE + _hcalisoSlopeEE * pho->pt(); hadoverem = _hadoveremEE; minphoet = _minPhoEtEE; trackiso = _trackisoOffsetEE + _trackisoSlopeEE * pho->pt(); etawidth = _etawidthEE; } if (pho->ecalRecHitSumEtConeDR04() < ecalisocut && pho->hcalTowerSumEtConeDR04() < hcalisocut && pho->hadronicOverEm() < hadoverem && pho->pt() > minphoet && pho->trkSumPtHollowConeDR04()<trackiso && pho->sigmaIetaIeta() <etawidth ) PreselPhotons++; }//Loop over Photons if (PreselPhotons > 0 ) return true; return false; }
double MonoPhotonSkimmer::_ecalisoOffsetEB [private] |
Definition at line 58 of file MonoPhotonSkimmer.cc.
Referenced by filter(), and MonoPhotonSkimmer().
double MonoPhotonSkimmer::_ecalisoOffsetEE [private] |
Definition at line 74 of file MonoPhotonSkimmer.cc.
Referenced by filter(), and MonoPhotonSkimmer().
double MonoPhotonSkimmer::_ecalisoSlopeEB [private] |
Definition at line 59 of file MonoPhotonSkimmer.cc.
Referenced by filter(), and MonoPhotonSkimmer().
double MonoPhotonSkimmer::_ecalisoSlopeEE [private] |
Definition at line 75 of file MonoPhotonSkimmer.cc.
Referenced by filter(), and MonoPhotonSkimmer().
double MonoPhotonSkimmer::_etawidthEB [private] |
Definition at line 72 of file MonoPhotonSkimmer.cc.
Referenced by filter(), and MonoPhotonSkimmer().
double MonoPhotonSkimmer::_etawidthEE [private] |
Definition at line 82 of file MonoPhotonSkimmer.cc.
Referenced by filter(), and MonoPhotonSkimmer().
double MonoPhotonSkimmer::_hadoveremEB [private] |
Definition at line 65 of file MonoPhotonSkimmer.cc.
Referenced by filter(), and MonoPhotonSkimmer().
double MonoPhotonSkimmer::_hadoveremEE [private] |
Definition at line 78 of file MonoPhotonSkimmer.cc.
Referenced by filter(), and MonoPhotonSkimmer().
double MonoPhotonSkimmer::_hcalisoOffsetEB [private] |
Definition at line 62 of file MonoPhotonSkimmer.cc.
Referenced by filter(), and MonoPhotonSkimmer().
double MonoPhotonSkimmer::_hcalisoOffsetEE [private] |
Definition at line 76 of file MonoPhotonSkimmer.cc.
Referenced by filter(), and MonoPhotonSkimmer().
double MonoPhotonSkimmer::_hcalisoSlopeEB [private] |
Definition at line 63 of file MonoPhotonSkimmer.cc.
Referenced by filter(), and MonoPhotonSkimmer().
double MonoPhotonSkimmer::_hcalisoSlopeEE [private] |
Definition at line 77 of file MonoPhotonSkimmer.cc.
Referenced by filter(), and MonoPhotonSkimmer().
double MonoPhotonSkimmer::_minPhoEtEB [private] |
Definition at line 67 of file MonoPhotonSkimmer.cc.
Referenced by filter(), and MonoPhotonSkimmer().
double MonoPhotonSkimmer::_minPhoEtEE [private] |
Definition at line 79 of file MonoPhotonSkimmer.cc.
Referenced by filter(), and MonoPhotonSkimmer().
edm::InputTag MonoPhotonSkimmer::_phoTag [private] |
Definition at line 54 of file MonoPhotonSkimmer.cc.
Referenced by filter(), and MonoPhotonSkimmer().
bool MonoPhotonSkimmer::_selectEE [private] |
Definition at line 55 of file MonoPhotonSkimmer.cc.
Referenced by filter(), and MonoPhotonSkimmer().
double MonoPhotonSkimmer::_trackisoOffsetEB [private] |
Definition at line 69 of file MonoPhotonSkimmer.cc.
Referenced by filter(), and MonoPhotonSkimmer().
double MonoPhotonSkimmer::_trackisoOffsetEE [private] |
Definition at line 80 of file MonoPhotonSkimmer.cc.
Referenced by filter(), and MonoPhotonSkimmer().
double MonoPhotonSkimmer::_trackisoSlopeEB [private] |
Definition at line 70 of file MonoPhotonSkimmer.cc.
Referenced by filter(), and MonoPhotonSkimmer().
double MonoPhotonSkimmer::_trackisoSlopeEE [private] |
Definition at line 81 of file MonoPhotonSkimmer.cc.
Referenced by filter(), and MonoPhotonSkimmer().