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
1f3468d5
Commit
1f3468d5
authored
4 years ago
by
Matthieu Carrere
Committed by
Ralf Ulrich
4 years ago
Browse files
Options
Downloads
Patches
Plain Diff
changed directory choice because of run_examples script
parent
bdb7f226
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!326
Resolve "Multiple showers"
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
examples/vertical_EAS.cpp
+14
-9
14 additions, 9 deletions
examples/vertical_EAS.cpp
with
14 additions
and
9 deletions
examples/vertical_EAS.cpp
+
14
−
9
View file @
1f3468d5
...
...
@@ -93,7 +93,8 @@ using MyExtraEnv = MediumPropertyModel<UniformMagneticField<T>>;
// argv : 1.number of nucleons, 2.number of protons,
// 3.total energy in GeV, 4.number of showers,
// 5.seed (0 by default to generate random values for all)
// 5.output directory
// 6.seed (0 by default to generate random values for all)
int
main
(
int
argc
,
char
**
argv
)
{
...
...
@@ -111,9 +112,15 @@ int main(int argc, char** argv) {
}
feenableexcept
(
FE_INVALID
);
string
output_dir
=
""
;
int
seed
=
0
;
int
number_showers
=
std
::
stoi
(
std
::
string
(
argv
[
4
]));
if
(
argc
>
5
)
{
seed
=
std
::
stoi
(
std
::
string
(
argv
[
5
]));
}
if
(
argc
>
5
)
{
output_dir
=
argv
[
5
];
if
(
output_dir
.
back
()
!=
'/'
&&
output_dir
!=
""
)
output_dir
+=
'/'
;
}
if
(
argc
>
6
)
{
seed
=
std
::
stoi
(
std
::
string
(
argv
[
6
]));
}
// initialize random number sequence(s)
registerRandomStreams
(
seed
);
...
...
@@ -156,19 +163,17 @@ int main(int argc, char** argv) {
fmt
::
ptr
(
env
.
getUniverse
()
->
getContainingNode
(
Point
(
rootCS
,
{
constants
::
EarthRadius
::
Mean
+
2
_km
,
0
_m
,
0
_m
}))));
string
output_dir
=
"example_outputs"
;
for
(
int
i_shower
=
1
;
i_shower
<
number_showers
+
1
;
i_shower
++
)
{
// directory for outputs
string
labHist_dir
=
output_dir
+
"
/
inthist_lab_verticalEAS_"
+
to_string
(
i_shower
)
+
".npz"
;
output_dir
+
"inthist_lab_verticalEAS_"
+
to_string
(
i_shower
)
+
".npz"
;
string
cMSHist_dir
=
output_dir
+
"
/
inthist_cms_verticalEAS_"
+
to_string
(
i_shower
)
+
".npz"
;
output_dir
+
"inthist_cms_verticalEAS_"
+
to_string
(
i_shower
)
+
".npz"
;
string
longprof_dir
=
output_dir
+
"
/
longprof_verticalEAS_"
+
to_string
(
i_shower
)
+
".txt"
;
string
tracks_dir
=
output_dir
+
"
/
tracks_"
+
to_string
(
i_shower
)
+
".dat"
;
string
particles_dir
=
output_dir
+
"
/
particles_"
+
to_string
(
i_shower
)
+
".dat"
;
output_dir
+
"longprof_verticalEAS_"
+
to_string
(
i_shower
)
+
".txt"
;
string
tracks_dir
=
output_dir
+
"tracks_"
+
to_string
(
i_shower
)
+
".dat"
;
string
particles_dir
=
output_dir
+
"particles_"
+
to_string
(
i_shower
)
+
".dat"
;
std
::
cout
<<
std
::
endl
;
std
::
cout
<<
"Shower "
<<
i_shower
<<
"/"
<<
number_showers
<<
std
::
endl
;
...
...
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