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
b45f1007
Commit
b45f1007
authored
3 years ago
by
Felix Riehn
Committed by
ralfulrich
3 years ago
Browse files
Options
Downloads
Patches
Plain Diff
function names
parent
47a4ae40
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
corsika/detail/modules/epos/Interaction.inl
+19
-22
19 additions, 22 deletions
corsika/detail/modules/epos/Interaction.inl
corsika/modules/epos/Interaction.hpp
+5
-5
5 additions, 5 deletions
corsika/modules/epos/Interaction.hpp
with
24 additions
and
27 deletions
corsika/detail/modules/epos/Interaction.inl
+
19
−
22
View file @
b45f1007
...
@@ -43,13 +43,13 @@ namespace corsika::epos {
...
@@ -43,13 +43,13 @@ namespace corsika::epos {
// initialize Eposlhc
// initialize Eposlhc
static
bool
initialized
=
false
;
static
bool
initialized
=
false
;
if
(
!
initialized
)
{
if
(
!
initialized
)
{
initialize
_eposlhc_c7
();
initialize
();
initialized
=
true
;
initialized
=
true
;
}
}
set
_p
articles
_s
table
();
set
P
articles
S
table
();
}
}
inline
void
Interaction
::
set
_p
articles
_s
table
()
const
{
inline
void
Interaction
::
set
P
articles
S
table
()
const
{
CORSIKA_LOGGER_DEBUG
(
logger_
,
CORSIKA_LOGGER_DEBUG
(
logger_
,
"set all particles known to CORSIKA stable inside EPOS.."
);
"set all particles known to CORSIKA stable inside EPOS.."
);
for
(
auto
&
p
:
get_all_particles
())
{
for
(
auto
&
p
:
get_all_particles
())
{
...
@@ -80,7 +80,7 @@ namespace corsika::epos {
...
@@ -80,7 +80,7 @@ namespace corsika::epos {
}
}
}
}
inline
void
Interaction
::
initialize
_eposlhc_c7
()
const
{
inline
void
Interaction
::
initialize
()
const
{
CORSIKA_LOGGER_DEBUG
(
logger_
,
"initializing..."
);
CORSIKA_LOGGER_DEBUG
(
logger_
,
"initializing..."
);
...
@@ -165,11 +165,11 @@ namespace corsika::epos {
...
@@ -165,11 +165,11 @@ namespace corsika::epos {
//::epos::ainit_();
//::epos::ainit_();
// dummy event (prepare commons)
// dummy event (prepare commons)
initialize
_e
vent
_
Lab
(
Code
::
Iron
,
Iron
::
nucleus_A
,
Iron
::
nucleus_Z
,
Code
::
Argon
,
initialize
E
ventLab
(
Code
::
Iron
,
Iron
::
nucleus_A
,
Iron
::
nucleus_Z
,
Code
::
Argon
,
Argon
::
nucleus_A
,
Argon
::
nucleus_Z
,
100
_GeV
);
Argon
::
nucleus_A
,
Argon
::
nucleus_Z
,
100
_GeV
);
}
}
inline
void
Interaction
::
initialize
_e
vent
_
CoM
(
Code
const
idBeam
,
int
const
iBeamA
,
inline
void
Interaction
::
initialize
E
ventCoM
(
Code
const
idBeam
,
int
const
iBeamA
,
int
const
iBeamZ
,
Code
const
idTarget
,
int
const
iBeamZ
,
Code
const
idTarget
,
int
const
iTargetA
,
int
const
iTargetZ
,
int
const
iTargetA
,
int
const
iTargetZ
,
HEPEnergyType
const
Ecm
)
const
{
HEPEnergyType
const
Ecm
)
const
{
...
@@ -186,16 +186,16 @@ namespace corsika::epos {
...
@@ -186,16 +186,16 @@ namespace corsika::epos {
::
epos
::
enrgy_
.
ecms
=
Ecm
/
1
_GeV
;
::
epos
::
enrgy_
.
ecms
=
Ecm
/
1
_GeV
;
CORSIKA_LOGGER_TRACE
(
logger_
,
CORSIKA_LOGGER_TRACE
(
logger_
,
"
initialize_event:
inside EPOS: "
"inside EPOS: "
"Ecm={}, "
"Ecm={}, "
"Elab={}"
,
"Elab={}"
,
::
epos
::
enrgy_
.
ecms
,
::
epos
::
enrgy_
.
elab
);
::
epos
::
enrgy_
.
ecms
,
::
epos
::
enrgy_
.
elab
);
configure
_p
articles
(
idBeam
,
iBeamA
,
iBeamZ
,
idTarget
,
iTargetA
,
iTargetZ
);
configure
P
articles
(
idBeam
,
iBeamA
,
iBeamZ
,
idTarget
,
iTargetA
,
iTargetZ
);
::
epos
::
ainit_
();
::
epos
::
ainit_
();
}
}
inline
void
Interaction
::
initialize
_e
vent
_
Lab
(
Code
const
idBeam
,
int
const
iBeamA
,
inline
void
Interaction
::
initialize
E
ventLab
(
Code
const
idBeam
,
int
const
iBeamA
,
int
const
iBeamZ
,
Code
const
idTarget
,
int
const
iBeamZ
,
Code
const
idTarget
,
int
const
iTargetA
,
int
const
iTargetZ
,
int
const
iTargetA
,
int
const
iTargetZ
,
HEPEnergyType
const
Plab
)
const
{
HEPEnergyType
const
Plab
)
const
{
...
@@ -213,22 +213,22 @@ namespace corsika::epos {
...
@@ -213,22 +213,22 @@ namespace corsika::epos {
::
epos
::
hadr1_
.
pnll
=
float
(
Plab
/
1
_GeV
);
::
epos
::
hadr1_
.
pnll
=
float
(
Plab
/
1
_GeV
);
CORSIKA_LOGGER_TRACE
(
logger_
,
CORSIKA_LOGGER_TRACE
(
logger_
,
"
initialize_event:
inside EPOS: "
"inside EPOS: "
"Ecm={}, "
"Ecm={}, "
"Elab={}, "
"Elab={}, "
"Pnll={}"
,
"Pnll={}"
,
::
epos
::
enrgy_
.
ecms
,
::
epos
::
enrgy_
.
elab
,
::
epos
::
hadr1_
.
pnll
);
::
epos
::
enrgy_
.
ecms
,
::
epos
::
enrgy_
.
elab
,
::
epos
::
hadr1_
.
pnll
);
configure
_p
articles
(
idBeam
,
iBeamA
,
iBeamZ
,
idTarget
,
iTargetA
,
iTargetZ
);
configure
P
articles
(
idBeam
,
iBeamA
,
iBeamZ
,
idTarget
,
iTargetA
,
iTargetZ
);
::
epos
::
ainit_
();
::
epos
::
ainit_
();
}
}
inline
void
Interaction
::
configure
_p
articles
(
Code
const
idBeam
,
int
const
iBeamA
,
inline
void
Interaction
::
configure
P
articles
(
Code
const
idBeam
,
int
const
iBeamA
,
int
const
iBeamZ
,
Code
const
idTarget
,
int
const
iBeamZ
,
Code
const
idTarget
,
int
const
iTargetA
,
int
const
iTargetA
,
int
const
iTargetZ
)
const
{
int
const
iTargetZ
)
const
{
CORSIKA_LOGGER_TRACE
(
logger_
,
CORSIKA_LOGGER_TRACE
(
logger_
,
"
configure_particles:
setting "
"setting "
"Beam={}, "
"Beam={}, "
"BeamA={}, "
"BeamA={}, "
"BeamZ={}, "
"BeamZ={}, "
...
@@ -265,10 +265,10 @@ namespace corsika::epos {
...
@@ -265,10 +265,10 @@ namespace corsika::epos {
::
epos
::
nucl1_
.
latarg
=
-
1
;
::
epos
::
nucl1_
.
latarg
=
-
1
;
::
epos
::
had10_
.
icltar
=
corsika
::
epos
::
getEposXSCode
(
Code
::
Proton
);
::
epos
::
had10_
.
icltar
=
corsika
::
epos
::
getEposXSCode
(
Code
::
Proton
);
}
else
{
}
else
{
throw
std
::
runtime_error
(
"Epos:
configure_particles:
target outside range!"
);
throw
std
::
runtime_error
(
"Epos: target outside range!"
);
}
}
CORSIKA_LOGGER_TRACE
(
logger_
,
CORSIKA_LOGGER_TRACE
(
logger_
,
"
configure_particles:
inside EPOS: "
"inside EPOS: "
"Id beam={}, "
"Id beam={}, "
"Z beam={}, "
"Z beam={}, "
"A beam={}, "
"A beam={}, "
...
@@ -321,17 +321,14 @@ namespace corsika::epos {
...
@@ -321,17 +321,14 @@ namespace corsika::epos {
iBeam
);
iBeam
);
// reset beam particle // (1: pion-like, 2: proton-like, 3:kaon-like)
// reset beam particle // (1: pion-like, 2: proton-like, 3:kaon-like)
if
(
iBeam
==
1
)
if
(
iBeam
==
1
)
initialize
_e
vent
_
CoM
(
Code
::
PiPlus
,
BeamA
,
BeamZ
,
TargetId
,
TargetA
,
TargetZ
,
initialize
E
ventCoM
(
Code
::
PiPlus
,
BeamA
,
BeamZ
,
TargetId
,
TargetA
,
TargetZ
,
EnergyCOM
);
EnergyCOM
);
else
if
(
iBeam
==
2
)
else
if
(
iBeam
==
2
)
initialize
_e
vent
_
CoM
(
Code
::
Proton
,
BeamA
,
BeamZ
,
TargetId
,
TargetA
,
TargetZ
,
initialize
E
ventCoM
(
Code
::
Proton
,
BeamA
,
BeamZ
,
TargetId
,
TargetA
,
TargetZ
,
EnergyCOM
);
EnergyCOM
);
else
if
(
iBeam
==
3
)
else
if
(
iBeam
==
3
)
initialize
_e
vent
_
CoM
(
Code
::
KPlus
,
BeamA
,
BeamZ
,
TargetId
,
TargetA
,
TargetZ
,
initialize
E
ventCoM
(
Code
::
KPlus
,
BeamA
,
BeamZ
,
TargetId
,
TargetA
,
TargetZ
,
EnergyCOM
);
EnergyCOM
);
// else if (iBeam == 4)
// initialize_event_CoM(Code::Nucleus, BeamA, BeamZ, TargetId, TargetA, TargetZ,
// EnergyCOM);
else
else
throw
std
::
runtime_error
(
throw
std
::
runtime_error
(
"calcCrossSectionCoM: interaction of beam hadron not defined in "
"calcCrossSectionCoM: interaction of beam hadron not defined in "
...
@@ -588,7 +585,7 @@ namespace corsika::epos {
...
@@ -588,7 +585,7 @@ namespace corsika::epos {
targetA
=
get_nucleus_A
(
targetCode
);
targetA
=
get_nucleus_A
(
targetCode
);
targetZ
=
get_nucleus_Z
(
targetCode
);
targetZ
=
get_nucleus_Z
(
targetCode
);
}
}
initialize
_e
vent
_
Lab
(
corsikaBeamId
,
beamA
,
beamZ
,
targetCode
,
targetA
,
targetZ
,
initialize
E
ventLab
(
corsikaBeamId
,
beamA
,
beamZ
,
targetCode
,
targetA
,
targetZ
,
projectileMomentumLabPerNucleon
);
projectileMomentumLabPerNucleon
);
// create event
// create event
...
...
This diff is collapsed.
Click to expand it.
corsika/modules/epos/Interaction.hpp
+
5
−
5
View file @
b45f1007
...
@@ -69,14 +69,14 @@ namespace corsika::epos {
...
@@ -69,14 +69,14 @@ namespace corsika::epos {
//! neutrons (p,n == nucleon)
//! neutrons (p,n == nucleon)
bool
isValidTarget
(
Code
const
)
const
;
bool
isValidTarget
(
Code
const
)
const
;
void
initialize
_eposlhc_c7
()
const
;
void
initialize
()
const
;
void
initialize
_e
vent
_
CoM
(
Code
const
,
int
const
,
int
const
,
Code
const
,
int
const
,
void
initialize
E
ventCoM
(
Code
const
,
int
const
,
int
const
,
Code
const
,
int
const
,
int
const
,
HEPEnergyType
const
)
const
;
int
const
,
HEPEnergyType
const
)
const
;
void
initialize
_e
vent
_
Lab
(
Code
const
,
int
const
,
int
const
,
Code
const
,
int
const
,
void
initialize
E
ventLab
(
Code
const
,
int
const
,
int
const
,
Code
const
,
int
const
,
int
const
,
HEPEnergyType
const
)
const
;
int
const
,
HEPEnergyType
const
)
const
;
void
configure
_p
articles
(
Code
const
,
int
const
,
int
const
,
Code
const
,
int
const
,
void
configure
P
articles
(
Code
const
,
int
const
,
int
const
,
Code
const
,
int
const
,
int
const
)
const
;
int
const
)
const
;
void
set
_p
articles
_s
table
()
const
;
void
set
P
articles
S
table
()
const
;
private
:
private
:
default_prng_type
&
RNG_
=
RNGManager
::
getInstance
().
getRandomStream
(
"epos"
);
default_prng_type
&
RNG_
=
RNGManager
::
getInstance
().
getRandomStream
(
"epos"
);
...
...
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