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
cd0c04ce
Commit
cd0c04ce
authored
4 years ago
by
Maximilian Reininghaus
Committed by
ralfulrich
4 years ago
Browse files
Options
Downloads
Patches
Plain Diff
removed double test
parent
fd5189c9
No related branches found
No related tags found
1 merge request
!280
Refactory 2020
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
corsika/detail/framework/core/ParticleProperties.inl
+0
-5
0 additions, 5 deletions
corsika/detail/framework/core/ParticleProperties.inl
corsika/framework/core/ParticleProperties.hpp
+6
-0
6 additions, 0 deletions
corsika/framework/core/ParticleProperties.hpp
with
6 additions
and
5 deletions
corsika/detail/framework/core/ParticleProperties.inl
+
0
−
5
View file @
cd0c04ce
...
...
@@ -30,8 +30,6 @@ namespace corsika {
}
ElectricChargeType
constexpr
charge
(
Code
const
code
)
{
if
(
code
==
Code
::
Nucleus
)
throw
std
::
runtime_error
(
"Cannot GetCharge() of particle::Nucleus -> unspecified"
);
return
charge_number
(
code
)
*
constants
::
e
;
}
...
...
@@ -76,12 +74,10 @@ namespace corsika {
return
(
code
==
Code
::
Nucleus
)
||
(
nucleus_A
(
code
)
!=
0
);
}
//! the output stream operator for human-readable particle codes
inline
std
::
ostream
&
operator
<<
(
std
::
ostream
&
stream
,
corsika
::
Code
const
code
)
{
return
stream
<<
name
(
code
);
}
//! convert PDG code to CORSIKA 8 internal code
inline
Code
convert_from_PDG
(
PDGCode
p
)
{
static_assert
(
particle
::
detail
::
conversionArray
.
size
()
%
2
==
1
);
// this will fail, for the strange case where the maxPDG is negative...
...
...
@@ -94,7 +90,6 @@ namespace corsika {
}
}
//! returns mass of (A,Z) nucleus, disregarding binding energy
inline
HEPMassType
nucleus_mass
(
const
int
A
,
const
int
Z
)
{
auto
const
absA
=
std
::
abs
(
A
);
auto
const
absZ
=
std
::
abs
(
Z
);
...
...
This diff is collapsed.
Click to expand it.
corsika/framework/core/ParticleProperties.hpp
+
6
−
0
View file @
cd0c04ce
...
...
@@ -59,6 +59,12 @@ namespace corsika {
//! returns mass of (A,Z) nucleus, disregarding binding energy
inline
HEPMassType
nucleus_mass
(
int
,
int
);
//! convert PDG code to CORSIKA 8 internal code
inline
Code
convert_from_PDG
(
PDGCode
);
//! the output stream operator for human-readable particle codes
inline
std
::
ostream
&
operator
<<
(
std
::
ostream
&
,
corsika
::
Code
);
}
// namespace corsika
// data arrays, etc.
...
...
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