78 upperLimit ( 1000.0 *
TeV ), lowerLimit ( 5.0 *
GeV ), maxA(240)
80 theCrossSectionIndex.clear();
100 G4cout <<
"G4DPMJET2_5CrossSection::~G4DPMJET2_5CrossSection" <<
G4endl;
101 G4cout <<
"Size: " << theCrossSectionIndex.size() <<
G4endl;
142 ZZ =
G4double( (*isoVector)[i]->GetZ() );
143 AA =
G4double( (*isoVector)[i]->GetN() );
145 }
while (result && ++i < nIso);
160 }
while (result && ++i < nIso);
162 G4cout <<
"G4DPMJET2_5CrossSection::IsApplicable E(GeV)= "
176 G4bool result = EPN >= lowerLimit && EPN <= upperLimit &&
177 AT >= ATmin && AT <= ATmax &&
178 AP >= APmin && AP <= APmax;
200 if (AT < ATmin || AT > ATmax || AP < APmin || AP > APmax ||
201 EPN < lowerLimit || EPN > upperLimit)
204 G4cout <<
"ERROR IN G4DPMJET2_5CrossSection::GetIsoZACrossSection" <<
G4endl;
205 G4cout <<
"ATTEMPT TO USE CROSS-SECTION OUTSIDE OF RANGE" <<
G4endl;
206 G4cout <<
"NUCLEON NUMBER OF PROJECTILE = " <<AP <<
G4endl;
209 G4cout <<
"ACCEPTABLE RANGE FOR AP = " <<APmin
210 <<
" TO " <<APmax <<
G4endl;
211 G4cout <<
"ACCEPTABLE RANGE FOR AT = " <<ATmin
212 <<
" TO " <<ATmax <<
G4endl;
213 G4cout <<
"ACCEPTABLE RANGE FOR ENERGY = " <<lowerLimit
214 <<
" MeV/n TO " <<upperLimit
225 if ( AT == 1 )
return 0.0;
236 ->
GetIonMass(static_cast<G4int>(ZZ), static_cast<G4int>(AT));
239 G4double lnECM = std::log(std::sqrt(mP*mP + mT*mT + 2.0*mT*EP));
240 G4DPMJET2_5CrossSectionIndex::iterator it = theCrossSectionIndex.find(AT);
241 if (it != theCrossSectionIndex.end())
247 sigma = cc0 + cc1*lnECM + cc2*lnECM*lnECM;
250 G4cout <<
"***************************************************************"
252 G4cout <<
"G4DPMJET2_5CrossSection::GetIsoZACrossSection" <<
G4endl;
255 G4cout <<
"TARGET (A,Z) = (" <<AA <<
"," <<ZZ <<
")" <<
G4endl;
257 G4cout <<
"CROSS SECTION = " <<sigma/millibarn <<
" MILLIBARNS" <<
G4endl;
258 G4cout <<
"***************************************************************"
265 G4cout <<
"ERROR IN G4DPMJET2_5CrossSection::GetIsoZACrossSection" <<
G4endl;
266 G4cout <<
"NO CROSS-SECTION FIT DATA LOADED FOR AT = " <<AT <<
G4endl;
300 for (
G4int i = 0; i < nIso; i++) {
301 ZZ =
G4double( (*isoVector)[i]->GetZ() );
302 AA =
G4double( (*isoVector)[i]->GetN() );
304 xsection += sig*abundVector[i];
318 for (
G4int i = 0; i < nIso; i++) {
331 G4cout <<
"***************************************************************"
333 G4cout <<
"G4DPMJET2_5CrossSection::GetCrossSection" <<
G4endl;
338 G4cout <<
"CROSS SECTION = " <<xsection/millibarn <<
" MILLIBARNS" <<
G4endl;
339 G4cout <<
"***************************************************************"
347 void G4DPMJET2_5CrossSection::Initialise ()
357 if ( !getenv(
"G4DPMJET2_5DATA") )
359 G4cout <<
"ENVIRONMENT VARIABLE G4DPMJET2_5DATA NOT SET " <<
G4endl;
361 "Please setenv G4DPMJET2_5DATA to point to the dpmjet2.5 data files.");
365 "GlauberCrossSections.dat";
367 std::ifstream glauberXSFile(filename);
374 glauberXSFile >>APmin >>APmax >>ATmin >>ATmax;
383 G4ElementTable::const_iterator it;
384 for (it=theElementTable->begin(); it!=theElementTable->end(); it++)
386 G4int nIso = (*it)->GetNumberOfIsotopes();
394 for (
G4int i = 0; i < nIso; i++)
396 G4int AA = (*isoVector)[i]->GetN();
397 if (theCrossSectionIndex.count(AA) == 0 && AA >= ATmin && AA <= ATmax)
407 theCrossSectionIndex.insert(
408 G4DPMJET2_5CrossSectionIndex::value_type(AA,a));
420 for (
G4int i = 0; i < nIso; i++) {
422 if (theCrossSectionIndex.count(AA) == 0 && AA >= ATmin && AA <= ATmax)
426 theCrossSectionIndex.insert(
427 G4DPMJET2_5CrossSectionIndex::value_type(AA,a));
438 char inputChars[80]={
' '};
440 while (-glauberXSFile.getline(inputChars, 80).eof() != EOF)
442 inputLine = inputChars;
443 if (inputLine.length() != 0)
445 std::istringstream tmpStream(inputLine);
448 tmpStream >>AP >>AT >>cc0 >>cc1 >>cc2;
449 G4DPMJET2_5CrossSectionIndex::iterator it = theCrossSectionIndex.find(AT);
450 if (it != theCrossSectionIndex.end())
458 glauberXSFile.close();
459 G4cout <<
"G4DPMJET2_5CrossSection::Initialise () done!" <<
G4endl;
462 G4cout <<
"GlauberCrossSections.dat DOES NOT EXIST" <<
G4endl;
464 "GlauberCrossSections.dat should be located in $G4DPMJET2_5DATA directory.");
478 G4cout <<
"G4DPMJET2_5CrossSection::DumpPhysicsTable" <<
G4endl;
479 G4cout <<
"DUMPING CROSS-SECTION FITTING COEFFICIENTS FOR AP = "
487 G4DPMJET2_5CrossSectionIndex::iterator it;
488 for (it=theCrossSectionIndex.begin(); it!=theCrossSectionIndex.end(); it++)
490 G4cout.unsetf(std::ios::scientific);
493 G4cout <<std::setw(5) <<it->first;
495 G4cout.unsetf(std::ios::fixed);
499 G4cout <<std::setw(15) <<(*ptr)[0]
500 <<std::setw(15) <<(*ptr)[1]
501 <<std::setw(15) <<(*ptr)[2]
504 G4cout.setf(std::ios::fixed);