TrackingTools
TrajectoryCleaning
src
FastTrajectoryCleaner.cc
Go to the documentation of this file.
1
#include "
TrackingTools/TrajectoryCleaning/interface/FastTrajectoryCleaner.h
"
2
void
FastTrajectoryCleaner::clean
(
TrajectoryPointerContainer
& tc)
const
{
3
edm::LogError
(
"FastTrajectoryCleaner"
) <<
"not implemented for Trajectory"
;
4
assert
(
false
);
5
}
6
7
void
FastTrajectoryCleaner::clean
(
TempTrajectoryContainer
& tc)
const
{
8
if
(tc.size() <= 1)
9
return
;
// nothing to clean
10
float
maxScore
= -
std::numeric_limits<float>::max
();
11
TempTrajectory
* bestTr =
nullptr
;
12
for
(
auto
& it : tc) {
13
if
(!it.isValid())
14
continue
;
15
auto
const
& pd = it.
measurements
();
16
// count active degree of freedom
17
int
dof
= 0;
18
for
(
auto
const
& im : pd) {
19
if
(
dismissSeed_
& (im.estimate() == 0))
20
continue
;
21
auto
const
&
h
= im.recHitR();
22
if
(!
h
.isValid())
23
continue
;
24
dof
+=
h
.dimension();
25
}
26
float
score
=
validHitBonus_
*
float
(
dof
) -
missingHitPenalty_
* it.lostHits() - it.chiSquared();
27
if
(it.lastMeasurement().updatedState().globalMomentum().perp2() < 0.81f)
28
score
-= 0.5
f
*
validHitBonus_
*
float
(
dof
);
29
else
if
(it.dPhiCacheForLoopersReconstruction() == 0 && it.foundHits() > 8)
30
score
+=
validHitBonus_
*
float
(
dof
);
// extra bonus for long tracks
31
if
(
score
>=
maxScore
) {
32
bestTr = ⁢
33
maxScore
=
score
;
34
}
35
}
36
37
for
(
auto
& it : tc) {
38
if
((&it) != bestTr)
39
it.invalidate();
40
}
41
}
42
43
/*
44
auto score = [&](Trajectory const&t)->float {
45
// possible variant under study
46
// auto ns = t.foundHits()-t.trailingFoundHits();
47
//auto penalty = 0.8f*missingHitPenalty_;
48
// return validHitBonus_*(t.foundHits()-0.2f*t.cccBadHits()) - penalty*t.lostHits() - t.chiSquared();
49
// classical score
50
return validHitBonus_*t.foundHits() - missingHitPenalty_*t.lostHits() - t.chiSquared();
51
};
52
*/
FastTrajectoryCleaner::dismissSeed_
bool dismissSeed_
Definition:
FastTrajectoryCleaner.h:37
DOFs::dof
dof
Definition:
AlignPCLThresholdsWriter.cc:37
dqmMemoryStats.float
float
Definition:
dqmMemoryStats.py:127
FastTrajectoryCleaner::missingHitPenalty_
float missingHitPenalty_
Definition:
FastTrajectoryCleaner.h:36
f
double f[11][100]
Definition:
MuScleFitUtils.cc:78
FastTrajectoryCleaner::TrajectoryPointerContainer
TrajectoryCleaner::TrajectoryPointerContainer TrajectoryPointerContainer
Definition:
FastTrajectoryCleaner.h:16
TempTrajectory
Definition:
TempTrajectory.h:40
cms::cuda::assert
assert(be >=bs)
FastTrajectoryCleaner::validHitBonus_
float validHitBonus_
Definition:
FastTrajectoryCleaner.h:35
FastTrajectoryCleaner::TempTrajectoryContainer
TrajectoryCleaner::TempTrajectoryContainer TempTrajectoryContainer
Definition:
FastTrajectoryCleaner.h:17
TempTrajectory::measurements
const DataContainer & measurements() const
Definition:
TempTrajectory.h:177
h
FastTrajectoryCleaner::clean
void clean(TempTrajectoryContainer &) const override
Definition:
FastTrajectoryCleaner.cc:7
SiStripPI::max
Definition:
SiStripPayloadInspectorHelper.h:169
edm::LogError
Log< level::Error, false > LogError
Definition:
MessageLogger.h:123
FastTrajectoryCleaner.h
HGVHistoProducerAlgoBlock_cfi.maxScore
maxScore
Definition:
HGVHistoProducerAlgoBlock_cfi.py:69
offlineSlimmedPrimaryVertices_cfi.score
score
Definition:
offlineSlimmedPrimaryVertices_cfi.py:6
Generated for CMSSW Reference Manual by
1.8.16