CMS 3D CMS Logo

EgammaHLTEcalIsolationProducersRegional Class Reference

Description: <one line="" class="" summary>="">. More...

#include <RecoEgamma/EgammaHLTProducers/interface/EgammaHLTEcalIsolationProducersRegional.h>

Inheritance diagram for EgammaHLTEcalIsolationProducersRegional:

edm::EDProducer edm::ProducerBase edm::ProductRegistryHelper

List of all members.

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_
EgammaHLTEcalIsolationtest_


Detailed Description

Description: <one line="" class="" summary>="">.

Author:
Monica Vazquez Acosta (CERN)
Implementation: <Notes on="" implementation>="">

$Id:

Definition at line 38 of file EgammaHLTEcalIsolationProducersRegional.h.


Constructor & Destructor Documentation

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_;}


Member Function Documentation

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 }


Member Data Documentation

int EgammaHLTEcalIsolationProducersRegional::algoType_ [private]

Definition at line 58 of file EgammaHLTEcalIsolationProducersRegional.h.

Referenced by EgammaHLTEcalIsolationProducersRegional().

edm::InputTag EgammaHLTEcalIsolationProducersRegional::bcBarrelProducer_ [private]

Definition at line 49 of file EgammaHLTEcalIsolationProducersRegional.h.

Referenced by EgammaHLTEcalIsolationProducersRegional(), and produce().

edm::InputTag EgammaHLTEcalIsolationProducersRegional::bcEndcapProducer_ [private]

Definition at line 50 of file EgammaHLTEcalIsolationProducersRegional.h.

Referenced by EgammaHLTEcalIsolationProducersRegional(), and produce().

edm::ParameterSet EgammaHLTEcalIsolationProducersRegional::conf_ [private]

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().

edm::InputTag EgammaHLTEcalIsolationProducersRegional::recoEcalCandidateProducer_ [private]

Definition at line 48 of file EgammaHLTEcalIsolationProducersRegional.h.

Referenced by EgammaHLTEcalIsolationProducersRegional(), and produce().

edm::InputTag EgammaHLTEcalIsolationProducersRegional::scIslandBarrelProducer_ [private]

Definition at line 51 of file EgammaHLTEcalIsolationProducersRegional.h.

Referenced by EgammaHLTEcalIsolationProducersRegional(), and produce().

edm::InputTag EgammaHLTEcalIsolationProducersRegional::scIslandEndcapProducer_ [private]

Definition at line 52 of file EgammaHLTEcalIsolationProducersRegional.h.

Referenced by EgammaHLTEcalIsolationProducersRegional(), and produce().

EgammaHLTEcalIsolation* EgammaHLTEcalIsolationProducersRegional::test_ [private]

Definition at line 59 of file EgammaHLTEcalIsolationProducersRegional.h.

Referenced by EgammaHLTEcalIsolationProducersRegional(), produce(), and ~EgammaHLTEcalIsolationProducersRegional().


The documentation for this class was generated from the following files:
Generated on Tue Jun 9 18:20:10 2009 for CMSSW by  doxygen 1.5.4