RecoTracker
FinalTrackSelectors
src
trackAlgoPriorityOrder.h
Go to the documentation of this file.
1
#ifndef RecoTracker_FinalTrackSelectors_trackAlgoPriorityOrder_h
2
#define RecoTracker_FinalTrackSelectors_trackAlgoPriorityOrder_h
3
4
#include "
DataFormats/TrackReco/interface/TrackBase.h
"
5
6
#include <array>
7
18
namespace
impl
{
19
28
constexpr
reco::TrackBase::TrackAlgorithm
algoPriorityOrder
[] = {
reco::TrackBase::undefAlgorithm
,
29
reco::TrackBase::ctf
,
30
reco::TrackBase::cosmics
,
31
reco::TrackBase::duplicateMerge
,
32
reco::TrackBase::initialStep
,
33
reco::TrackBase::highPtTripletStep
,
34
reco::TrackBase::detachedQuadStep
,
35
reco::TrackBase::detachedTripletStep
,
36
reco::TrackBase::lowPtQuadStep
,
37
reco::TrackBase::lowPtTripletStep
,
38
reco::TrackBase::pixelPairStep
,
39
reco::TrackBase::mixedTripletStep
,
40
reco::TrackBase::pixelLessStep
,
41
reco::TrackBase::tobTecStep
,
42
reco::TrackBase::displacedGeneralStep
,
43
reco::TrackBase::jetCoreRegionalStep
,
44
reco::TrackBase::conversionStep
,
45
reco::TrackBase::muonSeededStepInOut
,
46
reco::TrackBase::muonSeededStepOutIn
,
47
reco::TrackBase::outInEcalSeededConv
,
48
reco::TrackBase::inOutEcalSeededConv
,
49
reco::TrackBase::nuclInter
,
50
reco::TrackBase::standAloneMuon
,
51
reco::TrackBase::globalMuon
,
52
reco::TrackBase::cosmicStandAloneMuon
,
53
reco::TrackBase::cosmicGlobalMuon
,
54
reco::TrackBase::reservedForUpgrades2
,
55
reco::TrackBase::bTagGhostTracks
,
56
reco::TrackBase::beamhalo
,
57
reco::TrackBase::gsf
,
58
reco::TrackBase::hltPixel
,
59
reco::TrackBase::hltIter0
,
60
reco::TrackBase::hltIter1
,
61
reco::TrackBase::hltIter2
,
62
reco::TrackBase::hltIter3
,
63
reco::TrackBase::hltIter4
,
64
reco::TrackBase::hltIterX
,
65
reco::TrackBase::hiRegitMuInitialStep
,
66
reco::TrackBase::hiRegitMuPixelPairStep
,
67
reco::TrackBase::hiRegitMuMixedTripletStep
,
68
reco::TrackBase::hiRegitMuPixelLessStep
,
69
reco::TrackBase::hiRegitMuDetachedTripletStep
,
70
reco::TrackBase::hiRegitMuMuonSeededStepInOut
,
71
reco::TrackBase::hiRegitMuMuonSeededStepOutIn
,
72
reco::TrackBase::hiRegitMuLowPtTripletStep
,
73
reco::TrackBase::hiRegitMuTobTecStep
};
74
75
static_assert(
reco::TrackBase::algoSize
==
sizeof
(
algoPriorityOrder
) /
sizeof
(
unsigned
int
),
76
"Please update me too after adding new enumerators to reco::TrackBase::TrackAlgorithm"
);
77
86
constexpr
unsigned
int
findIndex
(
const
reco::TrackBase::TrackAlgorithm
algo
,
const
unsigned
int
index
) {
87
return
index
<
sizeof
(
algoPriorityOrder
)/
sizeof
(
unsigned
int
) ?
88
(
algo
==
algoPriorityOrder
[
index
] ?
index
:
findIndex
(
algo
,
index
+1)) :
89
throw
"Index out of bounds, this means that some reco::TrackBase::TrackAlgorithm enumerator is missing from impl::algoPriorityOrder array."
;
90
}
91
101
constexpr
unsigned
int
priorityForAlgo
(
const
reco::TrackBase::TrackAlgorithm
algo
) {
return
findIndex
(
algo
, 0); }
102
118
template
<
typename
T,
size_t
N,
size_t
I>
119
struct
MakeArray
{
120
template
<
typename
... Args>
121
constexpr
static
std::array<T, N>
value
(Args&&...
args
) {
122
return
MakeArray<T, N, I - 1>::value
(
priorityForAlgo
(static_cast<reco::TrackBase::TrackAlgorithm>(
I
- 1)),
123
std::forward<Args>(
args
)...);
124
}
125
};
126
130
template
<
typename
T,
size_t
N>
131
struct
MakeArray
<
T
,
N
, 0> {
132
template
<
typename
... Args>
133
constexpr
static
std::array<T, N>
value
(Args&&...
args
) {
134
return
std::array<T, N>{{std::forward<Args>(
args
)...}};
135
}
136
};
137
146
template
<
typename
T,
size_t
N>
147
constexpr std::array<T, N>
makeArray
() {
148
return
MakeArray<T, N, N>::value
();
149
}
150
151
}
// namespace impl
152
157
constexpr std::array<unsigned int, reco::TrackBase::algoSize>
trackAlgoPriorityOrder
=
158
impl::makeArray<unsigned int, reco::TrackBase::algoSize>();
159
160
#endif // DataFormats_TrackReco_trackAlgoPriorityOrder_h
trackAlgoPriorityOrder
constexpr std::array< unsigned int, reco::TrackBase::algoSize > trackAlgoPriorityOrder
Definition:
trackAlgoPriorityOrder.h:157
writedatasetfile.args
args
Definition:
writedatasetfile.py:18
reco::TrackBase::hltIter2
Definition:
TrackBase.h:126
reco::TrackBase::reservedForUpgrades2
Definition:
TrackBase.h:117
reco::TrackBase::cosmicStandAloneMuon
Definition:
TrackBase.h:110
reco::TrackBase::inOutEcalSeededConv
Definition:
TrackBase.h:106
reco::TrackBase::detachedQuadStep
Definition:
TrackBase.h:115
reco::TrackBase::lowPtQuadStep
Definition:
TrackBase.h:114
reco::TrackBase::hiRegitMuMuonSeededStepOutIn
Definition:
TrackBase.h:140
reco::TrackBase::beamhalo
Definition:
TrackBase.h:119
TrackBase.h
reco::TrackBase::hltIter3
Definition:
TrackBase.h:127
reco::TrackBase::TrackAlgorithm
TrackAlgorithm
track algorithm
Definition:
TrackBase.h:89
reco::TrackBase::lowPtTripletStep
Definition:
TrackBase.h:95
reco::TrackBase::gsf
Definition:
TrackBase.h:120
impl::MakeArray
Definition:
trackAlgoPriorityOrder.h:119
impl::MakeArray::value
constexpr static std::array< T, N > value(Args &&... args)
Definition:
trackAlgoPriorityOrder.h:121
reco::TrackBase::hltIter1
Definition:
TrackBase.h:125
reco::TrackBase::mixedTripletStep
Definition:
TrackBase.h:98
reco::TrackBase::hiRegitMuInitialStep
Definition:
TrackBase.h:132
reco::TrackBase::hiRegitMuPixelPairStep
Definition:
TrackBase.h:134
reco::TrackBase::displacedGeneralStep
Definition:
TrackBase.h:116
cmsdt::algo
algo
Definition:
constants.h:165
reco::TrackBase::hiRegitMuMixedTripletStep
Definition:
TrackBase.h:136
reco::TrackBase::standAloneMuon
Definition:
TrackBase.h:108
reco::TrackBase::muonSeededStepOutIn
Definition:
TrackBase.h:104
reco::TrackBase::hiRegitMuTobTecStep
Definition:
TrackBase.h:138
reco::TrackBase::jetCoreRegionalStep
Definition:
TrackBase.h:101
impl::makeArray
constexpr std::array< T, N > makeArray()
Definition:
trackAlgoPriorityOrder.h:147
Exhume::I
const std::complex< double > I
Definition:
I.h:8
reco::TrackBase::outInEcalSeededConv
Definition:
TrackBase.h:105
impl::algoPriorityOrder
constexpr reco::TrackBase::TrackAlgorithm algoPriorityOrder[]
Definition:
trackAlgoPriorityOrder.h:28
impl::findIndex
constexpr unsigned int findIndex(const reco::TrackBase::TrackAlgorithm algo, const unsigned int index)
Definition:
trackAlgoPriorityOrder.h:86
N
#define N
Definition:
blowfish.cc:9
reco::TrackBase::hltPixel
Definition:
TrackBase.h:122
reco::TrackBase::cosmics
Definition:
TrackBase.h:93
reco::TrackBase::detachedTripletStep
Definition:
TrackBase.h:97
reco::TrackBase::undefAlgorithm
Definition:
TrackBase.h:90
reco::TrackBase::cosmicGlobalMuon
Definition:
TrackBase.h:111
reco::TrackBase::initialStep
Definition:
TrackBase.h:94
reco::TrackBase::nuclInter
Definition:
TrackBase.h:107
reco::TrackBase::hiRegitMuDetachedTripletStep
Definition:
TrackBase.h:135
reco::TrackBase::tobTecStep
Definition:
TrackBase.h:100
reco::TrackBase::conversionStep
Definition:
TrackBase.h:102
reco::TrackBase::pixelPairStep
Definition:
TrackBase.h:96
reco::TrackBase::muonSeededStepInOut
Definition:
TrackBase.h:103
reco::TrackBase::ctf
Definition:
TrackBase.h:91
reco::TrackBase::highPtTripletStep
Definition:
TrackBase.h:113
impl
Definition:
trackAlgoPriorityOrder.h:18
reco::TrackBase::algoSize
Definition:
TrackBase.h:141
T
long double T
Definition:
Basic3DVectorLD.h:48
reco::TrackBase::hiRegitMuMuonSeededStepInOut
Definition:
TrackBase.h:139
impl::MakeArray< T, N, 0 >::value
constexpr static std::array< T, N > value(Args &&... args)
Definition:
trackAlgoPriorityOrder.h:133
AlignmentPI::index
index
Definition:
AlignmentPayloadInspectorHelper.h:46
reco::TrackBase::bTagGhostTracks
Definition:
TrackBase.h:118
impl::priorityForAlgo
constexpr unsigned int priorityForAlgo(const reco::TrackBase::TrackAlgorithm algo)
Definition:
trackAlgoPriorityOrder.h:101
reco::TrackBase::hltIterX
Definition:
TrackBase.h:130
reco::TrackBase::hiRegitMuLowPtTripletStep
Definition:
TrackBase.h:133
reco::TrackBase::hiRegitMuPixelLessStep
Definition:
TrackBase.h:137
reco::TrackBase::pixelLessStep
Definition:
TrackBase.h:99
reco::TrackBase::hltIter4
Definition:
TrackBase.h:128
reco::TrackBase::duplicateMerge
Definition:
TrackBase.h:92
reco::TrackBase::hltIter0
Definition:
TrackBase.h:124
reco::TrackBase::globalMuon
Definition:
TrackBase.h:109
Generated for CMSSW Reference Manual by
1.8.16