104 if (GetVerboseLevel()>0) {
105 G4cout <<
"G4DPMJET2_5Model default constructor" <<
G4endl;
113 PrintWelcomeMessage();
117 theExcitationHandler = 0;
118 SetDefaultPreCompoundModel();
146 theGlauberDataSetHandler->SetMaxGlauberDataSets(-1);
149 theIonTable = const_cast <
G4IonTable *> (theParticleTable->GetIonTable());
179 theInitType = initType;
180 PrintWelcomeMessage();
184 theExcitationHandler = 0;
247 theInitType = initType;
248 PrintWelcomeMessage();
252 theExcitationHandler = aExcitationHandler;
315 theInitType = initType;
316 PrintWelcomeMessage();
320 theExcitationHandler = 0;
321 thePreComp = aPreComp;
366 if (theExcitationHandler)
delete theExcitationHandler;
367 if (thePreComp)
delete thePreComp;
392 if (AP >= 2 && ZP >= 1 && AT >= 2 && ZT >=1) {
465 G4cout <<
"########################################"
466 <<
"########################################"
471 G4cout <<
"Initial projectile (A,Z) = (" <<AP <<
", " <<ZP <<
")" <<
G4endl;
472 G4cout <<
"Initial target (A,Z) = (" <<AT <<
", " <<ZT <<
")" <<
G4endl;
497 if (AP1 > 1 && AP1 == ZP1) {
502 G4cout <<
"PROJECTILE WITH AP = " <<AP1 <<
" == ZP = " <<ZP1
504 G4cout <<
"########################################"
505 <<
"########################################"
536 G4double ppn = std::sqrt((epn-mpn)*(epn+mpn));
562 nncms_.
umo = std::sqrt(mpn*mpn + mpnt*mpnt + 2.0*mpnt*epn);
601 if ( theInitType ==
DEFAULT ) {
610 }
else if ( theInitType ==
CORSIKA ) {
620 else if ( theInitType ==
DPM2_5 ) {
630 else if ( theInitType ==
DPM3 ) {
726 G4cout <<
"REJECTED KKINC EVENT. RETRY # = " <<evtcnt <<
G4endl;
735 kkinc_ (&epn, &AT1, &ZT1, &AP1, &ZP1, &iiipro, &kkmat, &iiitar, &nhkkh1,
740 }
while (irej == 1 && ++evtcnt <100);
743 theGlauberDataSetHandler->ResetCurrentGlauberDataSet();
750 theParticleChange.SetStatusChange(
isAlive);
753 if (verboseLevel >= 2) {
754 G4cout <<
"Event rejected and original track maintained" <<
G4endl;
755 G4cout <<
"########################################"
756 <<
"########################################"
759 return &theParticleChange;
769 if (verboseLevel >= 2) DumpVerboseInformation1 (n);
796 theParticleChange.AddSecondary (theDynamicParticle);
798 if (verboseLevel >= 2)
815 if (nucA>0 && nucZ>0) {
821 G4double ionMass = theIonTable->GetIonMass(nucZ,nucA);
824 if (dpmMass > ionMass) ionMass = dpmMass;
825 G4double et = std::sqrt(px*px + py*py + pz*pz + ionMass*ionMass);
829 if (verboseLevel >= 2)
830 DumpVerboseInformation3 (m, nucA, nucZ, lv.
vect(), et, et-ionMass, pP);
837 if (fragment && (thePreComp || theExcitationHandler))
840 if (thePreComp && fragment->
GetA() > 1.5)
841 products = thePreComp->DeExcite(*fragment);
843 products = theExcitationHandler->BreakItUp(*fragment);
846 G4ReactionProductVector::iterator iter;
847 for (iter = products->begin(); iter != products->end(); ++iter)
851 (*iter)->GetTotalEnergy(), (*iter)->GetMomentum());
852 theParticleChange.AddSecondary (secondary);
853 G4String particleName = (*iter)->GetDefinition()->GetParticleName();
855 if (verboseLevel >= 2) {
856 if (particleName.find(
"[",0) < particleName.size())
857 DumpVerboseInformation4 (m, particleName, secondary->
GetMomentum(),
859 else DumpVerboseInformation2 (particleName, secondary->
GetMomentum(),
877 theParticleChange.AddSecondary (theDynamicParticle);
885 if (verboseLevel >= 3) {
897 G4int nSecondaries = theParticleChange.GetNumberOfSecondaries();
898 for (
G4int j=0; j<nSecondaries; j++) {
899 TotalEPost += theParticleChange.GetSecondary(j)->
900 GetParticle()->GetTotalEnergy();
901 TotalPPost += theParticleChange.GetSecondary(j)->
902 GetParticle()->GetMomentum();
904 GetParticle()->GetDefinition();
910 G4cout <<
"----------------------------------------"
911 <<
"----------------------------------------"
913 G4cout <<
"Total energy before collision = " <<TotalEPre/
MeV
915 G4cout <<
"Total energy after collision = " <<TotalEPost/
MeV
917 G4cout <<
"Total momentum before collision = " <<pP/
MeV
919 G4cout <<
"Total momentum after collision = " <<TotalPPost/
MeV
921 if (verboseLevel >= 4) {
922 G4cout <<
"Total charge before collision = " <<(ZP+ZT)*
eplus
924 G4cout <<
"Total charge after collision = " <<charge
926 G4cout <<
"Total baryon number before collision = "<<AP+AT
928 G4cout <<
"Total baryon number after collision = "<<baryon
930 G4cout <<
"Total lepton number before collision = 0"
932 G4cout <<
"Total lepton number after collision = "<<lepton
935 G4cout <<
"----------------------------------------"
936 <<
"----------------------------------------"
940 if (verboseLevel >= 2)
941 G4cout <<
"########################################"
942 <<
"########################################"
945 return &theParticleChange;
963 if (theExcitationHandler)
965 delete theExcitationHandler;
966 theExcitationHandler = 0;
1041 if (filename ==
"" || filename ==
"stdo" ||
1042 filename ==
"stdout" || filename ==
"std::out" )
1044 verboseFortranFile =
"std::out";
1049 G4int namelen = filename.length();
1050 char *ptr =
new char[namelen+1];
1051 filename.copy(ptr,namelen,0);
1052 ptr[namelen] =
'\0';
1058 if (opened == LTRUE) {
1059 verboseFortranFile = filename;
1062 verboseFortranFile =
"std::out";
1071 void G4DPMJET2_5Model::PrintWelcomeMessage ()
const
1074 G4cout <<
" *****************************************************************"
1076 G4cout <<
" Interface to DPMJET2.5 for nuclear-nuclear interactions activated"
1078 G4cout <<
" Version number : 00.00.0B File date : 23/05/08" <<
G4endl;
1079 G4cout <<
" (Interface written by QinetiQ Ltd for the European Space Agency)"
1082 G4cout <<
" Initialisation of DPMJET-II.5 variables will be according to "
1084 G4cout <<
" *****************************************************************"
1097 void G4DPMJET2_5Model::DumpVerboseInformation1 (
const G4int n)
const
1099 G4cout <<
"----------------------------------------"
1100 <<
"----------------------------------------" <<
G4endl;
1101 G4cout <<n <<
" INTERMEDIATE AND FINAL-STATE SECONDARIES PRODUCED" <<
G4endl;
1104 G4cout <<
"~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"
1105 <<
"~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~" <<
G4endl;
1106 G4cout <<
"ORIGINAL DPMJET-II.5 OUTPUT FOR EVENT:" <<
G4endl;
1107 G4cout <<
"Note that (1) the particles are yet to be transformed according"
1110 G4cout <<
" (2) the units of energy, momentum and mass are GeV,"
1124 for (
G4int i=0; i<
n; i++)
1126 G4cout.unsetf(std::ios::scientific);
1129 G4cout <<std::setw(5) <<i
1134 G4cout.unsetf(std::ios::fixed);
1144 G4cout <<
"~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"
1145 <<
"~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~" <<
G4endl;
1147 G4cout.setf(std::ios::fixed);
1148 G4cout <<
" THE FOLLOWING LISTS ONLY THE FINAL-STATE SECONDARIES" <<
G4endl;
1160 void G4DPMJET2_5Model::Initialise ()
1186 for (
G4int i=0; i<50; i++)
1224 for (
G4int i=0; i<7; i++)
1230 for (
G4int i=0; i<3; i++)
1291 parpt_ (&i,&pt1,&pt2,&ipt,&nevt);
1311 if ( theInitType ==
DEFAULT ) {
1314 }
else if ( theInitType ==
CORSIKA ) {
1317 }
else if ( theInitType ==
DPM2_5 ) {
1320 }
else if ( theInitType ==
DPM3 ) {
1337 if ( theInitType ==
DEFAULT ) {
1343 }
else if ( theInitType ==
CORSIKA ) {
1349 }
else if ( theInitType ==
DPM2_5 ) {
1355 }
else if ( theInitType ==
DPM3 ) {
1374 if ( theInitType ==
DEFAULT ) {
1379 }
else if ( theInitType ==
CORSIKA ) {
1384 }
else if ( theInitType ==
DPM2_5 ) {
1389 }
else if ( theInitType ==
DPM3 ) {
1402 if ( theInitType ==
DEFAULT ) {
1404 }
else if ( theInitType ==
CORSIKA ) {
1406 }
else if ( theInitType ==
DPM2_5 ) {
1408 }
else if ( theInitType ==
DPM3 ) {
1420 if ( theInitType ==
DEFAULT ) {
1424 }
else if ( theInitType ==
CORSIKA ) {
1428 }
else if ( theInitType ==
DPM2_5 ) {
1432 }
else if ( theInitType ==
DPM3 ) {
1482 }
else if ( theInitType ==
DPM2_5 ) {
1484 }
else if ( theInitType ==
DPM3 ) {
1529 if ( theInitType ==
DEFAULT ) {
1534 }
else if ( theInitType ==
CORSIKA ) {
1539 }
else if ( theInitType ==
DPM2_5 ) {
1544 }
else if ( theInitType ==
DPM3 ) {
1607 if ( theInitType ==
DEFAULT ) {
1614 }
else if ( theInitType ==
CORSIKA ) {
1621 }
else if ( theInitType ==
DPM2_5 ) {
1628 }
else if ( theInitType ==
DPM3 ) {
1639 verboseFortranFile =
"fort.6";
1640 G4int namelen = verboseFortranFile.length();
1641 char *ptr1 =
new char[namelen+1];
1642 verboseFortranFile.copy(ptr1,namelen,0);
1643 ptr1[namelen] =
'\0';
1648 if (opened == LFALSE)
1650 G4cout <<
"ATTEMPTED TO OPEN fort.6 TO OUTPUT VERBOSE FORTRAN TEXT" <<
G4endl;
1656 G4cout <<
"AT G4DPMJET2_5Model::Initialise: before NUCLEAR.BIN" <<
G4endl;
1657 G4cout <<
"OPENING NUCLEAR.BIN ON FILE UNIT " <<lunber <<
G4endl;
1660 if ( !getenv(
"G4DPMJET2_5DATA") )
1662 G4cout <<
"ENVIRONMENT VARIABLE G4DPMJET2_5DATA NOT SET " <<
G4endl;
1664 "Please setenv G4DPMJET2_5DATA to point to the dpmjet2.5 data files.");
1666 defaultDirName =
G4String(getenv(
"G4DPMJET2_5DATA")) +
"/NUCLEAR.BIN";
1667 namelen = defaultDirName.length();
1668 ptr1 =
new char[namelen+1];
1669 defaultDirName.copy(ptr1,namelen,0);
1670 ptr1[namelen] =
'\0';
1675 if (opened == LFALSE)
1681 G4cout <<
"NUCLEAR.BIN FILE NOT FOUND IN DIRECTORY " <<defaultDirName
1684 "NUCLEAR.BIN file not present.");
1688 G4cout <<
"AT G4DPMJET2_5Model::Initialise: after NUCLEAR.BIN" <<
G4endl;
1697 G4cout <<
"AT G4DPMJET2_5Model::Initialise: before INCINI" <<
G4endl;
1702 G4cout <<
"AT G4DPMJET2_5Model::Initialise: after INCINI" <<
G4endl;
1708 G4cout <<
"AT G4DPMJET2_5Model::Initialise: NUCLEAR.BIN closed" <<
G4endl;
1724 G4cout <<
"Printout of important Parameters before DPMJET2.5" <<
G4endl;
1725 G4cout <<
"Please note for DPMJET input all numbers are floating point!" <<
G4endl;
1741 G4cout <<
"RANDOMIZ " <<iseed1 <<
" "
1745 G4cout <<
"SELHARD " <<0 <<
" "
1751 G4cout <<
"SIGMAPOM " <<0 <<
" "