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
1ff43c3a
Commit
1ff43c3a
authored
1 year ago
by
Maximilian Reininghaus
Committed by
Alan Coleman
1 year ago
Browse files
Options
Downloads
Patches
Plain Diff
add some consts
parent
01c172fb
No related branches found
No related tags found
1 merge request
!585
Resolve "synchronize output format between examples"
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
examples/cascade_examples/radio_em_shower.cpp
+8
-8
8 additions, 8 deletions
examples/cascade_examples/radio_em_shower.cpp
with
8 additions
and
8 deletions
examples/cascade_examples/radio_em_shower.cpp
+
8
−
8
View file @
1ff43c3a
...
@@ -119,7 +119,7 @@ int main(int argc, char** argv) {
...
@@ -119,7 +119,7 @@ int main(int argc, char** argv) {
Point
const
center
{
rootCS
,
0
_m
,
0
_m
,
0
_m
};
Point
const
center
{
rootCS
,
0
_m
,
0
_m
,
0
_m
};
double
const
refractive_index
=
1.000327
;
double
const
refractive_index
=
1.000327
;
MagneticFieldVector
bField
{
rootCS
,
50
_uT
,
0
_T
,
0
_T
};
MagneticFieldVector
const
bField
{
rootCS
,
50
_uT
,
0
_T
,
0
_T
};
create_5layer_atmosphere
<
EnvironmentInterface
,
MyExtraEnv
>
(
create_5layer_atmosphere
<
EnvironmentInterface
,
MyExtraEnv
>
(
env
,
AtmosphereId
::
LinsleyUSStd
,
center
,
refractive_index
,
Medium
::
AirDry1Atm
,
env
,
AtmosphereId
::
LinsleyUSStd
,
center
,
refractive_index
,
Medium
::
AirDry1Atm
,
bField
);
bField
);
...
@@ -132,19 +132,19 @@ int main(int argc, char** argv) {
...
@@ -132,19 +132,19 @@ int main(int argc, char** argv) {
for
(
auto
[
pcode
,
energy
]
:
energy_resolution
)
for
(
auto
[
pcode
,
energy
]
:
energy_resolution
)
set_energy_production_threshold
(
pcode
,
energy
);
set_energy_production_threshold
(
pcode
,
energy
);
const
Code
beamCode
=
Code
::
Electron
;
Code
const
beamCode
=
Code
::
Electron
;
auto
const
mass
=
get_mass
(
beamCode
);
auto
const
mass
=
get_mass
(
beamCode
);
const
HEPEnergyType
E0
=
1
_GeV
*
std
::
stof
(
std
::
string
(
argv
[
1
]));
HEPEnergyType
const
E0
=
1
_GeV
*
std
::
stof
(
std
::
string
(
argv
[
1
]));
double
theta
=
0.
;
double
const
theta
=
0.
;
auto
const
thetaRad
=
theta
/
180.
*
M_PI
;
auto
const
thetaRad
=
theta
/
180.
*
M_PI
;
HEPMomentumType
P0
=
calculate_momentum
(
E0
,
mass
);
HEPMomentumType
const
P0
=
calculate_momentum
(
E0
,
mass
);
auto
momentumComponents
=
[](
double
thetaRad
,
HEPMomentumType
ptot
)
{
auto
momentumComponents
=
[](
double
thetaRad
,
HEPMomentumType
ptot
)
{
return
std
::
make_tuple
(
ptot
*
sin
(
thetaRad
),
0
_eV
,
-
ptot
*
cos
(
thetaRad
));
return
std
::
make_tuple
(
ptot
*
sin
(
thetaRad
),
0
_eV
,
-
ptot
*
cos
(
thetaRad
));
};
};
auto
const
[
px
,
py
,
pz
]
=
momentumComponents
(
thetaRad
,
P0
);
auto
const
[
px
,
py
,
pz
]
=
momentumComponents
(
thetaRad
,
P0
);
auto
plab
=
MomentumVector
(
rootCS
,
{
px
,
py
,
pz
});
auto
const
plab
=
MomentumVector
(
rootCS
,
{
px
,
py
,
pz
});
auto
const
observationHeight
=
1.4
_km
+
constants
::
EarthRadius
::
Mean
;
auto
const
observationHeight
=
1.4
_km
+
constants
::
EarthRadius
::
Mean
;
auto
const
injectionHeight
=
112.75
_km
+
constants
::
EarthRadius
::
Mean
;
auto
const
injectionHeight
=
112.75
_km
+
constants
::
EarthRadius
::
Mean
;
...
@@ -163,8 +163,8 @@ int main(int argc, char** argv) {
...
@@ -163,8 +163,8 @@ int main(int argc, char** argv) {
// Radio antennas and relevant information
// Radio antennas and relevant information
// the antenna time variables
// the antenna time variables
const
TimeType
duration
{
1e-6
_s
};
TimeType
const
duration
{
1e-6
_s
};
const
InverseTimeType
sampleRate
{
1e+9
_Hz
};
InverseTimeType
const
sampleRate
{
1e+9
_Hz
};
// the detector (aka antenna collection) for CoREAS and ZHS
// the detector (aka antenna collection) for CoREAS and ZHS
AntennaCollection
<
TimeDomainAntenna
>
detectorCoREAS
;
AntennaCollection
<
TimeDomainAntenna
>
detectorCoREAS
;
...
...
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