#include <RecoEgamma/EgammaHLTProducers/interface/EgammaHLTEcalIsolationProducersRegional.h>
Public Member Functions | |
EgammaHLTEcalIsolationProducersRegional (const edm::ParameterSet &) | |
virtual void | produce (edm::Event &, const edm::EventSetup &) |
~EgammaHLTEcalIsolationProducersRegional () | |
Private Attributes | |
int | algoType_ |
edm::InputTag | bcBarrelProducer_ |
edm::InputTag | bcEndcapProducer_ |
edm::ParameterSet | conf_ |
double | egEcalIsoConeSize_ |
double | egEcalIsoEtMin_ |
edm::InputTag | recoEcalCandidateProducer_ |
edm::InputTag | scIslandBarrelProducer_ |
edm::InputTag | scIslandEndcapProducer_ |
EgammaHLTEcalIsolation * | test_ |
Description: <one line="" class="" summary>="">
Implementation: <Notes on="" implementation>="">
$Id:
Definition at line 39 of file EgammaHLTEcalIsolationProducersRegional.h.
EgammaHLTEcalIsolationProducersRegional::EgammaHLTEcalIsolationProducersRegional | ( | const edm::ParameterSet & | config | ) | [explicit] |
Definition at line 41 of file EgammaHLTEcalIsolationProducersRegional.cc.
References algoType_, bcBarrelProducer_, bcEndcapProducer_, conf_, egEcalIsoConeSize_, egEcalIsoEtMin_, edm::ParameterSet::getParameter(), recoEcalCandidateProducer_, scIslandBarrelProducer_, scIslandEndcapProducer_, and test_.
: conf_(config) { // use configuration file to setup input/output collection names bcBarrelProducer_ = conf_.getParameter<edm::InputTag>("bcBarrelProducer"); bcEndcapProducer_ = conf_.getParameter<edm::InputTag>("bcEndcapProducer"); scIslandBarrelProducer_ = conf_.getParameter<edm::InputTag>("scIslandBarrelProducer"); scIslandEndcapProducer_ = conf_.getParameter<edm::InputTag>("scIslandEndcapProducer"); recoEcalCandidateProducer_ = conf_.getParameter<edm::InputTag>("recoEcalCandidateProducer"); egEcalIsoEtMin_ = conf_.getParameter<double>("egEcalIsoEtMin"); egEcalIsoConeSize_ = conf_.getParameter<double>("egEcalIsoConeSize"); algoType_ = conf_.getParameter<int>("SCAlgoType"); test_ = new EgammaHLTEcalIsolation(egEcalIsoEtMin_,egEcalIsoConeSize_,algoType_); //register your products produces < reco::RecoEcalCandidateIsolationMap >(); }
EgammaHLTEcalIsolationProducersRegional::~EgammaHLTEcalIsolationProducersRegional | ( | ) |
Definition at line 64 of file EgammaHLTEcalIsolationProducersRegional.cc.
References test_.
{delete test_;}
void EgammaHLTEcalIsolationProducersRegional::produce | ( | edm::Event & | iEvent, |
const edm::EventSetup & | iSetup | ||
) | [virtual] |
Implements edm::EDProducer.
Definition at line 68 of file EgammaHLTEcalIsolationProducersRegional.cc.
References bcBarrelProducer_, bcEndcapProducer_, begin, edm::Event::getByLabel(), edm::AssociationMap< Tag >::insert(), EgammaHLTEcalIsolation::isolPtSum(), edm::Handle< T >::product(), edm::Event::put(), recoEcalCandidateProducer_, scIslandBarrelProducer_, scIslandEndcapProducer_, and test_.
{ // Get the basic cluster collection in the Barrel edm::Handle<reco::BasicClusterCollection> bcBarrelHandle; iEvent.getByLabel(bcBarrelProducer_, bcBarrelHandle); const reco::BasicClusterCollection* clusterBarrelCollection = bcBarrelHandle.product(); // Get the basic cluster collection in the endcap edm::Handle<reco::BasicClusterCollection> bcEndcapHandle; iEvent.getByLabel(bcEndcapProducer_, bcEndcapHandle); const reco::BasicClusterCollection* clusterEndcapCollection = (bcEndcapHandle.product()); // Get the Barrel Super Cluster collection edm::Handle<reco::SuperClusterCollection> scBarrelHandle; iEvent.getByLabel(scIslandBarrelProducer_,scBarrelHandle); const reco::SuperClusterCollection* scBarrelCollection = (scBarrelHandle.product()); // Get the Endcap Super Cluster collection edm::Handle<reco::SuperClusterCollection> scEndcapHandle; iEvent.getByLabel(scIslandEndcapProducer_,scEndcapHandle); const reco::SuperClusterCollection* scEndcapCollection = (scEndcapHandle.product()); // Get the RecoEcalCandidate Collection edm::Handle<reco::RecoEcalCandidateCollection> recoecalcandHandle; iEvent.getByLabel(recoEcalCandidateProducer_,recoecalcandHandle); std::vector<const reco::BasicCluster*> clusterCollection; for (reco::BasicClusterCollection::const_iterator ibc = clusterBarrelCollection->begin(); ibc < clusterBarrelCollection->end(); ibc++ ){clusterCollection.push_back(&(*ibc));} for (reco::BasicClusterCollection::const_iterator iec = clusterEndcapCollection->begin(); iec < clusterEndcapCollection->end(); iec++ ){clusterCollection.push_back(&(*iec));} std::vector<const reco::SuperCluster*> scCollection; for (reco::SuperClusterCollection::const_iterator ibsc = scBarrelCollection->begin(); ibsc < scBarrelCollection->end(); ibsc++ ){scCollection.push_back(&(*ibsc));} for (reco::SuperClusterCollection::const_iterator iesc = scEndcapCollection->begin(); iesc < scEndcapCollection->end(); iesc++ ){scCollection.push_back(&(*iesc));} reco::RecoEcalCandidateIsolationMap isoMap; for (reco::RecoEcalCandidateCollection::const_iterator iRecoEcalCand= recoecalcandHandle->begin(); iRecoEcalCand!=recoecalcandHandle->end(); iRecoEcalCand++) { reco::RecoEcalCandidateRef recoecalcandref(reco::RecoEcalCandidateRef(recoecalcandHandle,iRecoEcalCand -recoecalcandHandle ->begin())); const reco::RecoCandidate *tempiRecoEcalCand = &(*recoecalcandref); float isol = test_->isolPtSum(tempiRecoEcalCand,scCollection, clusterCollection); isoMap.insert(recoecalcandref, isol); } std::auto_ptr<reco::RecoEcalCandidateIsolationMap> isolMap(new reco::RecoEcalCandidateIsolationMap(isoMap)); iEvent.put(isolMap); }
int EgammaHLTEcalIsolationProducersRegional::algoType_ [private] |
Definition at line 59 of file EgammaHLTEcalIsolationProducersRegional.h.
Referenced by EgammaHLTEcalIsolationProducersRegional().
Definition at line 50 of file EgammaHLTEcalIsolationProducersRegional.h.
Referenced by EgammaHLTEcalIsolationProducersRegional(), and produce().
Definition at line 51 of file EgammaHLTEcalIsolationProducersRegional.h.
Referenced by EgammaHLTEcalIsolationProducersRegional(), and produce().
Definition at line 55 of file EgammaHLTEcalIsolationProducersRegional.h.
Referenced by EgammaHLTEcalIsolationProducersRegional().
double EgammaHLTEcalIsolationProducersRegional::egEcalIsoConeSize_ [private] |
Definition at line 58 of file EgammaHLTEcalIsolationProducersRegional.h.
Referenced by EgammaHLTEcalIsolationProducersRegional().
double EgammaHLTEcalIsolationProducersRegional::egEcalIsoEtMin_ [private] |
Definition at line 57 of file EgammaHLTEcalIsolationProducersRegional.h.
Referenced by EgammaHLTEcalIsolationProducersRegional().
Definition at line 49 of file EgammaHLTEcalIsolationProducersRegional.h.
Referenced by EgammaHLTEcalIsolationProducersRegional(), and produce().
Definition at line 52 of file EgammaHLTEcalIsolationProducersRegional.h.
Referenced by EgammaHLTEcalIsolationProducersRegional(), and produce().
Definition at line 53 of file EgammaHLTEcalIsolationProducersRegional.h.
Referenced by EgammaHLTEcalIsolationProducersRegional(), and produce().
Definition at line 60 of file EgammaHLTEcalIsolationProducersRegional.h.
Referenced by EgammaHLTEcalIsolationProducersRegional(), produce(), and ~EgammaHLTEcalIsolationProducersRegional().