IAP GITLAB
Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
C
corsika
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Issue analytics
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
Pranav Sampathkumar
corsika
Commits
aec9a1c7
Commit
aec9a1c7
authored
4 years ago
by
Felix Riehn
Browse files
Options
Downloads
Patches
Plain Diff
output format etc
parent
20bf7cd5
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
Processes/OnShellCheck/OnShellCheck.cc
+12
-9
12 additions, 9 deletions
Processes/OnShellCheck/OnShellCheck.cc
with
12 additions
and
9 deletions
Processes/OnShellCheck/OnShellCheck.cc
+
12
−
9
View file @
aec9a1c7
...
...
@@ -40,8 +40,8 @@ namespace corsika::process {
auto
const
Plab
=
corsika
::
geometry
::
FourVector
(
e_original
,
p_original
);
auto
const
m_kinetic
=
Plab
.
GetNorm
();
auto
const
m_corsika
=
particles
::
GetMass
(
pid
);
auto
const
m_err
=
abs
(
m_kinetic
-
m_corsika
)
/
m_corsika
;
if
(
m_err
>
mass_tolerance_
)
{
auto
const
m_err
_abs
=
abs
(
m_kinetic
-
m_corsika
);
if
(
m_err
_abs
>
=
mass_tolerance_
*
m_corsika
)
{
const
HEPEnergyType
e_shifted
=
sqrt
(
p_original
.
GetSquaredNorm
()
+
m_corsika
*
m_corsika
);
auto
const
e_shift_relative
=
(
e_shifted
/
e_original
-
1
);
...
...
@@ -50,20 +50,23 @@ namespace corsika::process {
we could promote this to an error.
*/
if
(
abs
(
e_shift_relative
)
>
energy_tolerance_
)
{
std
::
cout
<<
"OnShellCheck:
:DoSecondaries:
warning! shifted particle energy by "
<<
e_shift_relative
*
100
<<
" %"
<<
std
::
endl
;
std
::
cout
<<
"OnShellCheck: warning! shifted particle energy by "
<<
e_shift_relative
*
100
<<
" %"
<<
std
::
endl
;
}
std
::
cout
<<
"OnShellCheck:
:DoSecondaries:
shift particle mass for "
<<
pid
std
::
cout
<<
"OnShellCheck: shift particle mass for "
<<
pid
<<
std
::
endl
<<
std
::
setw
(
20
)
<<
std
::
setfill
(
' '
)
<<
std
::
setw
(
35
)
<<
std
::
setfill
(
' '
)
<<
"corsika mass (GeV): "
<<
m_corsika
/
1
_GeV
<<
std
::
endl
<<
std
::
setw
(
35
)
<<
std
::
setfill
(
' '
)
<<
"kinetic mass (GeV): "
<<
m_kinetic
/
1
_GeV
<<
std
::
endl
<<
"(m_kin-m_cor)/en: "
<<
m_err
<<
std
::
endl
<<
"mass tolerance: "
<<
mass_tolerance_
<<
std
::
endl
;
<<
std
::
setw
(
35
)
<<
std
::
setfill
(
' '
)
<<
"m_kin-m_cor (GeV): "
<<
m_err_abs
/
1
_GeV
<<
std
::
endl
<<
std
::
setw
(
35
)
<<
std
::
setfill
(
' '
)
<<
"mass tolerance (GeV): "
<<
(
m_corsika
*
mass_tolerance_
)
/
1
_GeV
<<
std
::
endl
;
// reset energy
p
.
SetEnergy
(
e_shifted
);
}
else
std
::
cout
<<
"OnShellCheck:
:DoSecondaries:
particle mass for "
<<
pid
<<
" OK"
<<
std
::
endl
;
std
::
cout
<<
"OnShellCheck: particle mass for "
<<
pid
<<
" OK"
<<
std
::
endl
;
}
return
EProcessReturn
::
eOk
;
}
...
...
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