IAP GITLAB
Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
C
corsika
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
123
Issues
123
List
Boards
Labels
Service Desk
Milestones
Merge Requests
15
Merge Requests
15
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Environments
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Air Shower Physics
corsika
Commits
61cd7c65
Commit
61cd7c65
authored
Feb 18, 2021
by
Ralf Ulrich
☄
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
final small fixed and style
parent
1f7a2c17
Pipeline
#3530
passed with stages
in 14 minutes and 8 seconds
Changes
7
Pipelines
2
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
37 additions
and
29 deletions
+37
-29
corsika/detail/modules/LongitudinalProfile.inl
corsika/detail/modules/LongitudinalProfile.inl
+5
-3
corsika/detail/modules/proposal/ContinuousProcess.inl
corsika/detail/modules/proposal/ContinuousProcess.inl
+8
-7
corsika/detail/modules/tracking/TrackingLeapFrogCurved.inl
corsika/detail/modules/tracking/TrackingLeapFrogCurved.inl
+2
-2
corsika/framework/core/ParticleProperties.hpp
corsika/framework/core/ParticleProperties.hpp
+8
-6
corsika/setup/SetupTrajectory.hpp
corsika/setup/SetupTrajectory.hpp
+2
-2
examples/vertical_EAS.cpp
examples/vertical_EAS.cpp
+7
-7
tests/modules/testParticleCut.cpp
tests/modules/testParticleCut.cpp
+5
-2
No files found.
corsika/detail/modules/LongitudinalProfile.inl
View file @
61cd7c65
...
...
@@ -35,9 +35,11 @@ namespace corsika {
GrammageType const grammageStart = shower_axis_.getProjectedX(vTrack.getPosition(0));
GrammageType const grammageEnd = shower_axis_.getProjectedX(vTrack.getPosition(1));
CORSIKA_LOG_INFO(
"pos1={} m, pos2={}, X1={} g/cm2, X2={} g/cm2", vTrack.getPosition(0).getCoordinates() / 1_m,
vTrack.getPosition(1).getCoordinates() / 1_m, grammageStart / 1_g * square(1_cm), grammageEnd / 1_g * square(1_cm));
CORSIKA_LOG_INFO("pos1={} m, pos2={}, X1={} g/cm2, X2={} g/cm2",
vTrack.getPosition(0).getCoordinates() / 1_m,
vTrack.getPosition(1).getCoordinates() / 1_m,
grammageStart / 1_g * square(1_cm),
grammageEnd / 1_g * square(1_cm));
// Note: particle may go also "upward", thus, grammageEnd<grammageStart
const int binStart = std::ceil(grammageStart / dX_);
...
...
corsika/detail/modules/proposal/ContinuousProcess.inl
View file @
61cd7c65
...
...
@@ -125,13 +125,14 @@ namespace corsika::proposal {
// hyper parameter which must be adjusted.
//
auto const energy = vP.getEnergy();
auto const energy_lim =
std::max(energy * 0.9, // either 10% relative loss max., or
get_energy_threshold(
code) // energy thresholds globally defined for individual particles
* 0.99 // need to go 1% below global e-cut to assure removal in ParticleCut. The
// 1% does not matter since at cut-time the entire energy is removed.
);
auto const energy_lim = std::max(
energy * 0.9, // either 10% relative loss max., or
get_energy_threshold(
code) // energy thresholds globally defined for individual particles
*
0.99 // need to go 1% below global e-cut to assure removal in ParticleCut. The
// 1% does not matter since at cut-time the entire energy is removed.
);
// solving the track integral for giving energy lim
auto c = getCalculator(vP, calc);
...
...
corsika/detail/modules/tracking/TrackingLeapFrogCurved.inl
View file @
61cd7c65
...
...
@@ -176,7 +176,7 @@ namespace corsika {
CORSIKA_LOG_TRACE("Solution (real) for current Volume: {} ", dist);
if (numericallyInside) {
// there must be an entry (negative) and exit (positive) solution
if (dist < 0.0001_m) { // security margin to assure transfer to next
if (dist <
-
0.0001_m) { // security margin to assure transfer to next
// logical volume
if (first_entry == 0) {
d_enter = dist;
...
...
@@ -200,7 +200,7 @@ namespace corsika {
// both physical solutions (entry, exit) must be positive, and as small as
// possible
if (dist < 0.0001_m) { // need small numerical margin, to assure transport
if (dist <
-
0.0001_m) { // need small numerical margin, to assure transport
// into next logical volume
continue;
}
...
...
corsika/framework/core/ParticleProperties.hpp
View file @
61cd7c65
...
...
@@ -73,12 +73,14 @@ namespace corsika {
//! true iff the particle is a hard-coded nucleus or Code::Nucleus
bool
constexpr
is_nucleus
(
Code
const
);
bool
constexpr
is_hadron
(
Code
const
);
//!< true iff particle is hadron
bool
constexpr
is_em
(
Code
const
);
//!< true iff particle is electron, positron or gamma
bool
constexpr
is_muon
(
Code
const
);
//!< true iff particle is mu+ or mu-
bool
constexpr
is_neutrino
(
Code
const
);
//!< true iff particle is (anti-) neutrino
int
constexpr
get_nucleus_A
(
Code
const
);
//!< returns A for hard-coded nucleus, otherwise 0
int
constexpr
get_nucleus_Z
(
Code
const
);
//!< returns Z for hard-coded nucleus, otherwise 0
bool
constexpr
is_hadron
(
Code
const
);
//!< true iff particle is hadron
bool
constexpr
is_em
(
Code
const
);
//!< true iff particle is electron, positron or gamma
bool
constexpr
is_muon
(
Code
const
);
//!< true iff particle is mu+ or mu-
bool
constexpr
is_neutrino
(
Code
const
);
//!< true iff particle is (anti-) neutrino
int
constexpr
get_nucleus_A
(
Code
const
);
//!< returns A for hard-coded nucleus, otherwise 0
int
constexpr
get_nucleus_Z
(
Code
const
);
//!< returns Z for hard-coded nucleus, otherwise 0
//! returns mass of (A,Z) nucleus, disregarding binding energy
HEPMassType
get_nucleus_mass
(
unsigned
int
const
,
unsigned
int
const
);
...
...
corsika/setup/SetupTrajectory.hpp
View file @
61cd7c65
...
...
@@ -38,7 +38,7 @@ namespace corsika::setup {
The default tracking algorithm.
*/
//typedef corsika::tracking_leapfrog_curved::Tracking Tracking;
//
typedef corsika::tracking_leapfrog_curved::Tracking Tracking;
// typedef corsika::tracking_leapfrog_straight::Tracking Tracking;
typedef
corsika
::
tracking_line
::
Tracking
Tracking
;
...
...
@@ -47,6 +47,6 @@ namespace corsika::setup {
*/
/// definition of Trajectory base class, to be used in tracking and cascades
typedef
StraightTrajectory
Trajectory
;
//typedef corsika::LeapFrogTrajectory Trajectory;
//
typedef corsika::LeapFrogTrajectory Trajectory;
}
// namespace corsika::setup
examples/vertical_EAS.cpp
View file @
61cd7c65
...
...
@@ -131,7 +131,7 @@ int main(int argc, char** argv) {
builder
.
addExponentialLayer
(
1144.9069
_g
/
(
1
_cm
*
1
_cm
),
878153.55
_cm
,
10
_km
);
builder
.
addExponentialLayer
(
1305.5948
_g
/
(
1
_cm
*
1
_cm
),
636143.04
_cm
,
40
_km
);
builder
.
addExponentialLayer
(
540.1778
_g
/
(
1
_cm
*
1
_cm
),
772170.16
_cm
,
100
_km
);
builder
.
addLinearLayer
(
1e9
_cm
,
112.8
_km
+
constants
::
EarthRadius
::
Mean
);
builder
.
addLinearLayer
(
1e9
_cm
,
112.8
_km
+
constants
::
EarthRadius
::
Mean
);
builder
.
assemble
(
env
);
CORSIKA_LOG_DEBUG
(
...
...
@@ -157,7 +157,7 @@ int main(int argc, char** argv) {
Code
beamCode
;
HEPEnergyType
mass
;
unsigned
short
Z
=
0
;
if
(
A
>
0
)
{
if
(
A
>
0
)
{
beamCode
=
Code
::
Nucleus
;
Z
=
std
::
stoi
(
std
::
string
(
argv
[
2
]));
mass
=
get_nucleus_mass
(
A
,
Z
);
...
...
@@ -200,14 +200,14 @@ int main(int argc, char** argv) {
stack
.
addParticle
(
std
::
make_tuple
(
beamCode
,
E0
,
plab
,
injectionPos
,
0
_ns
,
A
,
Z
));
}
else
{
if
(
A
==
1
)
{
if
(
A
==
1
)
{
if
(
Z
==
1
)
{
stack
.
addParticle
(
std
::
make_tuple
(
Code
::
Proton
,
E0
,
plab
,
injectionPos
,
0
_ns
));
stack
.
addParticle
(
std
::
make_tuple
(
Code
::
Proton
,
E0
,
plab
,
injectionPos
,
0
_ns
));
}
else
if
(
Z
==
0
)
{
stack
.
addParticle
(
std
::
make_tuple
(
Code
::
Neutron
,
E0
,
plab
,
injectionPos
,
0
_ns
));
stack
.
addParticle
(
std
::
make_tuple
(
Code
::
Neutron
,
E0
,
plab
,
injectionPos
,
0
_ns
));
}
else
{
std
::
cerr
<<
"illegal parameters"
<<
std
::
endl
;
return
EXIT_FAILURE
;
std
::
cerr
<<
"illegal parameters"
<<
std
::
endl
;
return
EXIT_FAILURE
;
}
}
else
{
stack
.
addParticle
(
std
::
make_tuple
(
beamCode
,
E0
,
plab
,
injectionPos
,
0
_ns
));
...
...
tests/modules/testParticleCut.cpp
View file @
61cd7c65
...
...
@@ -23,7 +23,7 @@
using
namespace
corsika
;
TEST_CASE
(
"ParticleCut"
,
"
[processes]
"
)
{
TEST_CASE
(
"ParticleCut"
,
"
processes
"
)
{
logging
::
set_level
(
logging
::
level
::
info
);
corsika_logger
->
set_pattern
(
"[%n:%^%-8l%$] %v"
);
...
...
@@ -222,7 +222,10 @@ TEST_CASE("ParticleCut", "[processes]") {
for
(
auto
proType
:
particleList
)
{
auto
particle
=
stack
.
addParticle
(
std
::
make_tuple
(
proType
,
Eabove
,
MomentumVector
(
rootCS
,
{
0
_GeV
,
0
_GeV
,
0
_GeV
}),
point0
,
0
_ns
));
cut
.
doContinuous
(
particle
,
track
);
if
(
cut
.
doContinuous
(
particle
,
track
)
==
ProcessReturn
::
ParticleAbsorbed
)
{
particle
.
erase
();
}
}
CHECK
(
stack
.
getEntries
()
==
9
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment