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
0c7c189e
Commit
0c7c189e
authored
5 years ago
by
Felix Riehn
Committed by
Maximilian Reininghaus
5 years ago
Browse files
Options
Downloads
Patches
Plain Diff
fixed CanInteract for Nucleus, added test
parent
dcef0c88
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
Processes/Sibyll/code_generator.py
+1
-1
1 addition, 1 deletion
Processes/Sibyll/code_generator.py
Processes/Sibyll/testSibyll.cc
+3
-0
3 additions, 0 deletions
Processes/Sibyll/testSibyll.cc
with
4 additions
and
1 deletion
Processes/Sibyll/code_generator.py
+
1
−
1
View file @
0c7c189e
...
@@ -64,7 +64,7 @@ def generate_corsika2sibyll(particle_db):
...
@@ -64,7 +64,7 @@ def generate_corsika2sibyll(particle_db):
def
generate_corsika2sibyll_xsType
(
particle_db
):
def
generate_corsika2sibyll_xsType
(
particle_db
):
string
=
"
std::array<int, {:d}> constexpr corsika2sibyllXStype = {{
\n
"
.
format
(
len
(
particle_db
))
string
=
"
std::array<int, {:d}> constexpr corsika2sibyllXStype = {{
\n
"
.
format
(
len
(
particle_db
))
for
identifier
,
pData
in
particle_db
.
items
():
for
identifier
,
pData
in
particle_db
.
items
():
sibCodeXS
=
pData
.
get
(
"
sibyll_xsType
"
,
-
1
)
sibCodeXS
=
pData
.
get
(
"
sibyll_xsType
"
,
0
)
string
+=
"
{:d}, // {:s}
\n
"
.
format
(
sibCodeXS
,
identifier
if
sibCodeXS
else
identifier
+
"
(not implemented in SIBYLL)
"
)
string
+=
"
{:d}, // {:s}
\n
"
.
format
(
sibCodeXS
,
identifier
if
sibCodeXS
else
identifier
+
"
(not implemented in SIBYLL)
"
)
string
+=
"
};
\n
"
string
+=
"
};
\n
"
return
string
return
string
...
...
This diff is collapsed.
Click to expand it.
Processes/Sibyll/testSibyll.cc
+
3
−
0
View file @
0c7c189e
...
@@ -45,6 +45,9 @@ TEST_CASE("Sibyll", "[processes]") {
...
@@ -45,6 +45,9 @@ TEST_CASE("Sibyll", "[processes]") {
REQUIRE_FALSE
(
process
::
sibyll
::
CanInteract
(
particles
::
Electron
::
GetCode
()));
REQUIRE_FALSE
(
process
::
sibyll
::
CanInteract
(
particles
::
Electron
::
GetCode
()));
REQUIRE_FALSE
(
process
::
sibyll
::
CanInteract
(
particles
::
SigmaC0
::
GetCode
()));
REQUIRE_FALSE
(
process
::
sibyll
::
CanInteract
(
particles
::
SigmaC0
::
GetCode
()));
REQUIRE_FALSE
(
process
::
sibyll
::
CanInteract
(
particles
::
Nucleus
::
GetCode
()));
REQUIRE_FALSE
(
process
::
sibyll
::
CanInteract
(
particles
::
Helium
::
GetCode
()));
}
}
SECTION
(
"cross-section type"
)
{
SECTION
(
"cross-section type"
)
{
...
...
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