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
fa194cf8
Commit
fa194cf8
authored
3 years ago
by
ralfulrich
Committed by
Ralf Ulrich
3 years ago
Browse files
Options
Downloads
Patches
Plain Diff
added explicit conex init method. This allows to run multiple showers, and re-init
parent
38e6dc9e
No related branches found
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
corsika/detail/modules/conex/CONEXhybrid.inl
+6
-4
6 additions, 4 deletions
corsika/detail/modules/conex/CONEXhybrid.inl
corsika/modules/conex/Random.hpp
+13
-0
13 additions, 0 deletions
corsika/modules/conex/Random.hpp
tests/modules/testCONEX.cpp
+2
-1
2 additions, 1 deletion
tests/modules/testCONEX.cpp
with
21 additions
and
5 deletions
corsika/detail/modules/conex/CONEXhybrid.inl
+
6
−
4
View file @
fa194cf8
...
...
@@ -80,7 +80,9 @@ namespace corsika {
CORSIKA_LOG_DEBUG
(
"showerCore (C8): {}"
,
showerCore_
.
getCoordinates
(
center
.
getCoordinateSystem
()));
int
randomSeeds
[
3
]
=
{
1234
,
0
,
0
};
// will be overwritten later??
int
randomSeeds
[
3
]
=
{
1234
,
0
,
0
};
// SEEDS ARE NOT USED. All random numbers are obtained from
// the CORSIKA 8 stream "conex" and "epos"!
int
heModel
=
eSibyll23
;
int
nShower
=
1
;
// large to avoid final stats.
...
...
@@ -118,13 +120,13 @@ namespace corsika {
theta
,
phi
);
int
ipart
=
static_cast
<
int
>
(
primaryPDG_
);
auto
rng
=
RNGManager
<>::
getInstance
().
getRandomStream
(
"conex"
);
double
dimpact
=
0.
;
// valid only if shower core is fixed on the observation plane;
// for skimming showers an offset is needed like in CONEX
std
::
array
<
int
,
3
>
ioseed
{
static_cast
<
int
>
(
rng
()),
static_cast
<
int
>
(
rng
()),
static_cast
<
int
>
(
rng
())};
// SEEDS ARE NOT USED. All random numbers are obtained from
// the CORSIKA 8 stream "conex" and "epos"!
std
::
array
<
int
,
3
>
ioseed
{
1
,
1
,
1
};
double
xminp
=
injectionHeight_
/
1
_m
;
...
...
This diff is collapsed.
Click to expand it.
corsika/modules/conex/Random.hpp
+
13
−
0
View file @
fa194cf8
...
...
@@ -17,6 +17,19 @@
* This file is an integral part of the epos interface. It must be
* linked to the executable linked to epos exactly once
*
* Note, that the fortran random numbe interface functions are all
* defined in the epos corsika 8 interface:
*
* ranfst, ranfgt, rmmaqd, ranfini, ranfcv, rmmard, rangen, drangen
*
* All of them use the epos_random_interface registered as "epos" stream.
*
* Thus, the fortran part of CONEX will use the "epos" CORSIKA 8 random stream,
* only the CONEX c++ part will use the "conex" random stream.
*
* Since EPOS and CONEX use the same fortran symbols for access to
* random numbers this can only be changed by renaming inside the
* fortran part.
*/
namespace
conex
{
...
...
This diff is collapsed.
Click to expand it.
tests/modules/testCONEX.cpp
+
2
−
1
View file @
fa194cf8
...
...
@@ -101,7 +101,8 @@ TEST_CASE("CONEXSourceCut") {
[[
maybe_unused
]]
corsika
::
sibyll
::
NuclearInteraction
sibyllNuc
(
sibyll
,
env
);
CONEXhybrid
conex
(
center
,
showerAxis
,
t
,
injectionHeight
,
E0
,
get_PDG
(
Code
::
Proton
));
conex
.
init
();
HEPEnergyType
const
Eem
{
1
_PeV
};
auto
const
momentum
=
showerAxis
.
getDirection
()
*
Eem
;
...
...
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