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
9811a637
Commit
9811a637
authored
6 years ago
by
ralfulrich
Browse files
Options
Downloads
Plain Diff
fixed cascade_exmple
parents
e2bdbe01
fa101a34
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
Documentation/Examples/cascade_example.cc
+21
-0
21 additions, 0 deletions
Documentation/Examples/cascade_example.cc
with
21 additions
and
0 deletions
Documentation/Examples/cascade_example.cc
+
21
−
0
View file @
9811a637
...
...
@@ -94,9 +94,12 @@ public:
template
<
typename
Particle
,
typename
Stack
>
void
DoDiscrete
(
Particle
&
p
,
Stack
&
s
)
const
{
<<<<<<<
HEAD
cout
<<
"DoDiscrete: "
<<
p
.
GetPID
()
<<
" interaction? "
<<
process
::
sibyll
::
CanInteract
(
p
.
GetPID
()
)
<<
endl
;
if
(
process
::
sibyll
::
CanInteract
(
p
.
GetPID
()
)
){
=======
>>>>>>>
fa101a34281211b0c7e3293ffd9463b0bfdd8ff5
// get energy of particle from stack
/*
stack is in GeV in lab. frame
...
...
@@ -106,9 +109,14 @@ public:
*/
EnergyType
E
=
p
.
GetEnergy
();
EnergyType
Ecm
=
sqrt
(
2.
*
E
*
0.93827
_GeV
);
<<<<<<<
HEAD
int
kBeam
=
process
::
sibyll
::
ConvertToSibyllRaw
(
p
.
GetPID
()
);
=======
// FOR NOW: set beam to proton
int
kBeam
=
13
;
//p.GetPID();
>>>>>>>
fa101a34281211b0c7e3293ffd9463b0bfdd8ff5
/*
the target should be defined by the Environment,
ideally as full particle object so that the four momenta
...
...
@@ -159,10 +167,15 @@ public:
auto
pnew
=
s
.
NewParticle
();
pnew
.
SetEnergy
(
en_lab
*
1
_GeV
);
pnew
.
SetPID
(
process
::
sibyll
::
ConvertFromSibyll
(
p
.
GetPID
()
)
);
<<<<<<<
HEAD
}
}
}
else
p
.
Delete
();
=======
}
}
>>>>>>>
fa101a34281211b0c7e3293ffd9463b0bfdd8ff5
}
...
...
@@ -186,13 +199,18 @@ public:
// test random number generator
std
::
cout
<<
"ProcessSplit: "
<<
" test sequence of random numbers."
<<
std
::
endl
;
int
a
=
0
;
<<<<<<<
HEAD
for
(
int
i
=
0
;
i
<
8
;
++
i
)
=======
for
(
int
i
=
0
;
i
<
5
;
++
i
)
>>>>>>>
fa101a34281211b0c7e3293ffd9463b0bfdd8ff5
std
::
cout
<<
i
<<
" "
<<
s_rndm_
(
a
)
<<
std
::
endl
;
//initialize Sibyll
sibyll_ini_
();
// set particles stable / unstable
<<<<<<<
HEAD
// use stack to loop over particles
setup
::
Stack
ds
;
ds
.
NewParticle
().
SetPID
(
Code
::
Proton
);
...
...
@@ -211,6 +229,9 @@ public:
s_csydec_
.
idb
[
s_id
]
=
-
s_csydec_
.
idb
[
s_id
-
1
];
p
.
Delete
();
}
=======
>>>>>>>
fa101a34281211b0c7e3293ffd9463b0bfdd8ff5
}
int
GetCount
()
{
return
fCount
;
}
...
...
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