CMS 3D CMS Logo

ElectronSiStripSeedProducer Class Reference

#include <RecoEgamma/EgammaElectronProducers/plugins/ElectronSiStripSeedProducer.h>

Inheritance diagram for ElectronSiStripSeedProducer:

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

List of all members.

Public Member Functions

virtual void beginJob (edm::EventSetup const &iSetup)
 ElectronSiStripSeedProducer (const edm::ParameterSet &conf)
virtual void produce (edm::Event &e, const edm::EventSetup &c)
virtual ~ElectronSiStripSeedProducer ()

Private Attributes

const edm::ParameterSet conf_
ElectronSiStripSeedGeneratormatcher_
edm::InputTag superClusters_ [2]


Detailed Description

Definition at line 16 of file ElectronSiStripSeedProducer.h.


Constructor & Destructor Documentation

ElectronSiStripSeedProducer::ElectronSiStripSeedProducer ( const edm::ParameterSet conf  )  [explicit]

Definition at line 21 of file ElectronSiStripSeedProducer.cc.

References edm::ParameterSet::getParameter(), matcher_, and superClusters_.

00021                                                                                        : conf_(iConfig)
00022 {
00023   matcher_ = new ElectronSiStripSeedGenerator();
00024 
00025   //  get labels from config
00026   superClusters_[0]=iConfig.getParameter<edm::InputTag>("barrelSuperClusters");
00027   superClusters_[1]=iConfig.getParameter<edm::InputTag>("endcapSuperClusters");
00028 
00029   //register your products
00030   produces<ElectronPixelSeedCollection>();
00031 }

ElectronSiStripSeedProducer::~ElectronSiStripSeedProducer (  )  [virtual]

Definition at line 33 of file ElectronSiStripSeedProducer.cc.

References matcher_.

00034 {
00035   // do anything here that needs to be done at desctruction time
00036   // (e.g. close files, deallocate resources etc.)
00037   delete matcher_;
00038 }


Member Function Documentation

void ElectronSiStripSeedProducer::beginJob ( edm::EventSetup const &  iSetup  )  [virtual]

Reimplemented from edm::EDProducer.

Definition at line 40 of file ElectronSiStripSeedProducer.cc.

References conf_, matcher_, and ElectronSiStripSeedGenerator::setupES().

00041 {  
00042   matcher_->setupES(iSetup,conf_);
00043 }

void ElectronSiStripSeedProducer::produce ( edm::Event e,
const edm::EventSetup c 
) [virtual]

Implements edm::EDProducer.

Definition at line 45 of file ElectronSiStripSeedProducer.cc.

References edm::Event::getByLabel(), i, LogDebug, matcher_, edm::Event::put(), ElectronSiStripSeedGenerator::run(), std, and superClusters_.

00046 { 
00047   using namespace edm;
00048   using namespace std;
00049 
00050   LogDebug("entering");
00051   LogDebug("")  <<"[ElectronSiStripSeedProducer::produce] entering " ;
00052   
00053   ElectronPixelSeedCollection *seeds = new ElectronPixelSeedCollection;
00054   std::auto_ptr<ElectronPixelSeedCollection> pSeeds;
00055 
00056   // do both barrel and endcap instances
00057   for (unsigned int i=0; i<2; i++) {
00058 
00059     // get the superclusters
00060     edm::Handle<SuperClusterCollection> clusters;
00061     if(e.getByLabel(superClusters_[i],clusters)) {
00062       // run the seed generator and put the ElectronPixelSeeds into a collection
00063       matcher_->run(e,clusters,*seeds);
00064     }
00065     
00066   }
00067 
00068   pSeeds = std::auto_ptr<ElectronPixelSeedCollection>(seeds);
00069 
00070   e.put(pSeeds);
00071 
00072 }


Member Data Documentation

const edm::ParameterSet ElectronSiStripSeedProducer::conf_ [private]

Definition at line 29 of file ElectronSiStripSeedProducer.h.

Referenced by beginJob().

ElectronSiStripSeedGenerator* ElectronSiStripSeedProducer::matcher_ [private]

Definition at line 30 of file ElectronSiStripSeedProducer.h.

Referenced by beginJob(), ElectronSiStripSeedProducer(), produce(), and ~ElectronSiStripSeedProducer().

edm::InputTag ElectronSiStripSeedProducer::superClusters_[2] [private]

Definition at line 28 of file ElectronSiStripSeedProducer.h.

Referenced by ElectronSiStripSeedProducer(), and produce().


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