Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
acts-core
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD 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
This is an archived project. Repository and other project resources are read-only.
Show more breadcrumbs
acts
acts-core
Commits
2ca18efc
Commit
2ca18efc
authored
5 years ago
by
Paul Gessinger
Browse files
Options
Downloads
Plain Diff
Merge branch 'fix-KF-surface-check' into 'master'
Fix kf surface check See merge request
!793
parents
2376dc12
0abc0fbe
No related branches found
No related tags found
1 merge request
!793
Fix kf surface check
Pipeline
#1498845
passed
5 years ago
Stage: check
Stage: build
Stage: test
Stage: analysis
Stage: deploy
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
Core/include/Acts/Fitter/KalmanFitter.hpp
+40
-27
40 additions, 27 deletions
Core/include/Acts/Fitter/KalmanFitter.hpp
Core/include/Acts/Fitter/KalmanFitterError.hpp
+1
-1
1 addition, 1 deletion
Core/include/Acts/Fitter/KalmanFitterError.hpp
with
41 additions
and
28 deletions
Core/include/Acts/Fitter/KalmanFitter.hpp
+
40
−
27
View file @
2ca18efc
...
@@ -290,10 +290,9 @@ class KalmanFitter {
...
@@ -290,10 +290,9 @@ class KalmanFitter {
}
}
// Update:
// Update:
// - Waiting for a current surface that has material
// - Waiting for a current surface
// -> a trackState will be created on surface with material
auto
surface
=
state
.
navigation
.
currentSurface
;
auto
surface
=
state
.
navigation
.
currentSurface
;
if
(
surface
and
surface
->
surfaceMaterial
()
)
{
if
(
surface
!=
nullptr
)
{
// Check if the surface is in the measurement map
// Check if the surface is in the measurement map
// -> Get the measurement / calibrate
// -> Get the measurement / calibrate
// -> Create the predicted state
// -> Create the predicted state
...
@@ -546,7 +545,9 @@ class KalmanFitter {
...
@@ -546,7 +545,9 @@ class KalmanFitter {
}
}
// We count the processed state
// We count the processed state
++
result
.
processedStates
;
++
result
.
processedStates
;
}
else
{
}
else
if
(
surface
->
surfaceMaterial
()
!=
nullptr
)
{
// We only create track states here if there is already measurement
// detected
if
(
result
.
measurementStates
>
0
)
{
if
(
result
.
measurementStates
>
0
)
{
// No source links on surface, add either hole or passive material
// No source links on surface, add either hole or passive material
// TrackState entry multi trajectory. No storage allocation for
// TrackState entry multi trajectory. No storage allocation for
...
@@ -708,7 +709,7 @@ class KalmanFitter {
...
@@ -708,7 +709,7 @@ class KalmanFitter {
// Update state and stepper with post material effects
// Update state and stepper with post material effects
materialInteractor
(
surface
,
state
,
stepper
,
postUpdate
);
materialInteractor
(
surface
,
state
,
stepper
,
postUpdate
);
}
}
}
else
{
}
else
if
(
surface
->
surfaceMaterial
()
!=
nullptr
)
{
// Transport covariance
// Transport covariance
if
(
surface
->
associatedDetectorElement
()
!=
nullptr
)
{
if
(
surface
->
associatedDetectorElement
()
!=
nullptr
)
{
ACTS_VERBOSE
(
"Detected hole on "
<<
surface
->
geoID
()
ACTS_VERBOSE
(
"Detected hole on "
<<
surface
->
geoID
()
...
@@ -748,27 +749,40 @@ class KalmanFitter {
...
@@ -748,27 +749,40 @@ class KalmanFitter {
void
materialInteractor
(
void
materialInteractor
(
const
Surface
*
surface
,
propagator_state_t
&
state
,
stepper_t
&
stepper
,
const
Surface
*
surface
,
propagator_state_t
&
state
,
stepper_t
&
stepper
,
const
MaterialUpdateStage
&
updateStage
=
fullUpdate
)
const
{
const
MaterialUpdateStage
&
updateStage
=
fullUpdate
)
const
{
// Prepare relevant input particle properties
// Indicator if having material
detail
::
PointwiseMaterialInteraction
interaction
(
surface
,
state
,
stepper
);
bool
hasMaterial
=
false
;
// Evaluate the material properties
if
(
surface
and
surface
->
surfaceMaterial
())
{
if
(
interaction
.
evaluateMaterialProperties
(
state
,
updateStage
))
{
// Prepare relevant input particle properties
// Evaluate the material effects
detail
::
PointwiseMaterialInteraction
interaction
(
surface
,
state
,
interaction
.
evaluatePointwiseMaterialInteraction
(
multipleScattering
,
stepper
);
energyLoss
);
// Evaluate the material properties
if
(
interaction
.
evaluateMaterialProperties
(
state
,
updateStage
))
{
ACTS_VERBOSE
(
"Material effects on surface: "
// Surface has material at this stage
<<
surface
->
geoID
()
<<
" at update stage: "
<<
updateStage
hasMaterial
=
true
;
<<
" are :"
);
ACTS_VERBOSE
(
"eLoss = "
// Evaluate the material effects
<<
interaction
.
Eloss
<<
", "
interaction
.
evaluatePointwiseMaterialInteraction
(
multipleScattering
,
<<
"variancePhi = "
<<
interaction
.
variancePhi
<<
", "
energyLoss
);
<<
"varianceTheta = "
<<
interaction
.
varianceTheta
<<
", "
<<
"varianceQoverP = "
<<
interaction
.
varianceQoverP
);
// Screen out material effects info
ACTS_VERBOSE
(
"Material effects on surface: "
// Update the state and stepper with material effects
<<
surface
->
geoID
()
interaction
.
updateState
(
state
,
stepper
);
<<
" at update stage: "
<<
updateStage
<<
" are :"
);
}
else
{
ACTS_VERBOSE
(
"eLoss = "
<<
interaction
.
Eloss
<<
", "
<<
"variancePhi = "
<<
interaction
.
variancePhi
<<
", "
<<
"varianceTheta = "
<<
interaction
.
varianceTheta
<<
", "
<<
"varianceQoverP = "
<<
interaction
.
varianceQoverP
);
// Update the state and stepper with material effects
interaction
.
updateState
(
state
,
stepper
);
}
}
if
(
not
hasMaterial
)
{
// Screen out message
ACTS_VERBOSE
(
"No material effects on surface: "
<<
surface
->
geoID
()
ACTS_VERBOSE
(
"No material effects on surface: "
<<
surface
->
geoID
()
<<
" at update stage: "
<<
" at update stage: "
<<
updateStage
);
<<
updateStage
);
...
@@ -979,7 +993,6 @@ class KalmanFitter {
...
@@ -979,7 +993,6 @@ class KalmanFitter {
/// It could happen that the fit ends in zero processed states.
/// It could happen that the fit ends in zero processed states.
/// The result gets meaningless so such case is regarded as fit failure.
/// The result gets meaningless so such case is regarded as fit failure.
//@TODO: should we require the number of measurments >0 ?
if
(
kalmanResult
.
result
.
ok
()
and
not
kalmanResult
.
processedStates
)
{
if
(
kalmanResult
.
result
.
ok
()
and
not
kalmanResult
.
processedStates
)
{
kalmanResult
.
result
=
Result
<
void
>
(
KalmanFitterError
::
PropagationInVain
);
kalmanResult
.
result
=
Result
<
void
>
(
KalmanFitterError
::
PropagationInVain
);
}
}
...
...
This diff is collapsed.
Click to expand it.
Core/include/Acts/Fitter/KalmanFitterError.hpp
+
1
−
1
View file @
2ca18efc
...
@@ -40,7 +40,7 @@ class KalmanFitterErrorCategory : public std::error_category {
...
@@ -40,7 +40,7 @@ class KalmanFitterErrorCategory : public std::error_category {
case
KalmanFitterError
::
OutputConversionFailed
:
case
KalmanFitterError
::
OutputConversionFailed
:
return
"Kalman output conversion failed"
;
return
"Kalman output conversion failed"
;
case
KalmanFitterError
::
PropagationInVain
:
case
KalmanFitterError
::
PropagationInVain
:
return
"No
detector observ
ed during the propagation"
;
return
"No
measurement detect
ed during the propagation"
;
default:
default:
return
"unknown"
;
return
"unknown"
;
}
}
...
...
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