124     G4cout << 
"### G4GoudsmitSaundersonMscModel loading ELSEPA data" << 
G4endl;
 
  176     eloss = kineticEnergy - 
 
  188   kineticEnergy -= 0.5*eloss;
 
  198   for(
G4int i=0;i<nelm;i++)
 
  201       lambda0 += (theAtomNumDensityVector[i]*
s0);
 
  213   for(
G4int i=0;i<1000;++i)
 
  215       logx0 = 
G4Log(1.+1./x0);
 
  216       x1 = x0-(x0*((1.+x0)*logx0-1.0)-g1*0.5)/( (1.+2.*x0)*logx0-2.0);
 
  219       if(x1 < 0.0)         { x1 = 0.5*x0; }
 
  220       else if(x1 > 2*x0)   { x1 = 2*x0; }
 
  221       else if(x1 < 0.5*x0) { x1 = 0.5*x0; }
 
  222       delta = std::fabs( x1 - x0 );    
 
  224       if(delta < 1.0e-3*x1) { 
break;}
 
  236   G4double cosTheta1,sinTheta1,cosTheta2,sinTheta2;
 
  250   else if((epsilon1<((1.+lambdan)*expn))||(lambdan<1.))
 
  253       xi= 2.*scrA*xi/(1.-xi + 
scrA);
 
  259       newDirection.set(wss*cos(phi0),wss*sin(phi0),ws); 
 
  267       G4ThreeVector newDirection1(sinTheta1*cos(phi1),sinTheta1*sin(phi1),cosTheta1);
 
  275       newDirection.set(sinTheta2*cos(phi2),sinTheta2*sin(phi2),cosTheta2); 
 
  276       newDirection.rotateUz(newDirection1);
 
  279   newDirection.rotateUz(oldDirection);
 
  294   if(scrA < 10.) { Qn1 *= scrA*((1.+
scrA)*
G4Log(1.+1./scrA)-1.); }
 
  295   else { Qn1*= (1.0 - 0.5/scrA - 0.5/(scrA*
scrA)) ; }
 
  302       }
while(tet*r1*r1>sin(tet));
 
  312   sint=sqrt(xi*(2.-xi));
 
  333   if(iZ > 103) iZ = 103;
 
  336   for(
G4int i=0;i<105;i++)
 
  338   if((logE>=
ener[i])&&(logE<
ener[i+1])){enerInd=i;
break;}
 
  347         y1=
TCSE[iZ-1][enerInd];
 
  348         y2=
TCSE[iZ-1][enerInd+1];
 
  349         acoeff=(y2-y1)/(x2*x2-x1*x1);
 
  350         bcoeff=y2-acoeff*x2*x2;
 
  351         Sig0=acoeff*logE*logE+bcoeff;
 
  353         y1=
FTCSE[iZ-1][enerInd];
 
  354         y2=
FTCSE[iZ-1][enerInd+1];
 
  355         acoeff=(y2-y1)/(x2*x2-x1*x1);
 
  356         bcoeff=y2-acoeff*x2*x2;
 
  357         Sig1=acoeff*logE*logE+bcoeff;
 
  366         Sig0=(y2-y1)*(logE-x1)/(x2-x1)+y1;
 
  370         Sig1=(y2-y1)*(logE-x1)/(x2-x1)+y1;
 
  376     if(kinEnergy<=1.0e+9)
 
  380         y1=
TCSP[iZ-1][enerInd];
 
  381         y2=
TCSP[iZ-1][enerInd+1];
 
  382         acoeff=(y2-y1)/(x2*x2-x1*x1);
 
  383         bcoeff=y2-acoeff*x2*x2;
 
  384         Sig0=acoeff*logE*logE+bcoeff;
 
  386         y1=
FTCSP[iZ-1][enerInd];
 
  387         y2=
