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
14eba275
Commit
14eba275
authored
5 years ago
by
Maximilian Reininghaus
Browse files
Options
Downloads
Patches
Plain Diff
moved sgn function into separate file for reuse
parent
f6b02511
No related branches found
No related tags found
1 merge request
!100
Resolve "Low energy hadronic interactions: UrQMD interface"
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
Framework/Utilities/CMakeLists.txt
+1
-0
1 addition, 0 deletions
Framework/Utilities/CMakeLists.txt
Framework/Utilities/COMBoost.cc
+1
-6
1 addition, 6 deletions
Framework/Utilities/COMBoost.cc
Framework/Utilities/sgn.h
+14
-0
14 additions, 0 deletions
Framework/Utilities/sgn.h
with
16 additions
and
6 deletions
Framework/Utilities/CMakeLists.txt
+
1
−
0
View file @
14eba275
...
...
@@ -27,6 +27,7 @@ set (
COMBoost.h
Bit.h
Singleton.h
sgn.h
CorsikaFenv.h
MetaProgramming.h
)
...
...
This diff is collapsed.
Click to expand it.
Framework/Utilities/COMBoost.cc
+
1
−
6
View file @
14eba275
...
...
@@ -14,17 +14,12 @@
#include
<corsika/geometry/Vector.h>
#include
<corsika/units/PhysicalUnits.h>
#include
<corsika/utl/COMBoost.h>
#include
<corsika/utl/sgn.h>
using
namespace
corsika
::
utl
;
using
namespace
corsika
::
units
::
si
;
using
namespace
corsika
::
geometry
;
//! sign function without branches
template
<
typename
T
>
static
int
sgn
(
T
val
)
{
return
(
T
(
0
)
<
val
)
-
(
val
<
T
(
0
));
}
COMBoost
::
COMBoost
(
FourVector
<
HEPEnergyType
,
Vector
<
hepmomentum_d
>>
const
&
Pprojectile
,
const
HEPMassType
massTarget
)
:
fCS
(
Pprojectile
.
GetSpaceLikeComponents
().
GetCoordinateSystem
())
{
...
...
This diff is collapsed.
Click to expand it.
Framework/Utilities/sgn.h
0 → 100644
+
14
−
0
View file @
14eba275
#ifndef _utilities_sgn_h
#define _utilities_sgn_h
namespace
corsika
::
utl
{
//! sign function without branches
template
<
typename
T
>
static
int
sgn
(
T
val
)
{
return
(
T
(
0
)
<
val
)
-
(
val
<
T
(
0
));
}
}
#endif
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