RecoPixelVertexing
PixelTriplets
plugins
CombinedHitTripletGenerator.cc
Go to the documentation of this file.
1
#include "
CombinedHitTripletGenerator.h
"
2
3
#include "
RecoTracker/TkHitPairs/interface/HitPairGeneratorFromLayerPair.h
"
4
#include "
RecoPixelVertexing/PixelTriplets/interface/HitTripletGeneratorFromPairAndLayers.h
"
5
#include "
RecoPixelVertexing/PixelTriplets/interface/HitTripletGeneratorFromPairAndLayersFactory.h
"
6
#include "
RecoPixelVertexing/PixelTriplets/interface/LayerTriplets.h
"
7
#include "
FWCore/Framework/interface/ConsumesCollector.h
"
8
#include "
FWCore/Framework/interface/Event.h
"
9
#include "
DataFormats/Common/interface/Handle.h
"
10
11
CombinedHitTripletGenerator::CombinedHitTripletGenerator
(
const
edm::ParameterSet
&
cfg
,
edm::ConsumesCollector
& iC)
12
: theSeedingLayerToken(iC.consumes<
SeedingLayerSetsHits
>(
cfg
.getParameter<
edm
::
InputTag
>(
"SeedingLayers"
))) {
13
edm::ParameterSet
generatorPSet =
cfg
.getParameter<
edm::ParameterSet
>(
"GeneratorPSet"
);
14
std::string
generatorName = generatorPSet.
getParameter
<
std::string
>(
"ComponentName"
);
15
theGenerator
=
HitTripletGeneratorFromPairAndLayersFactory::get
()->create(generatorName, generatorPSet, iC);
16
theGenerator
->init(std::make_unique<HitPairGeneratorFromLayerPair>(0, 1, &
theLayerCache
), &
theLayerCache
);
17
}
18
19
CombinedHitTripletGenerator::~CombinedHitTripletGenerator
() {}
20
21
void
CombinedHitTripletGenerator::hitTriplets
(
const
TrackingRegion
&
region
,
22
OrderedHitTriplets
&
result
,
23
const
edm::Event
&
ev
,
24
const
edm::EventSetup
& es) {
25
edm::Handle<SeedingLayerSetsHits>
hlayers;
26
ev
.getByToken(
theSeedingLayerToken
, hlayers);
27
const
SeedingLayerSetsHits
&
layers
= *hlayers;
28
if
(
layers
.numberOfLayersInSet() != 3)
29
throw
cms::Exception
(
"Configuration"
)
30
<<
"CombinedHitTripletGenerator expects SeedingLayerSetsHits::numberOfLayersInSet() to be 3, got "
31
<<
layers
.numberOfLayersInSet();
32
33
std::vector<LayerTriplets::LayerSetAndLayers> trilayers =
LayerTriplets::layers
(
layers
);
34
for
(
const
auto
& setAndLayers : trilayers) {
35
theGenerator
->hitTriplets(
region
,
result
,
ev
, es, setAndLayers.first, setAndLayers.second);
36
}
37
theLayerCache
.
clear
();
38
}
Handle.h
CombinedHitTripletGenerator::theGenerator
std::unique_ptr< HitTripletGeneratorFromPairAndLayers > theGenerator
Definition:
CombinedHitTripletGenerator.h:50
HitTripletGeneratorFromPairAndLayers.h
HitTripletGeneratorFromPairAndLayersFactory.h
edm
HLT enums.
Definition:
AlignableModifier.h:19
HLT_FULL_cff.InputTag
InputTag
Definition:
HLT_FULL_cff.py:89287
CombinedHitTripletGenerator::~CombinedHitTripletGenerator
~CombinedHitTripletGenerator() override
Definition:
CombinedHitTripletGenerator.cc:19
SeedingLayerSetsHits
Definition:
SeedingLayerSetsHits.h:18
CombinedHitTripletGenerator::theSeedingLayerToken
edm::EDGetTokenT< SeedingLayerSetsHits > theSeedingLayerToken
Definition:
CombinedHitTripletGenerator.h:46
edm::Handle
Definition:
AssociativeIterator.h:50
CombinedHitTripletGenerator::CombinedHitTripletGenerator
CombinedHitTripletGenerator(const edm::ParameterSet &cfg, edm::ConsumesCollector &iC)
Definition:
CombinedHitTripletGenerator.cc:11
CombinedHitTripletGenerator.h
CombinedHitTripletGenerator::theLayerCache
LayerCacheType theLayerCache
Definition:
CombinedHitTripletGenerator.h:48
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition:
AlCaHLTBitMon_QueryRunRegistry.py:256
edm::ParameterSet
Definition:
ParameterSet.h:47
Event.h
OrderedHitTriplets
Definition:
OrderedHitTriplets.h:9
HLT_FULL_cff.region
region
Definition:
HLT_FULL_cff.py:88272
edm::EventSetup
Definition:
EventSetup.h:57
get
#define get
looper.cfg
cfg
Definition:
looper.py:297
HitPairGeneratorFromLayerPair.h
ev
bool ev
Definition:
Hydjet2Hadronizer.cc:95
LayerTriplets.h
LayerHitMapCache::clear
void clear()
Definition:
LayerHitMapCache.h:69
edm::ParameterSet::getParameter
T getParameter(std::string const &) const
Definition:
ParameterSet.h:303
TrackingRegion
Definition:
TrackingRegion.h:41
mps_fire.result
result
Definition:
mps_fire.py:311
ConsumesCollector.h
cms::Exception
Definition:
Exception.h:70
edm::Event
Definition:
Event.h:73
LayerTriplets::layers
std::vector< LayerSetAndLayers > layers(const SeedingLayerSetsHits &sets)
Definition:
LayerTriplets.cc:4
edm::ConsumesCollector
Definition:
ConsumesCollector.h:45
hgcalTopologyTester_cfi.layers
layers
Definition:
hgcalTopologyTester_cfi.py:8
CombinedHitTripletGenerator::hitTriplets
void hitTriplets(const TrackingRegion ®, OrderedHitTriplets &triplets, const edm::Event &ev, const edm::EventSetup &es) override
from base class
Definition:
CombinedHitTripletGenerator.cc:21
Generated for CMSSW Reference Manual by
1.8.16