IAP GITLAB

Skip to content
Snippets Groups Projects
Commit 4571a6ed authored by ralfulrich's avatar ralfulrich
Browse files

make conex source cut compile

parent f57b5993
No related branches found
No related tags found
No related merge requests found
......@@ -21,7 +21,6 @@ set_target_properties (
PROPERTIES
VERSION ${PROJECT_VERSION}
SOVERSION 1
# PUBLIC_HEADER "${MODEL_HEADERS}"
)
# target dependencies on other libraries (also the header onlys)
......@@ -31,6 +30,7 @@ target_link_libraries (
CORSIKAparticles
CORSIKAprocesssequence
CORSIKAsetup
C8::ext::conex
)
target_include_directories (
......
......@@ -20,12 +20,6 @@ using namespace corsika::units::si;
using namespace corsika::particles;
using namespace corsika::setup;
// RU, after the cleanup it seems there are just few direct calls to CONEX left:
// show_
// HadronCascade_(id, nshtot_, zero, iCEmode);
// SolveMomentEquations_(zero);
// and a new "ini" function
corsika::process::EProcessReturn CONEXSourceCut::DoSecondaries(
corsika::setup::StackView& vS) {
......@@ -95,13 +89,14 @@ void CONEXSourceCut::Init() {}
void CONEXSourceCut::SolveCE() {
int zero = 0;
int iCEmode = 1;
int id =0; // RU
HadronCascade_(id, nshtot_, zero, iCEmode);
SolveMomentEquations_(zero);
int id =0; // RU: max, fix this
int nshtot_ = 0;//RU: max, fix this
conex::hadroncascade_(id, nshtot_, zero, iCEmode);
conex::solvemomentequations_(zero);
// RU: this here is from cxroot,
const int nX = get_number_of_depth_bins_(); // make sure this works!
const int nX = conex::get_number_of_depth_bins_(); // make sure this works!
int icut = 1;
int icutg = 2;
......@@ -115,20 +110,13 @@ void CONEXSourceCut::SolveCE() {
Mu[maxX], dMu[maxX], Gamma[maxX], Electrons[maxX], Hadrons[maxX],
EGround[3], fitpars[13], currlgE, Xmx, Nmx, XmxdEdX, dEdXmx ;
get_shower_data_(icut, iSec, nX, X[0], N[0], fitpars[0], H[0], D[0]);
get_shower_edep_(icut, nX, dEdX[0], EGround[0]);
get_shower_muon_(icutm, nX, Mu[0], dMu[0]);
get_shower_gamma_(icutg, nX, Gamma[0]);
get_shower_electron_(icute, nX, Electrons[0]);
get_shower_hadron_(icuth, nX, Hadrons[0]);
conex::get_shower_data_(icut, iSec, nX, X[0], N[0], fitpars[0], H[0], D[0]);
conex::get_shower_edep_(icut, nX, dEdX[0], EGround[0]);
conex::get_shower_muon_(icutm, nX, Mu[0], dMu[0]);
conex::get_shower_gamma_(icutg, nX, Gamma[0]);
conex::get_shower_electron_(icute, nX, Electrons[0]);
conex::get_shower_hadron_(icuth, nX, Hadrons[0]);
/*fConexInterface->GetShowerData(icut, iSec, nX, X[0], N[0], fitpars[0], H[0], D[0]);
fConexInterface->GetdEdXProfile(icut, nX, dEdX[0], EGround[0]);
fConexInterface->GetMuonProfile(icutm, nX, Mu[0], dMu[0]);
fConexInterface->GetGammaProfile(icutg, nX, Gamma[0]);
fConexInterface->GetElectronProfile(icute, nX, Electrons[0]);
fConexInterface->GetHadronProfile(icuth, nX, Hadrons[0]);
*/
}
// RU: move all the non-C8 code from the following c++ function into a new file. Here we only want to have a single function call to CONEX left.
......
......@@ -23,45 +23,26 @@
namespace conex {
extern "C" {
extern struct {
double eecut;
double epcut;
double ehcut;
double emcut;
} cxcut_;
// ipart,energy,theta,phi,dimpact,ioseed
void conexrun_(int& ipart, double& energy, double& theta, double& phi, double& dimpact,
int ioseed[3]);
void conexcascade_();
void hadroncascade_(int&, int&, int&, int&);
void solvemomentequations_(int&);
void show_(int& iqi, double& ei, double& xmi, double& ymi, double& zmi, double& dmi,
double& xi, double& yi, double& zi, double& tmi, double& ui, double& vi,
double& wi, int& iri, double& wti, int& latchi);
extern struct {
double feecut_;
double fehcut_;
double femcut_;
} cxsubcut_;
int get_number_of_depth_bins_();
extern struct {
double eprima_;
double thetas_;
double costhet_;
double phisho_;
int muse;
int musz;
double c2bas;
double sinthet;
double sinphi;
double XminSlant;
double HGrd;
double distMaxi;
} cxbas4_;
// ipart,energy,theta,phi,dimpact,ioseed
void conexrun_(int& ipart, double& energy, double& theta, double& phi, double& dimpact,
int ioseed[3]);
void conexcascade_();
void hadroncascade_(int&, int&, int&, int&);
void solvemomentequations_(int&);
void show_(int& iqi, double& ei, double& xmi, double& ymi, double& zmi, double& dmi,
double& xi, double& yi, double& zi, double& tmi, double& ui, double& vi,
double& wi, int& iri, double& wti, int& latchi);
void get_shower_data_(const int&, const int&, const int&, float&, float&,
float&, float&, float&);
void get_shower_edep_(const int&, const int&, float&, float&);
void get_shower_muon_(const int&, const int&, float&, float&);
void get_shower_gamma_(const int&, const int&, float&);
void get_shower_electron_(const int&, const int&, float&);
void get_shower_hadron_(const int&, const int&, float&);
}
corsika::units::si::LengthType constexpr earthRadius{6371315 *
corsika::units::si::meter};
} // namespace conex
......
......@@ -257,7 +257,7 @@ else ()
GIT_REPOSITORY https://gitlab.ikp.kit.edu/AirShowerPhysics/cxroot.git
GIT_SUBMODULES ""
GIT_TAG origin/master
GIT_SHALLOW 1
GIT_SHALLOW 5
GIT_PROGRESS 1
SOURCE_DIR ${CMAKE_CURRENT_BINARY_DIR}/cxroot/source
INSTALL_DIR ${CMAKE_CURRENT_BINARY_DIR}/cxroot/source
......
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