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
a1d53f40
Commit
a1d53f40
authored
4 years ago
by
Maximilian Reininghaus
Committed by
Ralf Ulrich
4 years ago
Browse files
Options
Downloads
Patches
Plain Diff
some documentation
parent
240772f7
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!189
Interaction histogram
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
Processes/InteractionCounter/InteractionCounter.h
+18
-1
18 additions, 1 deletion
Processes/InteractionCounter/InteractionCounter.h
with
18 additions
and
1 deletion
Processes/InteractionCounter/InteractionCounter.h
+
18
−
1
View file @
a1d53f40
...
...
@@ -24,7 +24,11 @@
#include
<utility>
namespace
corsika
::
process
::
interaction_counter
{
/*!
* Wrapper around an InteractionProcess that fills histograms of the number
* of calls to DoInteraction() binned in projectile energy (both in
* lab and center-of-mass frame) and species
*/
template
<
class
TCountedProcess
>
class
InteractionCounter
:
public
InteractionProcess
<
InteractionCounter
<
TCountedProcess
>>
{
...
...
@@ -55,6 +59,9 @@ namespace corsika::process::interaction_counter {
hist_type_count_cms
interaction_histogram_cms_
;
hist_type_count_lab
interaction_histogram_lab_
;
/*!
* These maps map PDG nucei codes to their corresponding interaction histograms
*/
std
::
map
<
int32_t
,
nucl_hist_type
>
nuclIntHistLab
,
nuclIntHistCMS
;
public:
...
...
@@ -134,6 +141,11 @@ namespace corsika::process::interaction_counter {
}
};
/*! Save a histogram into a text file. The \arg comment string is written
* into the header of the text file.
* This method is static so that you can sum the histograms of multiple
* InteractionProcesses before saving them into the same file.
*/
template
<
typename
T1
>
static
void
saveHist
(
T1
const
&
hist
,
std
::
string
const
&
filename
,
std
::
string
const
&
comment
=
""
)
{
...
...
@@ -178,6 +190,11 @@ namespace corsika::process::interaction_counter {
}
}
/*!
* save both the "normal" particle histograms as well as the "nuclear" histograms
* into the same file
*/
template
<
typename
T1
,
typename
T2
>
static
void
saveHist
(
T1
const
&
hist
,
T2
const
&
histMap
,
std
::
string
const
&
filename
,
std
::
string
const
&
comment
=
""
)
{
...
...
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