CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
SiStripElectronSeedProducer.cc
Go to the documentation of this file.
1 // Producer for making electron seeds from Si Strip hits.
2 
9 
14 
16 
17 #include <iostream>
18 
19 using namespace reco;
20 
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  }
48  matcher_ = new SiStripElectronSeedGenerator(conf_);
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 }
57 
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 }
64 
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 }
95 
#define LogDebug(id)
T getParameter(std::string const &) const
int i
Definition: DBlmapReader.cc:9
bool exists(std::string const &parameterName) const
checks if a parameter exists
OrphanHandle< PROD > put(std::auto_ptr< PROD > product)
Put a new product.
Definition: Event.h:84
void addParameter(std::string const &name, T const &value)
Definition: ParameterSet.h:139
std::vector< ElectronSeed > ElectronSeedCollection
collection of ElectronSeed objects
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
Definition: Event.h:355
virtual void produce(edm::Event &e, const edm::EventSetup &c)
SiStripElectronSeedProducer(const edm::ParameterSet &conf)