#include <SiStripElectronSeedProducer.h>
Public Member Functions | |
virtual void | produce (edm::Event &e, const edm::EventSetup &c) |
SiStripElectronSeedProducer (const edm::ParameterSet &conf) | |
virtual | ~SiStripElectronSeedProducer () |
Private Attributes | |
edm::ParameterSet | conf_ |
SiStripElectronSeedGenerator * | matcher_ |
edm::InputTag | superClusters_ [2] |
Definition at line 15 of file SiStripElectronSeedProducer.h.
SiStripElectronSeedProducer::SiStripElectronSeedProducer | ( | const edm::ParameterSet & | conf | ) | [explicit] |
Definition at line 21 of file SiStripElectronSeedProducer.cc.
References edm::ParameterSet::addParameter(), edm::ParameterSet::exists(), and edm::ParameterSet::getParameter().
{ if(iConfig.exists("SeedConfiguration")){ conf_ = iConfig.getParameter<edm::ParameterSet>("SeedConfiguration") ; }else{ conf_.addParameter("beamSpot",edm::InputTag("offlineBeamSpot")); conf_.addParameter("tibOriginZCut",20.); conf_.addParameter("tidOriginZCut",20.); conf_.addParameter("tecOriginZCut",20.); conf_.addParameter("monoOriginZCut",20.); conf_.addParameter("tibDeltaPsiCut",0.1); conf_.addParameter("tidDeltaPsiCut",0.1); conf_.addParameter("tecDeltaPsiCut",0.1); conf_.addParameter("monoDeltaPsiCut",0.1); conf_.addParameter("tibPhiMissHit2Cut",0.006); conf_.addParameter("tidPhiMissHit2Cut",0.006); conf_.addParameter("tecPhiMissHit2Cut",0.007); conf_.addParameter("monoPhiMissHit2Cut",0.02); conf_.addParameter("tibZMissHit2Cut",0.35); conf_.addParameter("tidRMissHit2Cut",0.3); conf_.addParameter("tecRMissHit2Cut",0.3); conf_.addParameter("tidEtaUsage", 1.2); conf_.addParameter("tidMaxHits",4); conf_.addParameter("tecMaxHits",2); conf_.addParameter("monoMaxHits",4); conf_.addParameter("maxSeeds",5); } matcher_ = new SiStripElectronSeedGenerator(conf_); // get labels from config superClusters_[0]=iConfig.getParameter<edm::InputTag>("barrelSuperClusters"); superClusters_[1]=iConfig.getParameter<edm::InputTag>("endcapSuperClusters"); //register your products produces<ElectronSeedCollection>(); }
SiStripElectronSeedProducer::~SiStripElectronSeedProducer | ( | ) | [virtual] |
Definition at line 58 of file SiStripElectronSeedProducer.cc.
{ // do anything here that needs to be done at desctruction time // (e.g. close files, deallocate resources etc.) delete matcher_; }
void SiStripElectronSeedProducer::produce | ( | edm::Event & | e, |
const edm::EventSetup & | c | ||
) | [virtual] |
Implements edm::EDProducer.
Definition at line 65 of file SiStripElectronSeedProducer.cc.
References edm::Event::getByLabel(), i, LogDebug, and edm::Event::put().
{ using namespace edm; using namespace std; LogDebug("entering"); LogDebug("") <<"[SiStripElectronSeedProducer::produce] entering " ; matcher_->setupES(iSetup); ElectronSeedCollection *seeds = new ElectronSeedCollection; std::auto_ptr<ElectronSeedCollection> pSeeds; // do both barrel and endcap instances for (unsigned int i=0; i<2; i++) { // get the superclusters edm::Handle<SuperClusterCollection> clusters; if(e.getByLabel(superClusters_[i],clusters)) { // run the seed generator and put the ElectronSeeds into a collection matcher_->run(e,iSetup,clusters,*seeds); } } pSeeds = std::auto_ptr<ElectronSeedCollection>(seeds); e.put(pSeeds); }
Definition at line 27 of file SiStripElectronSeedProducer.h.
Definition at line 28 of file SiStripElectronSeedProducer.h.
edm::InputTag SiStripElectronSeedProducer::superClusters_[2] [private] |
Definition at line 26 of file SiStripElectronSeedProducer.h.