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
db4441b2
Commit
db4441b2
authored
3 years ago
by
ralfulrich
Browse files
Options
Downloads
Patches
Plain Diff
protect sibyll for Argon
parent
fa24e6fe
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
corsika/detail/modules/sibyll/Interaction.inl
+5
-1
5 additions, 1 deletion
corsika/detail/modules/sibyll/Interaction.inl
corsika/detail/modules/sibyll/NuclearInteraction.inl
+7
-0
7 additions, 0 deletions
corsika/detail/modules/sibyll/NuclearInteraction.inl
with
12 additions
and
1 deletion
corsika/detail/modules/sibyll/Interaction.inl
+
5
−
1
View file @
db4441b2
...
@@ -127,7 +127,10 @@ namespace corsika::sibyll {
...
@@ -127,7 +127,10 @@ namespace corsika::sibyll {
si
::
CrossSectionType
weightedProdCrossSection
=
mediumComposition
.
getWeightedSum
(
si
::
CrossSectionType
weightedProdCrossSection
=
mediumComposition
.
getWeightedSum
(
[
=
](
corsika
::
Code
targetID
)
->
si
::
CrossSectionType
{
[
=
](
corsika
::
Code
targetID
)
->
si
::
CrossSectionType
{
return
std
::
get
<
0
>
(
this
->
getCrossSection
(
corsikaBeamId
,
targetID
,
ECoM
));
// Argon needs special handling ....
return
targetID
==
Code
::
Argon
?
CrossSectionType
::
zero
()
:
std
::
get
<
0
>
(
this
->
getCrossSection
(
corsikaBeamId
,
targetID
,
ECoM
));
});
});
CORSIKA_LOG_DEBUG
(
CORSIKA_LOG_DEBUG
(
...
@@ -243,6 +246,7 @@ namespace corsika::sibyll {
...
@@ -243,6 +246,7 @@ namespace corsika::sibyll {
for
(
size_t
i
=
0
;
i
<
compVec
.
size
();
++
i
)
{
for
(
size_t
i
=
0
;
i
<
compVec
.
size
();
++
i
)
{
auto
const
targetId
=
compVec
[
i
];
auto
const
targetId
=
compVec
[
i
];
if
(
targetId
==
Code
::
Argon
)
continue
;
// skip Argon ....
const
auto
[
sigProd
,
sigEla
]
=
getCrossSection
(
corsikaBeamId
,
targetId
,
Ecm
);
const
auto
[
sigProd
,
sigEla
]
=
getCrossSection
(
corsikaBeamId
,
targetId
,
Ecm
);
[[
maybe_unused
]]
const
auto
&
dummy_sigEla
=
sigEla
;
[[
maybe_unused
]]
const
auto
&
dummy_sigEla
=
sigEla
;
cross_section_of_components
[
i
]
=
sigProd
;
cross_section_of_components
[
i
]
=
sigProd
;
...
...
This diff is collapsed.
Click to expand it.
corsika/detail/modules/sibyll/NuclearInteraction.inl
+
7
−
0
View file @
db4441b2
...
@@ -51,6 +51,10 @@ namespace corsika::sibyll {
...
@@ -51,6 +51,10 @@ namespace corsika::sibyll {
template
<
typename
TEnvironment
>
template
<
typename
TEnvironment
>
inline
void
NuclearInteraction
<
TEnvironment
>::
printCrossSectionTable
(
Code
pCode
)
{
inline
void
NuclearInteraction
<
TEnvironment
>::
printCrossSectionTable
(
Code
pCode
)
{
if
(
pCode
==
Code
::
Argon
)
{
CORSIKA_LOG_WARN
(
"SIBYLL cannot handle Argon as target!"
);
return
;
}
const
int
k
=
targetComponentsIndex_
.
at
(
pCode
);
const
int
k
=
targetComponentsIndex_
.
at
(
pCode
);
Code
pNuclei
[]
=
{
Code
::
Helium
,
Code
::
Lithium7
,
Code
::
Oxygen
,
Code
pNuclei
[]
=
{
Code
::
Helium
,
Code
::
Lithium7
,
Code
::
Oxygen
,
Code
::
Neon
,
Code
::
Argon
,
Code
::
Iron
};
Code
::
Neon
,
Code
::
Argon
,
Code
::
Iron
};
...
@@ -97,6 +101,7 @@ namespace corsika::sibyll {
...
@@ -97,6 +101,7 @@ namespace corsika::sibyll {
// loop over target components, at most 4!!
// loop over target components, at most 4!!
int
k
=
-
1
;
int
k
=
-
1
;
for
(
auto
&
ptarg
:
allElementsInUniverse
)
{
for
(
auto
&
ptarg
:
allElementsInUniverse
)
{
if
(
ptarg
==
Code
::
Argon
)
continue
;
// NEED TO IGNORE Argon ....
++
k
;
++
k
;
CORSIKA_LOG_DEBUG
(
"NuclearInteraction: init target component: {}"
,
ptarg
);
CORSIKA_LOG_DEBUG
(
"NuclearInteraction: init target component: {}"
,
ptarg
);
const
int
ib
=
get_nucleus_A
(
ptarg
);
const
int
ib
=
get_nucleus_A
(
ptarg
);
...
@@ -265,6 +270,7 @@ namespace corsika::sibyll {
...
@@ -265,6 +270,7 @@ namespace corsika::sibyll {
const
auto
&
w
=
mediumComposition
.
getFractions
();
const
auto
&
w
=
mediumComposition
.
getFractions
();
// loop over components in medium
// loop over components in medium
for
(
auto
const
targetId
:
mediumComposition
.
getComponents
())
{
for
(
auto
const
targetId
:
mediumComposition
.
getComponents
())
{
if
(
targetId
==
Code
::
Argon
)
continue
;
// NEED TO IGNORE Argon ....
i
++
;
i
++
;
CORSIKA_LOG_DEBUG
(
"NuclearInteraction: get interaction length for target: {}"
,
CORSIKA_LOG_DEBUG
(
"NuclearInteraction: get interaction length for target: {}"
,
get_name
(
targetId
));
get_name
(
targetId
));
...
@@ -422,6 +428,7 @@ namespace corsika::sibyll {
...
@@ -422,6 +428,7 @@ namespace corsika::sibyll {
for
(
size_t
i
=
0
;
i
<
compVec
.
size
();
++
i
)
{
for
(
size_t
i
=
0
;
i
<
compVec
.
size
();
++
i
)
{
auto
const
targetId
=
compVec
[
i
];
auto
const
targetId
=
compVec
[
i
];
if
(
targetId
==
Code
::
Argon
)
continue
;
// NEED TO IGNORE Argon ....
CORSIKA_LOG_DEBUG
(
"target component: {}"
,
get_name
(
targetId
));
CORSIKA_LOG_DEBUG
(
"target component: {}"
,
get_name
(
targetId
));
CORSIKA_LOG_DEBUG
(
"beam id: {}"
,
get_name
(
beamId
));
CORSIKA_LOG_DEBUG
(
"beam id: {}"
,
get_name
(
beamId
));
const
auto
[
sigProd
,
sigEla
]
=
const
auto
[
sigProd
,
sigEla
]
=
...
...
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