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
84de4c02
Commit
84de4c02
authored
4 years ago
by
Felix Riehn
Browse files
Options
Downloads
Patches
Plain Diff
add qgsjetII id
parent
e8dee5c0
No related branches found
No related tags found
1 merge request
!186
Resolve "particle list example"
Pipeline
#1223
passed
4 years ago
Stage: config
Stage: build_test
Stage: optional
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
Documentation/Examples/CMakeLists.txt
+1
-1
1 addition, 1 deletion
Documentation/Examples/CMakeLists.txt
Documentation/Examples/particle_list_example.cc
+8
-4
8 additions, 4 deletions
Documentation/Examples/particle_list_example.cc
with
9 additions
and
5 deletions
Documentation/Examples/CMakeLists.txt
+
1
−
1
View file @
84de4c02
...
...
@@ -3,7 +3,7 @@ target_link_libraries (helix_example CORSIKAgeometry CORSIKAunits)
install
(
TARGETS helix_example DESTINATION share/examples
)
CORSIKA_ADD_TEST
(
particle_list_example
)
target_link_libraries
(
particle_list_example CORSIKAparticles CORSIKAunits CORSIKAprocesses ProcessSibyll
)
target_link_libraries
(
particle_list_example CORSIKAparticles CORSIKAunits CORSIKAprocesses ProcessSibyll
ProcessQGSJetII
)
install
(
TARGETS particle_list_example DESTINATION share/examples
)
CORSIKA_ADD_TEST
(
geometry_example
)
...
...
This diff is collapsed.
Click to expand it.
Documentation/Examples/particle_list_example.cc
+
8
−
4
View file @
84de4c02
...
...
@@ -10,6 +10,7 @@
#include
<corsika/particles/ParticleProperties.h>
#include
<corsika/process/ProcessSequence.h>
#include
<corsika/process/qgsjetII/ParticleConversion.h>
#include
<corsika/process/sibyll/ParticleConversion.h>
#include
<corsika/setup/SetupEnvironment.h>
#include
<corsika/units/PhysicalUnits.h>
...
...
@@ -25,23 +26,26 @@ using namespace std;
// The example main program for a particle list
//
int
main
()
{
cout
<<
"--------------------"
cout
<<
"--------------------
----------------------
"
<<
"particles in CORSIKA"
<<
"--------------------"
<<
endl
;
<<
"--------------------
----------------------
"
<<
endl
;
cout
<<
std
::
setw
(
20
)
<<
"Name"
<<
" | "
<<
std
::
setw
(
10
)
<<
"PDG-id"
<<
" | "
<<
std
::
setw
(
10
)
<<
"SIBYLL-id"
<<
" | "
<<
std
::
setw
(
10
)
<<
"QGSJETII-id"
<<
" | "
<<
std
::
setw
(
18
)
<<
"PDG-mass (GeV)"
<<
" | "
<<
std
::
setw
(
18
)
<<
"SIBYLL-mass (GeV)"
<<
" | "
<<
endl
;
cout
<<
std
::
setw
(
58
)
<<
std
::
setfill
(
'-'
)
<<
"-"
<<
endl
;
cout
<<
std
::
setw
(
104
)
<<
std
::
setfill
(
'-'
)
<<
"-"
<<
endl
;
for
(
auto
p
:
corsika
::
particles
::
detail
::
all_particles
)
{
if
(
p
!=
Code
::
Unknown
&&
!
IsNucleus
(
p
))
cout
<<
std
::
setw
(
20
)
<<
std
::
setfill
(
' '
)
<<
p
<<
" | "
<<
std
::
setw
(
10
)
<<
static_cast
<
int
>
(
GetPDG
(
p
))
<<
" | "
<<
std
::
setw
(
10
)
<<
static_cast
<
int
>
(
corsika
::
process
::
sibyll
::
ConvertToSibyll
(
p
))
<<
" | "
<<
std
::
setw
(
10
)
<<
static_cast
<
int
>
(
corsika
::
process
::
qgsjetII
::
ConvertToQgsjetII
(
p
))
<<
" | "
<<
std
::
setw
(
18
)
<<
GetMass
(
p
)
/
1
_GeV
<<
" | "
<<
std
::
setw
(
18
)
<<
corsika
::
process
::
sibyll
::
GetSibyllMass
(
p
)
/
1
_GeV
<<
" | "
<<
endl
;
}
cout
<<
std
::
setw
(
5
4
)
<<
std
::
setfill
(
'-'
)
<<
"-"
<<
endl
;
cout
<<
std
::
setw
(
10
4
)
<<
std
::
setfill
(
'-'
)
<<
"-"
<<
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