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
f2dc5ef3
Commit
f2dc5ef3
authored
4 years ago
by
Maximilian Reininghaus
Committed by
ralfulrich
4 years ago
Browse files
Options
Downloads
Patches
Plain Diff
preliminary test of CONEXSourceCut
parent
75d99e4b
No related branches found
No related tags found
2 merge requests
!234
WIP: Initial example of python as script language from C++
,
!232
Conex EM
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
Processes/CONEXSourceCut/testCONEXSourceCut.cc
+20
-5
20 additions, 5 deletions
Processes/CONEXSourceCut/testCONEXSourceCut.cc
with
20 additions
and
5 deletions
Processes/CONEXSourceCut/testCONEXSourceCut.cc
+
20
−
5
View file @
f2dc5ef3
...
@@ -31,6 +31,8 @@ TEST_CASE("CONEXSourceCut") {
...
@@ -31,6 +31,8 @@ TEST_CASE("CONEXSourceCut") {
random
::
RNGManager
::
GetInstance
().
RegisterRandomStream
(
"cascade"
);
random
::
RNGManager
::
GetInstance
().
RegisterRandomStream
(
"cascade"
);
random
::
RNGManager
::
GetInstance
().
RegisterRandomStream
(
"s_rndm"
);
random
::
RNGManager
::
GetInstance
().
RegisterRandomStream
(
"s_rndm"
);
feenableexcept
(
FE_INVALID
);
// setup environment, geometry
// setup environment, geometry
using
EnvType
=
Environment
<
setup
::
IEnvironmentModel
>
;
using
EnvType
=
Environment
<
setup
::
IEnvironmentModel
>
;
EnvType
env
;
EnvType
env
;
...
@@ -51,7 +53,7 @@ TEST_CASE("CONEXSourceCut") {
...
@@ -51,7 +53,7 @@ TEST_CASE("CONEXSourceCut") {
const
HEPEnergyType
mass
=
particles
::
GetMass
(
particles
::
Code
::
Proton
);
const
HEPEnergyType
mass
=
particles
::
GetMass
(
particles
::
Code
::
Proton
);
const
HEPEnergyType
E0
=
1
_PeV
;
const
HEPEnergyType
E0
=
1
_PeV
;
double
thetaDeg
=
0.
;
double
thetaDeg
=
6
0.
;
auto
const
thetaRad
=
thetaDeg
/
180.
*
M_PI
;
auto
const
thetaRad
=
thetaDeg
/
180.
*
M_PI
;
auto
elab2plab
=
[](
HEPEnergyType
Elab
,
HEPMassType
m
)
{
auto
elab2plab
=
[](
HEPEnergyType
Elab
,
HEPMassType
m
)
{
...
@@ -66,8 +68,8 @@ TEST_CASE("CONEXSourceCut") {
...
@@ -66,8 +68,8 @@ TEST_CASE("CONEXSourceCut") {
auto
const
[
px
,
py
,
pz
]
=
momentumComponents
(
thetaRad
,
P0
);
auto
const
[
px
,
py
,
pz
]
=
momentumComponents
(
thetaRad
,
P0
);
auto
plab
=
corsika
::
stack
::
MomentumVector
(
rootCS
,
{
px
,
py
,
pz
});
auto
plab
=
corsika
::
stack
::
MomentumVector
(
rootCS
,
{
px
,
py
,
pz
});
auto
const
observationHeight
=
1.
_km
+
builder
.
earthRadius
;
auto
const
observationHeight
=
1.
4
_km
+
conex
::
earthRadius
;
auto
const
injectionHeight
=
112.75
_km
+
builder
.
earthRadius
;
auto
const
injectionHeight
=
112.75
_km
+
conex
::
earthRadius
;
auto
const
t
=
auto
const
t
=
-
observationHeight
*
cos
(
thetaRad
)
+
-
observationHeight
*
cos
(
thetaRad
)
+
sqrt
(
-
units
::
si
::
detail
::
static_pow
<
2
>
(
sin
(
thetaRad
)
*
observationHeight
)
+
sqrt
(
-
units
::
si
::
detail
::
static_pow
<
2
>
(
sin
(
thetaRad
)
*
observationHeight
)
+
...
@@ -86,10 +88,23 @@ TEST_CASE("CONEXSourceCut") {
...
@@ -86,10 +88,23 @@ TEST_CASE("CONEXSourceCut") {
sibyllNuc
.
Init
();
sibyllNuc
.
Init
();
corsika
::
process
::
conex_source_cut
::
CONEXSourceCut
conex
(
corsika
::
process
::
conex_source_cut
::
CONEXSourceCut
conex
(
center
,
showerAxis
,
(
showerCore
-
injectionPos
).
norm
(),
112.75
_km
,
E0
,
center
,
showerAxis
,
t
,
injectionHeight
,
E0
,
particles
::
GetPDG
(
particles
::
Code
::
Proton
));
particles
::
GetPDG
(
particles
::
Code
::
Proton
));
conex
.
dummyAddPhoton
();
HEPEnergyType
const
Eem
{
1
_PeV
};
auto
const
momentum
=
showerAxis
.
GetDirection
()
*
Eem
;
auto
const
emPosition
=
showerCore
+
showerAxis
.
GetDirection
()
*
(
-
20
_km
);
std
::
cout
<<
"position injection: "
<<
injectionPos
.
GetCoordinates
(
conex
.
GetObserverCS
())
<<
" "
<<
injectionPos
.
GetCoordinates
(
rootCS
)
<<
std
::
endl
;
std
::
cout
<<
"position core: "
<<
showerCore
.
GetCoordinates
(
conex
.
GetObserverCS
())
<<
" "
<<
showerCore
.
GetCoordinates
(
rootCS
)
<<
std
::
endl
;
std
::
cout
<<
"position EM: "
<<
emPosition
.
GetCoordinates
(
conex
.
GetObserverCS
())
<<
" "
<<
emPosition
.
GetCoordinates
(
rootCS
)
<<
std
::
endl
;
conex
.
addParticle
(
0
,
Eem
,
emPosition
,
momentum
.
normalized
(),
0
_s
);
conex
.
SolveCE
();
conex
.
SolveCE
();
}
}
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