RecoTracker
ConversionSeedGenerators
plugins
CombinedHitQuadrupletGeneratorForPhotonConversion.cc
Go to the documentation of this file.
1
#include "
CombinedHitQuadrupletGeneratorForPhotonConversion.h
"
2
#include "
HitQuadrupletGeneratorFromLayerPairForPhotonConversion.h
"
3
#include "
FWCore/Framework/interface/ConsumesCollector.h
"
4
#include "
FWCore/Framework/interface/Event.h
"
5
#include "
DataFormats/Common/interface/Handle.h
"
6
7
CombinedHitQuadrupletGeneratorForPhotonConversion::CombinedHitQuadrupletGeneratorForPhotonConversion
(
8
const
edm::ParameterSet
&
cfg
,
edm::ConsumesCollector
& iC)
9
: theSeedingLayerToken(iC.consumes<
SeedingLayerSetsHits
>(
cfg
.getParameter<
edm
::
InputTag
>(
"SeedingLayers"
))),
10
theMaxElement(
cfg
.getParameter<unsigned
int
>(
"maxElement"
)) {
11
theGenerator
=
12
std::make_unique<HitQuadrupletGeneratorFromLayerPairForPhotonConversion>(0, 1, &
theLayerCache
,
theMaxElement
);
13
}
14
15
CombinedHitQuadrupletGeneratorForPhotonConversion::~CombinedHitQuadrupletGeneratorForPhotonConversion
() {}
16
17
const
OrderedHitPairs
&
CombinedHitQuadrupletGeneratorForPhotonConversion::run
(
const
TrackingRegion
&
region
,
18
const
edm::Event
&
ev
,
19
const
edm::EventSetup
& es) {
20
thePairs
.clear();
21
hitPairs
(
region
,
thePairs
,
ev
, es);
22
return
thePairs
;
23
}
24
25
void
CombinedHitQuadrupletGeneratorForPhotonConversion::hitPairs
(
const
TrackingRegion
&
region
,
26
OrderedHitPairs
&
result
,
27
const
edm::Event
&
ev
,
28
const
edm::EventSetup
& es) {
29
size_t
maxHitQuadruplets = 1000000;
30
edm::Handle<SeedingLayerSetsHits>
hlayers;
31
ev
.getByToken(
theSeedingLayerToken
, hlayers);
32
const
SeedingLayerSetsHits
&
layers
= *hlayers;
33
assert
(
layers
.numberOfLayersInSet() == 2);
34
35
for
(
SeedingLayerSetsHits::LayerSetIndex
i
= 0;
i
< hlayers->
size
() &&
result
.size() < maxHitQuadruplets; ++
i
) {
36
theGenerator
->hitPairs(
region
,
result
,
layers
[
i
],
ev
, es);
37
}
38
theLayerCache
.
clear
();
39
}
CombinedHitQuadrupletGeneratorForPhotonConversion::theGenerator
std::unique_ptr< HitQuadrupletGeneratorFromLayerPairForPhotonConversion > theGenerator
Definition:
CombinedHitQuadrupletGeneratorForPhotonConversion.h:51
CombinedHitQuadrupletGeneratorForPhotonConversion::theSeedingLayerToken
edm::EDGetTokenT< SeedingLayerSetsHits > theSeedingLayerToken
Definition:
CombinedHitQuadrupletGeneratorForPhotonConversion.h:47
Handle.h
OrderedHitPairs
Definition:
OrderedHitPairs.h:8
mps_fire.i
i
Definition:
mps_fire.py:355
CombinedHitQuadrupletGeneratorForPhotonConversion::theLayerCache
LayerCacheType theLayerCache
Definition:
CombinedHitQuadrupletGeneratorForPhotonConversion.h:49
CombinedHitQuadrupletGeneratorForPhotonConversion::hitPairs
void hitPairs(const TrackingRegion &, OrderedHitPairs &, const edm::Event &, const edm::EventSetup &)
Definition:
CombinedHitQuadrupletGeneratorForPhotonConversion.cc:25
CombinedHitQuadrupletGeneratorForPhotonConversion::CombinedHitQuadrupletGeneratorForPhotonConversion
CombinedHitQuadrupletGeneratorForPhotonConversion(const edm::ParameterSet &cfg, edm::ConsumesCollector &iC)
Definition:
CombinedHitQuadrupletGeneratorForPhotonConversion.cc:7
CombinedHitQuadrupletGeneratorForPhotonConversion::thePairs
OrderedHitPairs thePairs
Definition:
CombinedHitQuadrupletGeneratorForPhotonConversion.h:53
SeedingLayerSetsHits::size
unsigned short size() const
Get the number of SeedingLayerSets.
Definition:
SeedingLayerSetsHits.h:199
edm
HLT enums.
Definition:
AlignableModifier.h:19
SeedingLayerSetsHits
Definition:
SeedingLayerSetsHits.h:18
cms::cuda::assert
assert(be >=bs)
edm::Handle
Definition:
AssociativeIterator.h:50
SeedingLayerSetsHits::LayerSetIndex
unsigned short LayerSetIndex
Definition:
SeedingLayerSetsHits.h:28
CombinedHitQuadrupletGeneratorForPhotonConversion::theMaxElement
const unsigned int theMaxElement
Definition:
CombinedHitQuadrupletGeneratorForPhotonConversion.h:48
CombinedHitQuadrupletGeneratorForPhotonConversion::run
const OrderedHitPairs & run(const TrackingRegion ®ion, const edm::Event &ev, const edm::EventSetup &es)
Definition:
CombinedHitQuadrupletGeneratorForPhotonConversion.cc:17
CombinedHitQuadrupletGeneratorForPhotonConversion.h
HitQuadrupletGeneratorFromLayerPairForPhotonConversion.h
HLT_2018_cff.InputTag
InputTag
Definition:
HLT_2018_cff.py:79016
edm::ParameterSet
Definition:
ParameterSet.h:36
Event.h
createfilelist.int
int
Definition:
createfilelist.py:10
edm::EventSetup
Definition:
EventSetup.h:57
looper.cfg
cfg
Definition:
looper.py:297
ev
bool ev
Definition:
Hydjet2Hadronizer.cc:95
HLT_2018_cff.region
region
Definition:
HLT_2018_cff.py:81479
LayerHitMapCache::clear
void clear()
Definition:
LayerHitMapCache.h:69
TrackingRegion
Definition:
TrackingRegion.h:40
mps_fire.result
result
Definition:
mps_fire.py:303
ConsumesCollector.h
edm::Event
Definition:
Event.h:73
CombinedHitQuadrupletGeneratorForPhotonConversion::~CombinedHitQuadrupletGeneratorForPhotonConversion
~CombinedHitQuadrupletGeneratorForPhotonConversion()
Definition:
CombinedHitQuadrupletGeneratorForPhotonConversion.cc:15
edm::ConsumesCollector
Definition:
ConsumesCollector.h:39
hgcalTopologyTester_cfi.layers
layers
Definition:
hgcalTopologyTester_cfi.py:8
Generated for CMSSW Reference Manual by
1.8.16