RecoTracker
SpecialSeedGenerators
src
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
10
#include "
RecoTracker/SpecialSeedGenerators/interface/CRackSeedGenerator.h
"
11
#include "
DataFormats/TrackerRecHit2D/interface/SiStripRecHit2DCollection.h
"
12
#include "
DataFormats/TrajectorySeed/interface/TrajectorySeedCollection.h
"
13
#include "
FWCore/MessageLogger/interface/MessageLogger.h
"
14
#include "
FWCore/Utilities/interface/InputTag.h
"
15
16
using namespace
std
;
17
CRackSeedGenerator::CRackSeedGenerator
(
edm::ParameterSet
const
& conf) : conf_(conf), cosmic_seed(conf) {
18
edm::LogInfo
(
"CRackSeedGenerator"
) <<
"Enter the CRackSeedGenerator"
;
19
matchedrecHitsToken_
=
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.
28
CRackSeedGenerator::~CRackSeedGenerator
() {}
29
30
// Functions that gets called by framework every event
31
void
CRackSeedGenerator::produce
(
edm::Event
&
ev
,
const
edm::EventSetup
& es) {
32
// get Inputs
33
edm::Handle<SiStripRecHit2DCollection>
rphirecHits
;
34
ev
.getByToken(
rphirecHitsToken_
,
rphirecHits
);
35
edm::Handle<SiStripRecHit2DCollection>
stereorecHits
;
36
ev
.getByToken(
stereorecHitsToken_
,
stereorecHits
);
37
edm::Handle<SiStripMatchedRecHit2DCollection>
matchedrecHits
;
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
}
CRackSeedGenerator::matchedrecHitsToken_
edm::EDGetTokenT< SiStripMatchedRecHit2DCollection > matchedrecHitsToken_
Definition:
CRackSeedGenerator.h:23
MessageLogger.h
CRackSeedGenerator::stereorecHitsToken_
edm::EDGetTokenT< SiStripRecHit2DCollection > stereorecHitsToken_
Definition:
CRackSeedGenerator.h:25
convertSQLitetoXML_cfg.output
output
Definition:
convertSQLitetoXML_cfg.py:72
CRackSeedGenerator::~CRackSeedGenerator
~CRackSeedGenerator() override
Definition:
CRackSeedGenerator.cc:28
CRackSeedGenerator.h
convBremSeeds_cfi.stereorecHits
stereorecHits
Definition:
convBremSeeds_cfi.py:13
AlignmentTrackSelector_cfi.matchedrecHits
matchedrecHits
Definition:
AlignmentTrackSelector_cfi.py:64
CRackSeedGenerator::rphirecHitsToken_
edm::EDGetTokenT< SiStripRecHit2DCollection > rphirecHitsToken_
Definition:
CRackSeedGenerator.h:24
edm::LogInfo
Log< level::Info, false > LogInfo
Definition:
MessageLogger.h:125
edm::Handle
Definition:
AssociativeIterator.h:50
SeedGeneratorForCRack::init
void init(const SiStripRecHit2DCollection &collstereo, const SiStripRecHit2DCollection &collrphi, const SiStripMatchedRecHit2DCollection &collmatched, const edm::EventSetup &c)
Definition:
SeedGeneratorForCRack.cc:5
CRackSeedGenerator::conf_
edm::ParameterSet conf_
Definition:
CRackSeedGenerator.h:21
CRackSeedGenerator::cosmic_seed
SeedGeneratorForCRack cosmic_seed
Definition:
CRackSeedGenerator.h:22
CRackSeedGenerator::produce
void produce(edm::Event &e, const edm::EventSetup &c) override
Definition:
CRackSeedGenerator.cc:31
CRackSeedGenerator::CRackSeedGenerator
CRackSeedGenerator(const edm::ParameterSet &conf)
Definition:
CRackSeedGenerator.cc:17
LogDebug
#define LogDebug(id)
Definition:
MessageLogger.h:223
edm::ParameterSet
Definition:
ParameterSet.h:47
SiStripRecHit2DCollection.h
edm::EventSetup
Definition:
EventSetup.h:57
TrajectorySeedCollection.h
InputTag.h
SeedGeneratorForCRack::run
void run(TrajectorySeedCollection &, const edm::EventSetup &c)
Definition:
SeedGeneratorForCRack.cc:42
eostools.move
def move(src, dest)
Definition:
eostools.py:511
std
Definition:
JetResolutionObject.h:76
ev
bool ev
Definition:
Hydjet2Hadronizer.cc:95
AlignmentTrackSelector_cfi.rphirecHits
rphirecHits
Definition:
AlignmentTrackSelector_cfi.py:63
edm::ParameterSet::getParameter
T getParameter(std::string const &) const
Definition:
ParameterSet.h:303
edm::Event
Definition:
Event.h:73
edm::InputTag
Definition:
InputTag.h:15
Generated for CMSSW Reference Manual by
1.8.16