IAP GITLAB

Skip to content
Snippets Groups Projects
Commit 44cf5966 authored by ralfulrich's avatar ralfulrich
Browse files

removed warning, more cleanup

parent 92137f4c
No related branches found
No related tags found
1 merge request!36Resolve "cascade example debugging"
Pipeline #71 failed
image: ubuntu:bionic
variables:
GIT_SSL_NO_VERIFY: "1"
before_script:
- apt-get update --yes
- apt-get install --yes cmake libboost-dev libeigen3-dev python3 gfortran
build:
stage: build
tags:
- run1
script:
- mkdir build
- cd build
- cmake ..
- cmake --build .
- ctest -V
# code_quality:
# image: docker:stable
# variables:
# DOCKER_DRIVER: overlay2
# allow_failure: true
# services:
# - docker:stable-dind
# script:
# - export SP_VERSION=$(echo "$CI_SERVER_VERSION" | sed 's/^\([0-9]*\)\.\([0-9]*\).*/\1-\2-stable/')
# - docker run
# --env SOURCE_CODE="$PWD"
# --volume "$PWD":/code
# --volume /var/run/docker.sock:/var/run/docker.sock
# "registry.gitlab.com/gitlab-org/security-products/codequality:$SP_VERSION" /code
# artifacts:
# reports:
# codequality: gl-code-quality-report.json
......@@ -28,7 +28,7 @@ if(EXISTS "${CMAKE_SOURCE_DIR}/.git")
endif()
if(NOT CMAKE_BUILD_TYPE AND NOT CMAKE_CONFIGURATION_TYPES)
message(STATUS "Setting build type to '${default_bluild_type}' as no other was specified.")
message(STATUS "Setting build type to '${default_build_type}' as no other was specified.")
set(CMAKE_BUILD_TYPE "${default_build_type}" CACHE
STRING "Choose the type of build." FORCE)
# Set the possible values of build type for cmake-gui
......
......@@ -170,10 +170,11 @@ public:
void ShowResults() {
cout << " ******************************" << endl
<< " ParticleCut: " << endl
<< " energy in em. component (GeV): " << fEmEnergy / 1_GeV << endl
<< " no. of em. particles injected: " << fEmCount << endl
<< " energy in inv. component (GeV): " << fInvEnergy / 1_GeV << endl
<< " no. of inv. particles injected: " << fInvCount << endl
<< " energy in em. component (GeV): " << fEmEnergy / 1_GeV << endl
<< " no. of em. particles injected: " << fEmCount << endl
<< " energy in inv. component (GeV): " << fInvEnergy / 1_GeV << endl
<< " no. of inv. particles injected: " << fInvCount << endl
<< " energy below particle cut (GeV): " << fEnergy / 1_GeV << endl
<< " ******************************" << endl;
}
......
......@@ -28,12 +28,6 @@ namespace corsika::process::sibyll {
corsika::random::RNGManager& rmng = corsika::random::RNGManager::GetInstance();
rmng.RegisterRandomStream("s_rndm");
// test random number generator
std::cout << "Interaction: "
<< " test sequence of random numbers." << std::endl;
int a = 0;
for (int i = 0; i < 8; ++i) std::cout << i << " " << s_rndm_(a) << std::endl;
// initialize Sibyll
sibyll_ini_();
}
......@@ -186,7 +180,7 @@ namespace corsika::process::sibyll {
EnergyType E = p.GetEnergy();
EnergyType Etot = E + Etarget;
// total momentum
MomentumVector Ptot = p.GetMomentum(); // + pTarget;
MomentumVector Ptot = p.GetMomentum();
// invariant mass, i.e. cm. energy
EnergyType Ecm =
sqrt(Etot * Etot - Ptot.squaredNorm()); // sqrt( 2. * E * 0.93827_GeV );
......@@ -210,7 +204,7 @@ namespace corsika::process::sibyll {
<< " Ecm(GeV): " << Ecm / 1_GeV << std::endl;
if (E < 8.5_GeV || Ecm < 10_GeV) {
std::cout << "Interaction: "
<< " DoInteraction: dropping particle.." << std::endl;
<< " DoInteraction: should have dropped particle.." << std::endl;
// p.Delete(); delete later... different process
} else {
// Sibyll does not know about units..
......
......@@ -74,12 +74,9 @@ namespace corsika::stack {
return GetStackData().GetTime(GetIndex());
}
//#warning this does not really work, nor makes sense:
corsika::geometry::Vector<corsika::units::si::SpeedType::dimension_type>
GetDirection() const {
auto P = GetMomentum();
return P / P.norm() * 1e10 *
(corsika::units::si::meter / corsika::units::si::second);
return GetMomentum() / GetEnergy() * corsika::units::constants::c;
}
};
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment