55 :
G4VEmModel(nam),fParticleChange(0),fParticle(0),isInitialised(false),
56 logAtomicCrossSection(0),atomicFormFactor(0),logFormFactorTable(0),
57 pMaxTable(0),samplingTable(0),fLocalTable(false)
59 fIntrinsicLowEnergyLimit = 100.0*eV;
60 fIntrinsicHighEnergyLimit = 100.0*GeV;
83 logEnergyGridPMax.push_back(logenergy);
85 if (logenergy < logtransitionenergy)
86 logenergy += logfactor1;
88 logenergy += logfactor2;
89 logEnergyGridPMax.push_back(logenergy);
90 }
while (logenergy < logmaxenergy);
99 if (logAtomicCrossSection)
101 for (
auto& item : (*logAtomicCrossSection))
102 if (item.second)
delete item.second;
103 delete logAtomicCrossSection;
104 logAtomicCrossSection =
nullptr;
106 if (atomicFormFactor)
108 for (
auto& item : (*atomicFormFactor))
109 if (item.second)
delete item.second;
110 delete atomicFormFactor;
111 atomicFormFactor =
nullptr;
118void G4PenelopeRayleighModel::ClearTables()
127 if (logFormFactorTable)
129 for (
auto& item : (*logFormFactorTable))
130 if (item.second)
delete item.second;
131 delete logFormFactorTable;
132 logFormFactorTable =
nullptr;
137 for (
auto& item : (*pMaxTable))
138 if (item.second)
delete item.second;
145 for (
auto& item : (*samplingTable))
146 if (item.second)
delete item.second;
147 delete samplingTable;
148 samplingTable =
nullptr;
159 if (verboseLevel > 3)
160 G4cout <<
"Calling G4PenelopeRayleighModel::Initialise()" <<
G4endl;
170 if (verboseLevel > 3)
171 G4cout <<
"Calling G4PenelopeRayleighModel::Initialise() [master]" <<
G4endl;
177 if (!logAtomicCrossSection)
178 logAtomicCrossSection =
new std::map<G4int,G4PhysicsFreeVector*>;
179 if (!atomicFormFactor)
180 atomicFormFactor =
new std::map<G4int,G4PhysicsFreeVector*>;
182 if (!logFormFactorTable)
183 logFormFactorTable =
new std::map<const G4Material*,G4PhysicsFreeVector*>;
185 pMaxTable =
new std::map<const G4Material*,G4PhysicsFreeVector*>;
187 samplingTable =
new std::map<const G4Material*,G4PenelopeSamplingData*>;
201 G4int iZ = theElementVector->at(j)->GetZasInt();
203 if (!logAtomicCrossSection->count(iZ))
208 if (!logFormFactorTable->count(material))
209 BuildFormFactorTable(material);
212 if (!(samplingTable->count(material)))
213 InitializeSamplingAlgorithm(material);
216 if (!pMaxTable->count(material))
217 GetPMaxTable(material);
221 if (verboseLevel > 1) {
222 G4cout <<
"Penelope Rayleigh model v2008 is initialized " <<
G4endl
230 if(isInitialised)
return;
232 isInitialised =
true;
240 if (verboseLevel > 3)
241 G4cout <<
"Calling G4PenelopeRayleighModel::InitialiseLocal()" <<
G4endl;
254 logAtomicCrossSection = theModel->logAtomicCrossSection;
255 atomicFormFactor = theModel->atomicFormFactor;
256 logFormFactorTable = theModel->logFormFactorTable;
257 pMaxTable = theModel->pMaxTable;
258 samplingTable = theModel->samplingTable;
261 logQSquareGrid = theModel->logQSquareGrid;
264 verboseLevel = theModel->verboseLevel;
284 if (verboseLevel > 3)
285 G4cout <<
"Calling CrossSectionPerAtom() of G4PenelopeRayleighModel" <<
G4endl;
291 if (!logAtomicCrossSection)
296 logAtomicCrossSection =
new std::map<G4int,G4PhysicsFreeVector*>;
299 if (!logAtomicCrossSection->count(iZ))
303 if (verboseLevel > 0)
307 ed <<
"Unable to retrieve the cross section table for Z=" << iZ <<
G4endl;
308 ed <<
"This can happen only in Unit Tests or via G4EmCalculator" <<
G4endl;
309 G4Exception(
"G4PenelopeRayleighModel::ComputeCrossSectionPerAtom()",
324 ed <<
"Unable to find Z=" << iZ <<
" in the atomic cross section table" <<
G4endl;
325 G4Exception(
"G4PenelopeRayleighModel::ComputeCrossSectionPerAtom()",
331 cross =
G4Exp(logXS);
333 if (verboseLevel > 2)
335 G4cout <<
"Rayleigh cross section at " << energy/keV <<
" keV for Z=" << Z <<
336 " = " << cross/barn <<
" barn" <<
G4endl;
344void G4PenelopeRayleighModel::BuildFormFactorTable(
const G4Material* material)
355 std::vector<G4double> *StechiometricFactors =
new std::vector<G4double>;
356 for (
G4int i=0;i<nElements;i++)
358 G4double fraction = fractionVector[i];
359 G4double atomicWeigth = (*elementVector)[i]->GetA()/(g/mole);
360 StechiometricFactors->push_back(fraction/atomicWeigth);
363 G4double MaxStechiometricFactor = 0.;
364 for (
G4int i=0;i<nElements;i++)
366 if ((*StechiometricFactors)[i] > MaxStechiometricFactor)
367 MaxStechiometricFactor = (*StechiometricFactors)[i];
369 if (MaxStechiometricFactor<1e-16)
372 ed <<
"Inconsistent data of atomic composition for " <<
374 G4Exception(
"G4PenelopeRayleighModel::BuildFormFactorTable()",
378 for (
G4int i=0;i<nElements;i++)
379 (*StechiometricFactors)[i] /= MaxStechiometricFactor;
383 for (
G4int i=0;i<nElements;i++)
384 atomsPerMolecule += (*StechiometricFactors)[i];
392 for (
size_t k=0;k<logQSquareGrid.size();k++)
395 for (
G4int i=0;i<nElements;i++)
397 G4int iZ = (*elementVector)[i]->GetZasInt();
400 ff2 += f*f*(*StechiometricFactors)[i];
405 logFormFactorTable->insert(std::make_pair(material,theFFVec));
407 delete StechiometricFactors;
434 if (verboseLevel > 3)
435 G4cout <<
"Calling SamplingSecondaries() of G4PenelopeRayleighModel" <<
G4endl;
439 if (photonEnergy0 <= fIntrinsicLowEnergyLimit)
455 if (!pMaxTable || !samplingTable || !logAtomicCrossSection || !atomicFormFactor ||
461 if (!logAtomicCrossSection)
462 logAtomicCrossSection =
new std::map<G4int,G4PhysicsFreeVector*>;
463 if (!atomicFormFactor)
464 atomicFormFactor =
new std::map<G4int,G4PhysicsFreeVector*>;
465 if (!logFormFactorTable)
466 logFormFactorTable =
new std::map<const G4Material*,G4PhysicsFreeVector*>;
468 pMaxTable =
new std::map<const G4Material*,G4PhysicsFreeVector*>;
470 samplingTable =
new std::map<const G4Material*,G4PenelopeSamplingData*>;
473 if (!samplingTable->count(theMat))
477 if (verboseLevel > 0)
481 ed <<
"Unable to find the samplingTable data for " <<
483 ed <<
"This can happen only in Unit Tests" <<
G4endl;
484 G4Exception(
"G4PenelopeRayleighModel::SampleSecondaries()",
492 G4int iZ = theElementVector->at(j)->GetZasInt();
493 if (!logAtomicCrossSection->count(iZ))
502 if (!logFormFactorTable->count(theMat))
503 BuildFormFactorTable(theMat);
506 if (!(samplingTable->count(theMat)))
507 InitializeSamplingAlgorithm(theMat);
510 if (!pMaxTable->count(theMat))
511 GetPMaxTable(theMat);
523 G4double qmax = 2.0*photonEnergy0/electron_mass_c2;
532 G4double G = 0.5*(1+cosTheta*cosTheta);
540 G4double LastQ2inTheTable = theDataTable->
GetX(nData-1);
541 G4double q2max = std::min(qmax*qmax,LastQ2inTheTable);
558 cosTheta = 1.0-2.0*xx/q2max;
559 G4double G = 0.5*(1+cosTheta*cosTheta);
565 G4double sinTheta = std::sqrt(1-cosTheta*cosTheta);
569 G4double dirX = sinTheta*std::cos(phi);
570 G4double dirY = sinTheta*std::sin(phi);
576 photonDirection1.
rotateUz(photonDirection0);
586void G4PenelopeRayleighModel::ReadDataFile(
const G4int Z)
589 if (verboseLevel > 2)
591 G4cout <<
"G4PenelopeRayleighModel::ReadDataFile()" <<
G4endl;
592 G4cout <<
"Going to read Rayleigh data files for Z=" << Z <<
G4endl;
595 char* path = std::getenv(
"G4LEDATA");
598 G4String excep =
"G4LEDATA environment variable not set!";
599 G4Exception(
"G4PenelopeRayleighModel::ReadDataFile()",
607 std::ostringstream ost;
609 ost << path <<
"/penelope/rayleigh/pdgra" << Z <<
".p08";
611 ost << path <<
"/penelope/rayleigh/pdgra0" << Z <<
".p08";
612 std::ifstream file(ost.str().c_str());
616 G4Exception(
"G4PenelopeRayleighModel::ReadDataFile()",
621 file >> readZ >> nPoints;
623 if (readZ != Z || nPoints <= 0 || nPoints >= 5000)
626 ed <<
"Corrupted data file for Z=" << Z <<
G4endl;
627 G4Exception(
"G4PenelopeRayleighModel::ReadDataFile()",
633 for (
size_t i=0;i<nPoints;i++)
635 file >> ene >> f1 >> f2 >> xs;
640 if (file.eof() && i != (nPoints-1))
643 ed <<
"Corrupted data file for Z=" << Z <<
G4endl;
644 ed <<
"Found less than " << nPoints <<
"entries " <<
G4endl;
645 G4Exception(
"G4PenelopeRayleighModel::ReadDataFile()",
649 if (!logAtomicCrossSection)
651 G4Exception(
"G4PenelopeRayleighModel::ReadDataFile()",
652 "em2044",
FatalException,
"Unable to allocate the atomic cross section table");
656 logAtomicCrossSection->insert(std::make_pair(Z,theVec));
662 std::ostringstream ost2;
664 ost2 << path <<
"/penelope/rayleigh/pdaff" << Z <<
".p08";
666 ost2 << path <<
"/penelope/rayleigh/pdaff0" << Z <<
".p08";
667 file.open(ost2.str().c_str());
671 G4Exception(
"G4PenelopeRayleighModel::ReadDataFile()",
674 file >> readZ >> nPoints;
676 if (readZ != Z || nPoints <= 0 || nPoints >= 5000)
679 ed <<
"Corrupted data file for Z=" << Z <<
G4endl;
680 G4Exception(
"G4PenelopeRayleighModel::ReadDataFile()",
688 if (!logQSquareGrid.size())
690 for (
size_t i=0;i<nPoints;i++)
692 file >> q >> ff >> incoh;
697 logQSquareGrid.push_back(2.0*
G4Log(q));
699 if (file.eof() && i != (nPoints-1))
702 ed <<
"Corrupted data file for Z=" << Z <<
G4endl;
703 ed <<
"Found less than " << nPoints <<
"entries " <<
G4endl;
704 G4Exception(
"G4PenelopeRayleighModel::ReadDataFile()",
708 if (!atomicFormFactor)
710 G4Exception(
"G4PenelopeRayleighModel::ReadDataFile()",
712 "Unable to allocate the atomicFormFactor data table");
716 atomicFormFactor->insert(std::make_pair(Z,theFFVec));
729 G4double logQSquared = (QSquared>1e-10) ?
G4Log(QSquared) : -23.;
731 G4double maxlogQ2 = logQSquareGrid[logQSquareGrid.size()-1];
740 ed <<
"Unable to retrieve F squared table for " << mat->
GetName() <<
G4endl;
741 G4Exception(
"G4PenelopeRayleighModel::GetFSquared()",
745 if (logQSquared < -20)
750 else if (logQSquared > maxlogQ2)
759 if (verboseLevel > 3)
762 G4cout <<
"Q^2 = " << QSquared <<
" (units of 1/(m_e*c); F^2 = " << f2 <<
G4endl;
769void G4PenelopeRayleighModel::InitializeSamplingAlgorithm(
const G4Material* mat)
774 const size_t np = 150;
776 for (
size_t i=1;i<logQSquareGrid.size();i++)
779 if (GetFSquared(mat,Q2) > 1e-35)
781 q2max =
G4Exp(logQSquareGrid[i-1]);
786 size_t nReducedPoints = np/4;
791 G4Exception(
"G4PenelopeRayleighModel::InitializeSamplingAlgorithm()",
793 "Too few points to initialize the sampling algorithm");
795 if (q2min > (q2max-1e-10))
797 G4cout <<
"q2min= " << q2min <<
" q2max= " << q2max <<
G4endl;
798 G4Exception(
"G4PenelopeRayleighModel::InitializeSamplingAlgorithm()",
800 "Too narrow grid to initialize the sampling algorithm");
812 size_t NUNIF = std::min(std::max(((
size_t)8),nReducedPoints),np/2);
813 const G4int nip = 51;
817 for (
size_t i=1;i<NUNIF-1;i++)
825 G4cout <<
"Vector x has " << x->size() <<
" points, while NUNIF = " << NUNIF <<
G4endl;
834 for (
size_t i=0;i<NUNIF-1;i++)
843 for (
G4int k=0;k<nip;k++)
846 G4double pdfk = std::max(GetFSquared(mat,xik),0.);
847 pdfi->push_back(pdfk);
848 pdfmax = std::max(pdfmax,pdfk);
852 G4double pdfIK = std::max(GetFSquared(mat,xih),0.);
853 pdfih->push_back(pdfIK);
854 pdfmax = std::max(pdfmax,pdfIK);
861 for (
G4int k=1;k<nip;k++)
864 G4double next = previous + cons*((*pdfi)[k-1]+4.0*(*pdfih)[k-1]+(*pdfi)[k]);
865 sumi->push_back(next);
868 G4double lastIntegral = (*sumi)[sumi->size()-1];
869 area->push_back(lastIntegral);
872 for (
size_t k=0;k<sumi->size();k++)
873 (*sumi)[k] *= factor;
876 if ((*pdfi)[0] < 1e-35)
877 (*pdfi)[0] = 1e-5*pdfmax;
878 if ((*pdfi)[pdfi->size()-1] < 1e-35)
879 (*pdfi)[pdfi->size()-1] = 1e-5*pdfmax;
882 G4double pui = (*pdfi)[pdfi->size()-1]*factor;
883 G4double B_temp = 1.0-1.0/(pli*pui*dx*dx);
884 G4double A_temp = (1.0/(pli*dx))-1.0-B_temp;
885 G4double C_temp = 1.0+A_temp+B_temp;
894 a->push_back(A_temp);
895 b->push_back(B_temp);
896 c->push_back(C_temp);
908 for (
G4int k=0;k<nip;k++)
911 G4double pap = (*area)[i]*(1.0+((*a)[i]+(*b)[i]*rr)*rr)*(1.0+((*a)[i]+(*b)[i]*rr)*rr)/
912 ((1.0-(*b)[i]*rr*rr)*(*c)[i]*((*x)[i+1]-(*x)[i]));
913 if (k == 0 || k == nip-1)
914 (*err)[i] += 0.5*std::fabs(pap-(*pdfi)[k]);
916 (*err)[i] += std::fabs(pap-(*pdfi)[k]);
921 if ((*err)[i] > 0.1*(*area)[i] && icase == 1)
937 (*x)[x->size()-1] = q2max;
944 if (x->size() != NUNIF || a->size() != NUNIF ||
945 err->size() != NUNIF || area->size() != NUNIF)
948 ed <<
"Problem in building the Table for Sampling: array dimensions do not match" <<
G4endl;
949 G4Exception(
"G4PenelopeRayleighModel::InitializeSamplingAlgorithm()",
961 for (
size_t i=0;i<err->size()-2;i++)
964 if ((*err)[i] > maxError)
966 maxError = (*err)[i];
972 G4double newx = 0.5*((*x)[iErrMax]+(*x)[iErrMax+1]);
974 x->insert(x->begin()+iErrMax+1,newx);
976 area->insert(area->begin()+iErrMax+1,0.);
977 a->insert(a->begin()+iErrMax+1,0.);
978 b->insert(b->begin()+iErrMax+1,0.);
979 c->insert(c->begin()+iErrMax+1,0.);
980 err->insert(err->begin()+iErrMax+1,0.);
983 for (
size_t i=iErrMax;i<=iErrMax+1;i++)
990 G4double dxLocal = (*x)[i+1]-(*x)[i];
993 for (
G4int k=0;k<nip;k++)
996 G4double pdfk = std::max(GetFSquared(mat,xik),0.);
997 pdfi->push_back(pdfk);
998 pdfmax = std::max(pdfmax,pdfk);
1002 G4double pdfIK = std::max(GetFSquared(mat,xih),0.);
1003 pdfih->push_back(pdfIK);
1004 pdfmax = std::max(pdfmax,pdfIK);
1010 sumi->push_back(0.);
1011 for (
G4int k=1;k<nip;k++)
1014 G4double next = previous + cons*((*pdfi)[k-1]+4.0*(*pdfih)[k-1]+(*pdfi)[k]);
1015 sumi->push_back(next);
1017 G4double lastIntegral = (*sumi)[sumi->size()-1];
1018 (*area)[i] = lastIntegral;
1021 G4double factor = 1.0/lastIntegral;
1022 for (
size_t k=0;k<sumi->size();k++)
1023 (*sumi)[k] *= factor;
1026 if ((*pdfi)[0] < 1e-35)
1027 (*pdfi)[0] = 1e-5*pdfmax;
1028 if ((*pdfi)[pdfi->size()-1] < 1e-35)
1029 (*pdfi)[pdfi->size()-1] = 1e-5*pdfmax;
1032 G4double pui = (*pdfi)[pdfi->size()-1]*factor;
1033 G4double B_temp = 1.0-1.0/(pli*pui*dxLocal*dxLocal);
1034 G4double A_temp = (1.0/(pli*dxLocal))-1.0-B_temp;
1035 G4double C_temp = 1.0+A_temp+B_temp;
1056 for (
G4int k=0;k<nip;k++)
1059 G4double pap = (*area)[i]*(1.0+((*a)[i]+(*b)[i]*rr)*rr)*(1.0+((*a)[i]+(*b)[i]*rr)*rr)/
1060 ((1.0-(*b)[i]*rr*rr)*(*c)[i]*((*x)[i+1]-(*x)[i]));
1061 if (k == 0 || k == nip-1)
1062 (*err)[i] += 0.5*std::fabs(pap-(*pdfi)[k]);
1064 (*err)[i] += std::fabs(pap-(*pdfi)[k]);
1069 if ((*err)[i] > 0.1*(*area)[i] && icase == 1)
1082 }
while(x->size() < np);
1084 if (x->size() != np || a->size() != np ||
1085 err->size() != np || area->size() != np)
1087 G4Exception(
"G4PenelopeRayleighModel::InitializeSamplingAlgorithm()",
1089 "Problem in building the extended Table for Sampling: array dimensions do not match ");
1096 for (
size_t i=0;i<np-1;i++)
1100 for (
size_t i=0;i<np-1;i++)
1104 errMax = std::max(errMax,(*err)[i]);
1110 for (
size_t i=0;i<np-1;i++)
1113 PAC->push_back(previous+(*area)[i]);
1115 (*PAC)[PAC->size()-1] = 1.;
1122 std::vector<size_t> *ITTL =
new std::vector<size_t>;
1123 std::vector<size_t> *ITTU =
new std::vector<size_t>;
1126 for (
size_t i=0;i<np;i++)
1134 for (
size_t i=1;i<(np-1);i++)
1138 for (
size_t j=(*ITTL)[i-1];j<np && !found;j++)
1140 if ((*PAC)[j] > ptst)
1148 (*ITTU)[ITTU->size()-2] = ITTU->size()-1;
1149 (*ITTU)[ITTU->size()-1] = ITTU->size()-1;
1150 (*ITTL)[ITTL->size()-1] = ITTU->size()-2;
1152 if (ITTU->size() != np || ITTU->size() != np)
1154 G4Exception(
"G4PenelopeRayleighModel::InitializeSamplingAlgorithm()",
1156 "Problem in building the Limit Tables for Sampling: array dimensions do not match");
1164 for (
size_t i=0;i<np;i++)
1166 theTable->
AddPoint((*x)[i],(*PAC)[i],(*a)[i],(*b)[i],(*ITTL)[i],(*ITTU)[i]);
1169 if (verboseLevel > 2)
1171 G4cout <<
"*************************************************************************" <<
1173 G4cout <<
"Sampling table for Penelope Rayleigh scattering in " << mat->
GetName() <<
G4endl;
1176 samplingTable->insert(std::make_pair(mat,theTable));
1197void G4PenelopeRayleighModel::GetPMaxTable(
const G4Material* mat)
1202 G4cout <<
"G4PenelopeRayleighModel::BuildPMaxTable" <<
G4endl;
1203 G4cout <<
"Going to instanziate the pMaxTable !" <<
G4endl;
1205 pMaxTable =
new std::map<const G4Material*,G4PhysicsFreeVector*>;
1208 if (pMaxTable->count(mat))
1214 G4Exception(
"G4PenelopeRayleighModel::GetPMaxTable()",
1216 "SamplingTable is not properly instantiated");
1221 if (!samplingTable->count(mat))
1224 ed <<
"Sampling table for material " << mat->
GetName() <<
" not found";
1225 G4Exception(
"G4PenelopeRayleighModel::GetPMaxTable()",
1234 size_t nOfEnergyPoints = logEnergyGridPMax.size();
1237 const size_t nip = 51;
1239 for (
size_t ie=0;ie<logEnergyGridPMax.size();ie++)
1253 size_t lowerBound = 0;
1254 size_t upperBound = tablePoints-1;
1255 while (lowerBound <= upperBound)
1257 size_t midBin = (lowerBound + upperBound)/2;
1258 if( Qm2 < theTable->GetX(midBin))
1259 { upperBound = midBin-1; }
1261 { lowerBound = midBin+1; }
1271 for (
size_t k=0;k<nip;k++)
1275 (theTable->
GetX(upperBound+1)-Q1);
1280 if (std::fabs(con1) > 1.0e-16*std::fabs(con2))
1281 etap = con2*(1.0-std::sqrt(1.0-2.0*tau*con1/(con2*con2)))/con1;
1285 (1.0+(theA+theB*etap)*etap)*(1.0+(theA+theB*etap)*etap)/
1286 ((1.0-theB*etap*etap)*ci*(theTable->
GetX(upperBound+1)-Q1));
1287 fun->push_back(theFun);
1295 (5.0*(*fun)[0]+8.0*(*fun)[1]-(*fun)[2])*CONS;
1296 sum->push_back(secondPoint);
1297 for (
size_t hh=2;hh<nip-1;hh++)
1300 G4double next = previous+(13.0*((*fun)[hh-1]+(*fun)[hh])-
1301 (*fun)[hh+1]-(*fun)[hh-2])*HCONS;
1302 sum->push_back(next);
1304 G4double last = (*sum)[nip-2]+(5.0*(*fun)[nip-1]+8.0*(*fun)[nip-2]-
1305 (*fun)[nip-3])*CONS;
1306 sum->push_back(last);
1307 thePMax = thePAC + (*sum)[sum->size()-1];
1318 thePMax = theTable->
GetPAC(0);
1322 theVec->
PutValue(ie,energy,thePMax);
1325 pMaxTable->insert(std::make_pair(mat,theVec));
1334 G4cout <<
"*****************************************************************" <<
G4endl;
1338 G4cout <<
"*****************************************************************" <<
G4endl;
1339 if (!logFormFactorTable->count(mat))
1340 BuildFormFactorTable(mat);
std::vector< G4Element * > G4ElementVector
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *description)
std::ostringstream G4ExceptionDescription
G4double G4Exp(G4double initial_x)
Exponential Function double precision.
G4double G4Log(G4double x)
#define G4MUTEX_INITIALIZER
G4GLOB_DLL std::ostream G4cout
Hep3Vector & rotateUz(const Hep3Vector &)
const G4ThreeVector & GetMomentumDirection() const
G4double GetKineticEnergy() const
const G4Material * GetMaterial() const
const G4ElementVector * GetElementVector() const
const G4double * GetFractionVector() const
size_t GetNumberOfElements() const
const G4String & GetName() const
void SetProposedKineticEnergy(G4double proposedKinEnergy)
void ProposeMomentumDirection(G4double Px, G4double Py, G4double Pz)
virtual void Initialise(const G4ParticleDefinition *, const G4DataVector &)
virtual G4double ComputeCrossSectionPerAtom(const G4ParticleDefinition *, G4double kinEnergy, G4double Z, G4double A=0, G4double cut=0, G4double emax=DBL_MAX)
void DumpFormFactorTable(const G4Material *)
const G4ParticleDefinition * fParticle
G4ParticleChangeForGamma * fParticleChange
virtual ~G4PenelopeRayleighModel()
G4PenelopeRayleighModel(const G4ParticleDefinition *p=0, const G4String &processName="PenRayleigh")
virtual void InitialiseLocal(const G4ParticleDefinition *, G4VEmModel *masterModel)
virtual void SampleSecondaries(std::vector< G4DynamicParticle * > *, const G4MaterialCutsCouple *, const G4DynamicParticle *, G4double tmin, G4double maxEnergy)
G4double GetA(size_t index)
G4double GetPAC(size_t index)
size_t GetNumberOfStoredPoints()
void AddPoint(G4double x0, G4double pac0, G4double a0, G4double b0, size_t ITTL0, size_t ITTU0)
G4double GetX(size_t index)
G4double SampleValue(G4double rndm)
G4double GetB(size_t index)
void PutValue(std::size_t index, G4double energy, G4double dValue)
G4double Value(G4double theEnergy, std::size_t &lastidx) const
G4double GetLowEdgeEnergy(std::size_t binNumber) const
std::size_t GetVectorLength() const
const G4MaterialCutsCouple * GetMaterialCutsCouple(G4int i) const
std::size_t GetTableSize() const
static G4ProductionCutsTable * GetProductionCutsTable()
void SetHighEnergyLimit(G4double)
G4ParticleChangeForGamma * GetParticleChangeForGamma()
G4double LowEnergyLimit() const
G4double HighEnergyLimit() const
void ProposeTrackStatus(G4TrackStatus status)
void ProposeLocalEnergyDeposit(G4double anEnergyPart)
G4double energy(const ThreeVector &p, const G4double m)