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
765e0474
Commit
765e0474
authored
2 years ago
by
Felix Riehn
Committed by
Maximilian Reininghaus
2 years ago
Browse files
Options
Downloads
Patches
Plain Diff
sample target nucleon in proposal for LE photon interactions w SOPHIA
parent
1507b82b
No related branches found
No related tags found
1 merge request
!465
Resolve "SOPHIA for low energy photo-hadronic interaction"
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
corsika/detail/modules/proposal/HadronicPhotonModel.inl
+12
-3
12 additions, 3 deletions
corsika/detail/modules/proposal/HadronicPhotonModel.inl
with
12 additions
and
3 deletions
corsika/detail/modules/proposal/HadronicPhotonModel.inl
+
12
−
3
View file @
765e0474
...
...
@@ -12,6 +12,7 @@
#include
<corsika/framework/core/EnergyMomentumOperations.hpp>
#include
<tuple>
#include
<random>
namespace
corsika
::
proposal
{
...
...
@@ -89,8 +90,16 @@ namespace corsika::proposal {
CORSIKA_LOGGER_TRACE
(
logger_
,
"LE photo-hadronic interaction! implemented via SOPHIA "
"assuming a single nucleon as target"
);
// as LE model we only have SOPHIA which only handles photon-nucleon interactions
if
(
!
leHadronicInteraction_
.
isValid
(
Code
::
Photon
,
Code
::
Proton
,
sqrtSNN
))
{
// sample nucleon from nucleus A,Z
double
const
fProtons
=
get_nucleus_Z
(
targetId
)
/
get_nucleus_A
(
targetId
);
double
const
fNeutrons
=
1.
-
fProtons
;
std
::
discrete_distribution
<
int
>
nucleonChannelDist
{
fProtons
,
fNeutrons
};
static
corsika
::
default_prng_type
&
rng
=
corsika
::
RNGManager
<>::
getInstance
().
getRandomStream
(
"proposal"
);
Code
const
nucleonId
=
(
nucleonChannelDist
(
rng
)
?
Code
::
Proton
:
Code
::
Neutron
);
CORSIKA_LOGGER_DEBUG
(
logger_
,
"selected {} as target nucleon"
,
nucleonId
);
if
(
!
leHadronicInteraction_
.
isValid
(
Code
::
Photon
,
nucleonId
,
sqrtSNN
))
{
CORSIKA_LOGGER_WARN
(
logger_
,
"LE interaction model cannot handle configuration in photo-hadronic "
...
...
@@ -101,7 +110,7 @@ namespace corsika::proposal {
sqrtSNN
/
1
_GeV
);
return
ProcessReturn
::
Ok
;
}
leHadronicInteraction_
.
doInteraction
(
photon_secondaries
,
Code
::
Photon
,
Code
::
Proton
,
leHadronicInteraction_
.
doInteraction
(
photon_secondaries
,
Code
::
Photon
,
nucleonId
,
photonP4
,
targetP4
/
get_nucleus_A
(
targetId
));
}
for
(
const
auto
&
pSec
:
photon_secondaries
)
{
...
...
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