src
RecoTracker
FinalTrackSelectors
src
TrackAlgoPriorityOrder.cc
Go to the documentation of this file.
1
#include "
RecoTracker/FinalTrackSelectors/interface/TrackAlgoPriorityOrder.h
"
2
3
#include "
FWCore/ParameterSet/interface/ParameterSet.h
"
4
#include "
FWCore/ParameterSet/interface/ParameterSetDescription.h
"
5
6
#include "
trackAlgoPriorityOrder.h
"
7
8
TrackAlgoPriorityOrder::TrackAlgoPriorityOrder
(
const
std::vector<reco::TrackBase::TrackAlgorithm>&
algoOrder
)
9
: priority_(
trackAlgoPriorityOrder
) {
10
// with less than 1 element there is nothing to do
11
if
(
algoOrder
.size() <= 1)
12
return
;
13
14
// Reordering the algo priorities is just a matter of taking the
15
// current priorities of the algos, sorting them, and inserting back
16
//
17
// iter0 2 2
18
// iter1 4 -> 3
19
// iter2 3 4
20
std::vector<unsigned int>
priorities
;
21
priorities
.reserve(
algoOrder
.size());
22
for
(
const
auto
algo
:
algoOrder
) {
23
priorities
.push_back(
trackAlgoPriorityOrder
[
algo
]);
24
}
25
26
std::sort
(
priorities
.begin(),
priorities
.end());
27
28
for
(
size_t
i
= 0,
end
=
priorities
.size();
i
!=
end
; ++
i
) {
29
priority_
[
algoOrder
[
i
]] =
priorities
[
i
];
30
}
31
}
HLT_2023v12_cff.algoOrder
algoOrder
Definition:
HLT_2023v12_cff.py:6058
jetUpdater_cfi.sort
sort
Definition:
jetUpdater_cfi.py:30
mps_fire.i
i
Definition:
mps_fire.py:429
TrackAlgoPriorityOrder::TrackAlgoPriorityOrder
TrackAlgoPriorityOrder(const std::vector< reco::TrackBase::TrackAlgorithm > &algoOrder)
Definition:
TrackAlgoPriorityOrder.cc:8
TrackAlgoPriorityOrder::priority_
std::array< unsigned int, reco::TrackBase::algoSize > priority_
Definition:
TrackAlgoPriorityOrder.h:13
ParameterSet.h
ParameterSetDescription.h
cmsdt::algo
algo
Definition:
constants.h:171
bookConverter.priorities
def priorities()
Definition:
bookConverter.py:119
TrackAlgoPriorityOrder.h
mps_fire.end
end
Definition:
mps_fire.py:242
trackAlgoPriorityOrder.h
trackAlgoPriorityOrder
constexpr std::array< unsigned int, reco::TrackBase::algoSize > trackAlgoPriorityOrder
Definition:
trackAlgoPriorityOrder.h:157
Generated for CMSSW Reference Manual by
1.8.14