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
b4025210
Commit
b4025210
authored
4 years ago
by
Maximilian Sackel
Committed by
Ralf Ulrich
4 years ago
Browse files
Options
Downloads
Patches
Plain Diff
enable continuous losses for gammas
parent
0de8f965
No related branches found
No related tags found
1 merge request
!245
Include proposal process rebase
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
Processes/Proposal/ContinuousProcess.cc
+4
-5
4 additions, 5 deletions
Processes/Proposal/ContinuousProcess.cc
Processes/Proposal/Interaction.cc
+1
-2
1 addition, 2 deletions
Processes/Proposal/Interaction.cc
with
5 additions
and
7 deletions
Processes/Proposal/ContinuousProcess.cc
+
4
−
5
View file @
b4025210
...
@@ -32,9 +32,8 @@ namespace corsika::process::proposal {
...
@@ -32,9 +32,8 @@ namespace corsika::process::proposal {
,
fRNG
(
corsika
::
random
::
RNGManager
::
GetInstance
().
GetRandomStream
(
"proposal"
))
{
,
fRNG
(
corsika
::
random
::
RNGManager
::
GetInstance
().
GetRandomStream
(
"proposal"
))
{
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
())
all_compositions
.
push_back
(
&
vtn
.
GetModelProperties
().
GetNuclearComposition
());
all_compositions
.
push_back
(
&
vtn
.
GetModelProperties
().
GetNuclearComposition
());
}
});
});
for
(
auto
&
ncarg
:
all_compositions
)
{
for
(
auto
&
ncarg
:
all_compositions
)
{
auto
comp_vec
=
std
::
vector
<
PROPOSAL
::
Components
::
Component
>
();
auto
comp_vec
=
std
::
vector
<
PROPOSAL
::
Components
::
Component
>
();
...
@@ -63,7 +62,7 @@ namespace corsika::process::proposal {
...
@@ -63,7 +62,7 @@ namespace corsika::process::proposal {
template
<
>
template
<
>
void
ContinuousProcess
::
Scatter
(
SetupParticle
&
vP
,
HEPEnergyType
const
&
loss
,
void
ContinuousProcess
::
Scatter
(
SetupParticle
&
vP
,
HEPEnergyType
const
&
loss
,
GrammageType
const
&
grammage
)
{
GrammageType
const
&
grammage
)
{
auto
calc
=
GetCalculator
(
vP
);
auto
calc
=
GetCalculator
(
vP
);
auto
d
=
vP
.
GetDirection
().
GetComponents
();
auto
d
=
vP
.
GetDirection
().
GetComponents
();
auto
direction
=
PROPOSAL
::
Vector3D
(
d
.
GetX
().
magnitude
(),
d
.
GetY
().
magnitude
(),
auto
direction
=
PROPOSAL
::
Vector3D
(
d
.
GetX
().
magnitude
(),
d
.
GetY
().
magnitude
(),
...
@@ -86,10 +85,10 @@ namespace corsika::process::proposal {
...
@@ -86,10 +85,10 @@ namespace corsika::process::proposal {
template
<
>
template
<
>
EProcessReturn
ContinuousProcess
::
DoContinuous
(
SetupParticle
&
vP
,
EProcessReturn
ContinuousProcess
::
DoContinuous
(
SetupParticle
&
vP
,
SetupTrack
const
&
vT
)
{
SetupTrack
const
&
vT
)
{
if
(
vP
.
GetChargeNumber
()
==
0
)
return
process
::
EProcessReturn
::
eOk
;
if
(
!
CanInteract
(
vP
.
GetPID
())
)
return
process
::
EProcessReturn
::
eOk
;
auto
dX
=
vP
.
GetNode
()
->
GetModelProperties
().
IntegratedGrammage
(
vT
,
vT
.
GetLength
());
auto
dX
=
vP
.
GetNode
()
->
GetModelProperties
().
IntegratedGrammage
(
vT
,
vT
.
GetLength
());
auto
energy_loss
=
TotalEnergyLoss
(
vP
,
dX
);
auto
energy_loss
=
TotalEnergyLoss
(
vP
,
dX
);
Scatter
(
vP
,
energy_loss
,
dX
);
if
(
vP
.
GetChargeNumber
()
!=
0
)
Scatter
(
vP
,
energy_loss
,
dX
);
vP
.
SetEnergy
(
vP
.
GetEnergy
()
-
energy_loss
);
vP
.
SetEnergy
(
vP
.
GetEnergy
()
-
energy_loss
);
if
(
vP
.
GetEnergy
()
<
cut
.
GetECut
())
return
process
::
EProcessReturn
::
eParticleAbsorbed
;
if
(
vP
.
GetEnergy
()
<
cut
.
GetECut
())
return
process
::
EProcessReturn
::
eParticleAbsorbed
;
vP
.
SetMomentum
(
vP
.
GetMomentum
()
*
vP
.
GetEnergy
()
/
vP
.
GetMomentum
().
GetNorm
());
vP
.
SetMomentum
(
vP
.
GetMomentum
()
*
vP
.
GetEnergy
()
/
vP
.
GetMomentum
().
GetNorm
());
...
...
This diff is collapsed.
Click to expand it.
Processes/Proposal/Interaction.cc
+
1
−
2
View file @
b4025210
...
@@ -32,9 +32,8 @@ namespace corsika::process::proposal {
...
@@ -32,9 +32,8 @@ namespace corsika::process::proposal {
,
fRNG
(
corsika
::
random
::
RNGManager
::
GetInstance
().
GetRandomStream
(
"proposal"
))
{
,
fRNG
(
corsika
::
random
::
RNGManager
::
GetInstance
().
GetRandomStream
(
"proposal"
))
{
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
())
all_compositions
.
push_back
(
&
vtn
.
GetModelProperties
().
GetNuclearComposition
());
all_compositions
.
push_back
(
&
vtn
.
GetModelProperties
().
GetNuclearComposition
());
}
});
});
for
(
auto
&
ncarg
:
all_compositions
)
{
for
(
auto
&
ncarg
:
all_compositions
)
{
auto
comp_vec
=
std
::
vector
<
Component_PROPOSAL
>
();
auto
comp_vec
=
std
::
vector
<
Component_PROPOSAL
>
();
...
...
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