65 Initialise(0,
"",
"",
"",1.*
keV,0.1*
GeV,200,
MeV,
barn,6,92);
81 : interpolation(algorithm), eMin(minE), eMax(maxE), nBins(bins),
82 unit1(unitE), unit2(unitData), zMin(minZ), zMax(maxZ)
101 std::map<G4int,G4IDataSet*,std::less<G4int> >::iterator
pos;
116 for (
size_t i=0; i<
n; i++)
118 delete (*crossSections)[i];
146 nBins = numberOfBins;
160 std::map<G4int,G4IDataSet*,std::less<G4int> >::const_iterator
pos;
171 G4cout <<
"---- Data set for Z = "
175 G4cout <<
"--------------------------------------------------" <<
G4endl;
182 for (
size_t i=0; i<nZ; i++)
212 std::map<G4int,G4IDataSet*,std::less<G4int> >::iterator
pos;
225 G4int i = (*pos).first;
239 std::map<G4int,G4IDataSet*,std::less<G4int> >::const_iterator
pos;
252 G4cout <<
"WARNING: G4PixeCrossSectionHandler::FindValue(Z,e) did not find Z = "
259 G4int shellIndex)
const
263 std::map<G4int,G4IDataSet*,std::less<G4int> >::const_iterator
pos;
275 if(shellIndex < nComponents)
280 G4cout <<
"WARNING: G4PixeCrossSectionHandler::FindValue(Z,e,shell) did not find"
281 <<
" shellIndex= " << shellIndex
291 G4cout <<
"WARNING: G4PixeCrossSectionHandler::FindValue did not find Z = "
307 for (
G4int i=0 ; i<nElements ; i++)
311 G4double nAtomsVol = nAtomsPerVolume[i];
312 value += nAtomsVol * elementValue;
415 energyVector.push_back(std::pow(10., std::log10(
eMin)+i*dBin));
420 std::vector<G4IDataSet*>::iterator
mat;
438 G4Exception(
"G4PixeCrossSectionHandler::BuildForMaterials",
441 ", crossSections = 0");
465 size_t materialIndex = material->
GetIndex();
467 G4IDataSet* materialSet = (*crossSections)[materialIndex];
468 G4double materialCrossSection0 = 0.0;
471 for (
G4int i=0; i < nElements; i++ )
474 materialCrossSection0 += cr;
475 cross.push_back(materialCrossSection0);
480 for (
G4int k=0 ;
k < nElements ;
k++ )
482 if (random <= cross[
k])
return (
G4int) (*elementVector)[
k]->GetZ();
552 std::map<G4int,G4IDataSet*,std::less<G4int> >::const_iterator
pos;
558 if (pos !=
dataMap.end()) dataSet = (*pos).second;
561 for (
size_t i=0; i<nShells; i++)
564 if (shellDataSet != 0)
568 if (random <= partialSum)
return i;
578 if (materialTable == 0)
579 G4Exception(
"G4PixeCrossSectionHandler::ActiveElements",
582 "no MaterialTable found");
592 for (
G4int iEl=0; iEl<nElements; iEl++)
594 G4Element* element = (*elementVector)[iEl];
614 std::map<G4int,G4IDataSet*,std::less<G4int> >::const_iterator
pos;
623 G4cout <<
"WARNING: G4PixeCrossSectionHandler::NumberOfComponents did not "
631 std::vector<G4IDataSet*>*
637 std::vector<G4IDataSet*>* matCrossSections =
new std::vector<G4IDataSet*>;
642 size_t nOfBins = energyVector.size();
646 if (materialTable == 0)
647 G4Exception(
"G4PixeCrossSectionHandler::BuildCrossSectionsForMaterials",
650 "no MaterialTable found");
665 for (
G4int i=0; i<nElements; i++) {
668 G4double density = nAtomsPerVolume[i];
677 energies->push_back(e);
680 data->push_back(cross);
688 matCrossSections->push_back(setForMat);
690 return matCrossSections;
711 G4double gamma = energy / particleMass;
712 G4double beta2 = 1. - 1. / (gamma * gamma);
718 if ( tMax > deltaCut )
720 var = deltaCut / tMax;
721 cross = (1. - var * (1. - beta2 * std::log(var))) / deltaCut;
728 cross += 0.5 * (tMax - deltaCut) / (energy*energy);
731 else if (spin > 0.9 )
733 cross += -std::log(var) / (3.*deltaCut) + (tMax-deltaCut) *
734 ((5.+1./var)*0.25 /(energy*energy) - beta2 / (tMax*deltaCut))/3.;