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
d40a0190
Commit
d40a0190
authored
4 years ago
by
Maximilian Sackel
Committed by
Ralf Ulrich
4 years ago
Browse files
Options
Downloads
Patches
Plain Diff
fix physical factors for energy conversions
parent
063f8edf
No related branches found
No related tags found
1 merge request
!245
Include proposal process rebase
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
Processes/Proposal/Interaction.cc
+8
-6
8 additions, 6 deletions
Processes/Proposal/Interaction.cc
with
8 additions
and
6 deletions
Processes/Proposal/Interaction.cc
+
8
−
6
View file @
d40a0190
...
@@ -39,8 +39,8 @@ namespace corsika::process::proposal {
...
@@ -39,8 +39,8 @@ namespace corsika::process::proposal {
Interaction
::
Interaction
(
SetupEnvironment
const
&
_env
,
CORSIKA_ParticleCut
const
&
_cut
)
Interaction
::
Interaction
(
SetupEnvironment
const
&
_env
,
CORSIKA_ParticleCut
const
&
_cut
)
:
cut
(
make_shared
<
const
PROPOSAL
::
EnergyCutSettings
>
(
_cut
.
GetECut
()
/
1
_MeV
,
1
,
:
cut
(
make_shared
<
const
PROPOSAL
::
EnergyCutSettings
>
(
_cut
.
GetECut
()
/
1
_MeV
,
1
,
false
))
{
false
))
{
std
::
cout
<<
"corsika set cut to "
<<
_cut
.
GetECut
()
/
1
_GeV
<<
" [GeV]"
<<
std
::
endl
;
std
::
cout
<<
"corsika set cut to "
<<
_cut
.
GetECut
()
/
1
_GeV
<<
" [GeV]"
<<
std
::
endl
;
std
::
cout
<<
"proposal set ecut to "
<<
cut
->
GetEcut
()
<<
" [MeV]"
<<
std
::
endl
;
std
::
cout
<<
"proposal set ecut to "
<<
cut
->
GetEcut
()
<<
" [MeV]"
<<
std
::
endl
;
auto
all_compositions
=
std
::
vector
<
const
NuclearComposition
*>
();
auto
all_compositions
=
std
::
vector
<
const
NuclearComposition
*>
();
_env
.
GetUniverse
()
->
walk
([
&
](
auto
&
vtn
)
{
_env
.
GetUniverse
()
->
walk
([
&
](
auto
&
vtn
)
{
if
(
vtn
.
HasModelProperties
())
{
if
(
vtn
.
HasModelProperties
())
{
...
@@ -72,12 +72,13 @@ namespace corsika::process::proposal {
...
@@ -72,12 +72,13 @@ namespace corsika::process::proposal {
std
::
uniform_real_distribution
<
double
>
distr
(
0.
,
1.
);
std
::
uniform_real_distribution
<
double
>
distr
(
0.
,
1.
);
auto
[
type
,
comp_ptr
,
v
]
=
auto
[
type
,
comp_ptr
,
v
]
=
std
::
get
<
INTERACTION
>
(
calc
->
second
)
std
::
get
<
INTERACTION
>
(
calc
->
second
)
->
TypeInteraction
(
vP
.
GetEnergy
()
/
1
_GeV
,
distr
(
fRNG
));
->
TypeInteraction
(
vP
.
GetEnergy
()
/
1
_MeV
,
distr
(
fRNG
));
std
::
cout
<<
"InteractionType: "
<<
static_cast
<
int
>
(
type
)
<<
std
::
endl
;
auto
rnd
=
std
::
vector
<
double
>
();
auto
rnd
=
std
::
vector
<
double
>
();
for
(
size_t
i
=
0
;
for
(
size_t
i
=
0
;
i
<
std
::
get
<
SECONDARIES
>
(
calc
->
second
).
RequiredRandomNumbers
(
type
);
++
i
)
i
<
std
::
get
<
SECONDARIES
>
(
calc
->
second
).
RequiredRandomNumbers
(
type
);
++
i
)
rnd
.
push_back
(
distr
(
fRNG
));
rnd
.
push_back
(
distr
(
fRNG
));
double
primary_energy
=
vP
.
GetEnergy
()
/
1
_
G
eV
;
double
primary_energy
=
vP
.
GetEnergy
()
/
1
_
M
eV
;
auto
point
=
PROPOSAL
::
Vector3D
(
vP
.
GetPosition
().
GetX
()
/
1
_cm
,
auto
point
=
PROPOSAL
::
Vector3D
(
vP
.
GetPosition
().
GetX
()
/
1
_cm
,
vP
.
GetPosition
().
GetY
()
/
1
_cm
,
vP
.
GetPosition
().
GetY
()
/
1
_cm
,
vP
.
GetPosition
().
GetZ
()
/
1
_cm
);
vP
.
GetPosition
().
GetZ
()
/
1
_cm
);
...
@@ -112,10 +113,11 @@ namespace corsika::process::proposal {
...
@@ -112,10 +113,11 @@ namespace corsika::process::proposal {
if
(
CanInteract
(
vP
.
GetPID
()))
{
if
(
CanInteract
(
vP
.
GetPID
()))
{
auto
calc
=
GetCalculator
(
vP
);
// [CrossSections]
auto
calc
=
GetCalculator
(
vP
);
// [CrossSections]
std
::
uniform_real_distribution
<
double
>
distr
(
0.
,
1.
);
std
::
uniform_real_distribution
<
double
>
distr
(
0.
,
1.
);
auto
rnd
=
distr
(
fRNG
);
auto
energy
=
get
<
INTERACTION
>
(
calc
->
second
)
auto
energy
=
get
<
INTERACTION
>
(
calc
->
second
)
->
EnergyInteraction
(
vP
.
GetEnergy
()
/
1
_
G
eV
,
distr
(
fRNG
)
);
->
EnergyInteraction
(
vP
.
GetEnergy
()
/
1
_
M
eV
,
rnd
);
return
get
<
DISPLACEMENT
>
(
calc
->
second
)
return
get
<
DISPLACEMENT
>
(
calc
->
second
)
->
SolveTrackIntegral
(
vP
.
GetEnergy
()
/
1
_
G
eV
,
energy
)
*
->
SolveTrackIntegral
(
vP
.
GetEnergy
()
/
1
_
M
eV
,
energy
)
*
1
_g
/
1
_cm
/
1
_cm
;
1
_g
/
1
_cm
/
1
_cm
;
}
}
return
std
::
numeric_limits
<
double
>::
infinity
()
*
1
_g
/
(
1
_cm
*
1
_cm
);
return
std
::
numeric_limits
<
double
>::
infinity
()
*
1
_g
/
(
1
_cm
*
1
_cm
);
...
...
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