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;
126 result = (EPN >= lowerLimit && EPN <= upperLimit &&
127 AT >= ATmin && AT <= ATmax &&
128 AP >= APmin && AP <= APmax);
153 if (AT < ATmin || AT > ATmax || AP < APmin || AP > APmax ||
154 EPN < lowerLimit || EPN > upperLimit)
157 G4cout <<
"ERROR IN G4DPMJET2_5CrossSection::GetIsoZACrossSection" <<
G4endl;
158 G4cout <<
"ATTEMPT TO USE CROSS-SECTION OUTSIDE OF RANGE" <<
G4endl;
159 G4cout <<
"NUCLEON NUMBER OF PROJECTILE = " <<AP <<
G4endl;
162 G4cout <<
"ACCEPTABLE RANGE FOR AP = " <<APmin
163 <<
" TO " <<APmax <<
G4endl;
164 G4cout <<
"ACCEPTABLE RANGE FOR AT = " <<ATmin
165 <<
" TO " <<ATmax <<
G4endl;
166 G4cout <<
"ACCEPTABLE RANGE FOR ENERGY = " <<lowerLimit
167 <<
" MeV/n TO " <<upperLimit
178 if ( AT == 1 )
return 0.0;
190 G4double lnECM = std::log(std::sqrt(mP*mP + mT*mT + 2.0*mT*EP));
191 G4DPMJET2_5CrossSectionIndex::iterator it = theCrossSectionIndex.find(AT);
192 if (it != theCrossSectionIndex.end())
198 sigma = cc0 + cc1*lnECM + cc2*lnECM*lnECM;
201 G4cout <<
"***************************************************************"
203 G4cout <<
"G4DPMJET2_5CrossSection::GetIsoCrossSection" <<
G4endl;
206 G4cout <<
"TARGET (A,Z) = (" <<AT <<
"," <<ZZ <<
")" <<
G4endl;
208 G4cout <<
"CROSS SECTION = " <<sigma/millibarn <<
" MILLIBARNS" <<
G4endl;
209 G4cout <<
"***************************************************************"
216 G4cout <<
"ERROR IN G4DPMJET2_5CrossSection::GetIsoCrossSection" <<
G4endl;
217 G4cout <<
"NO CROSS-SECTION FIT DATA LOADED FOR AT = " <<AT <<
G4endl;
225 void G4DPMJET2_5CrossSection::Initialise ()
233 if ( !getenv(
"G4DPMJET2_5DATA") )
235 G4cout <<
"ENVIRONMENT VARIABLE G4DPMJET2_5DATA NOT SET " <<
G4endl;
237 "Please setenv G4DPMJET2_5DATA to point to the dpmjet2.5 data files.");
241 "GlauberCrossSections.dat";
243 std::ifstream glauberXSFile(filename);
250 glauberXSFile >>APmin >>APmax >>ATmin >>ATmax;
259 G4ElementTable::const_iterator it;
260 for (it=theElementTable->begin(); it!=theElementTable->end(); it++)
262 G4int nIso = (*it)->GetNumberOfIsotopes();
264 for (
G4int i = 0; i < nIso; i++)
266 G4int AA = (*isoVector)[i]->GetN();
267 if (theCrossSectionIndex.count(AA) == 0 &&
268 AA >= ATmin && AA <= ATmax)
278 theCrossSectionIndex.insert(
279 G4DPMJET2_5CrossSectionIndex::value_type(AA,a));
290 char inputChars[80]={
' '};
292 while (-glauberXSFile.getline(inputChars, 80).eof() != EOF)
294 inputLine = inputChars;
295 if (inputLine.length() != 0)
297 std::istringstream tmpStream(inputLine);
300 tmpStream >>AP >>AT >>cc0 >>cc1 >>cc2;
301 G4DPMJET2_5CrossSectionIndex::iterator
IT =
302 theCrossSectionIndex.find(AT);
303 if (IT != theCrossSectionIndex.end())
311 glauberXSFile.close();
312 G4cout <<
"G4DPMJET2_5CrossSection::Initialise () done!" <<
G4endl;
314 G4cout <<
"GlauberCrossSections.dat DOES NOT EXIST" <<
G4endl;
316 "GlauberCrossSections.dat should be located in $G4DPMJET2_5DATA directory.");
330 G4cout <<
"G4DPMJET2_5CrossSection::DumpPhysicsTable" <<
G4endl;
331 G4cout <<
"DUMPING CROSS-SECTION FITTING COEFFICIENTS FOR AP = "
339 G4DPMJET2_5CrossSectionIndex::iterator it;
340 for (it=theCrossSectionIndex.begin(); it!=theCrossSectionIndex.end(); it++)
342 G4cout.unsetf(std::ios::scientific);
345 G4cout <<std::setw(5) <<it->first;
347 G4cout.unsetf(std::ios::fixed);
351 G4cout <<std::setw(15) <<(*ptr)[0]
352 <<std::setw(15) <<(*ptr)[1]
353 <<std::setw(15) <<(*ptr)[2]
356 G4cout.setf(std::ios::fixed);
static G4double GetNuclearMass(const G4double A, const G4double Z)
std::vector< G4Isotope * > G4IsotopeVector
G4double GetKineticEnergy() const
G4double GetTotalEnergy() const
virtual void BuildPhysicsTable(const G4ParticleDefinition &)
virtual G4bool IsIsoApplicable(const G4DynamicParticle *theProjectile, G4int ZZ, G4int AA, const G4Element *elm=0, const G4Material *mat=0)
G4ParticleDefinition * GetDefinition() const
const G4String & GetParticleName() const
G4GLOB_DLL std::ostream G4cout
virtual ~G4DPMJET2_5CrossSection()
virtual void DumpPhysicsTable(const G4ParticleDefinition &)
G4DPMJET2_5CrossSection()
G4double GetPDGMass() const
std::vector< G4Element * > G4ElementTable
static G4ElementTable * GetElementTable()
Definition of the G4DPMJET2_5CrossSection class.
G4int GetBaryonNumber() const
virtual G4double GetIsoCrossSection(const G4DynamicParticle *theProjectile, G4int ZZ, G4int AA, const G4Isotope *, const G4Element *elm=0, const G4Material *mat=0)