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
bc449f78
Commit
bc449f78
authored
4 years ago
by
Maximilian Sackel
Browse files
Options
Downloads
Patches
Plain Diff
extension of longitudinal shower profile with electro magnetic component
parent
c84b912c
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
Processes/LongitudinalProfile/LongitudinalProfile.cc
+8
-2
8 additions, 2 deletions
Processes/LongitudinalProfile/LongitudinalProfile.cc
Processes/LongitudinalProfile/LongitudinalProfile.h
+9
-2
9 additions, 2 deletions
Processes/LongitudinalProfile/LongitudinalProfile.h
with
17 additions
and
4 deletions
Processes/LongitudinalProfile/LongitudinalProfile.cc
+
8
−
2
View file @
bc449f78
...
...
@@ -41,7 +41,13 @@ corsika::process::EProcessReturn LongitudinalProfile::DoContinuous(Particle cons
const
int
binEnd
=
std
::
floor
(
grammageEnd
/
dX_
);
for
(
int
b
=
binStart
;
b
<=
binEnd
;
++
b
)
{
if
(
pid
==
particles
::
Code
::
MuPlus
)
{
if
(
pid
==
particles
::
Code
::
Gamma
)
{
profiles_
.
at
(
b
)[
ProfileIndex
::
Gamma
]
++
;
}
else
if
(
pid
==
particles
::
Code
::
Positron
)
{
profiles_
.
at
(
b
)[
ProfileIndex
::
Positron
]
++
;
}
else
if
(
pid
==
particles
::
Code
::
Electron
)
{
profiles_
.
at
(
b
)[
ProfileIndex
::
Electron
]
++
;
}
else
if
(
pid
==
particles
::
Code
::
MuPlus
)
{
profiles_
.
at
(
b
)[
ProfileIndex
::
MuPlus
]
++
;
}
else
if
(
pid
==
particles
::
Code
::
MuMinus
)
{
profiles_
.
at
(
b
)[
ProfileIndex
::
MuMinus
]
++
;
...
...
@@ -55,7 +61,7 @@ corsika::process::EProcessReturn LongitudinalProfile::DoContinuous(Particle cons
void
LongitudinalProfile
::
save
(
std
::
string
const
&
filename
)
{
std
::
ofstream
f
{
filename
};
f
<<
"# X / g·cm¯², mu+, mu-, all hadrons"
<<
std
::
endl
;
f
<<
"# X / g·cm¯²,
gamma, e+, e-,
mu+, mu-, all hadrons"
<<
std
::
endl
;
for
(
size_t
b
=
0
;
b
<
profiles_
.
size
();
++
b
)
{
f
<<
std
::
setprecision
(
5
)
<<
std
::
setw
(
11
)
<<
b
*
(
dX_
/
(
1
_g
/
1
_cm
/
1
_cm
));
for
(
auto
const
&
N
:
profiles_
.
at
(
b
))
{
...
...
This diff is collapsed.
Click to expand it.
Processes/LongitudinalProfile/LongitudinalProfile.h
+
9
−
2
View file @
bc449f78
...
...
@@ -43,8 +43,15 @@ namespace corsika::process::longitudinal_profile {
});
// profile binning
environment
::
ShowerAxis
const
&
shower_axis_
;
using
ProfileEntry
=
std
::
array
<
uint32_t
,
3
>
;
enum
ProfileIndex
{
MuPlus
=
0
,
MuMinus
=
1
,
Hadron
=
2
};
using
ProfileEntry
=
std
::
array
<
uint32_t
,
6
>
;
enum
ProfileIndex
{
Gamma
=
0
,
Positron
=
1
,
Electron
=
2
,
MuPlus
=
3
,
MuMinus
=
4
,
Hadron
=
5
};
std
::
vector
<
ProfileEntry
>
profiles_
;
// longitudinal profile
static
int
const
width_
=
14
;
...
...
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