#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_ |
Implementation: <Notes on="" implementation>="">
$Id:
Definition at line 38 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_.
00041 : conf_(config) 00042 { 00043 00044 // use configuration file to setup input/output collection names 00045 00046 bcBarrelProducer_ = conf_.getParameter<edm::InputTag>("bcBarrelProducer"); 00047 bcEndcapProducer_ = conf_.getParameter<edm::InputTag>("bcEndcapProducer"); 00048 00049 scIslandBarrelProducer_ = conf_.getParameter<edm::InputTag>("scIslandBarrelProducer"); 00050 scIslandEndcapProducer_ = conf_.getParameter<edm::InputTag>("scIslandEndcapProducer"); 00051 00052 recoEcalCandidateProducer_ = conf_.getParameter<edm::InputTag>("recoEcalCandidateProducer"); 00053 00054 egEcalIsoEtMin_ = conf_.getParameter<double>("egEcalIsoEtMin"); 00055 egEcalIsoConeSize_ = conf_.getParameter<double>("egEcalIsoConeSize"); 00056 algoType_ = conf_.getParameter<int>("SCAlgoType"); 00057 test_ = new EgammaHLTEcalIsolation(egEcalIsoEtMin_,egEcalIsoConeSize_,algoType_); 00058 00059 00060 //register your products 00061 produces < reco::RecoEcalCandidateIsolationMap >(); 00062 }
EgammaHLTEcalIsolationProducersRegional::~EgammaHLTEcalIsolationProducersRegional | ( | ) |
Definition at line 64 of file EgammaHLTEcalIsolationProducersRegional.cc.
References test_.
00064 {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_.
00068 { 00069 00070 // Get the basic cluster collection in the Barrel 00071 edm::Handle<reco::BasicClusterCollection> bcBarrelHandle; 00072 iEvent.getByLabel(bcBarrelProducer_, bcBarrelHandle); 00073 const reco::BasicClusterCollection* clusterBarrelCollection = bcBarrelHandle.product(); 00074 // Get the basic cluster collection in the endcap 00075 edm::Handle<reco::BasicClusterCollection> bcEndcapHandle; 00076 iEvent.getByLabel(bcEndcapProducer_, bcEndcapHandle); 00077 const reco::BasicClusterCollection* clusterEndcapCollection = (bcEndcapHandle.product()); 00078 // Get the Barrel Super Cluster collection 00079 edm::Handle<reco::SuperClusterCollection> scBarrelHandle; 00080 iEvent.getByLabel(scIslandBarrelProducer_,scBarrelHandle); 00081 const reco::SuperClusterCollection* scBarrelCollection = (scBarrelHandle.product()); 00082 // Get the Endcap Super Cluster collection 00083 edm::Handle<reco::SuperClusterCollection> scEndcapHandle; 00084 iEvent.getByLabel(scIslandEndcapProducer_,scEndcapHandle); 00085 const reco::SuperClusterCollection* scEndcapCollection = (scEndcapHandle.product()); 00086 // Get the RecoEcalCandidate Collection 00087 edm::Handle<reco::RecoEcalCandidateCollection> recoecalcandHandle; 00088 iEvent.getByLabel(recoEcalCandidateProducer_,recoecalcandHandle); 00089 00090 std::vector<const reco::BasicCluster*> clusterCollection; 00091 for (reco::BasicClusterCollection::const_iterator ibc = clusterBarrelCollection->begin(); 00092 ibc < clusterBarrelCollection->end(); ibc++ ){clusterCollection.push_back(&(*ibc));} 00093 for (reco::BasicClusterCollection::const_iterator iec = clusterEndcapCollection->begin(); 00094 iec < clusterEndcapCollection->end(); iec++ ){clusterCollection.push_back(&(*iec));} 00095 std::vector<const reco::SuperCluster*> scCollection; 00096 for (reco::SuperClusterCollection::const_iterator ibsc = scBarrelCollection->begin(); 00097 ibsc < scBarrelCollection->end(); ibsc++ ){scCollection.push_back(&(*ibsc));} 00098 for (reco::SuperClusterCollection::const_iterator iesc = scEndcapCollection->begin(); 00099 iesc < scEndcapCollection->end(); iesc++ ){scCollection.push_back(&(*iesc));} 00100 00101 reco::RecoEcalCandidateIsolationMap isoMap; 00102 00103 00104 00105 for (reco::RecoEcalCandidateCollection::const_iterator iRecoEcalCand= recoecalcandHandle->begin(); iRecoEcalCand!=recoecalcandHandle->end(); iRecoEcalCand++) { 00106 00107 00108 reco::RecoEcalCandidateRef recoecalcandref(reco::RecoEcalCandidateRef(recoecalcandHandle,iRecoEcalCand -recoecalcandHandle ->begin())); 00109 00110 00111 const reco::RecoCandidate *tempiRecoEcalCand = &(*recoecalcandref); 00112 float isol = test_->isolPtSum(tempiRecoEcalCand,scCollection, clusterCollection); 00113 00114 isoMap.insert(recoecalcandref, isol); 00115 00116 } 00117 00118 std::auto_ptr<reco::RecoEcalCandidateIsolationMap> isolMap(new reco::RecoEcalCandidateIsolationMap(isoMap)); 00119 iEvent.put(isolMap); 00120 00121 }
Definition at line 58 of file EgammaHLTEcalIsolationProducersRegional.h.
Referenced by EgammaHLTEcalIsolationProducersRegional().
Definition at line 49 of file EgammaHLTEcalIsolationProducersRegional.h.
Referenced by EgammaHLTEcalIsolationProducersRegional(), and produce().
Definition at line 50 of file EgammaHLTEcalIsolationProducersRegional.h.
Referenced by EgammaHLTEcalIsolationProducersRegional(), and produce().
Definition at line 54 of file EgammaHLTEcalIsolationProducersRegional.h.
Referenced by EgammaHLTEcalIsolationProducersRegional().
double EgammaHLTEcalIsolationProducersRegional::egEcalIsoConeSize_ [private] |
Definition at line 57 of file EgammaHLTEcalIsolationProducersRegional.h.
Referenced by EgammaHLTEcalIsolationProducersRegional().
double EgammaHLTEcalIsolationProducersRegional::egEcalIsoEtMin_ [private] |
Definition at line 56 of file EgammaHLTEcalIsolationProducersRegional.h.
Referenced by EgammaHLTEcalIsolationProducersRegional().
Definition at line 48 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 52 of file EgammaHLTEcalIsolationProducersRegional.h.
Referenced by EgammaHLTEcalIsolationProducersRegional(), and produce().
Definition at line 59 of file EgammaHLTEcalIsolationProducersRegional.h.
Referenced by EgammaHLTEcalIsolationProducersRegional(), produce(), and ~EgammaHLTEcalIsolationProducersRegional().