CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions | Private Attributes
SiStripElectronSeedProducer Class Reference

#include <SiStripElectronSeedProducer.h>

Inheritance diagram for SiStripElectronSeedProducer:
edm::EDProducer edm::ProducerBase edm::ProductRegistryHelper

Public Member Functions

virtual void produce (edm::Event &e, const edm::EventSetup &c)
 
 SiStripElectronSeedProducer (const edm::ParameterSet &conf)
 
virtual ~SiStripElectronSeedProducer ()
 
- Public Member Functions inherited from edm::EDProducer
 EDProducer ()
 
virtual ~EDProducer ()
 
- Public Member Functions inherited from edm::ProducerBase
 ProducerBase ()
 
void registerProducts (ProducerBase *, ProductRegistry *, ModuleDescription const &)
 
boost::function< void(const
BranchDescription &)> 
registrationCallback () const
 used by the fwk to register list of products More...
 
virtual ~ProducerBase ()
 

Private Attributes

edm::ParameterSet conf_
 
SiStripElectronSeedGeneratormatcher_
 
edm::InputTag superClusters_ [2]
 

Additional Inherited Members

- Public Types inherited from edm::EDProducer
typedef EDProducer ModuleType
 
typedef WorkerT< EDProducerWorkerType
 
- Public Types inherited from edm::ProducerBase
typedef
ProductRegistryHelper::TypeLabelList 
TypeLabelList
 
- Static Public Member Functions inherited from edm::EDProducer
static const std::string & baseType ()
 
static void fillDescriptions (ConfigurationDescriptions &descriptions)
 
static void prevalidate (ConfigurationDescriptions &descriptions)
 
- Protected Member Functions inherited from edm::EDProducer
CurrentProcessingContext const * currentContext () const
 
- Protected Member Functions inherited from edm::ProducerBase
template<class TProducer , class TMethod >
void callWhenNewProductsRegistered (TProducer *iProd, TMethod iMethod)
 

Detailed Description

Definition at line 15 of file SiStripElectronSeedProducer.h.

Constructor & Destructor Documentation

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

22 {
23  if(iConfig.exists("SeedConfiguration")){
24  conf_ = iConfig.getParameter<edm::ParameterSet>("SeedConfiguration") ;
25  }else{
26  conf_.addParameter("beamSpot",edm::InputTag("offlineBeamSpot"));
27  conf_.addParameter("tibOriginZCut",20.);
28  conf_.addParameter("tidOriginZCut",20.);
29  conf_.addParameter("tecOriginZCut",20.);
30  conf_.addParameter("monoOriginZCut",20.);
31  conf_.addParameter("tibDeltaPsiCut",0.1);
32  conf_.addParameter("tidDeltaPsiCut",0.1);
33  conf_.addParameter("tecDeltaPsiCut",0.1);
34  conf_.addParameter("monoDeltaPsiCut",0.1);
35  conf_.addParameter("tibPhiMissHit2Cut",0.006);
36  conf_.addParameter("tidPhiMissHit2Cut",0.006);
37  conf_.addParameter("tecPhiMissHit2Cut",0.007);
38  conf_.addParameter("monoPhiMissHit2Cut",0.02);
39  conf_.addParameter("tibZMissHit2Cut",0.35);
40  conf_.addParameter("tidRMissHit2Cut",0.3);
41  conf_.addParameter("tecRMissHit2Cut",0.3);
42  conf_.addParameter("tidEtaUsage", 1.2);
43  conf_.addParameter("tidMaxHits",4);
44  conf_.addParameter("tecMaxHits",2);
45  conf_.addParameter("monoMaxHits",4);
46  conf_.addParameter("maxSeeds",5);
47  }
49 
50  // get labels from config
51  superClusters_[0]=iConfig.getParameter<edm::InputTag>("barrelSuperClusters");
52  superClusters_[1]=iConfig.getParameter<edm::InputTag>("endcapSuperClusters");
53 
54  //register your products
55  produces<ElectronSeedCollection>();
56 }
T getParameter(std::string const &) const
SiStripElectronSeedGenerator * matcher_
void addParameter(std::string const &name, T const &value)
Definition: ParameterSet.h:145
SiStripElectronSeedProducer::~SiStripElectronSeedProducer ( )
virtual

Definition at line 58 of file SiStripElectronSeedProducer.cc.

59 {
60  // do anything here that needs to be done at desctruction time
61  // (e.g. close files, deallocate resources etc.)
62  delete matcher_;
63 }
SiStripElectronSeedGenerator * matcher_

Member Function Documentation

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

66 {
67  using namespace edm;
68  using namespace std;
69 
70  LogDebug("entering");
71  LogDebug("") <<"[SiStripElectronSeedProducer::produce] entering " ;
72 
73  matcher_->setupES(iSetup);
74 
76  std::auto_ptr<ElectronSeedCollection> pSeeds;
77 
78  // do both barrel and endcap instances
79  for (unsigned int i=0; i<2; i++) {
80 
81  // get the superclusters
83  if(e.getByLabel(superClusters_[i],clusters)) {
84  // run the seed generator and put the ElectronSeeds into a collection
85  matcher_->run(e,iSetup,clusters,*seeds);
86  }
87 
88  }
89 
90  pSeeds = std::auto_ptr<ElectronSeedCollection>(seeds);
91 
92  e.put(pSeeds);
93 
94 }
#define LogDebug(id)
int i
Definition: DBlmapReader.cc:9
SiStripElectronSeedGenerator * matcher_
OrphanHandle< PROD > put(std::auto_ptr< PROD > product)
Put a new product.
Definition: Event.h:85
std::vector< ElectronSeed > ElectronSeedCollection
collection of ElectronSeed objects
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
Definition: Event.h:356
void setupES(const edm::EventSetup &setup)
void run(edm::Event &, const edm::EventSetup &setup, const edm::Handle< reco::SuperClusterCollection > &, reco::ElectronSeedCollection &)

Member Data Documentation

edm::ParameterSet SiStripElectronSeedProducer::conf_
private

Definition at line 27 of file SiStripElectronSeedProducer.h.

SiStripElectronSeedGenerator* SiStripElectronSeedProducer::matcher_
private

Definition at line 28 of file SiStripElectronSeedProducer.h.

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

Definition at line 26 of file SiStripElectronSeedProducer.h.