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;
17 CRackSeedGenerator::CRackSeedGenerator(edm::ParameterSet const& conf) : conf_(conf), cosmic_seed(conf) {
18  edm::LogInfo("CRackSeedGenerator") << "Enter the CRackSeedGenerator";
20  consumes<SiStripMatchedRecHit2DCollection>(conf_.getParameter<edm::InputTag>("matchedRecHits"));
21  rphirecHitsToken_ = consumes<SiStripRecHit2DCollection>(conf_.getParameter<edm::InputTag>("rphirecHits"));
22  stereorecHitsToken_ = consumes<SiStripRecHit2DCollection>(conf_.getParameter<edm::InputTag>("stereorecHits"));
23 
24  produces<TrajectorySeedCollection>();
25 }
26 
27 // Virtual destructor needed.
29 
30 // Functions that gets called by framework every event
32  // get Inputs
34  ev.getByToken(rphirecHitsToken_, rphirecHits);
36  ev.getByToken(stereorecHitsToken_, stereorecHits);
38  ev.getByToken(matchedrecHitsToken_, matchedrecHits);
39 
40  auto output = std::make_unique<TrajectorySeedCollection>();
41  //
42 
43  cosmic_seed.init(*stereorecHits, *rphirecHits, *matchedrecHits, es);
44 
45  // invoke the seed finding algorithm
46  cosmic_seed.run(*output, es);
47 
48  // write output to file
49  LogDebug("CRackSeedGenerator") << " number of seeds = " << output->size();
50 
51  ev.put(std::move(output));
52 }
#define LogDebug(id)
T getParameter(std::string const &) const
OrphanHandle< PROD > put(std::unique_ptr< PROD > product)
Put a new product.
Definition: Event.h:131
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Definition: Event.h:525
bool ev
CRackSeedGenerator(const edm::ParameterSet &conf)
~CRackSeedGenerator() override
edm::EDGetTokenT< SiStripRecHit2DCollection > rphirecHitsToken_
edm::ParameterSet conf_
SeedGeneratorForCRack cosmic_seed
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:511