Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
athena
Manage
Activity
Members
Labels
Plan
Jira
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review 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
atlas
athena
Merge requests
!69099
Move more functions from MCTruthClassifier to TruthUtils
Code
Review changes
Check out branch
Download
Patches
Plain diff
Merged
Move more functions from MCTruthClassifier to TruthUtils
averbyts/athena:21022024a
into
main
Overview
42
Commits
19
Pipelines
13
Changes
3
Merged
Andrii Verbytskyi
requested to merge
averbyts/athena:21022024a
into
main
1 year ago
Overview
10
Commits
19
Pipelines
13
Changes
3
Expand
Move more functions from MCTruthClassifier to TruthUtils
@pclark
@jchapman
0
0
Merge request reports
Compare
main
version 17
7d6e12a6
1 year ago
version 16
a69e7702
1 year ago
version 15
294198b8
1 year ago
version 14
34adb6ac
1 year ago
version 13
44b93d39
1 year ago
version 12
8e8c64f4
1 year ago
version 11
6415ce7a
1 year ago
version 10
6c6f90e7
1 year ago
version 9
30163eb5
1 year ago
version 8
1d6932d9
1 year ago
version 7
2df7290d
1 year ago
version 6
4e648b25
1 year ago
version 5
b9dffc20
1 year ago
version 4
5c2191d4
1 year ago
version 3
fdcb3b65
1 year ago
version 2
59cc5627
1 year ago
version 1
d65753a4
1 year ago
main (base)
and
latest version
latest version
afb8c677
19 commits,
1 year ago
version 17
7d6e12a6
18 commits,
1 year ago
version 16
a69e7702
17 commits,
1 year ago
version 15
294198b8
16 commits,
1 year ago
version 14
34adb6ac
15 commits,
1 year ago
version 13
44b93d39
14 commits,
1 year ago
version 12
8e8c64f4
13 commits,
1 year ago
version 11
6415ce7a
12 commits,
1 year ago
version 10
6c6f90e7
11 commits,
1 year ago
version 9
30163eb5
10 commits,
1 year ago
version 8
1d6932d9
9 commits,
1 year ago
version 7
2df7290d
8 commits,
1 year ago
version 6
4e648b25
6 commits,
1 year ago
version 5
b9dffc20
5 commits,
1 year ago
version 4
5c2191d4
4 commits,
1 year ago
version 3
fdcb3b65
3 commits,
1 year ago
version 2
59cc5627
2 commits,
1 year ago
version 1
d65753a4
1 commit,
1 year ago
3 files
+
45
−
48
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
Files
3
Search (e.g. *.vue) (Ctrl+P)
Generators/TruthUtils/TruthUtils/HepMCHelpers.h
+
36
−
0
Options
@@ -62,6 +62,42 @@ namespace MC
if
(
apid
==
9000001
||
apid
==
9000002
||
apid
==
9000003
||
apid
==
9000004
||
apid
==
9000005
||
apid
==
9000006
)
return
true
;
//< exotic particles from monotop model
return
false
;
}
/// @brief Function to get a mother of particle. MCTruthClassifier legacy.
/** This can be used for HepMC3::GenVertexPtr, HepMC3::ConstGenVertexPtr or xAOD::TruthVertex* */
template
<
class
T
>
T
getMother
(
T
thePart
)
{
auto
partOriVert
=
thePart
->
production_vertex
();
if
(
!
partOriVert
)
return
nullptr
;
long
partPDG
=
thePart
->
pdg_id
();
long
MotherPDG
(
0
);
auto
MothOriVert
=
partOriVert
;
MothOriVert
=
nullptr
;
T
theMoth
(
nullptr
);
size_t
itr
=
0
;
do
{
if
(
itr
!=
0
)
partOriVert
=
MothOriVert
;
auto
incoming
=
partOriVert
->
particles_in
();
for
(
auto
p
:
incoming
)
{
theMoth
=
p
;
if
(
!
theMoth
)
continue
;
MotherPDG
=
theMoth
->
pdg_id
();
MothOriVert
=
theMoth
->
production_vertex
();
if
(
MotherPDG
==
partPDG
)
break
;
}
itr
++
;
if
(
itr
>
100
)
{
break
;
}
}
while
(
MothOriVert
!=
nullptr
&&
MotherPDG
==
partPDG
&&
!
HepMC
::
is_simulation_particle
(
thePart
)
&&
MothOriVert
!=
partOriVert
);
return
theMoth
;
}
/// @brief Function to find a particle in container
/** This can be used for HepMC3::GenVertexPtr, HepMC3::ConstGenVertexPtr or xAOD::TruthVertex* */
template
<
class
C
,
class
T
>
T
find_matching
(
C
TruthTES
,
T
bcin
)
{
Loading