#include <RecoEgamma/EgammaHLTProducers/interface/EgammaHLTHcalIsolationProducersRegional.h>
Public Member Functions | |
EgammaHLTHcalIsolationProducersRegional (const edm::ParameterSet &) | |
virtual void | produce (edm::Event &, const edm::EventSetup &) |
~EgammaHLTHcalIsolationProducersRegional () | |
Private Attributes | |
edm::ParameterSet | conf_ |
double | egHcalIsoConeSize_ |
double | egHcalIsoPtMin_ |
edm::InputTag | hbRecHitProducer_ |
edm::InputTag | hfRecHitProducer_ |
edm::InputTag | recoEcalCandidateProducer_ |
EgammaHLTHcalIsolation * | test_ |
$Id:
Definition at line 34 of file EgammaHLTHcalIsolationProducersRegional.h.
EgammaHLTHcalIsolationProducersRegional::EgammaHLTHcalIsolationProducersRegional | ( | const edm::ParameterSet & | config | ) | [explicit] |
Definition at line 34 of file EgammaHLTHcalIsolationProducersRegional.cc.
References conf_, egHcalIsoConeSize_, egHcalIsoPtMin_, edm::ParameterSet::getParameter(), hbRecHitProducer_, hfRecHitProducer_, recoEcalCandidateProducer_, and test_.
00034 : conf_(config) 00035 { 00036 // use configuration file to setup input/output collection names 00037 recoEcalCandidateProducer_ = conf_.getParameter<edm::InputTag>("recoEcalCandidateProducer"); 00038 00039 hbRecHitProducer_ = conf_.getParameter<edm::InputTag>("hbRecHitProducer"); 00040 hfRecHitProducer_ = conf_.getParameter<edm::InputTag>("hfRecHitProducer"); 00041 00042 egHcalIsoPtMin_ = conf_.getParameter<double>("egHcalIsoPtMin"); 00043 egHcalIsoConeSize_ = conf_.getParameter<double>("egHcalIsoConeSize"); 00044 00045 test_ = new EgammaHLTHcalIsolation(egHcalIsoPtMin_,egHcalIsoConeSize_); 00046 00047 00048 //register your products 00049 produces < reco::RecoEcalCandidateIsolationMap >(); 00050 }
EgammaHLTHcalIsolationProducersRegional::~EgammaHLTHcalIsolationProducersRegional | ( | ) |
Definition at line 53 of file EgammaHLTHcalIsolationProducersRegional.cc.
References test_.
00053 {delete test_;}
void EgammaHLTHcalIsolationProducersRegional::produce | ( | edm::Event & | iEvent, | |
const edm::EventSetup & | iSetup | |||
) | [virtual] |
Implements edm::EDProducer.
Definition at line 62 of file EgammaHLTHcalIsolationProducersRegional.cc.
References begin, edm::EventSetup::get(), edm::Event::getByLabel(), hbRecHitProducer_, hfRecHitProducer_, edm::AssociationMap< Tag >::insert(), EgammaHLTHcalIsolation::isolPtSum(), edm::ESHandle< T >::product(), edm::Handle< T >::product(), edm::Event::put(), recoEcalCandidateProducer_, and test_.
00063 { 00064 00065 // Get the HLT filtered objects 00066 edm::Handle<reco::RecoEcalCandidateCollection> recoecalcandHandle; 00067 iEvent.getByLabel(recoEcalCandidateProducer_,recoecalcandHandle); 00068 // Get the barrel hcal hits 00069 edm::Handle<HBHERecHitCollection> hhitBarrelHandle; 00070 iEvent.getByLabel(hbRecHitProducer_, hhitBarrelHandle); 00071 const HBHERecHitCollection* hcalhitBarrelCollection = hhitBarrelHandle.product(); 00072 // Get the forward hcal hits 00073 edm::Handle<HFRecHitCollection> hhitEndcapHandle; 00074 iEvent.getByLabel(hfRecHitProducer_, hhitEndcapHandle); 00075 const HFRecHitCollection* hcalhitEndcapCollection = hhitEndcapHandle.product(); 00076 //Get Calo Geometry 00077 edm::ESHandle<CaloGeometry> pG; 00078 iSetup.get<CaloGeometryRecord>().get(pG); 00079 const CaloGeometry* caloGeom = pG.product(); 00080 00081 reco::RecoEcalCandidateIsolationMap isoMap; 00082 00083 00084 for(reco::RecoEcalCandidateCollection::const_iterator iRecoEcalCand = recoecalcandHandle->begin(); iRecoEcalCand != recoecalcandHandle->end(); iRecoEcalCand++){ 00085 00086 reco::RecoEcalCandidateRef recoecalcandref(recoecalcandHandle,iRecoEcalCand -recoecalcandHandle ->begin()); 00087 00088 00089 const reco::RecoCandidate *tempiRecoEcalCand = &(*recoecalcandref); 00090 float isol = test_->isolPtSum(tempiRecoEcalCand,hcalhitBarrelCollection,hcalhitEndcapCollection,caloGeom); 00091 00092 isoMap.insert(recoecalcandref, isol); 00093 00094 } 00095 00096 std::auto_ptr<reco::RecoEcalCandidateIsolationMap> isolMap(new reco::RecoEcalCandidateIsolationMap(isoMap)); 00097 iEvent.put(isolMap); 00098 00099 }
Definition at line 51 of file EgammaHLTHcalIsolationProducersRegional.h.
Referenced by EgammaHLTHcalIsolationProducersRegional().
double EgammaHLTHcalIsolationProducersRegional::egHcalIsoConeSize_ [private] |
Definition at line 49 of file EgammaHLTHcalIsolationProducersRegional.h.
Referenced by EgammaHLTHcalIsolationProducersRegional().
double EgammaHLTHcalIsolationProducersRegional::egHcalIsoPtMin_ [private] |
Definition at line 48 of file EgammaHLTHcalIsolationProducersRegional.h.
Referenced by EgammaHLTHcalIsolationProducersRegional().
Definition at line 45 of file EgammaHLTHcalIsolationProducersRegional.h.
Referenced by EgammaHLTHcalIsolationProducersRegional(), and produce().
Definition at line 46 of file EgammaHLTHcalIsolationProducersRegional.h.
Referenced by EgammaHLTHcalIsolationProducersRegional(), and produce().
Definition at line 44 of file EgammaHLTHcalIsolationProducersRegional.h.
Referenced by EgammaHLTHcalIsolationProducersRegional(), and produce().
Definition at line 53 of file EgammaHLTHcalIsolationProducersRegional.h.
Referenced by EgammaHLTHcalIsolationProducersRegional(), produce(), and ~EgammaHLTHcalIsolationProducersRegional().