Ignore:
Timestamp:
Sep 30, 2010, 2:47:17 PM (14 years ago)
Author:
garnier
Message:

tag geant4.9.4 beta 1 + modifs locales

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/source/processes/electromagnetic/xrays/src/G4ForwardXrayTR.cc

    r1228 r1337  
    2525//
    2626//
    27 // $Id: G4ForwardXrayTR.cc,v 1.14 2007/05/11 14:23:04 gcosmo Exp $
    28 // GEANT4 tag $Name: geant4-09-03 $
     27// $Id: G4ForwardXrayTR.cc,v 1.15 2010/06/16 15:34:15 gcosmo Exp $
     28// GEANT4 tag $Name: geant4-09-04-beta-01 $
    2929//
    3030// G4ForwardXrayTR class -- implementation file
     
    8484
    8585G4double G4ForwardXrayTR::fCofTR     = fine_structure_const/pi ;
    86 
    87 using namespace std;
    8886
    8987/*   ************************************************************************
     
    411409// The high energy small theta approximation is applied.
    412410// (matter1 -> matter2)
    413 // varAngle =2* (1 - cos(Theta)) or approximately = Theta*Theta
     411// varAngle =2* (1 - std::cos(Theta)) or approximately = Theta*Theta
    414412//
    415413
     
    452450  a4 = a2*a2 ;
    453451  b4 = b2*b2 ;
    454   a = sqrt(a2) ;
    455   b = sqrt(b2) ;
    456   cof1 = c*c*(0.5/(a2*(x2 +a2)) +0.5*log(x2/(x2 +a2))/a4) ;
    457   cof3 = d*d*(0.5/(b2*(x2 +b2)) +0.5*log(x2/(x2 +b2))/b4) ;
    458   cof2 = -c*d*(log(x2/(x2 +b2))/b2 - log(x2/(x2 +a2))/a2)/(a2 - b2)   ;
     452  a = std::sqrt(a2) ;
     453  b = std::sqrt(b2) ;
     454  cof1 = c*c*(0.5/(a2*(x2 +a2)) +0.5*std::log(x2/(x2 +a2))/a4) ;
     455  cof3 = d*d*(0.5/(b2*(x2 +b2)) +0.5*std::log(x2/(x2 +b2))/b4) ;
     456  cof2 = -c*d*(std::log(x2/(x2 +b2))/b2 - std::log(x2/(x2 +a2))/a2)/(a2 - b2)   ;
    459457  return -varAngle*(cof1 + cof2 + cof3) ;
    460458}
     
    503501//
    504502// Analytical Expression for   spectral density of Xray TR photons
    505 // x = 2*(1 - cos(Theta)) ~ Theta^2
     503// x = 2*(1 - std::cos(Theta)) ~ Theta^2
    506504//
    507505
     
    514512  b =  1.0/(fGamma*fGamma)
    515513     + fSigma2/(energy*energy)  ;
    516   return ( (a + b)*log((x + b)/(x + a))/(a - b)
     514  return ( (a + b)*std::log((x + b)/(x + a))/(a - b)
    517515          + a/(x + a) + b/(x + b) )/energy ;
    518516
     
    688686          if(anglePos > (*(*fAngleDistrTable)(iPlace))(iTransfer)) break ;
    689687        }
    690         theta = sqrt((*fAngleDistrTable)(iPlace)->GetLowEdgeEnergy(iTransfer-1)) ;
     688        theta = std::sqrt((*fAngleDistrTable)(iPlace)->GetLowEdgeEnergy(iTransfer-1)) ;
    691689
    692690        // G4cout<<iTransfer<<" :  theta = "<<theta<<G4endl ;
    693691
    694692        phi = twopi*G4UniformRand() ;
    695         dirX = sin(theta)*cos(phi)  ;
    696         dirY = sin(theta)*sin(phi)  ;
    697         dirZ = cos(theta)           ;
     693        dirX = std::sin(theta)*std::cos(phi)  ;
     694        dirY = std::sin(theta)*std::sin(phi)  ;
     695        dirZ = std::cos(theta)           ;
    698696        G4ThreeVector directionTR(dirX,dirY,dirZ) ;
    699697        directionTR.rotateUz(particleDir) ;
     
    763761                      (*(*fAngleDistrTable)(iPlace + 1))(iTransfer)*W2)) break ;
    764762          }
    765           theta = sqrt(((*fAngleDistrTable)(iPlace)->
     763          theta = std::sqrt(((*fAngleDistrTable)(iPlace)->
    766764                        GetLowEdgeEnergy(iTransfer-1))*W1+
    767765                  ((*fAngleDistrTable)(iPlace + 1)->
     
    771769
    772770          phi = twopi*G4UniformRand() ;
    773           dirX = sin(theta)*cos(phi)  ;
    774           dirY = sin(theta)*sin(phi)  ;
    775           dirZ = cos(theta)           ;
     771          dirX = std::sin(theta)*std::cos(phi)  ;
     772          dirY = std::sin(theta)*std::sin(phi)  ;
     773          dirZ = std::cos(theta)           ;
    776774          G4ThreeVector directionTR(dirX,dirY,dirZ) ;
    777775          directionTR.rotateUz(particleDir) ;
Note: See TracChangeset for help on using the changeset viewer.