Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
L
LHCb
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Requirements
Jira
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
Show more breadcrumbs
LHCb
LHCb
Commits
f3c7f685
Commit
f3c7f685
authored
3 months ago
by
Gerhard Raven
Committed by
Miroslav Saur
3 months ago
Browse files
Options
Downloads
Patches
Plain Diff
Avoid `SmartRef<T>::data()` in `MCParticle::goodEndVertex()`
parent
97f97a20
No related branches found
No related tags found
2 merge requests
!4738
Synchronize master branch with 2024-patches
,
!4737
Avoid `SmartRef<T>::data()` in `MCParticle::goodEndVertex()`
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
Event/MCEvent/src/MCParticle.cpp
+7
-9
7 additions, 9 deletions
Event/MCEvent/src/MCParticle.cpp
with
7 additions
and
9 deletions
Event/MCEvent/src/MCParticle.cpp
+
7
−
9
View file @
f3c7f685
...
...
@@ -49,8 +49,8 @@ namespace LHCb {
* nullptr if nothing was found.
*/
const
MCVertex
*
MCParticle
::
goodEndVertex
()
const
{
const
auto
&
v
=
endVertices
();
const
auto
destructiveV
=
std
::
find_if
(
v
.
begin
(),
v
.
end
(),
[](
auto
vtx
)
{
const
auto
&
v
=
endVertices
();
const
auto
i
=
std
::
find_if
(
v
.
begin
(),
v
.
end
(),
[](
auto
vtx
)
{
switch
(
vtx
->
type
()
)
{
case
MCVertex
::
DecayVertex
:
case
MCVertex
::
OscillatedAndDecay
:
...
...
@@ -61,13 +61,11 @@ namespace LHCb {
return
false
;
}
}
);
if
(
destructiveV
!=
v
.
end
()
)
{
return
destructiveV
->
data
();
}
else
{
const
auto
hadronIAV
=
std
::
find_if
(
v
.
begin
(),
v
.
end
(),
[](
auto
vtx
)
{
return
vtx
->
type
()
==
MCVertex
::
HadronicInteraction
;
}
);
return
hadronIAV
!=
v
.
end
()
?
hadronIAV
->
data
()
:
nullptr
;
}
if
(
i
!=
v
.
end
()
)
return
*
i
;
const
auto
j
=
std
::
find_if
(
v
.
begin
(),
v
.
end
(),
[](
auto
vtx
)
{
return
vtx
->
type
()
==
MCVertex
::
HadronicInteraction
;
}
);
return
j
!=
v
.
end
()
?
*
j
:
nullptr
;
}
/**
...
...
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