CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
CRackSeedGenerator.cc
Go to the documentation of this file.
1 //
2 // Package: RecoTracker/TkSeedGenerator
3 // Class: GlobalPixelLessSeedGenerator
4 //
5 
6 #include <iostream>
7 #include <memory>
8 #include <string>
9 
20 
21 using namespace std;
23  conf_(conf) ,cosmic_seed(conf)
24  {
25  edm::LogInfo ("CRackSeedGenerator")<<"Enter the CRackSeedGenerator";
26  produces<TrajectorySeedCollection>();
27 }
28 
29 
30 // Virtual destructor needed.
32 
33 // Functions that gets called by framework every event
35 {
36  // get Inputs
37  edm::InputTag matchedrecHitsTag = conf_.getParameter<edm::InputTag>("matchedRecHits");
38  edm::InputTag rphirecHitsTag = conf_.getParameter<edm::InputTag>("rphirecHits");
39  edm::InputTag stereorecHitsTag = conf_.getParameter<edm::InputTag>("stereorecHits");
40 
42  ev.getByLabel( rphirecHitsTag, rphirecHits );
44  ev.getByLabel( stereorecHitsTag ,stereorecHits );
46  ev.getByLabel( matchedrecHitsTag ,matchedrecHits );
47 
48 
49  std::auto_ptr<TrajectorySeedCollection> output(new TrajectorySeedCollection);
50  //
51 
52  cosmic_seed.init(*stereorecHits,*rphirecHits,*matchedrecHits, es);
53 
54  // invoke the seed finding algorithm
55  cosmic_seed.run(*output,es);
56 
57  // write output to file
58  LogDebug("CRackSeedGenerator")<<" number of seeds = "<< output->size();
59 
60 
61  ev.put(output);
62 }
#define LogDebug(id)
T getParameter(std::string const &) const
CRackSeedGenerator(const edm::ParameterSet &conf)
std::vector< TrajectorySeed > TrajectorySeedCollection
OrphanHandle< PROD > put(std::auto_ptr< PROD > product)
Put a new product.
Definition: Event.h:84
edm::ParameterSet conf_
SeedGeneratorForCRack cosmic_seed
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
Definition: Event.h:359
tuple conf
Definition: dbtoconf.py:185
void init(const SiStripRecHit2DCollection &collstereo, const SiStripRecHit2DCollection &collrphi, const SiStripMatchedRecHit2DCollection &collmatched, const edm::EventSetup &c)
void run(TrajectorySeedCollection &, const edm::EventSetup &c)
virtual void produce(edm::Event &e, const edm::EventSetup &c)