FTCSP[iZ-1][enerInd+1];
 
  388         acoeff=(y2-y1)/(x2*x2-x1*x1);
 
  389         bcoeff=y2-acoeff*x2*x2;
 
  390         Sig1=acoeff*logE*logE+bcoeff;
 
  399         Sig0=(y2-y1)*(logE-x1)/(x2-x1)+y1;
 
  403         Sig1=(y2-y1)*(logE-x1)/(x2-x1)+y1;
 
  489           rat = 1.e-3/(rat*(10.+rat)) ;
 
  586           rat = 1.e-3/(rat*(10.+rat)) ;
 
  679       if(zt >= 0.333333333) {
 
  681         G4double cz = 0.5*(3.*zt-1.)/(1.-zt) ;
 
  687           grej = exp(cz*
G4Log(u/u0))*(1.-u)/(1.-u0) ;
 
  741   G4String filename = 
"XSECTIONS.dat";
 
  743   char* path = getenv(
"G4LEDATA");
 
  746       G4Exception(
"G4GoudsmitSaundersonMscModel::LoadELSEPAXSections()",
"em0006",
 
  748                   "Environment variable G4LEDATA not defined");
 
  753   G4String dirFile = pathString + 
"/msc_GS/" + filename;
 
  754   std::ifstream infile(dirFile, std::ios::in);
 
  755   if( !infile.is_open()) {
 
  757     ed << 
"Data file <" + dirFile + 
"> is not opened!";
 
  758     G4Exception(
"G4GoudsmitSaundersonMscModel::LoadELSEPAXSections()",
 
  765   for(
G4int i=0 ; i<106 ;i++){
 
  769       ed << 
"Error reading <" + dirFile + 
"> loop #1 i= " << i;
 
  770       G4Exception(
"G4GoudsmitSaundersonMscModel::LoadELSEPAXSections()",
 
  774       if(aRead > 0.0) { aRead = 
G4Log(aRead); }
 
  775       else            { aRead = 0.0; }
 
  779   for(
G4int j=0;j<103;j++){
 
  780     for(
G4int i=0;i<106;i++){
 
  784         ed << 
"Error reading <" + dirFile + 
"> loop #2 j= " << j 
 
  786         G4Exception(
"G4GoudsmitSaundersonMscModel::LoadELSEPAXSections()",
 
  790         if(aRead > 0.0) { aRead = 
G4Log(aRead); }
 
  791         else            { aRead = 0.0; }
 
  796   for(
G4int j=0;j<103;j++){
 
  797     for(
G4int i=0;i<106;i++){
 
  801         ed << 
"Error reading <" + dirFile + 
"> loop #3 j= " << j 
 
  803         G4Exception(
"G4GoudsmitSaundersonMscModel::LoadELSEPAXSections()",
 
  807         if(aRead > 0.0) { aRead = 
G4Log(aRead); }
 
  808         else            { aRead = 0.0; }
 
  813   for(
G4int j=0;j<103;j++){
 
  814     for(
G4int i=0;i<106;i++){
 
  818         ed << 
"Error reading <" + dirFile + 
"> loop #4 j= " << j 
 
  820         G4Exception(
"G4GoudsmitSaundersonMscModel::LoadELSEPAXSections()",
 
  824         if(aRead > 0.0) { aRead = 
G4Log(aRead); }
 
  825         else            { aRead = 0.0; }
 
  830   for(
G4int j=0;j<103;j++){
 
  831     for(
G4int i=0;i<106;i++){
 
  835         ed << 
"Error reading <" + dirFile + 
"> loop #5 j= " << j 
 
  837         G4Exception(
"G4GoudsmitSaundersonMscModel::LoadELSEPAXSections()",
 
  841         if(aRead > 0.0) { aRead = 
G4Log(aRead); }
 
  842         else            { aRead = 0.0; }
 
G4GoudsmitSaundersonMscModel(const G4String &nam="GoudsmitSaunderson")
 
void CalculateIntegrals(const G4ParticleDefinition *, G4double, G4double, G4double &, G4double &)
 
virtual G4double ComputeTrueStepLength(G4double geomStepLength)
 
G4GoudsmitSaundersonTable * GSTable
 
static G4double TCSP[103][106]
 
static G4LossTableManager * Instance()
 
std::vector< G4Element * > G4ElementVector
 
std::ostringstream G4ExceptionDescription
 
G4double GetKineticEnergy() const 
 
CLHEP::Hep3Vector G4ThreeVector
 
const G4DynamicParticle * GetDynamicParticle() const 
 
G4int currentMaterialIndex
 
G4StepStatus GetStepStatus() const 
 
G4double ConvertTrueToGeom(G4double &tLength, G4double &gLength)
 
const G4MaterialCutsCouple * GetMaterialCutsCouple() const 
 
const G4ParticleDefinition * particle
 
G4double SampleTheta(G4double, G4double, G4double)
 
G4ParticleDefinition * GetDefinition() const 
 
G4LossTableManager * theManager
 
const G4Step * GetStep() const 
 
G4double ComputeSafety(const G4ThreeVector &position, G4double limit=DBL_MAX)
 
const G4ElementVector * GetElementVector() const 
 
G4double currentKinEnergy
 
G4StepPoint * GetPreStepPoint() const 
 
G4double GetEnergy(const G4ParticleDefinition *part, G4double range, const G4MaterialCutsCouple *couple)
 
void StartTracking(G4Track *)
 
static G4double FTCSE[103][106]
 
static const G4double scrA[76 *11]
 
virtual G4double ComputeTruePathLengthLimit(const G4Track &track, G4double ¤tMinimalStep)
 
const G4double * GetVecNbOfAtomsPerVolume() const 
 
G4GLOB_DLL std::ostream G4cout
 
G4ParticleChangeForMSC * fParticleChange
 
static G4double TCSE[103][106]
 
const G4ThreeVector & GetPosition() const 
 
G4double GetRange(const G4ParticleDefinition *part, G4double kineticEnergy, const G4MaterialCutsCouple *couple)
 
G4ParticleChangeForMSC * GetParticleChangeForMSC(const G4ParticleDefinition *p=0)
 
virtual void Initialise(const G4ParticleDefinition *, const G4DataVector &)
 
G4double ComputeGeomLimit(const G4Track &, G4double &presafety, G4double limit)
 
G4ThreeVector fDisplacement
 
G4double GetTransportMeanFreePath(const G4ParticleDefinition *part, G4double kinEnergy)
 
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *comments)
 
G4double G4Log(G4double x)
 
G4double G4Exp(G4double initial_x)
Exponential Function double precision. 
 
void ProposeMomentumDirection(const G4ThreeVector &Pfinal)
 
static G4double FTCSP[103][106]
 
static G4Positron * Positron()
 
void SetParticle(const G4ParticleDefinition *p)
 
G4double GetDEDX(const G4ParticleDefinition *part, G4double kineticEnergy, const G4MaterialCutsCouple *couple)
 
void SetCurrentCouple(const G4MaterialCutsCouple *)
 
virtual ~G4GoudsmitSaundersonMscModel()
 
virtual G4double ComputeCrossSectionPerAtom(const G4ParticleDefinition *particle, G4double KineticEnergy, G4double AtomicNumber, G4double, G4double, G4double)
 
G4double GetSafety() const 
 
G4MscStepLimitType steppingAlgorithm
 
static G4Electron * Electron()
 
void SampleCosineTheta(G4double, G4double, G4double &, G4double &)
 
size_t GetNumberOfElements() const 
 
virtual G4ThreeVector & SampleScattering(const G4ThreeVector &, G4double safety)
 
const G4MaterialCutsCouple * currentCouple
 
const G4Material * GetMaterial() const 
 
static G4double ener[106]
 
virtual G4double ComputeGeomPathLength(G4double truePathLength)
 
void LoadELSEPAXSections()