#include <RecoEgamma/EgammaHLTProducers/interface/EgammaHLTHcalIsolationDoubleConeProducers.h>
Public Member Functions | |
EgammaHLTHcalIsolationDoubleConeProducers (const edm::ParameterSet &) | |
virtual void | produce (edm::Event &, const edm::EventSetup &) |
~EgammaHLTHcalIsolationDoubleConeProducers () | |
Private Attributes | |
edm::ParameterSet | conf_ |
double | egHcalExclusion_ |
double | egHcalIsoConeSize_ |
double | egHcalIsoPtMin_ |
edm::InputTag | hbRecHitProducer_ |
edm::InputTag | hfRecHitProducer_ |
edm::InputTag | recoEcalCandidateProducer_ |
EgammaHLTHcalIsolationDoubleCone * | test_ |
Definition at line 36 of file EgammaHLTHcalIsolationDoubleConeProducers.h.
EgammaHLTHcalIsolationDoubleConeProducers::EgammaHLTHcalIsolationDoubleConeProducers | ( | const edm::ParameterSet & | config | ) | [explicit] |
Definition at line 36 of file EgammaHLTHcalIsolationDoubleConeProducers.cc.
References conf_, egHcalExclusion_, egHcalIsoConeSize_, egHcalIsoPtMin_, edm::ParameterSet::getParameter(), hbRecHitProducer_, hfRecHitProducer_, recoEcalCandidateProducer_, and test_.
: conf_(config) { // use configuration file to setup input/output collection names recoEcalCandidateProducer_ = conf_.getParameter<edm::InputTag>("recoEcalCandidateProducer"); hbRecHitProducer_ = conf_.getParameter<edm::InputTag>("hbRecHitProducer"); hfRecHitProducer_ = conf_.getParameter<edm::InputTag>("hfRecHitProducer"); egHcalIsoPtMin_ = conf_.getParameter<double>("egHcalIsoPtMin"); egHcalIsoConeSize_ = conf_.getParameter<double>("egHcalIsoConeSize"); egHcalExclusion_ = conf_.getParameter<double>("egHcalExclusion"); test_ = new EgammaHLTHcalIsolationDoubleCone(egHcalIsoPtMin_,egHcalIsoConeSize_,egHcalExclusion_); //register your products produces < reco::RecoEcalCandidateIsolationMap >(); }
EgammaHLTHcalIsolationDoubleConeProducers::~EgammaHLTHcalIsolationDoubleConeProducers | ( | ) |
Definition at line 56 of file EgammaHLTHcalIsolationDoubleConeProducers.cc.
References test_.
{delete test_;}
void EgammaHLTHcalIsolationDoubleConeProducers::produce | ( | edm::Event & | iEvent, |
const edm::EventSetup & | iSetup | ||
) | [virtual] |
Implements edm::EDProducer.
Definition at line 65 of file EgammaHLTHcalIsolationDoubleConeProducers.cc.
References begin, edm::EventSetup::get(), edm::Event::getByLabel(), hbRecHitProducer_, hfRecHitProducer_, edm::AssociationMap< Tag >::insert(), EgammaHLTHcalIsolationDoubleCone::isolPtSum(), edm::ESHandle< T >::product(), edm::Handle< T >::product(), edm::Event::put(), recoEcalCandidateProducer_, and test_.
{ // std::cout << "YYY" << egHcalIsoConeSize_ << " " << egHcalExclusion_ <<std::endl; // Get the HLT filtered objects edm::Handle<reco::RecoEcalCandidateCollection> recoecalcandHandle; iEvent.getByLabel(recoEcalCandidateProducer_,recoecalcandHandle); // Get the barrel hcal hits edm::Handle<HBHERecHitCollection> hhitBarrelHandle; iEvent.getByLabel(hbRecHitProducer_, hhitBarrelHandle); const HBHERecHitCollection* hcalhitBarrelCollection = hhitBarrelHandle.product(); // Get the forward hcal hits edm::Handle<HFRecHitCollection> hhitEndcapHandle; iEvent.getByLabel(hfRecHitProducer_, hhitEndcapHandle); const HFRecHitCollection* hcalhitEndcapCollection = hhitEndcapHandle.product(); //Get Calo Geometry edm::ESHandle<CaloGeometry> pG; iSetup.get<CaloGeometryRecord>().get(pG); const CaloGeometry* caloGeom = pG.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); float isol = test_->isolPtSum(tempiRecoEcalCand,hcalhitBarrelCollection,hcalhitEndcapCollection,caloGeom); isoMap.insert(recoecalcandref, isol); // std::cout << isol << std::endl; } std::auto_ptr<reco::RecoEcalCandidateIsolationMap> isolMap(new reco::RecoEcalCandidateIsolationMap(isoMap)); iEvent.put(isolMap); }
Definition at line 54 of file EgammaHLTHcalIsolationDoubleConeProducers.h.
Referenced by EgammaHLTHcalIsolationDoubleConeProducers().
double EgammaHLTHcalIsolationDoubleConeProducers::egHcalExclusion_ [private] |
Definition at line 52 of file EgammaHLTHcalIsolationDoubleConeProducers.h.
Referenced by EgammaHLTHcalIsolationDoubleConeProducers().
double EgammaHLTHcalIsolationDoubleConeProducers::egHcalIsoConeSize_ [private] |
Definition at line 51 of file EgammaHLTHcalIsolationDoubleConeProducers.h.
Referenced by EgammaHLTHcalIsolationDoubleConeProducers().
double EgammaHLTHcalIsolationDoubleConeProducers::egHcalIsoPtMin_ [private] |
Definition at line 50 of file EgammaHLTHcalIsolationDoubleConeProducers.h.
Referenced by EgammaHLTHcalIsolationDoubleConeProducers().
Definition at line 47 of file EgammaHLTHcalIsolationDoubleConeProducers.h.
Referenced by EgammaHLTHcalIsolationDoubleConeProducers(), and produce().
Definition at line 48 of file EgammaHLTHcalIsolationDoubleConeProducers.h.
Referenced by EgammaHLTHcalIsolationDoubleConeProducers(), and produce().
Definition at line 46 of file EgammaHLTHcalIsolationDoubleConeProducers.h.
Referenced by EgammaHLTHcalIsolationDoubleConeProducers(), and produce().
Definition at line 56 of file EgammaHLTHcalIsolationDoubleConeProducers.h.
Referenced by EgammaHLTHcalIsolationDoubleConeProducers(), produce(), and ~EgammaHLTHcalIsolationDoubleConeProducers().