Main Page
Namespaces
Classes
Package Documentation
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
9
TrackAlgoPriorityOrder::TrackAlgoPriorityOrder
(
const
std::vector<reco::TrackBase::TrackAlgorithm>&
algoOrder
):
10
priority_(
trackAlgoPriorityOrder
) {
11
// with less than 1 element there is nothing to do
12
if
(algoOrder.size() <= 1)
13
return
;
14
15
// Reordering the algo priorities is just a matter of taking the
16
// current priorities of the algos, sorting them, and inserting back
17
//
18
// iter0 2 2
19
// iter1 4 -> 3
20
// iter2 3 4
21
std::vector<unsigned int>
priorities
;
22
priorities.reserve(algoOrder.size());
23
for
(
const
auto
algo
: algoOrder) {
24
priorities.push_back(
trackAlgoPriorityOrder
[
algo
]);
25
}
26
27
std::sort(priorities.begin(), priorities.end());
28
29
for
(
size_t
i
=0,
end
=priorities.size();
i
!=
end
; ++
i
) {
30
priority_
[algoOrder[
i
]] = priorities[
i
];
31
}
32
}
mps_fire.i
i
Definition:
mps_fire.py:269
TrackAlgoPriorityOrder::TrackAlgoPriorityOrder
TrackAlgoPriorityOrder(const std::vector< reco::TrackBase::TrackAlgorithm > &algoOrder)
Definition:
TrackAlgoPriorityOrder.cc:9
TrackAlgoPriorityOrder::priority_
std::array< unsigned int, reco::TrackBase::algoSize > priority_
Definition:
TrackAlgoPriorityOrder.h:15
ParameterSet.h
ParameterSetDescription.h
end
#define end
Definition:
vmac.h:37
bookConverter.priorities
def priorities()
Definition:
bookConverter.py:118
TrackAlgoPriorityOrder.h
trackAlgoPriorityOrder.h
trackAlgoPriorityOrder_cfi.algoOrder
algoOrder
Definition:
trackAlgoPriorityOrder_cfi.py:5
trackAlgoPriorityOrder
std::array< unsigned int, reco::TrackBase::algoSize > trackAlgoPriorityOrder
Definition:
trackAlgoPriorityOrder.h:164
patPFMETCorrections_cff.algo
algo
Definition:
patPFMETCorrections_cff.py:123
Generated for CMSSW Reference Manual by
1.8.11