Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
athena
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Terraform modules
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
Davide Di Croce
athena
Commits
afb48dbc
Commit
afb48dbc
authored
1 year ago
by
Andrii Verbytskyi
Committed by
Frank Winklmeier
1 year ago
Browse files
Options
Downloads
Patches
Plain Diff
Drop isStableOrSimDecayedv2
Drop isStableOrSimDecayedv2
parent
c257dc25
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
Generators/TruthUtils/TruthUtils/HepMCHelpers.h
+2
-6
2 additions, 6 deletions
Generators/TruthUtils/TruthUtils/HepMCHelpers.h
Reconstruction/Jet/JetSimTools/Root/JetTruthParticleSelectorTool.cxx
+3
-3
3 additions, 3 deletions
...ion/Jet/JetSimTools/Root/JetTruthParticleSelectorTool.cxx
with
5 additions
and
9 deletions
Generators/TruthUtils/TruthUtils/HepMCHelpers.h
+
2
−
6
View file @
afb48dbc
...
...
@@ -42,17 +42,13 @@ namespace MC
template
<
class
T
>
inline
bool
isSimInteracting
(
const
T
&
p
)
{
return
isGenStable
<
T
>
(
p
)
&&
isInteracting
<
T
>
(
p
);}
/// @brief Identify if particle is satble or decayed in simulation. + a pathological case of decayed particle w/o end vertex.
/// The decayed particles w/o end vertex might occur in case of simulation of long lived particles in Geant stripped off the decay products.
/// I.e. those particles should be re-decayed later.
template
<
class
T
>
inline
bool
isStableOrSimDecayed
(
const
T
&
p
)
{
const
auto
vertex
=
p
->
end_vertex
();
return
(
isStable
<
T
>
(
p
)
||
(
isDecayed
<
T
>
(
p
)
&&
(
!
vertex
||
HepMC
::
is_simulation_vertex
(
vertex
))));
}
/// @brief Identify if particle is satble or decayed in simulation. w/o a pathological case of decayed particle w/o end vertex.
template
<
class
T
>
inline
bool
isStableOrSimDecayedv2
(
const
T
&
p
)
{
const
auto
vertex
=
p
->
end_vertex
();
return
(
isStable
<
T
>
(
p
)
||
(
isDecayed
<
T
>
(
p
)
&&
vertex
&&
HepMC
::
is_simulation_vertex
(
vertex
)));
}
/// @brief Identify a photon with zero energy. Probably a workaround for a generator bug.
template
<
class
T
>
inline
bool
isZeroEnergyPhoton
(
const
T
&
p
)
{
return
isPhoton
<
T
>
(
p
)
&&
p
->
e
()
==
0
;}
...
...
This diff is collapsed.
Click to expand it.
Reconstruction/Jet/JetSimTools/Root/JetTruthParticleSelectorTool.cxx
+
3
−
3
View file @
afb48dbc
...
...
@@ -231,18 +231,18 @@ bool JetTruthParticleSelectorTool::selector(const xAOD::TruthParticle* truthPart
switch
(
m_selectionMode
)
{
// For now only 4 modes used in practice for jets...
// a switch statement is probably not optimal here...
case
StableNoMuonNoNu
:
result
=
(
MC
::
isStableOrSimDecayed
v2
(
truthPart
)
&&
!
HepMC
::
is_simulation_particle
(
truthPart
)
&&
!
MC
::
isZeroEnergyPhoton
(
truthPart
)
&&
result
=
(
MC
::
isStableOrSimDecayed
(
truthPart
)
&&
!
HepMC
::
is_simulation_particle
(
truthPart
)
&&
!
MC
::
isZeroEnergyPhoton
(
truthPart
)
&&
passKinematics
(
truthPart
)
&&
!
MC
::
isMuon
(
truthPart
)
&&
(
!
(
MC
::
isStable
(
truthPart
)
&&
MC
::
isSpecialNonInteracting
(
truthPart
))));
break
;
case
NuOnly
:
result
=
(
MC
::
isStableOrSimDecayed
v2
(
truthPart
)
&&
!
HepMC
::
is_simulation_particle
(
truthPart
)
&&
!
MC
::
isZeroEnergyPhoton
(
truthPart
)
&&
result
=
(
MC
::
isStableOrSimDecayed
(
truthPart
)
&&
!
HepMC
::
is_simulation_particle
(
truthPart
)
&&
!
MC
::
isZeroEnergyPhoton
(
truthPart
)
&&
passKinematics
(
truthPart
)
&&
MC
::
isStable
(
truthPart
)
&&
MC
::
isSpecialNonInteracting
(
truthPart
));
break
;
case
MuonOnly
:
result
=
MC
::
isMuon
(
truthPart
);
break
;
case
NoWZDecay
:
result
=
(
MC
::
isStableOrSimDecayed
v2
(
truthPart
)
&&
!
HepMC
::
is_simulation_particle
(
truthPart
)
&&
!
MC
::
isZeroEnergyPhoton
(
truthPart
)
&&
result
=
(
MC
::
isStableOrSimDecayed
(
truthPart
)
&&
!
HepMC
::
is_simulation_particle
(
truthPart
)
&&
!
MC
::
isZeroEnergyPhoton
(
truthPart
)
&&
passKinematics
(
truthPart
)
&&
!
isWZDecay
(
truthPart
,
m_wzLeptons
,
m_wzPhotonCone
*
m_wzPhotonCone
)
&&
!
isLeptonFromTau
(
truthPart
)
);
...
...
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