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
7e296a3c
Commit
7e296a3c
authored
4 years ago
by
ralfulrich
Browse files
Options
Downloads
Patches
Plain Diff
A/B -> A_/B_
parent
e29ca03c
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
Framework/ProcessSequence/ProcessSequence.h
+43
-44
43 additions, 44 deletions
Framework/ProcessSequence/ProcessSequence.h
Framework/ProcessSequence/SwitchProcessSequence.h
+39
-39
39 additions, 39 deletions
Framework/ProcessSequence/SwitchProcessSequence.h
with
82 additions
and
83 deletions
Framework/ProcessSequence/ProcessSequence.h
+
43
−
44
View file @
7e296a3c
...
...
@@ -30,7 +30,7 @@ namespace corsika::process {
A compile time static list of processes. The compiler will
generate a new type based on template logic containing all the
elements.
elements
provided by the user
.
TProcess1 and TProcess2 must both be derived from BaseProcess,
and are both references if possible (lvalue), otherwise (rvalue)
...
...
@@ -52,14 +52,13 @@ namespace corsika::process {
static
bool
constexpr
t1SwitchProcSeq
=
is_switch_process_sequence_v
<
TProcess1type
>
;
static
bool
constexpr
t2SwitchProcSeq
=
is_switch_process_sequence_v
<
TProcess2type
>
;
protected:
TProcess1
A
;
// this is a reference, if possible
TProcess2
B
;
// this is a reference, if possible
TProcess1
A_
;
// this is a reference, if possible
TProcess2
B_
;
// this is a reference, if possible
public:
ProcessSequence
(
TProcess1
in_A
,
TProcess2
in_B
)
:
A
(
in_A
)
,
B
(
in_B
)
{}
:
A
_
(
in_A
)
,
B
_
(
in_B
)
{}
template
<
typename
Particle
,
typename
VTNType
>
EProcessReturn
DoBoundaryCrossing
(
Particle
&
particle
,
VTNType
const
&
from
,
...
...
@@ -69,13 +68,13 @@ namespace corsika::process {
if
constexpr
(
std
::
is_base_of_v
<
BoundaryCrossingProcess
<
TProcess1type
>
,
TProcess1type
>
||
t1ProcSeq
)
{
ret
|=
A
.
DoBoundaryCrossing
(
particle
,
from
,
to
);
ret
|=
A
_
.
DoBoundaryCrossing
(
particle
,
from
,
to
);
}
if
constexpr
(
std
::
is_base_of_v
<
BoundaryCrossingProcess
<
TProcess2type
>
,
TProcess2type
>
||
t2ProcSeq
)
{
ret
|=
B
.
DoBoundaryCrossing
(
particle
,
from
,
to
);
ret
|=
B
_
.
DoBoundaryCrossing
(
particle
,
from
,
to
);
}
return
ret
;
...
...
@@ -86,11 +85,11 @@ namespace corsika::process {
EProcessReturn
ret
=
EProcessReturn
::
eOk
;
if
constexpr
(
std
::
is_base_of_v
<
ContinuousProcess
<
TProcess1type
>
,
TProcess1type
>
||
t1ProcSeq
)
{
ret
|=
A
.
DoContinuous
(
particle
,
vT
);
ret
|=
A
_
.
DoContinuous
(
particle
,
vT
);
}
if
constexpr
(
std
::
is_base_of_v
<
ContinuousProcess
<
TProcess2type
>
,
TProcess2type
>
||
t2ProcSeq
)
{
if
(
!
isAbsorbed
(
ret
))
{
ret
|=
B
.
DoContinuous
(
particle
,
vT
);
}
if
(
!
isAbsorbed
(
ret
))
{
ret
|=
B
_
.
DoContinuous
(
particle
,
vT
);
}
}
return
ret
;
}
...
...
@@ -99,11 +98,11 @@ namespace corsika::process {
inline
void
DoSecondaries
(
TSecondaries
&
vS
)
{
if
constexpr
(
std
::
is_base_of_v
<
SecondariesProcess
<
TProcess1type
>
,
TProcess1type
>
||
t1ProcSeq
)
{
A
.
DoSecondaries
(
vS
);
A
_
.
DoSecondaries
(
vS
);
}
if
constexpr
(
std
::
is_base_of_v
<
SecondariesProcess
<
TProcess2type
>
,
TProcess2type
>
||
t2ProcSeq
)
{
B
.
DoSecondaries
(
vS
);
B
_
.
DoSecondaries
(
vS
);
}
}
...
...
@@ -112,18 +111,18 @@ namespace corsika::process {
so they can be exectuted only each N steps. Often these are
"maintenacne processes" that do not need to run after each
single step of the simulations. In the CheckStep function it is
tested if either A or B are StackProcess and if they are due
tested if either A
_
or B
_
are StackProcess and if they are due
for execution.
*/
inline
bool
CheckStep
()
{
bool
ret
=
false
;
if
constexpr
(
std
::
is_base_of_v
<
StackProcess
<
TProcess1type
>
,
TProcess1type
>
||
(
t1ProcSeq
&&
!
t1SwitchProcSeq
))
{
ret
|=
A
.
CheckStep
();
ret
|=
A
_
.
CheckStep
();
}
if
constexpr
(
std
::
is_base_of_v
<
StackProcess
<
TProcess2type
>
,
TProcess2type
>
||
(
t2ProcSeq
&&
!
t2SwitchProcSeq
))
{
ret
|=
B
.
CheckStep
();
ret
|=
B
_
.
CheckStep
();
}
return
ret
;
}
...
...
@@ -135,11 +134,11 @@ namespace corsika::process {
inline
void
DoStack
(
TStack
&
stack
)
{
if
constexpr
(
std
::
is_base_of_v
<
StackProcess
<
TProcess1type
>
,
TProcess1type
>
||
(
t1ProcSeq
&&
!
t1SwitchProcSeq
))
{
if
(
A
.
CheckStep
())
{
A
.
DoStack
(
stack
);
}
if
(
A
_
.
CheckStep
())
{
A
_
.
DoStack
(
stack
);
}
}
if
constexpr
(
std
::
is_base_of_v
<
StackProcess
<
TProcess2type
>
,
TProcess2type
>
||
(
t2ProcSeq
&&
!
t2SwitchProcSeq
))
{
if
(
B
.
CheckStep
())
{
B
.
DoStack
(
stack
);
}
if
(
B
_
.
CheckStep
())
{
B
_
.
DoStack
(
stack
);
}
}
}
...
...
@@ -152,12 +151,12 @@ namespace corsika::process {
if
constexpr
(
std
::
is_base_of_v
<
ContinuousProcess
<
TProcess1type
>
,
TProcess1type
>
||
t1ProcSeq
)
{
corsika
::
units
::
si
::
LengthType
const
len
=
A
.
MaxStepLength
(
particle
,
vTrack
);
corsika
::
units
::
si
::
LengthType
const
len
=
A
_
.
MaxStepLength
(
particle
,
vTrack
);
max_length
=
std
::
min
(
max_length
,
len
);
}
if
constexpr
(
std
::
is_base_of_v
<
ContinuousProcess
<
TProcess2type
>
,
TProcess2type
>
||
t2ProcSeq
)
{
corsika
::
units
::
si
::
LengthType
const
len
=
B
.
MaxStepLength
(
particle
,
vTrack
);
corsika
::
units
::
si
::
LengthType
const
len
=
B
_
.
MaxStepLength
(
particle
,
vTrack
);
max_length
=
std
::
min
(
max_length
,
len
);
}
return
max_length
;
...
...
@@ -177,11 +176,11 @@ namespace corsika::process {
if
constexpr
(
std
::
is_base_of_v
<
InteractionProcess
<
TProcess1type
>
,
TProcess1type
>
||
t1ProcSeq
)
{
tot
+=
A
.
GetInverseInteractionLength
(
particle
);
tot
+=
A
_
.
GetInverseInteractionLength
(
particle
);
}
if
constexpr
(
std
::
is_base_of_v
<
InteractionProcess
<
TProcess2type
>
,
TProcess2type
>
||
t2ProcSeq
)
{
tot
+=
B
.
GetInverseInteractionLength
(
particle
);
tot
+=
B
_
.
GetInverseInteractionLength
(
particle
);
}
return
tot
;
}
...
...
@@ -198,34 +197,34 @@ namespace corsika::process {
if
constexpr
(
t1ProcSeq
)
{
// if A is a process sequence --> check inside
const
EProcessReturn
ret
=
A
.
SelectInteraction
(
view
,
lambda_inv_select
,
lambda_inv_sum
);
// if A did succeed, stop routine. Not checking other static branch B.
A
_
.
SelectInteraction
(
view
,
lambda_inv_select
,
lambda_inv_sum
);
// if A
_
did succeed, stop routine. Not checking other static branch B
_
.
if
(
ret
!=
EProcessReturn
::
eOk
)
{
return
ret
;
}
}
else
if
constexpr
(
std
::
is_base_of_v
<
InteractionProcess
<
TProcess1type
>
,
TProcess1type
>
)
{
// if this is not a ContinuousProcess --> evaluate probability
const
auto
particle
=
view
.
parent
();
lambda_inv_sum
+=
A
.
GetInverseInteractionLength
(
particle
);
lambda_inv_sum
+=
A
_
.
GetInverseInteractionLength
(
particle
);
// check if we should execute THIS process and then EXIT
if
(
lambda_inv_select
<
lambda_inv_sum
)
{
A
.
DoInteraction
(
view
);
A
_
.
DoInteraction
(
view
);
return
EProcessReturn
::
eInteracted
;
}
}
// end branch A
}
// end branch A
_
if
constexpr
(
t2ProcSeq
)
{
// if B is a process sequence --> check inside
return
B
.
SelectInteraction
(
view
,
lambda_inv_select
,
lambda_inv_sum
);
// if B
_
is a process sequence --> check inside
return
B
_
.
SelectInteraction
(
view
,
lambda_inv_select
,
lambda_inv_sum
);
}
else
if
constexpr
(
std
::
is_base_of_v
<
InteractionProcess
<
TProcess2type
>
,
TProcess2type
>
)
{
// if this is not a ContinuousProcess --> evaluate probability
lambda_inv_sum
+=
B
.
GetInverseInteractionLength
(
view
.
parent
());
lambda_inv_sum
+=
B
_
.
GetInverseInteractionLength
(
view
.
parent
());
// check if we should execute THIS process and then EXIT
if
(
lambda_inv_select
<
lambda_inv_sum
)
{
B
.
DoInteraction
(
view
);
B
_
.
DoInteraction
(
view
);
return
EProcessReturn
::
eInteracted
;
}
}
// end branch B
}
// end branch B
_
return
EProcessReturn
::
eOk
;
}
...
...
@@ -242,11 +241,11 @@ namespace corsika::process {
if
constexpr
(
std
::
is_base_of_v
<
DecayProcess
<
TProcess1type
>
,
TProcess1type
>
||
t1ProcSeq
)
{
tot
+=
A
.
GetInverseLifetime
(
particle
);
tot
+=
A
_
.
GetInverseLifetime
(
particle
);
}
if
constexpr
(
std
::
is_base_of_v
<
DecayProcess
<
TProcess2type
>
,
TProcess2type
>
||
t2ProcSeq
)
{
tot
+=
B
.
GetInverseLifetime
(
particle
);
tot
+=
B
_
.
GetInverseLifetime
(
particle
);
}
return
tot
;
}
...
...
@@ -262,35 +261,35 @@ namespace corsika::process {
// TODO: add check for decay_inv_select>decay_inv_tot
if
constexpr
(
t1ProcSeq
)
{
// if A is a process sequence --> check inside
const
EProcessReturn
ret
=
A
.
SelectDecay
(
view
,
decay_inv_select
,
decay_inv_sum
);
// if A did succeed, stop routine here (not checking other static branch B)
// if A
_
is a process sequence --> check inside
const
EProcessReturn
ret
=
A
_
.
SelectDecay
(
view
,
decay_inv_select
,
decay_inv_sum
);
// if A
_
did succeed, stop routine here (not checking other static branch B
_
)
if
(
ret
!=
EProcessReturn
::
eOk
)
{
return
ret
;
}
}
else
if
constexpr
(
std
::
is_base_of_v
<
DecayProcess
<
TProcess1type
>
,
TProcess1type
>
)
{
// if this is not a ContinuousProcess --> evaluate probability
decay_inv_sum
+=
A
.
GetInverseLifetime
(
view
.
parent
());
decay_inv_sum
+=
A
_
.
GetInverseLifetime
(
view
.
parent
());
// check if we should execute THIS process and then EXIT
if
(
decay_inv_select
<
decay_inv_sum
)
{
// more pedagogical: rndm_select <
// decay_inv_sum / decay_inv_tot
A
.
DoDecay
(
view
);
A
_
.
DoDecay
(
view
);
return
EProcessReturn
::
eDecayed
;
}
}
// end branch A
}
// end branch A
_
if
constexpr
(
t2ProcSeq
)
{
// if B is a process sequence --> check inside
return
B
.
SelectDecay
(
view
,
decay_inv_select
,
decay_inv_sum
);
// if B
_
is a process sequence --> check inside
return
B
_
.
SelectDecay
(
view
,
decay_inv_select
,
decay_inv_sum
);
}
else
if
constexpr
(
std
::
is_base_of_v
<
DecayProcess
<
TProcess2type
>
,
TProcess2type
>
)
{
// if this is not a ContinuousProcess --> evaluate probability
decay_inv_sum
+=
B
.
GetInverseLifetime
(
view
.
parent
());
decay_inv_sum
+=
B
_
.
GetInverseLifetime
(
view
.
parent
());
// check if we should execute THIS process and then EXIT
if
(
decay_inv_select
<
decay_inv_sum
)
{
B
.
DoDecay
(
view
);
B
_
.
DoDecay
(
view
);
return
EProcessReturn
::
eDecayed
;
}
}
// end branch B
}
// end branch B
_
return
EProcessReturn
::
eOk
;
}
};
...
...
This diff is collapsed.
Click to expand it.
Framework/ProcessSequence/SwitchProcessSequence.h
+
39
−
39
View file @
7e296a3c
...
...
@@ -65,14 +65,14 @@ namespace corsika::process {
TSelect
select_
;
// this is a reference, if possible
public:
TProcess1
A
;
// this is a reference, if possible
TProcess2
B
;
// this is a reference, if possible
TProcess1
A_
;
// this is a reference, if possible
TProcess2
B_
;
// this is a reference, if possible
public:
SwitchProcessSequence
(
TProcess1
in_A
,
TProcess2
in_B
,
TSelect
sel
)
:
select_
(
sel
)
,
A
(
in_A
)
,
B
(
in_B
)
{}
,
A
_
(
in_A
)
,
B
_
(
in_B
)
{}
template
<
typename
Particle
,
typename
VTNType
>
EProcessReturn
DoBoundaryCrossing
(
Particle
&
particle
,
VTNType
const
&
from
,
...
...
@@ -83,7 +83,7 @@ namespace corsika::process {
if
constexpr
(
std
::
is_base_of_v
<
BoundaryCrossingProcess
<
TProcess1type
>
,
TProcess1type
>
||
t1ProcSeq
)
{
return
A
.
DoBoundaryCrossing
(
particle
,
from
,
to
);
return
A
_
.
DoBoundaryCrossing
(
particle
,
from
,
to
);
}
break
;
}
...
...
@@ -91,7 +91,7 @@ namespace corsika::process {
if
constexpr
(
std
::
is_base_of_v
<
BoundaryCrossingProcess
<
TProcess2type
>
,
TProcess2type
>
||
t2ProcSeq
)
{
return
B
.
DoBoundaryCrossing
(
particle
,
from
,
to
);
return
B
_
.
DoBoundaryCrossing
(
particle
,
from
,
to
);
}
break
;
}
...
...
@@ -106,7 +106,7 @@ namespace corsika::process {
if
constexpr
(
std
::
is_base_of_v
<
ContinuousProcess
<
TProcess1type
>
,
TProcess1type
>
||
t1ProcSeq
)
{
return
A
.
DoContinuous
(
particle
,
vT
);
return
A
_
.
DoContinuous
(
particle
,
vT
);
}
break
;
}
...
...
@@ -114,7 +114,7 @@ namespace corsika::process {
if
constexpr
(
std
::
is_base_of_v
<
ContinuousProcess
<
TProcess2type
>
,
TProcess2type
>
||
t2ProcSeq
)
{
return
B
.
DoContinuous
(
particle
,
vT
);
return
B
_
.
DoContinuous
(
particle
,
vT
);
}
break
;
}
...
...
@@ -130,7 +130,7 @@ namespace corsika::process {
if
constexpr
(
std
::
is_base_of_v
<
SecondariesProcess
<
TProcess1type
>
,
TProcess1type
>
||
t1ProcSeq
)
{
A
.
DoSecondaries
(
vS
);
A
_
.
DoSecondaries
(
vS
);
}
break
;
}
...
...
@@ -138,7 +138,7 @@ namespace corsika::process {
if
constexpr
(
std
::
is_base_of_v
<
SecondariesProcess
<
TProcess2type
>
,
TProcess2type
>
||
t2ProcSeq
)
{
B
.
DoSecondaries
(
vS
);
B
_
.
DoSecondaries
(
vS
);
}
break
;
}
...
...
@@ -154,7 +154,7 @@ namespace corsika::process {
if
constexpr
(
std
::
is_base_of_v
<
ContinuousProcess
<
TProcess1type
>
,
TProcess1type
>
||
t1ProcSeq
)
{
return
A
.
MaxStepLength
(
particle
,
vTrack
);
return
A
_
.
MaxStepLength
(
particle
,
vTrack
);
}
break
;
}
...
...
@@ -162,7 +162,7 @@ namespace corsika::process {
if
constexpr
(
std
::
is_base_of_v
<
ContinuousProcess
<
TProcess2type
>
,
TProcess2type
>
||
t2ProcSeq
)
{
return
B
.
MaxStepLength
(
particle
,
vTrack
);
return
B
_
.
MaxStepLength
(
particle
,
vTrack
);
}
break
;
}
...
...
@@ -187,7 +187,7 @@ namespace corsika::process {
if
constexpr
(
std
::
is_base_of_v
<
InteractionProcess
<
TProcess1type
>
,
TProcess1type
>
||
t1ProcSeq
)
{
return
A
.
GetInverseInteractionLength
(
particle
);
return
A
_
.
GetInverseInteractionLength
(
particle
);
}
break
;
}
...
...
@@ -195,7 +195,7 @@ namespace corsika::process {
if
constexpr
(
std
::
is_base_of_v
<
InteractionProcess
<
TProcess2type
>
,
TProcess2type
>
||
t2ProcSeq
)
{
return
B
.
GetInverseInteractionLength
(
particle
);
return
B
_
.
GetInverseInteractionLength
(
particle
);
}
break
;
}
...
...
@@ -213,39 +213,39 @@ namespace corsika::process {
switch
(
select_
.
select
(
view
.
parent
()))
{
case
SwitchResult
::
First
:
{
if
constexpr
(
t1ProcSeq
)
{
// if A is a process sequence --> check inside
// if A
_
is a process sequence --> check inside
const
EProcessReturn
ret
=
A
.
SelectInteraction
(
view
,
lambda_inv_select
,
lambda_inv_sum
);
// if A did succeed, stop routine. Not checking other static branch B.
A
_
.
SelectInteraction
(
view
,
lambda_inv_select
,
lambda_inv_sum
);
// if A
_
did succeed, stop routine. Not checking other static branch B
_
.
if
(
ret
!=
EProcessReturn
::
eOk
)
{
return
ret
;
}
}
else
if
constexpr
(
std
::
is_base_of_v
<
InteractionProcess
<
TProcess1type
>
,
TProcess1type
>
)
{
// if this is not a ContinuousProcess --> evaluate probability
lambda_inv_sum
+=
A
.
GetInverseInteractionLength
(
view
.
parent
());
lambda_inv_sum
+=
A
_
.
GetInverseInteractionLength
(
view
.
parent
());
// check if we should execute THIS process and then EXIT
if
(
lambda_inv_select
<
lambda_inv_sum
)
{
A
.
DoInteraction
(
view
);
A
_
.
DoInteraction
(
view
);
return
EProcessReturn
::
eInteracted
;
}
}
// end branch A
}
// end branch A
_
break
;
}
case
SwitchResult
::
Second
:
{
if
constexpr
(
t2ProcSeq
)
{
// if B is a process sequence --> check inside
return
B
.
SelectInteraction
(
view
,
lambda_inv_select
,
lambda_inv_sum
);
// if B
_
is a process sequence --> check inside
return
B
_
.
SelectInteraction
(
view
,
lambda_inv_select
,
lambda_inv_sum
);
}
else
if
constexpr
(
std
::
is_base_of_v
<
InteractionProcess
<
TProcess2type
>
,
TProcess2type
>
)
{
// if this is not a ContinuousProcess --> evaluate probability
lambda_inv_sum
+=
B
.
GetInverseInteractionLength
(
view
.
parent
());
lambda_inv_sum
+=
B
_
.
GetInverseInteractionLength
(
view
.
parent
());
// check if we should execute THIS process and then EXIT
if
(
lambda_inv_select
<
lambda_inv_sum
)
{
B
.
DoInteraction
(
view
);
B
_
.
DoInteraction
(
view
);
return
EProcessReturn
::
eInteracted
;
}
}
// end branch B
}
// end branch B
_
break
;
}
}
...
...
@@ -265,7 +265,7 @@ namespace corsika::process {
case
SwitchResult
::
First
:
{
if
constexpr
(
std
::
is_base_of_v
<
DecayProcess
<
TProcess1type
>
,
TProcess1type
>
||
t1ProcSeq
)
{
return
A
.
GetInverseLifetime
(
particle
);
return
A
_
.
GetInverseLifetime
(
particle
);
}
break
;
}
...
...
@@ -273,7 +273,7 @@ namespace corsika::process {
case
SwitchResult
::
Second
:
{
if
constexpr
(
std
::
is_base_of_v
<
DecayProcess
<
TProcess2type
>
,
TProcess2type
>
||
t2ProcSeq
)
{
return
B
.
GetInverseLifetime
(
particle
);
return
B
_
.
GetInverseLifetime
(
particle
);
}
break
;
}
...
...
@@ -292,40 +292,40 @@ namespace corsika::process {
switch
(
select_
.
select
(
view
.
parent
()))
{
case
SwitchResult
::
First
:
{
if
constexpr
(
t1ProcSeq
)
{
// if A is a process sequence --> check inside
// if A
_
is a process sequence --> check inside
const
EProcessReturn
ret
=
A
.
SelectDecay
(
view
,
decay_inv_select
,
decay_inv_sum
);
// if A did succeed, stop routine here (not checking other static branch B)
A
_
.
SelectDecay
(
view
,
decay_inv_select
,
decay_inv_sum
);
// if A
_
did succeed, stop routine here (not checking other static branch B
_
)
if
(
ret
!=
EProcessReturn
::
eOk
)
{
return
ret
;
}
}
else
if
constexpr
(
std
::
is_base_of_v
<
DecayProcess
<
TProcess1type
>
,
TProcess1type
>
)
{
// if this is not a ContinuousProcess --> evaluate probability
decay_inv_sum
+=
A
.
GetInverseLifetime
(
view
.
parent
());
decay_inv_sum
+=
A
_
.
GetInverseLifetime
(
view
.
parent
());
// check if we should execute THIS process and then EXIT
if
(
decay_inv_select
<
decay_inv_sum
)
{
// more pedagogical: rndm_select < decay_inv_sum / decay_inv_tot
A
.
DoDecay
(
view
);
A
_
.
DoDecay
(
view
);
return
EProcessReturn
::
eDecayed
;
}
}
// end branch A
}
// end branch A
_
break
;
}
case
SwitchResult
::
Second
:
{
if
constexpr
(
t2ProcSeq
)
{
// if B is a process sequence --> check inside
return
B
.
SelectDecay
(
view
,
decay_inv_select
,
decay_inv_sum
);
// if B
_
is a process sequence --> check inside
return
B
_
.
SelectDecay
(
view
,
decay_inv_select
,
decay_inv_sum
);
}
else
if
constexpr
(
std
::
is_base_of_v
<
DecayProcess
<
TProcess2type
>
,
TProcess2type
>
)
{
// if this is not a ContinuousProcess --> evaluate probability
decay_inv_sum
+=
B
.
GetInverseLifetime
(
view
.
parent
());
decay_inv_sum
+=
B
_
.
GetInverseLifetime
(
view
.
parent
());
// check if we should execute THIS process and then EXIT
if
(
decay_inv_select
<
decay_inv_sum
)
{
B
.
DoDecay
(
view
);
B
_
.
DoDecay
(
view
);
return
EProcessReturn
::
eDecayed
;
}
}
// end branch B
}
// end branch B
_
break
;
}
}
...
...
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