RecoTracker
SpecialSeedGenerators
src
GenericPairGenerator.cc
Go to the documentation of this file.
1
#include "
RecoTracker/SpecialSeedGenerators/interface/GenericPairGenerator.h
"
2
//#include "RecoTracker/TkSeedingLayers/interface/SeedingLayerSetsBuilder.h"
3
typedef
SeedingHitSet::ConstRecHitPointer
SeedingHit
;
4
5
#include "
FWCore/Framework/interface/ConsumesCollector.h
"
6
#include "
FWCore/MessageLogger/interface/MessageLogger.h
"
7
#include "
TrackingTools/TransientTrackingRecHit/interface/SeedingLayerSetsHits.h
"
8
9
GenericPairGenerator::GenericPairGenerator
(
const
edm::ParameterSet
& conf,
edm::ConsumesCollector
& iC)
10
: theSeedingLayerToken(iC.consumes<
SeedingLayerSetsHits
>(conf.getParameter<
edm
::
InputTag
>(
"LayerSrc"
))) {
11
edm::LogInfo
(
"CtfSpecialSeedGenerator|GenericPairGenerator"
) <<
"Constructing GenericPairGenerator"
;
12
}
13
14
const
OrderedSeedingHits
&
GenericPairGenerator::run
(
const
TrackingRegion
&
region
,
15
const
edm::Event
&
e
,
16
const
edm::EventSetup
& es) {
17
hitPairs
.clear();
18
hitPairs
.reserve(0);
19
edm::Handle<SeedingLayerSetsHits>
hlayers;
20
e
.getByToken(
theSeedingLayerToken
, hlayers);
21
const
SeedingLayerSetsHits
&
layers
= *hlayers;
22
if
(
layers
.numberOfLayersInSet() != 2)
23
throw
cms::Exception
(
"CtfSpecialSeedGenerator"
)
24
<<
"You are using "
<<
layers
.numberOfLayersInSet() <<
" layers in set instead of 2 "
;
25
26
for
(
SeedingLayerSetsHits::SeedingLayerSet
ls
:
layers
) {
27
auto
innerHits =
region
.hits(es,
ls
[0]);
28
auto
outerHits =
region
.hits(es,
ls
[1]);
29
for
(
auto
iOuterHit = outerHits.begin(); iOuterHit != outerHits.end(); iOuterHit++) {
30
for
(
auto
iInnerHit = innerHits.begin(); iInnerHit != innerHits.end(); iInnerHit++) {
31
hitPairs
.push_back(
OrderedHitPair
(&(**iInnerHit), &(**iOuterHit)));
32
}
33
}
34
}
35
return
hitPairs
;
36
}
eostools.ls
def ls(path, rec=False)
Definition:
eostools.py:349
MessageLogger.h
edm
HLT enums.
Definition:
AlignableModifier.h:19
SeedingHitSet::ConstRecHitPointer
BaseTrackerRecHit const * ConstRecHitPointer
Definition:
SeedingHitSet.h:10
HLT_FULL_cff.InputTag
InputTag
Definition:
HLT_FULL_cff.py:89353
SeedingLayerSetsHits
Definition:
SeedingLayerSetsHits.h:18
edm::LogInfo
Log< level::Info, false > LogInfo
Definition:
MessageLogger.h:125
edm::Handle
Definition:
AssociativeIterator.h:50
GenericPairGenerator::run
const OrderedSeedingHits & run(const TrackingRegion ®ion, const edm::Event &ev, const edm::EventSetup &es) override
Definition:
GenericPairGenerator.cc:14
SeedingLayerSetsHits.h
GenericPairGenerator::theSeedingLayerToken
edm::EDGetTokenT< SeedingLayerSetsHits > theSeedingLayerToken
Definition:
GenericPairGenerator.h:24
OrderedSeedingHits
Definition:
OrderedSeedingHits.h:7
edm::ParameterSet
Definition:
ParameterSet.h:47
GenericPairGenerator::hitPairs
OrderedHitPairs hitPairs
Definition:
GenericPairGenerator.h:25
GenericPairGenerator::GenericPairGenerator
GenericPairGenerator(const edm::ParameterSet &conf, edm::ConsumesCollector &iC)
Definition:
GenericPairGenerator.cc:9
SeedingHit
SeedingHitSet::ConstRecHitPointer SeedingHit
Definition:
GenericPairGenerator.cc:3
HLT_FULL_cff.region
region
Definition:
HLT_FULL_cff.py:88338
edm::EventSetup
Definition:
EventSetup.h:57
SeedingLayerSetsHits::SeedingLayerSet
Definition:
SeedingLayerSetsHits.h:65
TrackingRegion
Definition:
TrackingRegion.h:41
ConsumesCollector.h
cms::Exception
Definition:
Exception.h:70
OrderedHitPair
Definition:
OrderedHitPair.h:6
edm::Event
Definition:
Event.h:73
edm::ConsumesCollector
Definition:
ConsumesCollector.h:45
hgcalTopologyTester_cfi.layers
layers
Definition:
hgcalTopologyTester_cfi.py:8
MillePedeFileConverter_cfg.e
e
Definition:
MillePedeFileConverter_cfg.py:37
GenericPairGenerator.h
Generated for CMSSW Reference Manual by
1.8.16