RecoTracker
TkSeedingLayers
src
HitExtractor.h
Go to the documentation of this file.
1
#ifndef RecoTracker_TkSeedingLayers_HitExtractor_H
2
#define RecoTracker_TkSeedingLayers_HitExtractor_H
3
4
#include <vector>
5
#include <iterator>
6
#include "
RecoTracker/TransientTrackingRecHit/interface/TkTransientTrackingRecHitBuilder.h
"
7
#include "
FWCore/Framework/interface/ConsumesCollector.h
"
8
#include "
FWCore/Utilities/interface/EDGetToken.h
"
9
#include "
DataFormats/Common/interface/ContainerMask.h
"
10
11
#include "
DataFormats/TrackerRecHit2D/interface/BaseTrackerRecHit.h
"
12
#include "
DataFormats/TrackingRecHit/interface/mayown_ptr.h
"
13
#include <limits>
14
15
namespace
edm
{
16
class
Event
;
17
class
EventSetup
;
18
class
ConsumesCollector;
19
}
// namespace edm
20
21
namespace
ctfseeding
{
22
23
class
HitExtractor
{
24
public
:
25
using
TkHit
=
BaseTrackerRecHit
;
26
using
TkHitRef
=
BaseTrackerRecHit
const
&;
27
using
HitPointer
=
mayown_ptr<BaseTrackerRecHit>
;
28
using
Hits
= std::vector<HitPointer>;
29
30
virtual
~HitExtractor
() {}
31
HitExtractor
() {}
32
33
virtual
Hits
hits
(
const
TkTransientTrackingRecHitBuilder
& ttrhBuilder,
34
const
edm::Event
&,
35
const
edm::EventSetup
&)
const
= 0;
36
virtual
HitExtractor
*
clone
()
const
= 0;
37
38
//skip clusters
39
void
useSkipClusters
(
const
edm::InputTag
&
m
,
edm::ConsumesCollector
& iC) {
40
skipClusters
=
true
;
41
maskCluster
=
true
;
42
useSkipClusters_
(
m
, iC);
43
}
44
bool
skipClusters
=
false
;
45
bool
filterCluster
=
false
;
46
bool
maskCluster
=
false
;
47
float
minGoodCharge
= 0;
48
49
protected
:
50
virtual
void
useSkipClusters_
(
const
edm::InputTag
&
m
,
edm::ConsumesCollector
& iC) = 0;
51
};
52
53
template
<
typename
DSTV,
typename
A,
typename
B>
54
inline
void
range2SeedingHits
(DSTV
const
& dstv,
HitExtractor::Hits
&
v
, std::pair<A, B>
const
&
sel
) {
55
typename
DSTV::Range
range
= dstv.equal_range(
sel
.first,
sel
.second);
56
size_t
ts =
v
.size();
57
for
(
typename
DSTV::const_iterator
id
=
range
.first;
id
!=
range
.second;
id
++)
58
ts +=
std::distance
((*id).begin(), (*id).end());
59
v
.reserve(ts);
60
for
(
typename
DSTV::const_iterator
id
=
range
.first;
id
!=
range
.second;
id
++) {
61
for
(
auto
const
&
h
: (*
id
))
62
v
.emplace_back(
h
);
63
}
64
}
65
}
// namespace ctfseeding
66
#endif
ctfseeding::range2SeedingHits
void range2SeedingHits(DSTV const &dstv, HitExtractor::Hits &v, std::pair< A, B > const &sel)
Definition:
HitExtractor.h:54
ctfseeding::HitExtractor::Hits
std::vector< HitPointer > Hits
Definition:
HitExtractor.h:28
Range
PixelRecoRange< float > Range
Definition:
PixelTripletHLTGenerator.cc:28
HLT_2022v15_cff.distance
distance
Definition:
HLT_2022v15_cff.py:6339
ctfseeding
Definition:
SeedingLayerSetsBuilder.h:23
ctfseeding::HitExtractor
Definition:
HitExtractor.h:23
mayown_ptr
Definition:
mayown_ptr.h:13
findQualityFiles.v
v
Definition:
findQualityFiles.py:179
ctfseeding::HitExtractor::TkHitRef
BaseTrackerRecHit const & TkHitRef
Definition:
HitExtractor.h:26
ctfseeding::HitExtractor::filterCluster
bool filterCluster
Definition:
HitExtractor.h:45
ctfseeding::HitExtractor::clone
virtual HitExtractor * clone() const =0
EventSetup
visualization-live-secondInstance_cfg.m
m
Definition:
visualization-live-secondInstance_cfg.py:80
TkTransientTrackingRecHitBuilder.h
edm::EventSetup
Definition:
EventSetup.h:59
mayown_ptr.h
EDGetToken.h
ctfseeding::HitExtractor::minGoodCharge
float minGoodCharge
Definition:
HitExtractor.h:47
BaseTrackerRecHit.h
TkTransientTrackingRecHitBuilder
Definition:
TkTransientTrackingRecHitBuilder.h:15
ctfseeding::HitExtractor::maskCluster
bool maskCluster
Definition:
HitExtractor.h:46
ctfseeding::HitExtractor::~HitExtractor
virtual ~HitExtractor()
Definition:
HitExtractor.h:30
BaseTrackerRecHit
Definition:
BaseTrackerRecHit.h:15
ContainerMask.h
Event
ctfseeding::HitExtractor::skipClusters
bool skipClusters
Definition:
HitExtractor.h:44
edm
HLT enums.
Definition:
AlignableModifier.h:19
edm::InputTag
Definition:
InputTag.h:15
ctfseeding::HitExtractor::hits
virtual Hits hits(const TkTransientTrackingRecHitBuilder &ttrhBuilder, const edm::Event &, const edm::EventSetup &) const =0
FastTimerService_cff.range
range
Definition:
FastTimerService_cff.py:34
ctfseeding::HitExtractor::HitExtractor
HitExtractor()
Definition:
HitExtractor.h:31
EgammaValidation_Wenu_cff.sel
sel
Definition:
EgammaValidation_Wenu_cff.py:33
edm::Event
Definition:
Event.h:73
h
The Signals That Services Can Subscribe To This is based on ActivityRegistry h
Helper function to determine trigger accepts.
Definition:
Activities.doc:4
ConsumesCollector.h
ctfseeding::HitExtractor::useSkipClusters
void useSkipClusters(const edm::InputTag &m, edm::ConsumesCollector &iC)
Definition:
HitExtractor.h:39
edm::ConsumesCollector
Definition:
ConsumesCollector.h:45
ctfseeding::HitExtractor::useSkipClusters_
virtual void useSkipClusters_(const edm::InputTag &m, edm::ConsumesCollector &iC)=0
Generated for CMSSW Reference Manual by
1.8.14