#include <RecoEgamma/EgammaHLTProducers/interface/EgammaHLTPhotonTrackIsolationProducersRegional.h>
Public Member Functions | |
EgammaHLTPhotonTrackIsolationProducersRegional (const edm::ParameterSet &) | |
virtual void | produce (edm::Event &, const edm::EventSetup &) |
~EgammaHLTPhotonTrackIsolationProducersRegional () | |
Private Attributes | |
edm::ParameterSet | conf_ |
bool | countTracks_ |
double | egTrkIsoConeSize_ |
double | egTrkIsoPtMin_ |
double | egTrkIsoRSpan_ |
double | egTrkIsoVetoConeSize_ |
double | egTrkIsoZSpan_ |
edm::InputTag | recoEcalCandidateProducer_ |
EgammaHLTTrackIsolation * | test_ |
edm::InputTag | trackProducer_ |
$Id:
Definition at line 34 of file EgammaHLTPhotonTrackIsolationProducersRegional.h.
EgammaHLTPhotonTrackIsolationProducersRegional::EgammaHLTPhotonTrackIsolationProducersRegional | ( | const edm::ParameterSet & | config | ) | [explicit] |
Definition at line 33 of file EgammaHLTPhotonTrackIsolationProducersRegional.cc.
References conf_, countTracks_, egTrkIsoConeSize_, egTrkIsoPtMin_, egTrkIsoRSpan_, egTrkIsoVetoConeSize_, egTrkIsoZSpan_, edm::ParameterSet::getParameter(), recoEcalCandidateProducer_, test_, and trackProducer_.
: conf_(config) { recoEcalCandidateProducer_ = conf_.getParameter<edm::InputTag>("recoEcalCandidateProducer"); trackProducer_ = conf_.getParameter<edm::InputTag>("trackProducer"); countTracks_ = conf_.getParameter<bool>("countTracks"); egTrkIsoPtMin_ = conf_.getParameter<double>("egTrkIsoPtMin"); egTrkIsoConeSize_ = conf_.getParameter<double>("egTrkIsoConeSize"); egTrkIsoZSpan_ = conf_.getParameter<double>("egTrkIsoZSpan"); egTrkIsoRSpan_ = conf_.getParameter<double>("egTrkIsoRSpan"); egTrkIsoVetoConeSize_ = conf_.getParameter<double>("egTrkIsoVetoConeSize"); double egTrkIsoStripBarrel = conf_.getParameter<double>("egTrkIsoStripBarrel"); double egTrkIsoStripEndcap = conf_.getParameter<double>("egTrkIsoStripEndcap"); test_ = new EgammaHLTTrackIsolation(egTrkIsoPtMin_,egTrkIsoConeSize_, egTrkIsoZSpan_,egTrkIsoRSpan_,egTrkIsoVetoConeSize_, egTrkIsoStripBarrel,egTrkIsoStripEndcap); //register your products produces < reco::RecoEcalCandidateIsolationMap >(); }
EgammaHLTPhotonTrackIsolationProducersRegional::~EgammaHLTPhotonTrackIsolationProducersRegional | ( | ) |
Definition at line 60 of file EgammaHLTPhotonTrackIsolationProducersRegional.cc.
References test_.
{delete test_;}
void EgammaHLTPhotonTrackIsolationProducersRegional::produce | ( | edm::Event & | iEvent, |
const edm::EventSetup & | iSetup | ||
) | [virtual] |
Implements edm::EDProducer.
Definition at line 69 of file EgammaHLTPhotonTrackIsolationProducersRegional.cc.
References begin, countTracks_, edm::Event::getByLabel(), edm::AssociationMap< Tag >::insert(), EgammaHLTTrackIsolation::photonPtSum(), EgammaHLTTrackIsolation::photonTrackCount(), edm::Handle< T >::product(), edm::Event::put(), recoEcalCandidateProducer_, test_, and trackProducer_.
{ // Get the HLT filtered objects edm::Handle<reco::RecoEcalCandidateCollection> recoecalcandHandle; iEvent.getByLabel(recoEcalCandidateProducer_,recoecalcandHandle); // Get the barrel hcal hits edm::Handle<reco::TrackCollection> trackHandle; iEvent.getByLabel(trackProducer_, trackHandle); const reco::TrackCollection* trackCollection = trackHandle.product(); reco::RecoEcalCandidateIsolationMap isoMap; for(reco::RecoEcalCandidateCollection::const_iterator iRecoEcalCand = recoecalcandHandle->begin(); iRecoEcalCand != recoecalcandHandle->end(); iRecoEcalCand++){ reco::RecoEcalCandidateRef recoecalcandref(recoecalcandHandle,iRecoEcalCand -recoecalcandHandle ->begin()); const reco::RecoCandidate *tempiRecoEcalCand = &(*recoecalcandref); bool usePhotonVertex = false; float isol; if (countTracks_) { isol = test_->photonTrackCount(tempiRecoEcalCand,trackCollection,usePhotonVertex); } else { isol = test_->photonPtSum(tempiRecoEcalCand,trackCollection,usePhotonVertex); } isoMap.insert(recoecalcandref, isol); } std::auto_ptr<reco::RecoEcalCandidateIsolationMap> isolMap(new reco::RecoEcalCandidateIsolationMap(isoMap)); iEvent.put(isolMap); }
Definition at line 47 of file EgammaHLTPhotonTrackIsolationProducersRegional.h.
Referenced by EgammaHLTPhotonTrackIsolationProducersRegional().
bool EgammaHLTPhotonTrackIsolationProducersRegional::countTracks_ [private] |
Definition at line 49 of file EgammaHLTPhotonTrackIsolationProducersRegional.h.
Referenced by EgammaHLTPhotonTrackIsolationProducersRegional(), and produce().
double EgammaHLTPhotonTrackIsolationProducersRegional::egTrkIsoConeSize_ [private] |
Definition at line 52 of file EgammaHLTPhotonTrackIsolationProducersRegional.h.
Referenced by EgammaHLTPhotonTrackIsolationProducersRegional().
double EgammaHLTPhotonTrackIsolationProducersRegional::egTrkIsoPtMin_ [private] |
Definition at line 51 of file EgammaHLTPhotonTrackIsolationProducersRegional.h.
Referenced by EgammaHLTPhotonTrackIsolationProducersRegional().
double EgammaHLTPhotonTrackIsolationProducersRegional::egTrkIsoRSpan_ [private] |
Definition at line 54 of file EgammaHLTPhotonTrackIsolationProducersRegional.h.
Referenced by EgammaHLTPhotonTrackIsolationProducersRegional().
Definition at line 55 of file EgammaHLTPhotonTrackIsolationProducersRegional.h.
Referenced by EgammaHLTPhotonTrackIsolationProducersRegional().
double EgammaHLTPhotonTrackIsolationProducersRegional::egTrkIsoZSpan_ [private] |
Definition at line 53 of file EgammaHLTPhotonTrackIsolationProducersRegional.h.
Referenced by EgammaHLTPhotonTrackIsolationProducersRegional().
Definition at line 44 of file EgammaHLTPhotonTrackIsolationProducersRegional.h.
Referenced by EgammaHLTPhotonTrackIsolationProducersRegional(), and produce().
Definition at line 57 of file EgammaHLTPhotonTrackIsolationProducersRegional.h.
Referenced by EgammaHLTPhotonTrackIsolationProducersRegional(), produce(), and ~EgammaHLTPhotonTrackIsolationProducersRegional().
Definition at line 45 of file EgammaHLTPhotonTrackIsolationProducersRegional.h.
Referenced by EgammaHLTPhotonTrackIsolationProducersRegional(), and produce().