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
bdb7f226
Commit
bdb7f226
authored
4 years ago
by
Matthieu Carrere
Committed by
Ralf Ulrich
4 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Replace vertical_EAS.cpp with do-clang correction
parent
821ee6ac
No related branches found
No related tags found
1 merge request
!326
Resolve "Multiple showers"
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
examples/vertical_EAS.cpp
+16
-15
16 additions, 15 deletions
examples/vertical_EAS.cpp
with
16 additions
and
15 deletions
examples/vertical_EAS.cpp
+
16
−
15
View file @
bdb7f226
...
@@ -112,10 +112,8 @@ int main(int argc, char** argv) {
...
@@ -112,10 +112,8 @@ int main(int argc, char** argv) {
feenableexcept
(
FE_INVALID
);
feenableexcept
(
FE_INVALID
);
int
seed
=
0
;
int
seed
=
0
;
int
number_showers
=
std
::
stoi
(
std
::
string
(
argv
[
4
]));
int
number_showers
=
std
::
stoi
(
std
::
string
(
argv
[
4
]));
if
(
argc
>
5
){
if
(
argc
>
5
)
{
seed
=
std
::
stoi
(
std
::
string
(
argv
[
5
]));
}
seed
=
std
::
stoi
(
std
::
string
(
argv
[
5
]));
}
// initialize random number sequence(s)
// initialize random number sequence(s)
registerRandomStreams
(
seed
);
registerRandomStreams
(
seed
);
...
@@ -158,19 +156,22 @@ int main(int argc, char** argv) {
...
@@ -158,19 +156,22 @@ int main(int argc, char** argv) {
fmt
::
ptr
(
env
.
getUniverse
()
->
getContainingNode
(
fmt
::
ptr
(
env
.
getUniverse
()
->
getContainingNode
(
Point
(
rootCS
,
{
constants
::
EarthRadius
::
Mean
+
2
_km
,
0
_m
,
0
_m
}))));
Point
(
rootCS
,
{
constants
::
EarthRadius
::
Mean
+
2
_km
,
0
_m
,
0
_m
}))));
string
output_dir
=
"example_outputs"
;
string
output_dir
=
"example_outputs"
;
for
(
int
i_shower
=
1
;
i_shower
<
number_showers
+
1
;
i_shower
++
){
for
(
int
i_shower
=
1
;
i_shower
<
number_showers
+
1
;
i_shower
++
)
{
// directory for outputs
// directory for outputs
string
labHist_dir
=
output_dir
+
"/inthist_lab_verticalEAS_"
+
to_string
(
i_shower
)
+
".npz"
;
string
labHist_dir
=
string
cMSHist_dir
=
output_dir
+
"/inthist_cms_verticalEAS_"
+
to_string
(
i_shower
)
+
".npz"
;
output_dir
+
"/inthist_lab_verticalEAS_"
+
to_string
(
i_shower
)
+
".npz"
;
string
longprof_dir
=
output_dir
+
"/longprof_verticalEAS_"
+
to_string
(
i_shower
)
+
".txt"
;
string
cMSHist_dir
=
string
tracks_dir
=
output_dir
+
"/tracks_"
+
to_string
(
i_shower
)
+
".dat"
;
output_dir
+
"/inthist_cms_verticalEAS_"
+
to_string
(
i_shower
)
+
".npz"
;
string
particles_dir
=
output_dir
+
"/particles_"
+
to_string
(
i_shower
)
+
".dat"
;
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"
;
std
::
cout
<<
std
::
endl
;
std
::
cout
<<
std
::
endl
;
std
::
cout
<<
"Shower "
<<
i_shower
<<
"/"
<<
number_showers
<<
std
::
endl
;
std
::
cout
<<
"Shower "
<<
i_shower
<<
"/"
<<
number_showers
<<
std
::
endl
;
// setup particle stack, and add primary particle
// setup particle stack, and add primary particle
setup
::
Stack
stack
;
setup
::
Stack
stack
;
...
@@ -307,8 +308,9 @@ int main(int argc, char** argv) {
...
@@ -307,8 +308,9 @@ int main(int argc, char** argv) {
return
SwitchResult
::
Second
;
return
SwitchResult
::
Second
;
}
}
};
};
auto
hadronSequence
=
make_select
(
auto
hadronSequence
=
urqmdCounted
,
make_sequence
(
sibyllNucCounted
,
sibyllCounted
),
EnergySwitch
(
55
_GeV
));
make_select
(
urqmdCounted
,
make_sequence
(
sibyllNucCounted
,
sibyllCounted
),
EnergySwitch
(
55
_GeV
));
auto
decaySequence
=
make_sequence
(
decayPythia
,
decaySibyll
);
auto
decaySequence
=
make_sequence
(
decayPythia
,
decaySibyll
);
auto
sequence
=
auto
sequence
=
make_sequence
(
stackInspect
,
hadronSequence
,
reset_particle_mass
,
decaySequence
,
make_sequence
(
stackInspect
,
hadronSequence
,
reset_particle_mass
,
decaySequence
,
...
@@ -342,5 +344,4 @@ int main(int argc, char** argv) {
...
@@ -342,5 +344,4 @@ int main(int argc, char** argv) {
save_hist
(
hists
.
CMSHist
(),
cMSHist_dir
,
true
);
save_hist
(
hists
.
CMSHist
(),
cMSHist_dir
,
true
);
longprof
.
save
(
longprof_dir
);
longprof
.
save
(
longprof_dir
);
}
}
}
}
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