IAP GITLAB
Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
C
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
Package Registry
Model registry
Operate
Environments
Terraform modules
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
Pranav Sampathkumar
corsika
Commits
394f7e7a
Commit
394f7e7a
authored
5 years ago
by
Maximilian Reininghaus
Browse files
Options
Downloads
Patches
Plain Diff
Linsley's atmosphere for vertical_EAS
parent
aa1c3660
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
Documentation/Examples/vertical_EAS.cc
+18
-29
18 additions, 29 deletions
Documentation/Examples/vertical_EAS.cc
with
18 additions
and
29 deletions
Documentation/Examples/vertical_EAS.cc
+
18
−
29
View file @
394f7e7a
...
...
@@ -20,6 +20,7 @@
#include
<corsika/setup/SetupStack.h>
#include
<corsika/setup/SetupTrajectory.h>
#include
<corsika/environment/Convenience.h>
#include
<corsika/environment/Environment.h>
#include
<corsika/environment/FlatExponential.h>
#include
<corsika/environment/NuclearComposition.h>
...
...
@@ -79,26 +80,19 @@ int main() {
using
EnvType
=
Environment
<
setup
::
IEnvironmentModel
>
;
EnvType
env
;
const
CoordinateSystem
&
rootCS
=
env
.
GetCoordinateSystem
();
auto
&
universe
=
*
(
env
.
GetUniverse
());
auto
theMedium
=
EnvType
::
CreateNode
<
Sphere
>
(
Point
{
rootCS
,
0
_m
,
0
_m
,
0
_m
},
1
_km
*
std
::
numeric_limits
<
double
>::
infinity
());
auto
constexpr
temperature
=
295
_K
;
// AIRES default temperature for isothermal model
auto
constexpr
lambda
=
-
constants
::
R
*
temperature
/
(
constants
::
g_sub_n
*
28.966
_g
/
mole
);
// 1036 g/cm² taken from AIRES code
auto
constexpr
rho0
=
-
1036
_g
/
square
(
1
_cm
)
/
lambda
;
using
FlatExp
=
environment
::
FlatExponential
<
environment
::
IMediumModel
>
;
theMedium
->
SetModelProperties
<
FlatExp
>
(
Point
{
rootCS
,
0
_m
,
0
_m
,
0
_m
},
Vector
<
dimensionless_d
>
{
rootCS
,
{
0.
,
0.
,
1.
}},
rho0
,
lambda
,
environment
::
NuclearComposition
(
std
::
vector
<
particles
::
Code
>
{
particles
::
Code
::
Nitrogen
,
particles
::
Code
::
Oxygen
},
std
::
vector
<
float
>
{
0.7847
f
,
1.
f
-
0.7847
f
}));
// values taken from AIRES manual, Ar removed for now
environment
::
LayeredSphericalAtmosphereBuilder
builder
(
Point
{
rootCS
,
0
_m
,
0
_m
,
0
_m
});
builder
.
setNuclearComposition
(
{{
particles
::
Code
::
Nitrogen
,
particles
::
Code
::
Oxygen
},
{
0.7847
f
,
1.
f
-
0.7847
f
}});
// values taken from AIRES manual, Ar removed for now
builder
.
addExponentialLayer
(
1222.6562
_g
/
(
1
_cm
*
1
_cm
),
994186.38
_cm
,
4
_km
);
builder
.
addExponentialLayer
(
1144.9069
_g
/
(
1
_cm
*
1
_cm
),
878153.55
_cm
,
10
_km
);
builder
.
addExponentialLayer
(
1305.5948
_g
/
(
1
_cm
*
1
_cm
),
636143.04
_cm
,
40
_km
);
builder
.
addExponentialLayer
(
540.1778
_g
/
(
1
_cm
*
1
_cm
),
772170.16
_cm
,
100
_km
);
builder
.
addLinearLayer
(
1e9
_cm
,
112.8
_km
);
builder
.
assemble
(
env
);
// setup particle stack, and add primary particle
setup
::
Stack
stack
;
...
...
@@ -110,7 +104,9 @@ int main() {
double
phi
=
0.
;
Point
const
injectionPos
(
rootCS
,
0
_m
,
0
_m
,
112.8
_km
);
// this is the CORSIKA 7 start of atmosphere/universe
rootCS
,
0
_m
,
0
_m
,
112.8
_km
*
0.999
+
builder
.
earthRadius
);
// this is the CORSIKA 7 start of atmosphere/universe
// {
auto
elab2plab
=
[](
HEPEnergyType
Elab
,
HEPMassType
m
)
{
...
...
@@ -137,17 +133,10 @@ int main() {
Line
const
line
(
injectionPos
,
plab
.
normalized
()
*
1
_m
*
1
_Hz
);
auto
const
velocity
=
line
.
GetV0
().
norm
();
auto
const
observationHeight
=
1.425
_km
;
auto
const
observationHeight
=
1.425
_km
+
builder
.
earthRadius
;
setup
::
Trajectory
const
showerAxis
(
line
,
(
112.8
_km
-
observationHeight
)
/
velocity
);
auto
const
grammage
=
theMedium
->
GetModelProperties
().
IntegratedGrammage
(
showerAxis
,
(
112.8
_km
-
observationHeight
));
std
::
cout
<<
"Grammage to ground: "
<<
grammage
/
(
1
_g
/
square
(
1
_cm
))
<<
" g/cm²"
<<
std
::
endl
;
universe
.
AddChild
(
std
::
move
(
theMedium
));
// setup processes, decays and interactions
const
std
::
vector
<
particles
::
Code
>
trackedHadrons
=
{
...
...
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