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
d748d69a
Commit
d748d69a
authored
4 years ago
by
Felix Riehn
Browse files
Options
Downloads
Patches
Plain Diff
comment on limited precision
parent
b91799fd
No related branches found
Branches containing commit
No related tags found
Tags containing commit
2 merge requests
!234
WIP: Initial example of python as script language from C++
,
!204
Resolve "boost & coordinate system in process::sibyll::Interaction"
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
Processes/Sibyll/testSibyll.cc
+38
-11
38 additions, 11 deletions
Processes/Sibyll/testSibyll.cc
with
38 additions
and
11 deletions
Processes/Sibyll/testSibyll.cc
+
38
−
11
View file @
d748d69a
...
@@ -119,7 +119,7 @@ TEST_CASE("SibyllInterface", "[processes]") {
...
@@ -119,7 +119,7 @@ TEST_CASE("SibyllInterface", "[processes]") {
random
::
RNGManager
::
GetInstance
().
RegisterRandomStream
(
"s_rndm"
);
random
::
RNGManager
::
GetInstance
().
RegisterRandomStream
(
"s_rndm"
);
SECTION
(
"InteractionInterface"
)
{
SECTION
(
"InteractionInterface
- low energy
"
)
{
setup
::
Stack
stack
;
setup
::
Stack
stack
;
const
HEPEnergyType
E0
=
60
_GeV
;
const
HEPEnergyType
E0
=
60
_GeV
;
...
@@ -141,22 +141,49 @@ TEST_CASE("SibyllInterface", "[processes]") {
...
@@ -141,22 +141,49 @@ TEST_CASE("SibyllInterface", "[processes]") {
[[
maybe_unused
]]
const
process
::
EProcessReturn
ret
=
model
.
DoInteraction
(
projectile
);
[[
maybe_unused
]]
const
process
::
EProcessReturn
ret
=
model
.
DoInteraction
(
projectile
);
auto
const
pSum
=
sumMomentum
(
view
,
cs
);
auto
const
pSum
=
sumMomentum
(
view
,
cs
);
// for debugging!
/*
std
::
cout
<<
pSum
.
GetComponents
(
cs
)
<<
std
::
endl
;
Interactions between hadrons (h) and nuclei (A) in Sibyll are treated in the
std
::
cout
<<
plab
.
GetComponents
(
cs
)
<<
std
::
endl
;
hadron-nucleon center-of-mass frame (hnCoM). In addition the incoming hadron (h) and
nucleon (n) are assumed massless, such that the energy and momentum in the hnCoM are
: E_i_cm = 0.5 * SQS and P_i_cm = +- 0.5 * SQS where i is either the projectile
hadron or the target nucleon and SQS is the hadron-nucleon center-of-mass energy.
CHECK
(
pSum
.
GetComponents
(
cs
).
GetX
()
/
P0
==
Any hadron-nucleus event can contain several nucleon interactions. In case of Nw
Approx
(
1
).
margin
(
model
.
get_relative_precision_momentum
()));
(number of wounded nucleons) in the hadron-nucleus interaction the total energy and
momentum in the hadron-nucleon center-of-mass frame are: momentum: p_projectile +
p_nucleon_1 + p_nucleon_2 + .... p_nucleon_Nw = -(Nw-1) Pcm with center-of-mass
momentum Pcm = p_projectile = - p_nucleon_i energy: E_projectile + E_nucleon_1 + ...
E_nucleon_Nw = (Nw+1) / 2 * SQS with SQS the hadron-nucleon center-of-mass energy.
In case of a single interaction (Nw=1), by definition, the total momentum is zero in
the hadron-nucleon frame. After the boost to the lab. frame the lab. momentum of the
projectile before the interaction is recoverred.
In case of multiple interactions (Nw>1), the momentum is not zero and the total
momentum in the lab. frame after the boost is different from the original projectile
(momentum violation).
The level of violation of momentum conservation is further enhanced due to the
approximation of massless hadrons. At low energies (~10GeV), where the masses can
not be neglected the violation is at the level of percent.
For this reason the numerical precision in these tests is limited to 5% at low
energies. see also:
Issue 272 / MR 204
https://gitlab.ikp.kit.edu/AirShowerPhysics/corsika/-/merge_requests/204
*/
CHECK
(
pSum
.
GetComponents
(
cs
).
GetX
()
/
P0
==
Approx
(
1
).
margin
(
0.05
));
CHECK
(
pSum
.
GetComponents
(
cs
).
GetY
()
/
1
_GeV
==
Approx
(
0
).
margin
(
1e-4
));
CHECK
(
pSum
.
GetComponents
(
cs
).
GetY
()
/
1
_GeV
==
Approx
(
0
).
margin
(
1e-4
));
CHECK
(
pSum
.
GetComponents
(
cs
).
GetZ
()
/
1
_GeV
==
Approx
(
0
).
margin
(
1e-4
));
CHECK
(
pSum
.
GetComponents
(
cs
).
GetZ
()
/
1
_GeV
==
Approx
(
0
).
margin
(
1e-4
));
CHECK
(
CHECK
((
pSum
-
plab
).
norm
()
/
1
_GeV
==
Approx
(
0
).
margin
(
plab
.
norm
()
*
0.05
/
1
_GeV
));
(
pSum
-
plab
).
norm
()
/
1
_GeV
==
CHECK
(
pSum
.
norm
()
/
P0
==
Approx
(
1
).
margin
(
0.05
));
Approx
(
0
).
margin
(
plab
.
norm
()
*
model
.
get_relative_precision_momentum
()
/
1
_GeV
));
CHECK
(
pSum
.
norm
()
/
P0
==
Approx
(
1
).
margin
(
model
.
get_relative_precision_momentum
()));
[[
maybe_unused
]]
const
GrammageType
length
=
model
.
GetInteractionLength
(
particle
);
[[
maybe_unused
]]
const
GrammageType
length
=
model
.
GetInteractionLength
(
particle
);
}
}
SECTION
(
"NuclearInteractionInterface"
)
{
SECTION
(
"NuclearInteractionInterface"
)
{
setup
::
Stack
stack
;
setup
::
Stack
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