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
4ad242ef
Commit
4ad242ef
authored
4 years ago
by
Christos Anastopoulos
Browse files
Options
Downloads
Patches
Plain Diff
GSFSmoother, not needed dynamic_cast
parent
6a76985f
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
Tracking/TrkFitter/TrkGaussianSumFilter/src/GsfSmoother.cxx
+32
-14
32 additions, 14 deletions
Tracking/TrkFitter/TrkGaussianSumFilter/src/GsfSmoother.cxx
with
32 additions
and
14 deletions
Tracking/TrkFitter/TrkGaussianSumFilter/src/GsfSmoother.cxx
+
32
−
14
View file @
4ad242ef
...
@@ -113,9 +113,15 @@ Trk::GsfSmoother::fit(const EventContext& ctx,
...
@@ -113,9 +113,15 @@ Trk::GsfSmoother::fit(const EventContext& ctx,
* We can have single or Multi components here, so we choose what to clone
* We can have single or Multi components here, so we choose what to clone
*/
*/
const
Trk
::
MultiComponentStateOnSurface
*
const
Trk
::
MultiComponentStateOnSurface
*
smootherPredictionMultiStateOnSurface
=
nullptr
;
// Check if we already have a MultiComponent state
if
(
smootherPredictionStateOnSurface
->
variety
()
==
Trk
::
TrackStateOnSurface
::
MultiComponent
)
{
smootherPredictionMultiStateOnSurface
=
smootherPredictionMultiStateOnSurface
=
dynam
ic_cast
<
const
Trk
::
MultiComponentStateOnSurface
*>
(
stat
ic_cast
<
const
Trk
::
MultiComponentStateOnSurface
*>
(
smootherPredictionStateOnSurface
);
smootherPredictionStateOnSurface
);
}
if
(
!
smootherPredictionMultiStateOnSurface
)
{
if
(
!
smootherPredictionMultiStateOnSurface
)
{
ATH_MSG_DEBUG
(
ATH_MSG_DEBUG
(
...
@@ -250,7 +256,7 @@ Trk::GsfSmoother::fit(const EventContext& ctx,
...
@@ -250,7 +256,7 @@ Trk::GsfSmoother::fit(const EventContext& ctx,
Trk
::
MultiComponentState
extrapolatedState
=
Trk
::
MultiComponentState
extrapolatedState
=
m_extrapolator
->
extrapolate
(
ctx
,
m_extrapolator
->
extrapolate
(
ctx
,
extrapolatorCache
,
extrapolatorCache
,
updatedState
,
updatedState
,
measurement
->
associatedSurface
(),
measurement
->
associatedSurface
(),
Trk
::
oppositeMomentum
,
Trk
::
oppositeMomentum
,
...
@@ -301,8 +307,14 @@ Trk::GsfSmoother::fit(const EventContext& ctx,
...
@@ -301,8 +307,14 @@ Trk::GsfSmoother::fit(const EventContext& ctx,
std
::
unique_ptr
<
Trk
::
MultiComponentState
>
forwardsMultiStateOwn
;
std
::
unique_ptr
<
Trk
::
MultiComponentState
>
forwardsMultiStateOwn
;
const
Trk
::
MultiComponentStateOnSurface
*
forwardsMultiStateOnSurface
=
const
Trk
::
MultiComponentStateOnSurface
*
forwardsMultiStateOnSurface
=
dynamic_cast
<
const
Trk
::
MultiComponentStateOnSurface
*>
(
nullptr
;
*
trackStateOnSurface
);
// Check if we already have a MultiComponent state on surface
if
((
*
trackStateOnSurface
)
->
variety
()
==
Trk
::
TrackStateOnSurface
::
MultiComponent
)
{
forwardsMultiStateOnSurface
=
static_cast
<
const
Trk
::
MultiComponentStateOnSurface
*>
(
*
trackStateOnSurface
);
}
if
(
!
forwardsMultiStateOnSurface
)
{
if
(
!
forwardsMultiStateOnSurface
)
{
// Create new multiComponentState from single state
// Create new multiComponentState from single state
...
@@ -368,7 +380,7 @@ Trk::GsfSmoother::fit(const EventContext& ctx,
...
@@ -368,7 +380,7 @@ Trk::GsfSmoother::fit(const EventContext& ctx,
if
(
ccot
&&
trackStateOnSurface
==
secondLastTrackStateOnSurface
)
{
if
(
ccot
&&
trackStateOnSurface
==
secondLastTrackStateOnSurface
)
{
Trk
::
MultiComponentState
ccotState
=
Trk
::
MultiComponentState
ccotState
=
addCCOT
(
ctx
,
updatedStateOnSurface
,
ccot
,
smoothedTrajectory
.
get
());
addCCOT
(
ctx
,
updatedStateOnSurface
,
ccot
,
smoothedTrajectory
.
get
());
if
(
!
ccotState
.
empty
())
{
if
(
!
ccotState
.
empty
())
{
updatedState
=
std
::
move
(
ccotState
);
updatedState
=
std
::
move
(
ccotState
);
}
}
...
@@ -482,8 +494,15 @@ Trk::GsfSmoother::addCCOT(const EventContext& ctx,
...
@@ -482,8 +494,15 @@ Trk::GsfSmoother::addCCOT(const EventContext& ctx,
const
Trk
::
CaloCluster_OnTrack
*
ccot
,
const
Trk
::
CaloCluster_OnTrack
*
ccot
,
Trk
::
SmoothedTrajectory
*
smoothedTrajectory
)
const
Trk
::
SmoothedTrajectory
*
smoothedTrajectory
)
const
{
{
const
Trk
::
MultiComponentStateOnSurface
*
currentMultiStateOS
=
dynamic_cast
<
const
Trk
::
MultiComponentStateOnSurface
*>
(
currentState
);
const
Trk
::
MultiComponentStateOnSurface
*
currentMultiStateOS
=
nullptr
;
// Check if we already have a MultiComponent state
if
(
currentState
->
variety
()
==
Trk
::
TrackStateOnSurface
::
MultiComponent
)
{
currentMultiStateOS
=
static_cast
<
const
Trk
::
MultiComponentStateOnSurface
*>
(
currentState
);
}
if
(
!
currentMultiStateOS
||
!
ccot
)
{
if
(
!
currentMultiStateOS
||
!
ccot
)
{
return
{};
return
{};
}
}
...
@@ -533,13 +552,12 @@ Trk::GsfSmoother::addCCOT(const EventContext& ctx,
...
@@ -533,13 +552,12 @@ Trk::GsfSmoother::addCCOT(const EventContext& ctx,
fitQuality
.
release
());
fitQuality
.
release
());
// Extrapolate back to the surface nearest the origin
// Extrapolate back to the surface nearest the origin
extrapolatedState
=
extrapolatedState
=
m_extrapolator
->
extrapolateDirectly
(
ctx
,
m_extrapolator
->
extrapolateDirectly
(
ctx
,
updatedState
,
updatedState
,
*
currentSurface
,
*
currentSurface
,
Trk
::
oppositeMomentum
,
Trk
::
oppositeMomentum
,
false
,
false
,
Trk
::
nonInteracting
);
Trk
::
nonInteracting
);
if
(
extrapolatedState
.
empty
())
{
if
(
extrapolatedState
.
empty
())
{
ATH_MSG_DEBUG
(
"Extrapolation from CCOT to 1st measurement failed .. now "
ATH_MSG_DEBUG
(
"Extrapolation from CCOT to 1st measurement failed .. now "
...
...
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