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
964cfb94
Commit
964cfb94
authored
4 years ago
by
Maximilian Reininghaus
Browse files
Options
Downloads
Patches
Plain Diff
clang-format vertical_EAS
parent
826f0f04
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
+16
-11
16 additions, 11 deletions
Documentation/Examples/vertical_EAS.cc
with
16 additions
and
11 deletions
Documentation/Examples/vertical_EAS.cc
+
16
−
11
View file @
964cfb94
...
@@ -108,18 +108,22 @@ int main(int argc, char** argv) {
...
@@ -108,18 +108,22 @@ int main(int argc, char** argv) {
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
]
=
auto
const
[
px
,
py
,
pz
]
=
momentumComponents
(
thetaRad
,
P0
);
momentumComponents
(
thetaRad
,
P0
);
auto
plab
=
corsika
::
stack
::
MomentumVector
(
rootCS
,
{
px
,
py
,
pz
});
auto
plab
=
corsika
::
stack
::
MomentumVector
(
rootCS
,
{
px
,
py
,
pz
});
cout
<<
"input particle: "
<<
beamCode
<<
endl
;
cout
<<
"input particle: "
<<
beamCode
<<
endl
;
cout
<<
"input angles: theta="
<<
theta
<<
endl
;
cout
<<
"input angles: theta="
<<
theta
<<
endl
;
cout
<<
"input momentum: "
<<
plab
.
GetComponents
()
/
1
_GeV
<<
", norm = "
<<
plab
.
norm
()
<<
endl
;
cout
<<
"input momentum: "
<<
plab
.
GetComponents
()
/
1
_GeV
<<
", norm = "
<<
plab
.
norm
()
<<
endl
;
auto
const
observationHeight
=
1.4
_km
+
builder
.
earthRadius
;
auto
const
observationHeight
=
1.4
_km
+
builder
.
earthRadius
;
auto
const
injectionHeight
=
112.75
_km
+
builder
.
earthRadius
;
auto
const
injectionHeight
=
112.75
_km
+
builder
.
earthRadius
;
auto
const
t
=
-
observationHeight
*
cos
(
thetaRad
)
+
sqrt
(
-
si
::
detail
::
static_pow
<
2
>
(
sin
(
thetaRad
)
*
observationHeight
)
+
si
::
detail
::
static_pow
<
2
>
(
injectionHeight
));
auto
const
t
=
-
observationHeight
*
cos
(
thetaRad
)
+
sqrt
(
-
si
::
detail
::
static_pow
<
2
>
(
sin
(
thetaRad
)
*
observationHeight
)
+
si
::
detail
::
static_pow
<
2
>
(
injectionHeight
));
Point
const
showerCore
{
rootCS
,
0
_m
,
0
_m
,
observationHeight
};
Point
const
showerCore
{
rootCS
,
0
_m
,
0
_m
,
observationHeight
};
Point
const
injectionPos
=
showerCore
+
Vector
<
dimensionless_d
>
{
rootCS
,
{
-
sin
(
thetaRad
),
0
,
cos
(
thetaRad
)}}
*
t
;
Point
const
injectionPos
=
showerCore
+
Vector
<
dimensionless_d
>
{
rootCS
,
{
-
sin
(
thetaRad
),
0
,
cos
(
thetaRad
)}}
*
t
;
std
::
cout
<<
"point of injection: "
<<
injectionPos
.
GetCoordinates
()
<<
std
::
endl
;
std
::
cout
<<
"point of injection: "
<<
injectionPos
.
GetCoordinates
()
<<
std
::
endl
;
...
@@ -158,8 +162,7 @@ int main(int argc, char** argv) {
...
@@ -158,8 +162,7 @@ int main(int argc, char** argv) {
process
::
energy_loss
::
EnergyLoss
eLoss
(
showerAxis
);
process
::
energy_loss
::
EnergyLoss
eLoss
(
showerAxis
);
Plane
const
obsPlane
(
showerCore
,
Plane
const
obsPlane
(
showerCore
,
Vector
<
dimensionless_d
>
(
rootCS
,
{
0.
,
0.
,
1.
}));
Vector
<
dimensionless_d
>
(
rootCS
,
{
0.
,
0.
,
1.
}));
process
::
observation_plane
::
ObservationPlane
observationLevel
(
obsPlane
,
process
::
observation_plane
::
ObservationPlane
observationLevel
(
obsPlane
,
"particles.dat"
);
"particles.dat"
);
...
@@ -169,7 +172,8 @@ int main(int argc, char** argv) {
...
@@ -169,7 +172,8 @@ int main(int argc, char** argv) {
process
::
interaction_counter
::
InteractionCounter
urqmdCounted
{
urqmd
};
process
::
interaction_counter
::
InteractionCounter
urqmdCounted
{
urqmd
};
auto
sibyllSequence
=
sibyllNucCounted
<<
sibyllCounted
;
auto
sibyllSequence
=
sibyllNucCounted
<<
sibyllCounted
;
process
::
switch_process
::
SwitchProcess
switchProcess
(
urqmdCounted
,
sibyllSequence
,
55
_GeV
);
process
::
switch_process
::
SwitchProcess
switchProcess
(
urqmdCounted
,
sibyllSequence
,
55
_GeV
);
auto
decaySequence
=
decayPythia
<<
decaySibyll
;
auto
decaySequence
=
decayPythia
<<
decaySibyll
;
auto
sequence
=
switchProcess
<<
decaySequence
<<
eLoss
<<
cut
<<
observationLevel
;
auto
sequence
=
switchProcess
<<
decaySequence
<<
eLoss
<<
cut
<<
observationLevel
;
...
@@ -194,10 +198,11 @@ int main(int argc, char** argv) {
...
@@ -194,10 +198,11 @@ int main(int argc, char** argv) {
cout
<<
"total dEdX energy (GeV): "
<<
eLoss
.
GetTotal
()
/
1
_GeV
<<
endl
cout
<<
"total dEdX energy (GeV): "
<<
eLoss
.
GetTotal
()
/
1
_GeV
<<
endl
<<
"relative difference (%): "
<<
eLoss
.
GetTotal
()
/
E0
*
100
<<
endl
;
<<
"relative difference (%): "
<<
eLoss
.
GetTotal
()
/
E0
*
100
<<
endl
;
auto
const
hists
=
sibyllCounted
.
GetHistogram
()
+
sibyllNucCounted
.
GetHistogram
()
+
urqmdCounted
.
GetHistogram
();
auto
const
hists
=
sibyllCounted
.
GetHistogram
()
+
sibyllNucCounted
.
GetHistogram
()
+
urqmdCounted
.
GetHistogram
();
hists
.
saveLab
(
"inthist_lab.txt"
);
hists
.
saveLab
(
"inthist_lab.txt"
);
hists
.
saveCMS
(
"inthist_cms.txt"
);
hists
.
saveCMS
(
"inthist_cms.txt"
);
std
::
ofstream
finish
(
"finished"
);
std
::
ofstream
finish
(
"finished"
);
finish
<<
"run completed without error"
<<
std
::
endl
;
finish
<<
"run completed without error"
<<
std
::
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