IAP GITLAB
Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
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
Model registry
Operate
Environments
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
Air Shower Physics
corsika
Commits
cd6fbba2
Commit
cd6fbba2
authored
4 years ago
by
Felix Riehn
Browse files
Options
Downloads
Patches
Plain Diff
added summary
parent
288a94a0
No related branches found
No related tags found
2 merge requests
!234
WIP: Initial example of python as script language from C++
,
!201
Resolve "handling of off-shell particles"
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
Processes/OnShellCheck/OnShellCheck.cc
+3
-0
3 additions, 0 deletions
Processes/OnShellCheck/OnShellCheck.cc
Processes/OnShellCheck/OnShellCheck.h
+12
-0
12 additions, 0 deletions
Processes/OnShellCheck/OnShellCheck.h
with
15 additions
and
0 deletions
Processes/OnShellCheck/OnShellCheck.cc
+
3
−
0
View file @
cd6fbba2
...
...
@@ -46,6 +46,9 @@ namespace corsika::process {
const
HEPEnergyType
e_shifted
=
sqrt
(
p_original
.
GetSquaredNorm
()
+
m_corsika
*
m_corsika
);
auto
const
e_shift_relative
=
(
e_shifted
/
e_original
-
1
);
count_
=
count_
+
1
;
average_shift_
+=
abs
(
e_shift_relative
);
if
(
abs
(
e_shift_relative
)
>
max_shift_
)
max_shift_
=
abs
(
e_shift_relative
);
/*
For now we warn if the necessary shift is larger than 1%.
we could promote this to an error.
...
...
This diff is collapsed.
Click to expand it.
Processes/OnShellCheck/OnShellCheck.h
+
12
−
0
View file @
cd6fbba2
...
...
@@ -19,12 +19,24 @@
namespace
corsika
::
process
{
namespace
on_shell_check
{
class
OnShellCheck
:
public
process
::
SecondariesProcess
<
OnShellCheck
>
{
double
average_shift_
=
0
;
double
max_shift_
=
0
;
double
count_
=
0
;
public:
OnShellCheck
(
const
double
vMassTolerance
,
const
double
vEnergyTolerance
)
:
mass_tolerance_
(
vMassTolerance
)
,
energy_tolerance_
(
vEnergyTolerance
)
{}
~
OnShellCheck
()
{
std
::
cout
<<
"OnShellCheck: summary"
<<
std
::
endl
<<
" particles shifted: "
<<
int
(
count_
)
<<
std
::
endl
;
if
(
count_
)
std
::
cout
<<
" average energy shift (%): "
<<
average_shift_
/
count_
*
100.
<<
std
::
endl
<<
" max. energy shift (%): "
<<
max_shift_
*
100.
<<
std
::
endl
;
};
EProcessReturn
DoSecondaries
(
corsika
::
setup
::
StackView
&
);
void
Init
();
...
...
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