79 MeanFreePath = (*theMeanFreePathTable)(aMaterial->
GetIndex())->
80 GetValue(kineticEnergy, isOutRange);
90 char* path = std::getenv(
"G4LEDATA");
95 "variable G4LEDATA not defined");
111 std::vector<G4Material*>::const_iterator matite;
112 for( matite = materialTable->begin(); matite != materialTable->end(); matite++ ) {
117 std::string dirName = std::string(path) +
"/lepts/";
118 std::string fnParam = dirName + mateName +
"." + aParticleName +
".param.dat";
119 std::string baseName = std::string(path) +
"/lepts/" + mateName +
"." + aParticleName;
121 if( !bData )
continue;
124 std::string fnIXS = baseName +
".IXS.dat";
126 std::map< G4int, std::vector<G4double> > integralXS =
ReadIXS(fnIXS, aMaterial);
129 if( integralXS.size() == 0 ) {
130 G4cerr <<
" Integral cross sections will be set to 0. for material " << mateName <<
G4endl;
135 unsigned int matIdx = aMaterial->
GetIndex();
141 std::map< G4int, std::vector<G4double> >::const_iterator itei;
142 for( itei = integralXS.begin(); itei != integralXS.end(); itei++ ){
149 std::string fnDXS = baseName +
".DXS.dat";
150 std::string fnRMT = baseName +
".RMT.dat";
151 std::string fnEloss = baseName +
".Eloss.dat";
152 std::string fnEloss2 = baseName +
".Eloss2.dat";
155 if( !
theDiffXS[aMaterial]->IsFileFound() ) {
159 (
G4String(
"File not found :" + fnDXS).c_str()));
170 (
G4String(
"File not found :" + fnEloss).c_str()));
183 unsigned int matIdx = aMaterial->
GetIndex();
203 if(eVEnergy < integralXS[0][1] ) {
210 if( eVEnergy > integralXS[0][jj]) {
216 aa = integralXS[0][Bin];
217 bb = integralXS[0][Bin+1];
223 SIGMA = NbOfMoleculesPerVolume * crossSection;
225 <<
" Bin " << Bin <<
" TOTAL " << aa <<
" " << bb
248 x =
theDiffXS[aMaterial]->SampleAngleMT(e, el);
254 G4double Pi = std::sqrt( std::pow( (Ei/27.2/137),2) +2*Ei/27.2);
255 G4double Pd = std::sqrt( std::pow( (Ed/27.2/137),2) +2*Ed/27.2);
262 G4double co = (Pi*Pi + Pd*Pd - KR*KR) / (2*Pi*Pd);
263 if( co > 1. ) co = 1.;
275 G4double sinTeta = std::sqrt(1.0-cosTeta*cosTeta);
277 G4double dirx = sinTeta*std::cos(Phi) , diry = sinTeta*std::sin(Phi) , dirz = cosTeta ;
296 G4double sinTeta = std::sqrt(1.0-cosTeta*cosTeta);
298 G4double dirx = sinTeta*std::cos(Phi) , diry = sinTeta*std::sin(Phi) , dirz = cosTeta ;
324 std::ifstream
fin(fnParam);
325 if (!fin.is_open()) {
329 (
G4String(
"File not found: ")+ fnParam).c_str());
335 fin >> IonisPot >> IonisPotInt;
336 if(
verboseLevel >= 1 )
G4cout <<
"Read param (" << fnParam <<
")\t IonisPot: " << IonisPot
337 <<
" IonisPotInt: " << IonisPotInt <<
G4endl;
345 for(
size_t ii = 0; ii < nelem; ii++ ) {
354 <<
" IonisPotInt: " << IonisPotInt/CLHEP::eV <<
" eV"
363 std::map< G4int, std::vector<G4double> > integralXS;
366 std::ifstream
fin(fnIXS);
367 if (!fin.is_open()) {
371 (
G4String(
"File not found: ")+ fnIXS).c_str());
375 G4int nXSdat, nXSsub;
376 fin >> nXSdat >> nXSsub;
378 <<
" nXSsub: " << nXSsub <<
G4endl;
383 for (
G4int ip=0; ip<=nXSsub; ip++) {
384 integralXS[ip].push_back(0.);
386 for (
G4int ie=1; ie<=nXSdat; ie++) {
387 for (
G4int ip=0; ip<=nXSsub; ip++) {
389 integralXS[ip].push_back(xsdat);