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:50
CombinedHitQuadrupletGeneratorForPhotonConversion::theSeedingLayerToken
edm::EDGetTokenT< SeedingLayerSetsHits > theSeedingLayerToken
Definition:
CombinedHitQuadrupletGeneratorForPhotonConversion.h:46
Handle.h
OrderedHitPairs
Definition:
OrderedHitPairs.h:8
mps_fire.i
i
Definition:
mps_fire.py:428
CombinedHitQuadrupletGeneratorForPhotonConversion::theLayerCache
LayerCacheType theLayerCache
Definition:
CombinedHitQuadrupletGeneratorForPhotonConversion.h:48
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:52
SeedingLayerSetsHits::size
unsigned short size() const
Get the number of SeedingLayerSets.
Definition:
SeedingLayerSetsHits.h:199
edm
HLT enums.
Definition:
AlignableModifier.h:19
HLT_FULL_cff.InputTag
InputTag
Definition:
HLT_FULL_cff.py:89301
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:47
CombinedHitQuadrupletGeneratorForPhotonConversion::run
const OrderedHitPairs & run(const TrackingRegion ®ion, const edm::Event &ev, const edm::EventSetup &es)
Definition:
CombinedHitQuadrupletGeneratorForPhotonConversion.cc:17
CombinedHitQuadrupletGeneratorForPhotonConversion.h
HitQuadrupletGeneratorFromLayerPairForPhotonConversion.h
edm::ParameterSet
Definition:
ParameterSet.h:47
Event.h
HLT_FULL_cff.region
region
Definition:
HLT_FULL_cff.py:88286
createfilelist.int
int
Definition:
createfilelist.py:10
edm::EventSetup
Definition:
EventSetup.h:58
looper.cfg
cfg
Definition:
looper.py:296
ev
bool ev
Definition:
Hydjet2Hadronizer.cc:97
LayerHitMapCache::clear
void clear()
Definition:
LayerHitMapCache.h:69
TrackingRegion
Definition:
TrackingRegion.h:41
mps_fire.result
result
Definition:
mps_fire.py:311
ConsumesCollector.h
edm::Event
Definition:
Event.h:73
CombinedHitQuadrupletGeneratorForPhotonConversion::~CombinedHitQuadrupletGeneratorForPhotonConversion
~CombinedHitQuadrupletGeneratorForPhotonConversion()
Definition:
CombinedHitQuadrupletGeneratorForPhotonConversion.cc:15
edm::ConsumesCollector
Definition:
ConsumesCollector.h:45
hgcalTopologyTester_cfi.layers
layers
Definition:
hgcalTopologyTester_cfi.py:8
Generated for CMSSW Reference Manual by
1.8.16