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
81da08b8
Commit
81da08b8
authored
6 years ago
by
ralfulrich
Browse files
Options
Downloads
Patches
Plain Diff
working
parent
ba6b8c63
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
Processes/Sibyll/code_generator.py
+3
-2
3 additions, 2 deletions
Processes/Sibyll/code_generator.py
Processes/Sibyll/sibyll_codes.dat
+2
-0
2 additions, 0 deletions
Processes/Sibyll/sibyll_codes.dat
Processes/Sibyll/testSibyll.cc
+11
-1
11 additions, 1 deletion
Processes/Sibyll/testSibyll.cc
with
16 additions
and
3 deletions
Processes/Sibyll/code_generator.py
+
3
−
2
View file @
81da08b8
...
...
@@ -28,10 +28,11 @@ def read_sibyll_codes(filename, pythia_db):
line
=
line
.
strip
()
if
line
[
0
]
==
'
#
'
:
continue
identifier
,
sib_code
,
canInteractFlag
,
xs
ctnId
=
line
.
split
()
identifier
,
sib_code
,
canInteractFlag
,
xs
Type
=
line
.
split
()
try
:
pythia_db
[
identifier
][
"
sibyll_code
"
]
=
int
(
sib_code
)
pythia_db
[
identifier
][
"
sibyll_canInteract
"
]
=
int
(
canInteractFlag
)
pythia_db
[
identifier
][
"
xsType
"
]
=
int
(
xsType
)
except
KeyError
as
e
:
raise
Exception
(
"
Identifier
'
{:s}
'
not found in pythia_db
"
.
format
(
identifier
))
...
...
@@ -126,7 +127,7 @@ def generate_interacting_particle(pythia_db):
low
=
numeric
&
0xFFFFFFFF
numeric
=
numeric
>>
32
string
+=
"
0x{:0x},
\n
"
.
format
(
low
)
string
+=
"
}}};
\n
"
return
string
...
...
This diff is collapsed.
Click to expand it.
Processes/Sibyll/sibyll_codes.dat
+
2
−
0
View file @
81da08b8
# input file for particle conversion to/from SIBYLL
# the format of this file is: "corsika-identifier" "sibyll-id" "can-interact-in-sibyll" "cross-section-type"
Electron 3 0 0
Positron 2 0 0
NuE 15 0 0
...
...
This diff is collapsed.
Click to expand it.
Processes/Sibyll/testSibyll.cc
+
11
−
1
View file @
81da08b8
...
...
@@ -33,10 +33,20 @@ TEST_CASE("Sibyll", "[processes]") {
13
);
}
SECTION
(
"
Known
BySibyll"
)
{
SECTION
(
"
handled
BySibyll"
)
{
REQUIRE
(
process
::
sibyll
::
KnownBySibyll
(
corsika
::
particles
::
Electron
::
GetCode
()));
REQUIRE_FALSE
(
process
::
sibyll
::
KnownBySibyll
(
corsika
::
particles
::
XiPrimeC0
::
GetCode
()));
}
SECTION
(
"cross-section type"
)
{
REQUIRE
(
process
::
sibyll
::
CanInteract
(
corsika
::
particles
::
Proton
::
GetCode
()));
REQUIRE
(
process
::
sibyll
::
CanInteract
(
corsika
::
particles
::
XiCPlus
::
GetCode
()));
REQUIRE_FALSE
(
process
::
sibyll
::
CanInteract
(
corsika
::
particles
::
Electron
::
GetCode
()));
REQUIRE_FALSE
(
process
::
sibyll
::
CanInteract
(
corsika
::
particles
::
SigmaC0
::
GetCode
()));
}
}
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