IAP GITLAB

Skip to content
Snippets Groups Projects
Commit 4a0a2786 authored by Felix Riehn's avatar Felix Riehn Committed by ralfulrich
Browse files

be quiet

parent 3b9b029d
No related branches found
No related tags found
1 merge request!318Resolve "EPOS is missing"
...@@ -28,8 +28,8 @@ using SetupParticle = setup::Stack::stack_iterator_type; ...@@ -28,8 +28,8 @@ using SetupParticle = setup::Stack::stack_iterator_type;
namespace corsika::epos { namespace corsika::epos {
inline Interaction::Interaction(const std::string& dataPath) inline Interaction::Interaction(const std::string& dataPath, const bool epos_printout_on)
: data_path_(dataPath) { : data_path_(dataPath), epos_listing_(epos_printout_on) {
if (dataPath == "") { if (dataPath == "") {
if (std::getenv("CORSIKA_DATA")) { if (std::getenv("CORSIKA_DATA")) {
data_path_ = std::string(std::getenv("CORSIKA_DATA")) + "/EPOS/"; data_path_ = std::string(std::getenv("CORSIKA_DATA")) + "/EPOS/";
...@@ -52,7 +52,7 @@ namespace corsika::epos { ...@@ -52,7 +52,7 @@ namespace corsika::epos {
::epos::aaset_(iarg); ::epos::aaset_(iarg);
//::epos::atitle_(); //::epos::atitle_();
::epos::prnt1_.ish = 3; // debug level in epos ::epos::prnt1_.ish = 0; // debug level in epos
::epos::files_.ifch = 6; // output unit ::epos::files_.ifch = 6; // output unit
//::epos::prnt1_.iecho = 1; //::epos::prnt1_.iecho = 1;
...@@ -309,7 +309,9 @@ namespace corsika::epos { ...@@ -309,7 +309,9 @@ namespace corsika::epos {
::epos::aepos_(iarg); ::epos::aepos_(iarg);
::epos::afinal_(); ::epos::afinal_();
if (epos_listing_) ::epos::alistf_("EPOSLHC&");
// NSTORE-part // NSTORE-part
MomentumVector Plab_final(originalCS, {0.0_GeV, 0.0_GeV, 0.0_GeV}); MomentumVector Plab_final(originalCS, {0.0_GeV, 0.0_GeV, 0.0_GeV});
...@@ -317,31 +319,29 @@ namespace corsika::epos { ...@@ -317,31 +319,29 @@ namespace corsika::epos {
// secondaries // secondaries
EposStack es; EposStack es;
CORSIKA_LOG_DEBUG("npart: {}", es.getSize()); CORSIKA_LOG_DEBUG("EPOSLHC number of particles: {}", es.getSize());
int i=-1; // int i=-1;
for (auto& psec : es) { for (auto& psec : es) {
++i; //++i;
if (!psec.isFinal()) continue; if (!psec.isFinal()) continue;
CORSIKA_LOG_DEBUG("EPOS: i, id, energy, mass, type, state: {} {} {} {} {}", i, // CORSIKA_LOG_DEBUG("EPOS: i, id, energy, mass, type, state: {} {} {} {} {}", i,
::epos::cptl_.idptl[i], ::epos::cptl_.pptl[3][i], // ::epos::cptl_.idptl[i], ::epos::cptl_.pptl[3][i],
::epos::cptl_.pptl[4][i], ::epos::cptl_.ityptl[i], // ::epos::cptl_.pptl[4][i], ::epos::cptl_.ityptl[i],
::epos::cptl_.istptl[i]); // ::epos::cptl_.istptl[i]);
CORSIKA_LOG_DEBUG("id, energy: {} {}", psec.getPID(), psec.getEnergy()); // CORSIKA_LOG_DEBUG("id, energy: {} {}", psec.getPID(), psec.getEnergy());
int id = abs(static_cast<int>(psec.getPID())); // int id = abs(static_cast<int>(psec.getPID()));
CORSIKA_LOG_DEBUG("epos id to pdg: {}", // CORSIKA_LOG_DEBUG("epos id to pdg: {}",
::epos::idtrafo_("nxs", "pdg", id)); // ::epos::idtrafo_("nxs", "pdg", id));
auto momentum = psec.getMomentum(zAxisFrame); auto momentum = psec.getMomentum(zAxisFrame);
auto const energy = psec.getEnergy(); auto const energy = psec.getEnergy();
momentum.rebase(originalCS); // transform back into standard lab frame momentum.rebase(originalCS); // transform back into standard lab frame
auto const pid = corsika::epos::convertFromEpos(psec.getPID()); auto const pid = corsika::epos::convertFromEpos(psec.getPID());
CORSIKA_LOG_DEBUG( CORSIKA_LOG_DEBUG(
"secondary fragment> id= {}" " id= {}"
" p= {}", " p= {}",
pid, momentum.getComponents() / 1_GeV); pid, momentum.getComponents() / 1_GeV);
auto pnew = auto pnew =
......
...@@ -19,9 +19,10 @@ namespace corsika::epos { ...@@ -19,9 +19,10 @@ namespace corsika::epos {
class Interaction : public InteractionProcess<Interaction> { class Interaction : public InteractionProcess<Interaction> {
std::string data_path_; std::string data_path_;
unsigned int count_ = 0; unsigned int count_ = 0;
bool epos_listing_;
public: public:
Interaction(const std::string& dataPath = ""); Interaction(const std::string& dataPath = "", const bool epos_printout_on = false);
~Interaction(); ~Interaction();
//! returns production and elastic cross section for hadrons in epos. Inputs are: //! returns production and elastic cross section for hadrons in epos. Inputs are:
......
...@@ -44,6 +44,7 @@ namespace epos { ...@@ -44,6 +44,7 @@ namespace epos {
void ainit_(); void ainit_();
void aepos_(int&); void aepos_(int&);
void afinal_(); void afinal_();
void alistf_(char[7]);
double lhcparameters_(); double lhcparameters_();
void hdecin_(bool&); void hdecin_(bool&);
void hnbspd_(int&); void hnbspd_(int&);
......
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