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
b93be13c
Commit
b93be13c
authored
6 years ago
by
Felix Riehn
Browse files
Options
Downloads
Patches
Plain Diff
added primitive decay step length
parent
2a862a95
No related branches found
No related tags found
1 merge request
!28
Sibyll
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
Documentation/Examples/cascade_example.cc
+34
-3
34 additions, 3 deletions
Documentation/Examples/cascade_example.cc
with
34 additions
and
3 deletions
Documentation/Examples/cascade_example.cc
+
34
−
3
View file @
b93be13c
...
...
@@ -337,12 +337,42 @@ class ProcessDecay : public corsika::process::BaseProcess<ProcessDecay> {
public:
ProcessDecay
()
{}
void
Init
()
{}
template
<
typename
Particle
>
double
MinStepLength
(
Particle
&
p
)
const
{
EnergyType
E
=
p
.
GetEnergy
();
MassType
m
=
corsika
::
particles
::
GetMass
(
p
.
GetPID
());
// env.GetDensity();
const
MassDensityType
density
=
1.e3
*
kilogram
/
(
1
_cm
*
1
_cm
*
1
_cm
);
const
double
gamma
=
E
/
m
/
constants
::
cSquared
;
// lifetimes not implemented yet
TimeType
t0
;
switch
(
p
.
GetPID
()
){
case
Code
::
PiPlus
:
t0
=
1.e-5
*
1
_s
;
break
;
case
Code
::
KPlus
:
t0
=
1.e-5
*
1
_s
;
break
;
default:
t0
=
1.e8
*
1
_s
;
break
;
}
cout
<<
"ProcessDecay: MinStep: t0: "
<<
t0
<<
endl
;
cout
<<
"ProcessDecay: MinStep: gamma: "
<<
gamma
<<
endl
;
cout
<<
"ProcessDecay: MinStep: density: "
<<
density
<<
endl
;
// return as column density
const
double
x0
=
density
*
t0
*
gamma
*
constants
::
c
/
kilogram
*
1
_cm
*
1
_cm
;
cout
<<
"ProcessDecay: MinStep: x0: "
<<
x0
<<
endl
;
return
x0
;
}
template
<
typename
Particle
,
typename
Stack
>
template
<
typename
Particle
,
typename
Stack
>
void
DoDiscrete
(
Particle
&
p
,
Stack
&
s
)
const
{
}
}
template
<
typename
Particle
,
typename
Trajectory
,
typename
Stack
>
EProcessReturn
DoContinuous
(
Particle
&
,
Trajectory
&
,
Stack
&
)
const
{
...
...
@@ -359,7 +389,8 @@ int main() {
tracking_line
::
TrackingLine
<
setup
::
Stack
>
tracking
;
stack_inspector
::
StackInspector
<
setup
::
Stack
>
p0
(
true
);
ProcessSplit
p1
;
const
auto
sequence
=
p0
+
p1
;
ProcessDecay
p2
;
const
auto
sequence
=
p0
+
p1
+
p2
;
setup
::
Stack
stack
;
corsika
::
cascade
::
Cascade
EAS
(
tracking
,
sequence
,
stack
);
...
...
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