Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
DD4hep
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
cepc
externals
mirroring
DD4hep
Commits
039aaadd
Commit
039aaadd
authored
1 year ago
by
Andre Sailer
Browse files
Options
Downloads
Patches
Plain Diff
Geant4InputHandling: protect propertime against negative masses
parent
f6f3f7fc
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
DDG4/src/Geant4InputHandling.cpp
+2
-2
2 additions, 2 deletions
DDG4/src/Geant4InputHandling.cpp
with
2 additions
and
2 deletions
DDG4/src/Geant4InputHandling.cpp
+
2
−
2
View file @
039aaadd
...
@@ -385,8 +385,8 @@ getRelevant(set<int>& visited,
...
@@ -385,8 +385,8 @@ getRelevant(set<int>& visited,
double
me
=
en
>
std
::
numeric_limits
<
double
>::
epsilon
()
?
p
->
mass
/
en
:
0.0
;
double
me
=
en
>
std
::
numeric_limits
<
double
>::
epsilon
()
?
p
->
mass
/
en
:
0.0
;
// fix by S.Morozov for real != 0
// fix by S.Morozov for real != 0
double
proper_time
=
fabs
(
dp
->
time
-
p
->
time
)
*
me
;
double
proper_time
=
fabs
(
dp
->
time
-
p
->
time
)
*
me
;
double
proper_time_Precision
=
pow
(
10.
,
-
DBL_DIG
)
*
me
*
fmax
(
fabs
(
p
->
time
),
fabs
(
dp
->
time
));
double
proper_time_Precision
=
pow
(
10.
,
-
DBL_DIG
)
*
fabs
(
me
)
*
fmax
(
fabs
(
p
->
time
),
fabs
(
dp
->
time
));
bool
isProperTimeZero
=
(
proper_time
<=
proper_time_Precision
);
bool
isProperTimeZero
=
(
fabs
(
proper_time
)
<=
fabs
(
proper_time_Precision
)
)
;
// -- remove original if ---
// -- remove original if ---
bool
rejectParticle
=
not
p
.
definition
()
// completely unknown to geant4
bool
rejectParticle
=
not
p
.
definition
()
// completely unknown to geant4
...
...
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