Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
athena
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Peter Sherwood
athena
Commits
cb79c66e
Commit
cb79c66e
authored
4 years ago
by
Shaun Roe
Committed by
Vakhtang Tsulaia
4 years ago
Browse files
Options
Downloads
Patches
Plain Diff
22.0-cleanup-TrkKalmanFitter
parent
3fc68229
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
Tracking/TrkFitter/TrkKalmanFitter/src/KalmanSmoother.cxx
+10
-15
10 additions, 15 deletions
Tracking/TrkFitter/TrkKalmanFitter/src/KalmanSmoother.cxx
with
10 additions
and
15 deletions
Tracking/TrkFitter/TrkKalmanFitter/src/KalmanSmoother.cxx
+
10
−
15
View file @
cb79c66e
...
...
@@ -6,8 +6,6 @@
// KalmanSmoother.cxx
// Source file for class KalmanSmoother
///////////////////////////////////////////////////////////////////
// (c) ATLAS Detector software
///////////////////////////////////////////////////////////////////
// Markus.Elsing@cern.ch
///////////////////////////////////////////////////////////////////
...
...
@@ -33,6 +31,7 @@
#include
<sstream>
#include
<iomanip>
#include
<cmath>
// InterfaceID
// const InterfaceID& Trk::KalmanSmoother::interfaceID() {
...
...
@@ -272,7 +271,6 @@ Trk::FitterStatusCode Trk::KalmanSmoother::fit(Trk::Trajectory& tra
}
lastPredictedState
->
backwardStateChiSquared
(
trackQualityIncrement
->
chiSquared
());
addChi2IncrementAndDelete
(
trackQualityIncrement
,
chi2Increment
,
ndofIncrement
);
// Trk::Surface& testSf = fittableMeasurement->associatedSurface();
////////////////////////////////////////////////////////////////////////////////////
...
...
@@ -289,10 +287,7 @@ Trk::FitterStatusCode Trk::KalmanSmoother::fit(Trk::Trajectory& tra
if
(
msgLvl
(
MSG
::
DEBUG
))
{
printGlobalParams
(
previousStatePosOnTraj
,
" start"
,
updatedPar
.
get
()
);
// ATH_MSG_VERBOSE << " Now trying to hit surface " << fittableMeasurement->associatedSurface() << endmsg;
BoundaryCheck
trackWithinSurface
=
true
;
// if ( ! testSf.isOnSurface( updatedPar->position(), trackWithinSurface) )
// ATH_MSG_VERBOSE << " previous updated parameters are outside surface bounds!" << endmsg;
if
(
!
fittableMeasurement
->
associatedSurface
().
isOnSurface
(
rit
->
forwardTrackParameters
()
->
position
(),
trackWithinSurface
)
)
{
ATH_MSG_VERBOSE
(
" for information: forward-filtered pars are outside surface bounds!"
);
...
...
@@ -392,7 +387,8 @@ Trk::FitterStatusCode Trk::KalmanSmoother::fit(Trk::Trajectory& tra
if
(
rit
==
lastSmoothableState
)
{
// at the last don't do state combination.
ATH_MSG_VERBOSE
(
"Identified state"
<<
(
rit
->
positionOnTrajectory
()
>
9
?
" "
:
" 0"
)
<<
rit
->
positionOnTrajectory
()
<<
" as last fittable state."
);
smooPar
=
std
::
move
(
updatedPar
);
//clone here, as updatedPar is used on next iteration and would be invalid if moved
smooPar
.
reset
(
updatedPar
->
clone
()
);
}
else
{
if
(
m_doSmoothing
)
{
forwardTPar
=
rit
->
forwardTrackParameters
();
...
...
@@ -564,7 +560,7 @@ Trk::FitterStatusCode Trk::KalmanSmoother::fitWithReference(Trk::Trajectory&
ATH_MSG_VERBOSE
(
"mass="
<<
mass
<<
", qOverP_ref="
<<
std
::
scientific
<<
rit
->
referenceParameters
()
->
parameters
()[
Trk
::
qOverP
]
<<
", qOverP_diff="
<<
(
predDiffPar
)(
Trk
::
qOverP
)
<<
", sigmaDeltaE="
<<
rit
->
materialEffects
()
->
sigmaDeltaE
()
<<
", sigmaDeltaQoverP="
<<
sqrt
(
sigmaDeltaQoverPsquared
)
<<
std
::
fixed
);
//std::defaultfloat);
<<
", sigmaDeltaQoverP="
<<
std
::
sqrt
(
sigmaDeltaQoverPsquared
)
<<
std
::
fixed
);
//std::defaultfloat);
ATH_MSG_VERBOSE
(
"Added material effects."
);
}
/* possibly check quality of backward "extrapolation", if not good return a
...
...
@@ -596,7 +592,7 @@ Trk::FitterStatusCode Trk::KalmanSmoother::fitWithReference(Trk::Trajectory&
return
FitterStatusCode
::
UpdateFailure
;
}
const
float
updatedQoverP
=
(
rit
->
referenceParameters
()
->
parameters
()[
Trk
::
qOverP
])
+
(
updatedDifference
->
first
[
Trk
::
qOverP
]);
if
(
f
abs
(
updatedQoverP
)
>
0.1
)
{
if
(
std
::
abs
(
updatedQoverP
)
>
0.1
)
{
delete
trackQualityIncrement
;
if
(
msgLvl
(
MSG
::
INFO
))
monitorTrackFits
(
UpdateFailure
,
rit
->
referenceParameters
()
->
eta
()
);
ATH_MSG_INFO
(
"could not update Track Parameters, momentum too low: qoverp="
<<
updatedQoverP
);
...
...
@@ -692,7 +688,7 @@ AmgSymMatrix(5)* Trk::KalmanSmoother::initialiseSmoother(const AmgSymMatrix(5)&
AmgSymMatrix
(
5
)
*
cov
=
new
AmgSymMatrix
(
5
)();
// a 5x5 0-matrix
cov
->
setZero
();
for
(
int
i
=
0
;
i
<
5
;
++
i
)
{
isConstraint
[
i
]
=
(
m_option_relErrorLimit
*
sqrt
(
err
(
i
,
i
))
<
m_initialErrors
[
i
]);
isConstraint
[
i
]
=
(
m_option_relErrorLimit
*
std
::
sqrt
(
err
(
i
,
i
))
<
m_initialErrors
[
i
]);
(
*
cov
)(
i
,
i
)
=
isConstraint
[
i
]
?
err
(
i
,
i
)
*
m_initialCovSeedFactor
:
m_initialErrors
[
i
]
*
m_initialErrors
[
i
];
}
if
(
msgLvl
(
MSG
::
DEBUG
))
{
...
...
@@ -726,7 +722,7 @@ bool Trk::KalmanSmoother::straightTrackModel(const Trk::TrackParameters& TP) con
+
(
*
TP
.
covariance
())(
4
,
1
)
+
(
*
TP
.
covariance
())(
4
,
2
)
+
(
*
TP
.
covariance
())(
4
,
3
);
bool
straightTrackModel
=
(
f
abs
(
momentumCorrelnTest
)
<
1.0E-100
);
bool
straightTrackModel
=
(
std
::
abs
(
momentumCorrelnTest
)
<
1.0E-100
);
if
(
straightTrackModel
)
{
ATH_MSG_DEBUG
(
"Straight track model identified => reduce track's ndof to 4"
);
if
(
msgLvl
(
MSG
::
INFO
))
monitorTrackFits
(
StraightTrackModelUsed
,
TP
.
eta
()
);
...
...
@@ -767,14 +763,13 @@ void Trk::KalmanSmoother::printGlobalParams(int istate, const std::string& ptype
<<
std
::
setw
(
8
)
<<
std
::
setprecision
(
0
)
<<
param
->
momentum
()[
2
]
<<
std
::
setprecision
(
6
)
<<
endmsg
;
if
(
mefot
)
// ATH_MSG_VERBOSE << "Mefot found with " << *mefot << endmsg;
msg
(
MSG
::
VERBOSE
)
<<
"-S- DNA kicked in at t/X0 of "
<<
mefot
->
thicknessInX0
()
<<
" with noise "
<<
mefot
->
addSigmaQoverP
()
<<
endmsg
;
}
void
Trk
::
KalmanSmoother
::
monitorTrackFits
(
FitStatusCodes
code
,
const
double
&
eta
)
const
{
((
m_fitStatistics
[
code
])[
iAll
])
++
;
if
(
f
abs
(
eta
)
<
0.80
)
((
m_fitStatistics
[
code
])[
iBarrel
])
++
;
else
if
(
f
abs
(
eta
)
<
1.60
)
((
m_fitStatistics
[
code
])[
iTransi
])
++
;
else
if
(
f
abs
(
eta
)
<
2.50
)
((
m_fitStatistics
[
code
])[
iEndcap
])
++
;
if
(
std
::
abs
(
eta
)
<
0.80
)
((
m_fitStatistics
[
code
])[
iBarrel
])
++
;
else
if
(
std
::
abs
(
eta
)
<
1.60
)
((
m_fitStatistics
[
code
])[
iTransi
])
++
;
else
if
(
std
::
abs
(
eta
)
<
2.50
)
((
m_fitStatistics
[
code
])[
iEndcap
])
++
;
}
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment