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 
15 
16 using namespace std;
18  conf_(conf) ,cosmic_seed(conf)
19  {
20  edm::LogInfo ("CRackSeedGenerator")<<"Enter the CRackSeedGenerator";
21  produces<TrajectorySeedCollection>();
22 }
23 
24 
25 // Virtual destructor needed.
27 
28 // Functions that gets called by framework every event
30 {
31  // get Inputs
32  edm::InputTag matchedrecHitsTag = conf_.getParameter<edm::InputTag>("matchedRecHits");
33  edm::InputTag rphirecHitsTag = conf_.getParameter<edm::InputTag>("rphirecHits");
34  edm::InputTag stereorecHitsTag = conf_.getParameter<edm::InputTag>("stereorecHits");
35 
37  ev.getByLabel( rphirecHitsTag, rphirecHits );
39  ev.getByLabel( stereorecHitsTag ,stereorecHits );
41  ev.getByLabel( matchedrecHitsTag ,matchedrecHits );
42 
43 
44  std::auto_ptr<TrajectorySeedCollection> output(new TrajectorySeedCollection);
45  //
46 
47  cosmic_seed.init(*stereorecHits,*rphirecHits,*matchedrecHits, es);
48 
49  // invoke the seed finding algorithm
50  cosmic_seed.run(*output,es);
51 
52  // write output to file
53  LogDebug("CRackSeedGenerator")<<" number of seeds = "<< output->size();
54 
55 
56  ev.put(output);
57 }
#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:94
edm::ParameterSet conf_
SeedGeneratorForCRack cosmic_seed
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
Definition: Event.h:361
tuple conf
Definition: dbtoconf.py:185
virtual void produce(edm::Event &e, const edm::EventSetup &c) override
void init(const SiStripRecHit2DCollection &collstereo, const SiStripRecHit2DCollection &collrphi, const SiStripMatchedRecHit2DCollection &collmatched, const edm::EventSetup &c)
void run(TrajectorySeedCollection &, const edm::EventSetup &c)