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
669b350d
Commit
669b350d
authored
1 year ago
by
Maximilian Reininghaus
Browse files
Options
Downloads
Patches
Plain Diff
add thinning
parent
5c553234
No related branches found
Branches containing commit
No related tags found
1 merge request
!512
Add additional options to corsika.cpp example
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
examples/corsika.cpp
+22
-1
22 additions, 1 deletion
examples/corsika.cpp
with
22 additions
and
1 deletion
examples/corsika.cpp
+
22
−
1
View file @
669b350d
...
@@ -58,6 +58,7 @@
...
@@ -58,6 +58,7 @@
#include
<corsika/modules/StackInspector.hpp>
#include
<corsika/modules/StackInspector.hpp>
#include
<corsika/modules/TrackWriter.hpp>
#include
<corsika/modules/TrackWriter.hpp>
#include
<corsika/modules/UrQMD.hpp>
#include
<corsika/modules/UrQMD.hpp>
#include
<corsika/modules/thinning/EMThinning.hpp>
#include
<corsika/setup/SetupStack.hpp>
#include
<corsika/setup/SetupStack.hpp>
#include
<corsika/setup/SetupTrajectory.hpp>
#include
<corsika/setup/SetupTrajectory.hpp>
...
@@ -194,6 +195,17 @@ int main(int argc, char** argv) {
...
@@ -194,6 +195,17 @@ int main(int argc, char** argv) {
->
default_val
(
"SIBYLL-2.3d"
)
->
default_val
(
"SIBYLL-2.3d"
)
->
check
(
CLI
::
IsMember
({
"SIBYLL-2.3d"
,
"QGSJet-II.04"
,
"EPOS-LHC"
}))
->
check
(
CLI
::
IsMember
({
"SIBYLL-2.3d"
,
"QGSJet-II.04"
,
"EPOS-LHC"
}))
->
group
(
"Misc."
);
->
group
(
"Misc."
);
app
.
add_option
(
"--emthin"
,
"fraction of primary energy at which thinning of EM particles starts"
)
->
default_val
(
1.e-6
)
->
check
(
CLI
::
Range
(
0.
,
1.
))
->
group
(
"Thinning"
);
app
.
add_option
(
"--max-weight"
,
"maximum weight for thinning of EM particles (0 to select Kobal's optimum)"
)
->
default_val
(
0
)
->
check
(
CLI
::
NonNegativeNumber
)
->
group
(
"Thinning"
);
// parse the command line options into the variables
// parse the command line options into the variables
CLI11_PARSE
(
app
,
argc
,
argv
);
CLI11_PARSE
(
app
,
argc
,
argv
);
...
@@ -307,6 +319,15 @@ int main(int argc, char** argv) {
...
@@ -307,6 +319,15 @@ int main(int argc, char** argv) {
ShowerAxis
const
showerAxis
{
injectionPos
,
(
showerCore
-
injectionPos
)
*
1.2
,
env
};
ShowerAxis
const
showerAxis
{
injectionPos
,
(
showerCore
-
injectionPos
)
*
1.2
,
env
};
/* === END: CONSTRUCT GEOMETRY === */
/* === END: CONSTRUCT GEOMETRY === */
double
const
emthinfrac
=
app
[
"--emthin"
]
->
as
<
double
>
();
double
const
maxWeight
=
std
::
invoke
([
&
]()
{
if
(
auto
const
wm
=
app
[
"--max-weight"
]
->
as
<
double
>
();
wm
>
0
)
return
wm
;
else
return
emthinfrac
*
E0
/
1
_GeV
;
});
EMThinning
thinning
{
emthinfrac
*
E0
,
maxWeight
};
// create the output manager that we then register outputs with
// create the output manager that we then register outputs with
OutputManager
output
(
app
[
"--filename"
]
->
as
<
std
::
string
>
());
OutputManager
output
(
app
[
"--filename"
]
->
as
<
std
::
string
>
());
...
@@ -426,7 +447,7 @@ int main(int argc, char** argv) {
...
@@ -426,7 +447,7 @@ int main(int argc, char** argv) {
// assemble the final process sequence
// assemble the final process sequence
auto
sequence
=
make_sequence
(
stackInspect
,
hadronSequence
,
decaySequence
,
emCascade
,
auto
sequence
=
make_sequence
(
stackInspect
,
hadronSequence
,
decaySequence
,
emCascade
,
emContinuous
,
// trackWriter,
emContinuous
,
// trackWriter,
longprof
,
observationLevel
,
cut
);
longprof
,
observationLevel
,
thinning
,
cut
);
/* === END: SETUP PROCESS LIST === */
/* === END: SETUP PROCESS LIST === */
// create the cascade object using the default stack and tracking
// create the cascade object using the default stack and tracking
...
...
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