Main Page
Namespaces
Classes
Package Documentation
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Properties
Friends
Macros
Groups
Pages
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
}
mps_fire.i
i
Definition:
mps_fire.py:428
bookConverter.priorities
def priorities
Definition:
bookConverter.py:119
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
HLT_FULL_cff.algoOrder
tuple algoOrder
Definition:
HLT_FULL_cff.py:8152
cmsdt::algo
algo
Definition:
constants.h:171
TrackAlgoPriorityOrder.h
trackAlgoPriorityOrder.h
trackAlgoPriorityOrder
constexpr std::array< unsigned int, reco::TrackBase::algoSize > trackAlgoPriorityOrder
Definition:
trackAlgoPriorityOrder.h:157
dataset.end
string end
Definition:
dataset.py:937
Generated for CMSSW Reference Manual by
1.8.5