RecoMuon
TrackerSeedGenerator
plugins
TSGSmart.cc
Go to the documentation of this file.
1
#include "
RecoMuon/TrackerSeedGenerator/plugins/TSGSmart.h
"
2
3
#include "
RecoTracker/TkTrackingRegions/interface/TrackingRegion.h
"
4
#include "
RecoTracker/TkTrackingRegions/interface/OrderedHitsGeneratorFactory.h
"
5
#include "
RecoTracker/TkTrackingRegions/interface/OrderedHitsGenerator.h
"
6
#include "
RecoTracker/TkSeedGenerator/interface/SeedGeneratorFromRegionHits.h
"
7
#include "
RecoTracker/TkSeedGenerator/interface/SeedCreatorFactory.h
"
8
9
TSGSmart::TSGSmart
(
const
edm::ParameterSet
&
pset
,
edm::ConsumesCollector
&iC) {
10
theEtaBound
=
pset
.getParameter<
double
>(
"EtaBound"
);
11
12
// FIXME??
13
edm::ParameterSet
creatorPSet;
14
creatorPSet.
addParameter
<
std::string
>(
"propagator"
,
"PropagatorWithMaterial"
);
15
16
edm::ParameterSet
PairPSet =
pset
.getParameter<
edm::ParameterSet
>(
"PixelPairGeneratorSet"
);
17
edm::ParameterSet
pairhitsfactoryPSet = PairPSet.
getParameter
<
edm::ParameterSet
>(
"OrderedHitsFactoryPSet"
);
18
std::string
pairhitsfactoryName = pairhitsfactoryPSet.getParameter<
std::string
>(
"ComponentName"
);
19
20
thePairGenerator
= std::make_unique<SeedGeneratorFromRegionHits>(
21
OrderedHitsGeneratorFactory::get
()->
create
(pairhitsfactoryName, pairhitsfactoryPSet, iC),
22
nullptr
,
23
SeedCreatorFactory::get
()->
create
(
"SeedFromConsecutiveHitsCreator"
, creatorPSet));
24
25
edm::ParameterSet
TripletPSet =
pset
.getParameter<
edm::ParameterSet
>(
"PixelTripletGeneratorSet"
);
26
edm::ParameterSet
triplethitsfactoryPSet = TripletPSet.
getParameter
<
edm::ParameterSet
>(
"OrderedHitsFactoryPSet"
);
27
std::string
triplethitsfactoryName = triplethitsfactoryPSet.getParameter<
std::string
>(
"ComponentName"
);
28
29
theTripletGenerator
= std::make_unique<SeedGeneratorFromRegionHits>(
30
OrderedHitsGeneratorFactory::get
()->
create
(triplethitsfactoryName, triplethitsfactoryPSet, iC),
31
nullptr
,
32
SeedCreatorFactory::get
()->
create
(
"SeedFromConsecutiveHitsCreator"
, creatorPSet));
33
34
edm::ParameterSet
MixedPSet =
pset
.getParameter<
edm::ParameterSet
>(
"MixedGeneratorSet"
);
35
edm::ParameterSet
mixedhitsfactoryPSet = MixedPSet.
getParameter
<
edm::ParameterSet
>(
"OrderedHitsFactoryPSet"
);
36
std::string
mixedhitsfactoryName = mixedhitsfactoryPSet.getParameter<
std::string
>(
"ComponentName"
);
37
38
theMixedGenerator
= std::make_unique<SeedGeneratorFromRegionHits>(
39
OrderedHitsGeneratorFactory::get
()->
create
(mixedhitsfactoryName, mixedhitsfactoryPSet, iC),
40
nullptr
,
41
SeedCreatorFactory::get
()->
create
(
"SeedFromConsecutiveHitsCreator"
, creatorPSet));
42
}
43
44
TSGSmart::~TSGSmart
() =
default
;
45
46
void
TSGSmart::run
(
TrajectorySeedCollection
&
seeds
,
47
const
edm::Event
&
ev
,
48
const
edm::EventSetup
&es,
49
const
TrackingRegion
&
region
) {
50
if
(fabs(
region
.direction().eta()) >
theEtaBound
) {
51
theMixedGenerator
->run(
seeds
,
region
,
ev
, es);
52
}
else
{
53
theTripletGenerator
->run(
seeds
,
region
,
ev
, es);
54
if
(
seeds
.empty())
55
thePairGenerator
->run(
seeds
,
region
,
ev
, es);
56
}
57
}
SeedCreatorFactory.h
TrajectorySeedCollection
std::vector< TrajectorySeed > TrajectorySeedCollection
Definition:
TrajectorySeedCollection.h:6
SeedGeneratorFromRegionHits.h
TSGSmart::TSGSmart
TSGSmart(const edm::ParameterSet &pset, edm::ConsumesCollector &iC)
Definition:
TSGSmart.cc:9
beamerCreator.create
def create(alignables, pedeDump, additionalData, outputFile, config)
Definition:
beamerCreator.py:44
TSGSmart::thePairGenerator
std::unique_ptr< SeedGeneratorFromRegionHits > thePairGenerator
Definition:
TSGSmart.h:24
TSGSmart::theMixedGenerator
std::unique_ptr< SeedGeneratorFromRegionHits > theMixedGenerator
Definition:
TSGSmart.h:26
edm::ParameterSet
Definition:
ParameterSet.h:47
OrderedHitsGeneratorFactory.h
edm::ParameterSet::addParameter
void addParameter(std::string const &name, T const &value)
Definition:
ParameterSet.h:135
TSGSmart.h
TSGSmart::run
void run(TrajectorySeedCollection &seeds, const edm::Event &ev, const edm::EventSetup &es, const TrackingRegion ®ion) override
Definition:
TSGSmart.cc:46
HLT_FULL_cff.region
region
Definition:
HLT_FULL_cff.py:88286
edm::EventSetup
Definition:
EventSetup.h:58
TSGSmart::theTripletGenerator
std::unique_ptr< SeedGeneratorFromRegionHits > theTripletGenerator
Definition:
TSGSmart.h:25
get
#define get
AlCaHLTBitMon_QueryRunRegistry.string
string string
Definition:
AlCaHLTBitMon_QueryRunRegistry.py:256
DetachedQuadStep_cff.seeds
seeds
Definition:
DetachedQuadStep_cff.py:195
TSGSmart::~TSGSmart
~TSGSmart() override
ev
bool ev
Definition:
Hydjet2Hadronizer.cc:97
edm::ParameterSet::getParameter
T getParameter(std::string const &) const
Definition:
ParameterSet.h:303
TrackingRegion
Definition:
TrackingRegion.h:41
TrackingRegion.h
edm::Event
Definition:
Event.h:73
TSGSmart::theEtaBound
double theEtaBound
Definition:
TSGSmart.h:28
edm::ConsumesCollector
Definition:
ConsumesCollector.h:45
muonDTDigis_cfi.pset
pset
Definition:
muonDTDigis_cfi.py:27
OrderedHitsGenerator.h
Generated for CMSSW Reference Manual by
1.8.16