246 #ifdef INCLXX_IN_GEANT4_MODE
249 ed <<
" Data missing: set environment variable G4INCLDATA\n"
250 <<
" to point to the directory containing data files needed\n"
251 <<
" by the INCL++ model" <<
G4endl;
252 G4Exception(
"G4INCLDataFile::readData()",
"rawppbarFS.dat, ...",
256 G4String dataPathppbar(dataPath0 +
"/rawppbarFS.dat");
257 G4String dataPathnpbar(dataPath0 +
"/rawnpbarFS.dat");
258 G4String dataPathppbark(dataPath0 +
"/rawppbarFSkaonic.dat");
259 G4String dataPathnpbark(dataPath0 +
"/rawnpbarFSkaonic.dat");
265 std::string dataPathppbar(path +
"/rawppbarFS.dat");
266 INCL_DEBUG(
"Reading https://doi.org/10.1016/0375-9474(92)90362-N ppbar final states" << dataPathppbar <<
'\n');
267 std::string dataPathnpbar(path +
"/rawnpbarFS.dat");
268 INCL_DEBUG(
"Reading https://doi.org/10.1016/0375-9474(92)90362-N npbar final states" << dataPathnpbar <<
'\n');
269 std::string dataPathppbark(path +
"/rawppbarFSkaonic.dat");
270 INCL_DEBUG(
"Reading https://doi.org/10.1016/j.physrep.2005.03.002 ppbar kaonic final states" << dataPathppbark <<
'\n');
271 std::string dataPathnpbark(path +
"/rawnpbarFSkaonic.dat");
272 INCL_DEBUG(
"Reading https://doi.org/10.1007/BF02818764 and https://link.springer.com/article/10.1007/BF02754930 npbar kaonic final states" << dataPathnpbark <<
'\n');
285 std::vector<G4double> probabilities;
286 std::vector<std::vector<std::string>> particle_types;
294 if(isProton ==
true){z++;}
301 if(isProton ==
true){
303 if(rdm < (1.-kaonicFSprob)){
304 INCL_DEBUG(
"pionic pp final state chosen" <<
'\n');
305 sum =
read_file(dataPathppbar, probabilities, particle_types);
306 rdm = (rdm/(1.-kaonicFSprob))*sum;
309 if ( n < 0 )
return starlist;
310 for(
G4int j = 0; j < static_cast<G4int>(particle_types[n].size()); j++){
311 if(particle_types[n][j] ==
"pi0"){
313 starlist.push_back(p);
315 else if(particle_types[n][j] ==
"pi-"){
317 starlist.push_back(p);
319 else if(particle_types[n][j] ==
"pi+"){
321 starlist.push_back(p);
323 else if(particle_types[n][j] ==
"omega"){
325 starlist.push_back(p);
327 else if(particle_types[n][j] ==
"eta"){
329 starlist.push_back(p);
331 else if(particle_types[n][j] ==
"rho-"){
333 starlist.push_back(p);
335 starlist.push_back(pp);
337 else if(particle_types[n][j] ==
"rho+"){
339 starlist.push_back(p);
341 starlist.push_back(pp);
343 else if(particle_types[n][j] ==
"rho0"){
345 starlist.push_back(p);
347 starlist.push_back(pp);
350 INCL_ERROR(
"Some non-existing FS particle detected when reading pbar FS files");
351 for(
G4int jj = 0; jj < static_cast<G4int>(particle_types[n].size()); jj++){
352 std::cout <<
"gotcha! " << particle_types[n][jj] << std::endl;
354 std::cout <<
"Some non-existing FS particle detected when reading pbar FS files" << std::endl;
359 INCL_DEBUG(
"kaonic pp final state chosen" <<
'\n');
360 sum =
read_file(dataPathppbark, probabilities, particle_types);
361 rdm = ((1-rdm)/kaonicFSprob)*sum;
364 if ( n < 0 )
return starlist;
365 for(
G4int j = 0; j < static_cast<G4int>(particle_types[n].size()); j++){
366 if(particle_types[n][j] ==
"pi0"){
368 starlist.push_back(p);
370 else if(particle_types[n][j] ==
"pi-"){
372 starlist.push_back(p);
374 else if(particle_types[n][j] ==
"pi+"){
376 starlist.push_back(p);
378 else if(particle_types[n][j] ==
"omega"){
380 starlist.push_back(p);
382 else if(particle_types[n][j] ==
"eta"){
384 starlist.push_back(p);
386 else if(particle_types[n][j] ==
"K-"){
388 starlist.push_back(p);
390 else if(particle_types[n][j] ==
"K+"){
392 starlist.push_back(p);
394 else if(particle_types[n][j] ==
"K0"){
396 starlist.push_back(p);
398 else if(particle_types[n][j] ==
"K0b"){
400 starlist.push_back(p);
403 INCL_ERROR(
"Some non-existing FS particle detected when reading pbar FS files");
404 for(
G4int jj = 0; jj < static_cast<G4int>(particle_types[n].size()); jj++){
405 std::cout <<
"gotcha! " << particle_types[n][jj] << std::endl;
407 std::cout <<
"Some non-existing FS particle detected when reading pbar FS files" << std::endl;
414 if(rdm < (1.-kaonicFSprob)){
415 INCL_DEBUG(
"pionic np final state chosen" <<
'\n');
416 sum =
read_file(dataPathnpbar, probabilities, particle_types);
417 rdm = (rdm/(1.-kaonicFSprob))*sum;
420 if ( n < 0 )
return starlist;
421 for(
G4int j = 0; j < static_cast<G4int>(particle_types[n].size()); j++){
422 if(particle_types[n][j] ==
"pi0"){
424 starlist.push_back(p);
426 else if(particle_types[n][j] ==
"pi-"){
428 starlist.push_back(p);
430 else if(particle_types[n][j] ==
"pi+"){
432 starlist.push_back(p);
434 else if(particle_types[n][j] ==
"omega"){
436 starlist.push_back(p);
438 else if(particle_types[n][j] ==
"eta"){
440 starlist.push_back(p);
442 else if(particle_types[n][j] ==
"rho-"){
444 starlist.push_back(p);
446 starlist.push_back(pp);
448 else if(particle_types[n][j] ==
"rho+"){
450 starlist.push_back(p);
452 starlist.push_back(pp);
454 else if(particle_types[n][j] ==
"rho0"){
456 starlist.push_back(p);
458 starlist.push_back(pp);
461 INCL_ERROR(
"Some non-existing FS particle detected when reading pbar FS files");
462 for(
G4int jj = 0; jj < static_cast<G4int>(particle_types[n].size()); jj++){
463 std::cout <<
"gotcha! " << particle_types[n][jj] << std::endl;
465 std::cout <<
"Some non-existing FS particle detected when reading pbar FS files" << std::endl;
470 INCL_DEBUG(
"kaonic np final state chosen" <<
'\n');
471 sum =
read_file(dataPathnpbark, probabilities, particle_types);
472 rdm = ((1-rdm)/kaonicFSprob)*sum;
475 if ( n < 0 )
return starlist;
476 for(
G4int j = 0; j < static_cast<G4int>(particle_types[n].size()); j++){
477 if(particle_types[n][j] ==
"pi0"){
479 starlist.push_back(p);
481 else if(particle_types[n][j] ==
"pi-"){
483 starlist.push_back(p);
485 else if(particle_types[n][j] ==
"pi+"){
487 starlist.push_back(p);
489 else if(particle_types[n][j] ==
"omega"){
491 starlist.push_back(p);
493 else if(particle_types[n][j] ==
"eta"){
495 starlist.push_back(p);
497 else if(particle_types[n][j] ==
"K-"){
499 starlist.push_back(p);
501 else if(particle_types[n][j] ==
"K+"){
503 starlist.push_back(p);
505 else if(particle_types[n][j] ==
"K0"){
507 starlist.push_back(p);
509 else if(particle_types[n][j] ==
"K0b"){
511 starlist.push_back(p);
514 INCL_ERROR(
"Some non-existing FS particle detected when reading pbar FS files");
515 for(
G4int jj = 0; jj < static_cast<G4int>(particle_types[n].size()); jj++){
516 std::cout <<
"gotcha! " << particle_types[n][jj] << std::endl;
518 std::cout <<
"Some non-existing FS particle detected when reading pbar FS files" << std::endl;
528 if(isProton ==
true){
538 if(starlist.size() < 2){
539 INCL_ERROR(
"should never happen, at least 2 final state particles!" <<
'\n');
541 else if(starlist.size() == 2){
546 G4double s = energyOfMesonStar*energyOfMesonStar;
547 G4double mom1 = std::sqrt(s/4 - (std::pow(m1,2) + std::pow(m2,2))/2 - std::pow(m1,2)*std::pow(m2,2)/s + (std::pow(m1,4) + 2*std::pow(m1*m2,2) + std::pow(m2,4))/(4*s));
549 (*first)->setMomentum(momentello);
550 (*first)->adjustEnergyFromMomentum();
551 (*last)->setMomentum(-momentello);
552 (*last)->adjustEnergyFromMomentum();