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
e4dca006
Commit
e4dca006
authored
5 years ago
by
Felix Riehn
Browse files
Options
Downloads
Patches
Plain Diff
removed IsNucleus from projectile test in nuclear interaction
parent
b304f38d
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
Processes/Sibyll/NuclearInteraction.cc
+13
-15
13 additions, 15 deletions
Processes/Sibyll/NuclearInteraction.cc
with
13 additions
and
15 deletions
Processes/Sibyll/NuclearInteraction.cc
+
13
−
15
View file @
e4dca006
...
@@ -227,15 +227,20 @@ namespace corsika::process::sibyll {
...
@@ -227,15 +227,20 @@ namespace corsika::process::sibyll {
RootCoordinateSystem
::
GetInstance
().
GetRootCoordinateSystem
();
RootCoordinateSystem
::
GetInstance
().
GetRootCoordinateSystem
();
const
particles
::
Code
corsikaBeamId
=
vP
.
GetPID
();
const
particles
::
Code
corsikaBeamId
=
vP
.
GetPID
();
if
(
!
particles
::
IsNucleus
(
corsikaBeamId
))
{
// no nuclear interaction
if
(
corsikaBeamId
!=
particles
::
Code
::
Nucleus
)
{
return
std
::
numeric_limits
<
double
>::
infinity
()
*
1
_g
/
(
1
_cm
*
1
_cm
);
// check if target-style nucleus (enum), these are not allowed as projectile
if
(
particles
::
IsNucleus
(
corsikaBeamId
))
throw
std
::
runtime_error
(
"NuclearInteraction: GetInteractionLength: Wrong nucleus type. Nuclear "
"projectiles should use NuclearStackExtension!"
);
else
{
// no nuclear interaction
cout
<<
"NuclearInteraction::GetInteractionLength: non nuclear projectile: "
<<
corsikaBeamId
<<
" set interaction length to inf"
<<
endl
;
return
std
::
numeric_limits
<
double
>::
infinity
()
*
1
_g
/
(
1
_cm
*
1
_cm
);
}
}
}
// check if target-style nucleus (enum)
if
(
corsikaBeamId
!=
particles
::
Code
::
Nucleus
)
throw
std
::
runtime_error
(
"NuclearInteraction: GetInteractionLength: Wrong nucleus type. Nuclear "
"projectiles should use NuclearStackExtension!"
);
// read from cross section code table
// read from cross section code table
...
@@ -333,13 +338,6 @@ namespace corsika::process::sibyll {
...
@@ -333,13 +338,6 @@ namespace corsika::process::sibyll {
// const auto ProjMass = vP.GetMass();
// const auto ProjMass = vP.GetMass();
cout
<<
"NuclearInteraction: DoInteraction: called with:"
<<
ProjId
<<
endl
;
cout
<<
"NuclearInteraction: DoInteraction: called with:"
<<
ProjId
<<
endl
;
if
(
!
IsNucleus
(
ProjId
))
{
cout
<<
"WARNING: non nuclear projectile in NUCLIB!"
<<
endl
;
// this should not happen
// throw std::runtime_error("Non nuclear projectile in NUCLIB!");
return
process
::
EProcessReturn
::
eOk
;
}
// check if target-style nucleus (enum)
// check if target-style nucleus (enum)
if
(
ProjId
!=
particles
::
Code
::
Nucleus
)
if
(
ProjId
!=
particles
::
Code
::
Nucleus
)
throw
std
::
runtime_error
(
throw
std
::
runtime_error
(
...
...
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