CMS 3D CMS Logo

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  matchedrecHitsToken_ = consumes<SiStripMatchedRecHit2DCollection>(
22  conf_.getParameter<edm::InputTag>("matchedRecHits"));
23  rphirecHitsToken_ = consumes<SiStripRecHit2DCollection>(
24  conf_.getParameter<edm::InputTag>("rphirecHits"));
25  stereorecHitsToken_ = consumes<SiStripRecHit2DCollection>(
26  conf_.getParameter<edm::InputTag>("stereorecHits"));
27 
28  produces<TrajectorySeedCollection>();
29 }
30 
31 
32 // Virtual destructor needed.
34 
35 // Functions that gets called by framework every event
37 {
38  // get Inputs
40  ev.getByToken(rphirecHitsToken_, rphirecHits);
42  ev.getByToken(stereorecHitsToken_, stereorecHits);
44  ev.getByToken(matchedrecHitsToken_, matchedrecHits);
45 
46 
47  auto output = std::make_unique<TrajectorySeedCollection>();
48  //
49 
50  cosmic_seed.init(*stereorecHits,*rphirecHits,*matchedrecHits, es);
51 
52  // invoke the seed finding algorithm
53  cosmic_seed.run(*output,es);
54 
55  // write output to file
56  LogDebug("CRackSeedGenerator")<<" number of seeds = "<< output->size();
57 
58 
59  ev.put(std::move(output));
60 }
#define LogDebug(id)
T getParameter(std::string const &) const
OrphanHandle< PROD > put(std::unique_ptr< PROD > product)
Put a new product.
Definition: Event.h:122
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Definition: Event.h:460
bool ev
CRackSeedGenerator(const edm::ParameterSet &conf)
edm::EDGetTokenT< SiStripRecHit2DCollection > rphirecHitsToken_
edm::ParameterSet conf_
SeedGeneratorForCRack cosmic_seed
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)
edm::EDGetTokenT< SiStripMatchedRecHit2DCollection > matchedrecHitsToken_
void run(TrajectorySeedCollection &, const edm::EventSetup &c)
edm::EDGetTokenT< SiStripRecHit2DCollection > stereorecHitsToken_
def move(src, dest)
Definition: eostools.py:510