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

tag geant4.9.4 beta 1 + modifs locales

Location:
trunk/source/processes/electromagnetic/xrays
Files:
27 edited

Legend:

Unmodified
Added
Removed
  • trunk/source/processes/electromagnetic/xrays/History

    r1315 r1337  
    1 $Id: History,v 1.71 2010/05/27 20:47:23 gum Exp $
     1$Id: History,v 1.72 2010/06/16 15:34:31 gcosmo Exp $
    22-------------------------------------------------------------------
    33
     
    1717     * Reverse chronological order (last date on top), please *
    1818     ----------------------------------------------------------
     19
     2016 June 10: G. Cosmo (xrays-V09-03-01)
     21- Use mathematical functions in std namespace explicitely.
    1922
    202322 February 10: P. Gumplinger (xrays-V09-03-00)
  • trunk/source/processes/electromagnetic/xrays/include/G4Cerenkov.hh

    r1228 r1337  
    2626//
    2727// $Id: G4Cerenkov.hh,v 1.11 2009/07/29 23:45:02 gum Exp $
    28 // GEANT4 tag $Name: geant4-09-03 $
     28// GEANT4 tag $Name: geant4-09-04-beta-01 $
    2929//
    3030//
  • trunk/source/processes/electromagnetic/xrays/include/G4ForwardXrayTR.hh

    r1228 r1337  
    2626//
    2727// $Id: G4ForwardXrayTR.hh,v 1.14 2006/06/29 19:55:33 gunter Exp $
    28 // GEANT4 tag $Name: geant4-09-03 $
     28// GEANT4 tag $Name: geant4-09-04-beta-01 $
    2929//
    3030// G4ForwardXrayTR -- header file
  • trunk/source/processes/electromagnetic/xrays/include/G4GammaXTRadiator.hh

    r1228 r1337  
    2626//
    2727// $Id: G4GammaXTRadiator.hh,v 1.4 2006/06/29 19:55:35 gunter Exp $
    28 // GEANT4 tag $Name: geant4-09-03 $
     28// GEANT4 tag $Name: geant4-09-04-beta-01 $
    2929//
    3030//
  • trunk/source/processes/electromagnetic/xrays/include/G4RegularXTRadiator.hh

    r1228 r1337  
    2626//
    2727// $Id: G4RegularXTRadiator.hh,v 1.3 2006/06/29 19:55:37 gunter Exp $
    28 // GEANT4 tag $Name: geant4-09-03 $
     28// GEANT4 tag $Name: geant4-09-04-beta-01 $
    2929//
    3030//
  • trunk/source/processes/electromagnetic/xrays/include/G4Scintillation.hh

    r1315 r1337  
    2525//
    2626//
    27 // $Id: G4Scintillation.hh,v 1.17 2010/05/27 20:48:35 gum Exp $
    28 // GEANT4 tag $Name: geant4-09-04-beta-cand-01 $
     27// $Id: G4Scintillation.hh,v 1.18 2010/06/25 09:41:46 gunter Exp $
     28// GEANT4 tag $Name: geant4-09-04-beta-01 $
    2929//
    3030//
     
    325325G4double G4Scintillation::single_exp(G4double t, G4double tau2)
    326326{
    327          return exp(-1.0*t/tau2)/tau2;
     327         return std::exp(-1.0*t/tau2)/tau2;
    328328}
    329329
     
    331331G4double G4Scintillation::bi_exp(G4double t, G4double tau1, G4double tau2)
    332332{
    333          return exp(-1.0*t/tau2)*(1-exp(-1.0*t/tau1))/tau2/tau2*(tau1+tau2);
     333         return std::exp(-1.0*t/tau2)*(1-std::exp(-1.0*t/tau1))/tau2/tau2*(tau1+tau2);
    334334}
    335335
  • trunk/source/processes/electromagnetic/xrays/include/G4StrawTubeXTRadiator.hh

    r1228 r1337  
    2626//
    2727// $Id: G4StrawTubeXTRadiator.hh,v 1.4 2007/09/29 17:49:34 vnivanch Exp $
    28 // GEANT4 tag $Name: geant4-09-03 $
     28// GEANT4 tag $Name: geant4-09-04-beta-01 $
    2929//
    3030//
  • trunk/source/processes/electromagnetic/xrays/include/G4SynchrotronRadiation.hh

    r1228 r1337  
    2626//
    2727// $Id: G4SynchrotronRadiation.hh,v 1.4 2006/06/29 19:55:43 gunter Exp $
    28 // GEANT4 tag $Name: geant4-09-03 $
     28// GEANT4 tag $Name: geant4-09-04-beta-01 $
    2929//
    3030// ------------------------------------------------------------
  • trunk/source/processes/electromagnetic/xrays/include/G4SynchrotronRadiationInMat.hh

    r1228 r1337  
    2626//
    2727// $Id: G4SynchrotronRadiationInMat.hh,v 1.2 2006/06/29 19:55:45 gunter Exp $
    28 // GEANT4 tag $Name: geant4-09-03 $
     28// GEANT4 tag $Name: geant4-09-04-beta-01 $
    2929//
    3030// ------------------------------------------------------------
  • trunk/source/processes/electromagnetic/xrays/include/G4TransitionRadiation.hh

    r1228 r1337  
    2626//
    2727// $Id: G4TransitionRadiation.hh,v 1.9 2006/06/29 19:55:47 gunter Exp $
    28 // GEANT4 tag $Name: geant4-09-03 $
     28// GEANT4 tag $Name: geant4-09-04-beta-01 $
    2929//
    3030// G4TransitionRadiation  -- header file
  • trunk/source/processes/electromagnetic/xrays/include/G4TransparentRegXTRadiator.hh

    r1228 r1337  
    2626//
    2727// $Id: G4TransparentRegXTRadiator.hh,v 1.2 2006/06/29 19:55:49 gunter Exp $
    28 // GEANT4 tag $Name: geant4-09-03 $
     28// GEANT4 tag $Name: geant4-09-04-beta-01 $
    2929//
    3030//
  • trunk/source/processes/electromagnetic/xrays/include/G4VTRModel.hh

    r1228 r1337  
    2626//
    2727// $Id: G4VTRModel.hh,v 1.3 2006/06/29 19:55:51 gunter Exp $
    28 // GEANT4 tag $Name: geant4-09-03 $
     28// GEANT4 tag $Name: geant4-09-04-beta-01 $
    2929//
    3030// G4VTRModel  -- header file
  • trunk/source/processes/electromagnetic/xrays/include/G4VTransitionRadiation.hh

    r1228 r1337  
    2626//
    2727// $Id: G4VTransitionRadiation.hh,v 1.3 2006/06/29 19:55:53 gunter Exp $
    28 // GEANT4 tag $Name: geant4-09-03 $
     28// GEANT4 tag $Name: geant4-09-04-beta-01 $
    2929//
    3030// G4VTransitionRadiation  -- header file
  • trunk/source/processes/electromagnetic/xrays/include/G4VXTRenergyLoss.hh

    r1228 r1337  
    2626//
    2727// $Id: G4VXTRenergyLoss.hh,v 1.24 2007/09/29 17:49:34 vnivanch Exp $
    28 // GEANT4 tag $Name: geant4-09-03 $
     28// GEANT4 tag $Name: geant4-09-04-beta-01 $
    2929//
    3030//
  • trunk/source/processes/electromagnetic/xrays/src/G4Cerenkov.cc

    r1228 r1337  
    2525//
    2626//
    27 // $Id: G4Cerenkov.cc,v 1.26 2008/11/14 20:16:51 gum Exp $
    28 // GEANT4 tag $Name: geant4-09-03 $
     27// $Id: G4Cerenkov.cc,v 1.27 2010/06/16 15:34:15 gcosmo Exp $
     28// GEANT4 tag $Name: geant4-09-04-beta-01 $
    2929//
    3030////////////////////////////////////////////////////////////////////////
     
    7373#include "G4Cerenkov.hh"
    7474
    75 using namespace std;
    76 
    7775/////////////////////////
    7876// Class Implementation 
     
    267265
    268266                G4double phi = twopi*rand;
    269                 G4double sinPhi = sin(phi);
    270                 G4double cosPhi = cos(phi);
     267                G4double sinPhi = std::sin(phi);
     268                G4double cosPhi = std::cos(phi);
    271269
    272270                // calculate x,y, and z components of photon energy
     
    274272                //  aligned with the z axis)
    275273
    276                 G4double sinTheta = sqrt(sin2Theta);
     274                G4double sinTheta = std::sqrt(sin2Theta);
    277275                G4double px = sinTheta*cosPhi;
    278276                G4double py = sinTheta*sinPhi;
  • 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) ;
  • trunk/source/processes/electromagnetic/xrays/src/G4GammaXTRadiator.cc

    r1228 r1337  
    2525//
    2626//
    27 // $Id: G4GammaXTRadiator.cc,v 1.5 2006/06/29 19:56:07 gunter Exp $
    28 // GEANT4 tag $Name: geant4-09-03 $
     27// $Id: G4GammaXTRadiator.cc,v 1.6 2010/06/16 15:34:15 gcosmo Exp $
     28// GEANT4 tag $Name: geant4-09-04-beta-01 $
    2929//
    3030
     
    3535
    3636#include "G4Gamma.hh"
    37 
    38 using namespace std;
    3937
    4038////////////////////////////////////////////////////////////////////////////
     
    9593  G4complex Cb(1.0+0.5*fGasThick*Mb/fAlphaGas,fGasThick/Zb/fAlphaGas) ;
    9694
    97   G4complex Ha = pow(Ca,-fAlphaPlate) ; 
    98   G4complex Hb = pow(Cb,-fAlphaGas) ;
     95  G4complex Ha = std::pow(Ca,-fAlphaPlate) ; 
     96  G4complex Hb = std::pow(Cb,-fAlphaGas) ;
    9997  G4complex H  = Ha*Hb ;
    10098
     
    103101
    104102  G4complex F2 =   (1.0-Ha)*(1.0-Ha)*Hb/(1.0-H)/(1.0-H)
    105                  * (1.0 - pow(H,fPlateNumber)) ;
     103                 * (1.0 - std::pow(H,fPlateNumber)) ;
    106104
    107105  G4complex R  = (F1 + F2)*OneInterfaceXTRdEdx(energy,gamma,varAngle) ;
    108106
    109   result       = 2.0*real(R) ;
     107  result       = 2.0*std::real(R) ;
    110108 
    111109  return      result ;
  • trunk/source/processes/electromagnetic/xrays/src/G4RegularXTRadiator.cc

    r1228 r1337  
    2525//
    2626//
    27 // $Id: G4RegularXTRadiator.cc,v 1.9 2006/06/29 19:56:09 gunter Exp $
    28 // GEANT4 tag $Name: geant4-09-03 $
     27// $Id: G4RegularXTRadiator.cc,v 1.10 2010/06/16 15:34:15 gcosmo Exp $
     28// GEANT4 tag $Name: geant4-09-04-beta-01 $
    2929//
    3030
     
    3535
    3636#include "G4Gamma.hh"
    37 
    38 using namespace std;
    3937
    4038////////////////////////////////////////////////////////////////////////////
     
    9694  G4complex Cb(1.0+0.5*fGasThick*Mb/fAlphaGas,fGasThick/Zb/fAlphaGas);
    9795
    98   G4complex Ha = pow(Ca,-fAlphaPlate); 
    99   G4complex Hb = pow(Cb,-fAlphaGas);
     96  G4complex Ha = std::pow(Ca,-fAlphaPlate); 
     97  G4complex Hb = std::pow(Cb,-fAlphaGas);
    10098  G4complex H  = Ha*Hb;
    10199 
     
    104102
    105103  G4complex F2 =   (1.0-Ha)*(1.0-Ha)*Hb/(1.0-H)/(1.0-H)
    106                  * (1.0 - pow(H,fPlateNumber));
     104                 * (1.0 - std::pow(H,fPlateNumber));
    107105
    108106  G4complex R  = (F1 + F2)*OneInterfaceXTRdEdx(energy,gamma,varAngle);
    109107 
    110   result       = 2.0*real(R);
     108  result       = 2.0*std::real(R);
    111109 
    112110  return      result;
     
    121119  aMa = fPlateThick*GetPlateLinearPhotoAbs(energy);
    122120  bMb = fGasThick*GetGasLinearPhotoAbs(energy);
    123   Qa = exp(-aMa);
    124   Qb = exp(-bMb);
     121  Qa = std::exp(-aMa);
     122  Qb = std::exp(-bMb);
    125123  Q  = Qa*Qb;
    126   G4complex Ha( exp(-0.5*aMa)*cos(aZa),
    127                -exp(-0.5*aMa)*sin(aZa)   ); 
    128   G4complex Hb( exp(-0.5*bMb)*cos(bZb),
    129                -exp(-0.5*bMb)*sin(bZb)    );
     124  G4complex Ha( std::exp(-0.5*aMa)*std::cos(aZa),
     125               -std::exp(-0.5*aMa)*std::sin(aZa)   ); 
     126  G4complex Hb( std::exp(-0.5*bMb)*std::cos(bZb),
     127               -std::exp(-0.5*bMb)*std::sin(bZb)    );
    130128  G4complex H  = Ha*Hb;
    131129 
    132130  G4complex Hs = conj(H);
    133   D            = 1.0 /( (1 - sqrt(Q))*(1 - sqrt(Q)) +
    134                   4*sqrt(Q)*sin(0.5*(aZa+bZb))*sin(0.5*(aZa+bZb)) );
     131  D            = 1.0 /( (1 - std::sqrt(Q))*(1 - std::sqrt(Q)) +
     132                  4*std::sqrt(Q)*std::sin(0.5*(aZa+bZb))*std::sin(0.5*(aZa+bZb)) );
    135133  G4complex F1 = (1.0 - Ha)*(1.0 - Hb)*(1.0 - Hs)
    136134                 * G4double(fPlateNumber)*D;
    137135  G4complex F2 = (1.0-Ha)*(1.0-Ha)*Hb*(1.0-Hs)*(1.0-Hs)
    138                  * (1.0 - pow(H,fPlateNumber)) * D*D;
     136                 * (1.0 - std::pow(H,fPlateNumber)) * D*D;
    139137  G4complex R  = (F1 + F2)*OneInterfaceXTRdEdx(energy,gamma,varAngle);
    140138 
     
    149147  G4complex R  = (2.- Ha - 1./Ha)*S + (1. - Ha)*G4double(fPlateNumber);
    150148            R *= OneInterfaceXTRdEdx(energy,gamma,varAngle);
    151   result       = 2.0*real(R);
     149  result       = 2.0*std::real(R);
    152150  return      result;
    153151  */
  • trunk/source/processes/electromagnetic/xrays/src/G4Scintillation.cc

    r1315 r1337  
    2525//
    2626//
    27 // $Id: G4Scintillation.cc,v 1.31 2010/05/27 20:49:40 gum Exp $
    28 // GEANT4 tag $Name: geant4-09-04-beta-cand-01 $
     27// $Id: G4Scintillation.cc,v 1.32 2010/06/16 15:34:15 gcosmo Exp $
     28// GEANT4 tag $Name: geant4-09-04-beta-01 $
    2929//
    3030////////////////////////////////////////////////////////////////////////
     
    7171#include "G4Scintillation.hh"
    7272
    73 using namespace std;
    74 
    7573/////////////////////////
    7674// Class Implementation 
     
    214212        if (MeanNumberOfPhotons > 10.)
    215213        {
    216           G4double sigma = ResolutionScale * sqrt(MeanNumberOfPhotons);
     214          G4double sigma = ResolutionScale * std::sqrt(MeanNumberOfPhotons);
    217215          NumPhotons = G4int(G4RandGauss::shoot(MeanNumberOfPhotons,sigma)+0.5);
    218216        }
     
    281279                                          GetConstProperty("YIELDRATIO");
    282280                 if ( ExcitationRatio == 1.0 ) {
    283                     Num = G4int (min(YieldRatio,1.0) * NumPhotons);
     281                    Num = G4int (std::min(YieldRatio,1.0) * NumPhotons);
    284282                 }
    285283                 else {
    286                     Num = G4int (min(ExcitationRatio,1.0) * NumPhotons);
     284                    Num = G4int (std::min(ExcitationRatio,1.0) * NumPhotons);
    287285                 }
    288286                 ScintillationTime   = aMaterialPropertiesTable->
     
    330328
    331329                G4double cost = 1. - 2.*G4UniformRand();
    332                 G4double sint = sqrt((1.-cost)*(1.+cost));
     330                G4double sint = std::sqrt((1.-cost)*(1.+cost));
    333331
    334332                G4double phi = twopi*G4UniformRand();
    335                 G4double sinp = sin(phi);
    336                 G4double cosp = cos(phi);
     333                G4double sinp = std::sin(phi);
     334                G4double cosp = std::cos(phi);
    337335
    338336                G4double px = sint*cosp;
     
    355353
    356354                phi = twopi*G4UniformRand();
    357                 sinp = sin(phi);
    358                 cosp = cos(phi);
     355                sinp = std::sin(phi);
     356                cosp = std::cos(phi);
    359357
    360358                photonPolarization = cosp * photonPolarization + sinp * perp;
     
    392390                if (ScintillationRiseTime==0.0) {
    393391                   deltaTime = deltaTime -
    394                           ScintillationTime * log( G4UniformRand() );
     392                          ScintillationTime * std::log( G4UniformRand() );
    395393                } else {
    396394                   deltaTime = deltaTime +
     
    633631          // make sure the envelope function is
    634632          // always larger than the bi-exponential
    635           G4double t = -1.0*tau2*log(1-ran1);
     633          G4double t = -1.0*tau2*std::log(1-ran1);
    636634          G4double g = d*single_exp(t,tau2);
    637635          if (ran2 <= bi_exp(t,tau1,tau2)/g) return t;
  • trunk/source/processes/electromagnetic/xrays/src/G4StrawTubeXTRadiator.cc

    r1228 r1337  
    2525//
    2626//
    27 // $Id: G4StrawTubeXTRadiator.cc,v 1.6 2007/09/29 17:49:34 vnivanch Exp $
    28 // GEANT4 tag $Name: geant4-09-03 $
     27// $Id: G4StrawTubeXTRadiator.cc,v 1.7 2010/06/16 15:34:15 gcosmo Exp $
     28// GEANT4 tag $Name: geant4-09-04-beta-01 $
    2929//
    3030
     
    3232#include "Randomize.hh"
    3333#include "G4Gamma.hh"
    34 
    35 using namespace std;
    3634
    3735////////////////////////////////////////////////////////////////////////////
     
    7876  fSigma3 = fPlasmaCof*mediumMat->GetElectronDensity();
    7977  if(verboseLevel > 0)
    80     G4cout<<"medium plasma energy = "<<sqrt(fSigma3)/eV<<" eV"<<G4endl;
     78    G4cout<<"medium plasma energy = "<<std::sqrt(fSigma3)/eV<<" eV"<<G4endl;
    8179
    8280  // Compute cofs for preparation of linear photo absorption in external medium
     
    121119  G4complex C3(1.0 + 0.5*fGasThick*M3/fAlphaGas, fGasThick/L3/fAlphaGas);
    122120
    123   G4complex H2 = pow(C2,-fAlphaPlate); 
    124   G4complex H3 = pow(C3,-fAlphaGas);
     121  G4complex H2 = std::pow(C2,-fAlphaPlate); 
     122  G4complex H3 = std::pow(C3,-fAlphaGas);
    125123  G4complex H  = H2*H3;
    126124
     
    134132                 2.*( Z1 - Z2 )*( Z2 - Z3 )*H2*( 1. - H3 ) ;
    135133
    136   result       = 2.0*real(R)*(varAngle*energy/hbarc/hbarc);
     134  result       = 2.0*std::real(R)*(varAngle*energy/hbarc/hbarc);
    137135 
    138136  return      result;
     
    165163                                             G4double varAngle    )
    166164{
    167   G4double cof, length,delta, real, image;
     165  G4double cof, length,delta, real_v, image_v;
    168166
    169167  length = 0.5*GetMediumFormationZone(omega,gamma,varAngle);
     
    171169  cof    = 1.0/(1.0 + delta*delta);
    172170
    173   real   = length*cof;
    174   image  = real*delta;
    175 
    176   G4complex zone(real,image);
     171  real_v   = length*cof;
     172  image_v  = real_v*delta;
     173
     174  G4complex zone(real_v,image_v);
    177175  return zone;
    178176}
  • trunk/source/processes/electromagnetic/xrays/src/G4SynchrotronRadiation.cc

    r1228 r1337  
    2525//
    2626//
    27 // $Id: G4SynchrotronRadiation.cc,v 1.5 2006/06/29 19:56:15 gunter Exp $
    28 // GEANT4 tag $Name: geant4-09-03 $
     27// $Id: G4SynchrotronRadiation.cc,v 1.6 2010/06/16 15:34:15 gcosmo Exp $
     28// GEANT4 tag $Name: geant4-09-04-beta-01 $
    2929//
    3030// --------------------------------------------------------------
     
    4444
    4545#include "G4SynchrotronRadiation.hh"
    46 // #include "G4Integrator.hh"
    4746#include "G4UnitsTable.hh"
    48 
    49 using namespace std;
    5047
    5148///////////////////////////////////////////////////////////////////////
     
    6562  fFieldPropagator = transportMgr->GetPropagatorInField();
    6663
    67   fLambdaConst = sqrt(3.0)*electron_mass_c2/
     64  fLambdaConst = std::sqrt(3.0)*electron_mass_c2/
    6865                           (2.5*fine_structure_const*eplus*c_light) ;
    6966  fEnergyConst = 1.5*c_light*c_light*eplus*hbar_Planck/electron_mass_c2  ;
     
    169166                << "  B = " << Btot/tesla << " Tesla"
    170167            << "  perpB = " << perpB/tesla << " Tesla"
    171             << "  Theta = " << Theta << " sin(Theta)=" << sin(Theta) << '\n'
     168            << "  Theta = " << Theta << " std::sin(Theta)=" << std::sin(Theta) << '\n'
    172169            << "  ptot  = " << G4BestUnit(ptot,"Energy")
    173170            << "  rho   = " << G4BestUnit(rho,"Length")
     
    262259      G4double Phi  = twopi * G4UniformRand() ;
    263260
    264       G4double dirx = sin(Teta)*cos(Phi) ,
    265                diry = sin(Teta)*sin(Phi) ,
    266                dirz = cos(Teta) ;
     261      G4double dirx = std::sin(Teta)*std::cos(Phi) ,
     262               diry = std::sin(Teta)*std::sin(Phi) ,
     263               dirz = std::cos(Teta) ;
    267264
    268265      G4ThreeVector gammaDirection ( dirx, diry, dirz);
     
    271268      // polarization of new gamma
    272269
    273       // G4double sx =  cos(Teta)*cos(Phi);
    274       // G4double sy =  cos(Teta)*sin(Phi);
    275       // G4double sz = -sin(Teta);
     270      // G4double sx =  std::cos(Teta)*std::cos(Phi);
     271      // G4double sy =  std::cos(Teta)*std::sin(Phi);
     272      // G4double sz = -std::sin(Teta);
    276273
    277274      G4ThreeVector gammaPolarization = FieldValue.cross(gammaDirection);
     
    368365  else if(x<aa3) return       Chebyshev(aa2,aa3,cheb2,ncheb2,x);
    369366  else if(x<1-0.0000841363)
    370   { G4double y=-log(1-x);
     367  { G4double y=-std::log(1-x);
    371368        return y*Chebyshev(aa4,aa5,cheb3,ncheb3,y);
    372369  }
    373370  else
    374   { G4double y=-log(1-x);
     371  { G4double y=-std::log(1-x);
    375372        return y*Chebyshev(aa5,aa6,cheb4,ncheb4,y);
    376373  }
     
    384381  static G4bool FirstTime=true;
    385382  if(verboseLevel > 0 && FirstTime)
    386   { G4double Emean=8./(15.*sqrt(3.))*Ecr; // mean photon energy
    387     G4double E_rms=sqrt(211./675.)*Ecr; // rms of photon energy distribution
     383  { G4double Emean=8./(15.*std::sqrt(3.))*Ecr; // mean photon energy
     384    G4double E_rms=std::sqrt(211./675.)*Ecr; // rms of photon energy distribution
    388385    G4cout << "G4SynchrotronRadiation::GetRandomEnergySR :" << '\n' << std::setprecision(4)
    389386        << "  Ecr   = "    << G4BestUnit(Ecr,"Energy") << '\n'
  • trunk/source/processes/electromagnetic/xrays/src/G4SynchrotronRadiationInMat.cc

    r1228 r1337  
    2525//
    2626//
    27 // $Id: G4SynchrotronRadiationInMat.cc,v 1.2 2006/06/29 19:56:17 gunter Exp $
    28 // GEANT4 tag $Name: geant4-09-03 $
     27// $Id: G4SynchrotronRadiationInMat.cc,v 1.3 2010/06/16 15:34:15 gcosmo Exp $
     28// GEANT4 tag $Name: geant4-09-04-beta-01 $
    2929//
    3030// --------------------------------------------------------------
     
    4444#include "G4Integrator.hh"
    4545
    46 using namespace std;
    47 
    4846////////////////////////////////////////////////////////////////////
    4947//
     
    5250
    5351const G4double
    54 G4SynchrotronRadiationInMat::fLambdaConst = sqrt(3.0)*electron_mass_c2/
     52G4SynchrotronRadiationInMat::fLambdaConst = std::sqrt(3.0)*electron_mass_c2/
    5553                                       (2.5*fine_structure_const*eplus*c_light) ;
    5654
     
    317315      G4double Phi  = twopi * G4UniformRand() ;
    318316
    319       G4double dirx = sin(Teta)*cos(Phi) ,
    320                diry = sin(Teta)*sin(Phi) ,
    321                dirz = cos(Teta) ;
     317      G4double dirx = std::sin(Teta)*std::cos(Phi) ,
     318               diry = std::sin(Teta)*std::sin(Phi) ,
     319               dirz = std::cos(Teta) ;
    322320
    323321      G4ThreeVector gammaDirection ( dirx, diry, dirz);
     
    326324      // polarization of new gamma
    327325
    328       // G4double sx =  cos(Teta)*cos(Phi);
    329       // G4double sy =  cos(Teta)*sin(Phi);
    330       // G4double sz = -sin(Teta);
     326      // G4double sx =  std::cos(Teta)*std::cos(Phi);
     327      // G4double sy =  std::cos(Teta)*std::sin(Phi);
     328      // G4double sz = -std::sin(Teta);
    331329
    332330      G4ThreeVector gammaPolarization = FieldValue.cross(gammaDirection);
  • trunk/source/processes/electromagnetic/xrays/src/G4TransitionRadiation.cc

    r1228 r1337  
    2525//
    2626//
    27 // $Id: G4TransitionRadiation.cc,v 1.7 2006/06/29 19:56:19 gunter Exp $
    28 // GEANT4 tag $Name: geant4-09-03 $
     27// $Id: G4TransitionRadiation.cc,v 1.8 2010/06/16 15:34:15 gcosmo Exp $
     28// GEANT4 tag $Name: geant4-09-04-beta-01 $
    2929//
    3030// G4TransitionRadiation class -- implementation file
     
    4242
    4343#include <cmath>
    44 // #include "G4ios.hh"
    45 // #include <fstream.h>
    46 // #include <stdlib.h>
    4744
    4845#include "G4TransitionRadiation.hh"
    4946#include "G4Material.hh"
    50 
    51 // Init gamma array
    52 
    5347
    5448// Local constants
     
    5852const G4int   G4TransitionRadiation::fPointNumber = 100 ;
    5953
    60 using namespace std;
    6154
    6255///////////////////////////////////////////////////////////////////////
     
    8780//
    8881// Sympson integral of TR spectral-angle density over energy between
    89 // the limits energy 1 and energy2 at fixed varAngle = 1 - cos(Theta)
     82// the limits energy 1 and energy2 at fixed varAngle = 1 - std::cos(Theta)
    9083
    9184G4double
  • trunk/source/processes/electromagnetic/xrays/src/G4TransparentRegXTRadiator.cc

    r1228 r1337  
    2525//
    2626//
    27 // $Id: G4TransparentRegXTRadiator.cc,v 1.11 2007/09/29 17:49:34 vnivanch Exp $
    28 // GEANT4 tag $Name: geant4-09-03 $
     27// $Id: G4TransparentRegXTRadiator.cc,v 1.12 2010/06/16 15:34:15 gcosmo Exp $
     28// GEANT4 tag $Name: geant4-09-04-beta-01 $
    2929//
    3030
     
    3535#include "G4Integrator.hh"
    3636#include "G4Gamma.hh"
    37 
    38 using namespace std;
    3937
    4038////////////////////////////////////////////////////////////////////////////
     
    113111    tmp    = pi*fPlateThick*(k + cof2)/(fPlateThick + fGasThick);
    114112    result = (k - cof1)*(k - cof1)*(k + cof2)*(k + cof2);
    115     // tmp = sin(tmp)*sin(tmp)*abs(k-cofMin)/result;
     113    // tmp = std::sin(tmp)*std::sin(tmp)*std::abs(k-cofMin)/result;
    116114    if( k == kMin && kMin == G4int(cofMin) )
    117115    {
    118       sum   += 0.5*sin(tmp)*sin(tmp)*abs(k-cofMin)/result;
     116      sum   += 0.5*std::sin(tmp)*std::sin(tmp)*std::abs(k-cofMin)/result;
    119117    }
    120118    else
    121119    {
    122       sum   += sin(tmp)*sin(tmp)*abs(k-cofMin)/result;
     120      sum   += std::sin(tmp)*std::sin(tmp)*std::abs(k-cofMin)/result;
    123121    }
    124122    if(verboseLevel > 2)
    125123    {   
    126       G4cout<<"k = "<<k<<"; tmp = "<<sin(tmp)*sin(tmp)*abs(k-cofMin)/result
     124      G4cout<<"k = "<<k<<"; tmp = "<<std::sin(tmp)*std::sin(tmp)*std::abs(k-cofMin)/result
    127125              <<";    sum = "<<sum<<G4endl; 
    128126    } 
    129127  }
    130128  result = 4*( cof1 + cof2 )*( cof1 + cof2 )*sum/energy;
    131   // result *= ( 1 - exp(-0.5*fPlateNumber*sigma) )/( 1 - exp(-0.5*sigma) ); 
     129  // result *= ( 1 - std::exp(-0.5*fPlateNumber*sigma) )/( 1 - std::exp(-0.5*sigma) ); 
    132130  // fPlateNumber;
    133   result *= fPlateNumber; // *exp(-0.5*fPlateNumber*sigma);
    134                              // +1-exp(-0.5*fPlateNumber*sigma);
     131  result *= fPlateNumber; // *std::exp(-0.5*fPlateNumber*sigma);
     132                             // +1-std::exp(-0.5*fPlateNumber*sigma);
    135133  /* 
    136134  fEnergy = energy;
     
    174172  G4complex Cb(1.0+0.5*fGasThick*Mb/fAlphaGas,fGasThick/Zb/fAlphaGas);
    175173
    176   G4complex Ha = pow(Ca,-fAlphaPlate); 
    177   G4complex Hb = pow(Cb,-fAlphaGas);
     174  G4complex Ha = std::pow(Ca,-fAlphaPlate); 
     175  G4complex Hb = std::pow(Cb,-fAlphaGas);
    178176  G4complex H  = Ha*Hb;
    179177  G4complex F1 =   (1.0 - Ha)*(1.0 - Hb )/(1.0 - H)
    180178                 * G4double(fPlateNumber) ;
    181179  G4complex F2 =   (1.0-Ha)*(1.0-Ha)*Hb/(1.0-H)/(1.0-H)
    182                  * (1.0 - exp(-0.5*fPlateNumber*sigma)) ;
    183   //    *(1.0 - pow(H,fPlateNumber)) ;
     180                 * (1.0 - std::exp(-0.5*fPlateNumber*sigma)) ;
     181  //    *(1.0 - std::pow(H,fPlateNumber)) ;
    184182    G4complex R  = (F1 + F2)*OneInterfaceXTRdEdx(energy,gamma,varAngle);
    185183  // G4complex R  = F2*OneInterfaceXTRdEdx(energy,gamma,varAngle);
    186   result       = 2.0*real(R); 
     184  result       = 2.0*std::real(R); 
    187185  return      result;
    188186  */
     
    196194  bMb   = fGasThick*GetGasLinearPhotoAbs(energy);
    197195  sigma = aMa*fPlateThick + bMb*fGasThick;
    198   Qa    = exp(-0.5*aMa);
    199   Qb    = exp(-0.5*bMb);
     196  Qa    = std::exp(-0.5*aMa);
     197  Qb    = std::exp(-0.5*bMb);
    200198  Q     = Qa*Qb;
    201199
    202   G4complex Ha( Qa*cos(aZa), -Qa*sin(aZa)   ); 
    203   G4complex Hb( Qb*cos(bZb), -Qb*sin(bZb)    );
     200  G4complex Ha( Qa*std::cos(aZa), -Qa*std::sin(aZa)   ); 
     201  G4complex Hb( Qb*std::cos(bZb), -Qb*std::sin(bZb)    );
    204202  G4complex H  = Ha*Hb;
    205203  G4complex Hs = conj(H);
    206204  D            = 1.0 /( (1 - Q)*(1 - Q) +
    207                   4*Q*sin(0.5*(aZa + bZb))*sin(0.5*(aZa + bZb)) );
     205                  4*Q*std::sin(0.5*(aZa + bZb))*std::sin(0.5*(aZa + bZb)) );
    208206  G4complex F1 = (1.0 - Ha)*(1.0 - Hb)*(1.0 - Hs)
    209207                 * G4double(fPlateNumber)*D;
    210208  G4complex F2 = (1.0 - Ha)*(1.0 - Ha)*Hb*(1.0 - Hs)*(1.0 - Hs)
    211                    // * (1.0 - pow(H,fPlateNumber)) * D*D;
    212                  * (1.0 - exp(-0.5*fPlateNumber*sigma)) * D*D;
     209                   // * (1.0 - std::pow(H,fPlateNumber)) * D*D;
     210                 * (1.0 - std::exp(-0.5*fPlateNumber*sigma)) * D*D;
    213211  G4complex R  = (F1 + F2)*OneInterfaceXTRdEdx(energy,gamma,varAngle);
    214   result       = 2.0*real(R);
     212  result       = 2.0*std::real(R);
    215213  return      result;
    216214 
  • trunk/source/processes/electromagnetic/xrays/src/G4VTransitionRadiation.cc

    r1228 r1337  
    2525//
    2626//
    27 // $Id: G4VTransitionRadiation.cc,v 1.5 2006/06/29 19:56:23 gunter Exp $
    28 // GEANT4 tag $Name: geant4-09-03 $
     27// $Id: G4VTransitionRadiation.cc,v 1.6 2010/06/16 15:34:15 gcosmo Exp $
     28// GEANT4 tag $Name: geant4-09-04-beta-01 $
    2929//
    3030// G4VTransitionRadiation class -- implementation file
     
    4646///////////////////////////////////////////////////////////////////////
    4747
    48 using namespace std;
    49 
    5048G4VTransitionRadiation::G4VTransitionRadiation( const G4String& processName,
    5149                                                      G4ProcessType type )
     
    5351  nSteps(0),
    5452  gammaMin(100),
    55   cosDThetaMax(cos(0.1))
     53  cosDThetaMax(std::cos(0.1))
    5654{
    5755  Clear();
  • trunk/source/processes/electromagnetic/xrays/src/G4VXTRenergyLoss.cc

    r1228 r1337  
    2525//
    2626//
    27 // $Id: G4VXTRenergyLoss.cc,v 1.44 2007/09/29 17:49:34 vnivanch Exp $
    28 // GEANT4 tag $Name: geant4-09-03 $
     27// $Id: G4VXTRenergyLoss.cc,v 1.45 2010/06/16 15:34:15 gcosmo Exp $
     28// GEANT4 tag $Name: geant4-09-04-beta-01 $
    2929//
    3030// History:
     
    5454#include "G4PhysicsFreeVector.hh"
    5555#include "G4PhysicsLinearVector.hh"
    56 
    57 using namespace std;
    5856
    5957////////////////////////////////////////////////////////////////////////////
     
    142140  //  fSigma1 = (20.9*eV)*(20.9*eV) ;
    143141  if(verboseLevel > 0)
    144     G4cout<<"plate plasma energy = "<<sqrt(fSigma1)/eV<<" eV"<<G4endl ;
     142    G4cout<<"plate plasma energy = "<<std::sqrt(fSigma1)/eV<<" eV"<<G4endl ;
    145143
    146144  // plasma energy squared for gas material
     
    148146  fSigma2 = fPlasmaCof*gasMat->GetElectronDensity()  ;
    149147  if(verboseLevel > 0)
    150     G4cout<<"gas plasma energy = "<<sqrt(fSigma2)/eV<<" eV"<<G4endl ;
     148    G4cout<<"gas plasma energy = "<<std::sqrt(fSigma2)/eV<<" eV"<<G4endl ;
    151149
    152150  // Compute cofs for preparation of linear photo absorption
     
    203201    }
    204202
    205     if ( fabs( gamma - fGamma ) < 0.05*gamma ) lambda = fLambda;
     203    if ( std::fabs( gamma - fGamma ) < 0.05*gamma ) lambda = fLambda;
    206204    else
    207205    {
     
    495493    result = (k - cof1)*(k - cof1)*(k + cof2)*(k + cof2);
    496494
    497     tmp = sin(tmp)*sin(tmp)*abs(k-cofMin)/result;
     495    tmp = std::sin(tmp)*std::sin(tmp)*std::abs(k-cofMin)/result;
    498496
    499497    if( k == kMin && kMin == G4int(cofMin) )
    500498    {
    501       angleSum   += 0.5*tmp; // 0.5*sin(tmp)*sin(tmp)*abs(k-cofMin)/result;
     499      angleSum   += 0.5*tmp; // 0.5*std::sin(tmp)*std::sin(tmp)*std::abs(k-cofMin)/result;
    502500    }
    503501    else
    504502    {
    505       angleSum   += tmp; // sin(tmp)*sin(tmp)*abs(k-cofMin)/result;
    506     }
    507     theta = abs(k-cofMin)*cofPHC/energy/(fPlateThick + fGasThick);
     503      angleSum   += tmp; // std::sin(tmp)*std::sin(tmp)*std::abs(k-cofMin)/result;
     504    }
     505    theta = std::abs(k-cofMin)*cofPHC/energy/(fPlateThick + fGasThick);
    508506    if(verboseLevel > 2)
    509507    {
    510508      G4cout<<"iTheta = "<<iTheta<<"; k = "<<k<<"; theta = "
    511509            <<std::sqrt(theta)*fGamma<<"; tmp = "
    512             <<tmp // sin(tmp)*sin(tmp)*abs(k-cofMin)/result
     510            <<tmp // std::sin(tmp)*std::sin(tmp)*std::abs(k-cofMin)/result
    513511            <<";    angleSum = "<<angleSum<<G4endl;
    514512    }
     
    697695      if (fAngleRadDistr)
    698696      {
    699         // theta = fabs(G4RandGauss::shoot(0.0,pi/gamma));
     697        // theta = std::fabs(G4RandGauss::shoot(0.0,pi/gamma));
    700698        theta2 = GetRandomAngle(energyTR,iTkin);
    701699        if(theta2 > 0.) theta = std::sqrt(theta2);
    702700        else            theta = theta2;
    703701      }
    704       else theta = fabs(G4RandGauss::shoot(0.0,pi/gamma));
     702      else theta = std::fabs(G4RandGauss::shoot(0.0,pi/gamma));
    705703
    706704      if( theta >= 0.1 ) theta = 0.1;
     
    710708      phi = twopi*G4UniformRand();
    711709
    712       dirX = sin(theta)*cos(phi);
    713       dirY = sin(theta)*sin(phi);
    714       dirZ = cos(theta);
     710      dirX = std::sin(theta)*std::cos(phi);
     711      dirY = std::sin(theta)*std::sin(phi);
     712      dirZ = std::cos(theta);
    715713
    716714      G4ThreeVector directionTR(dirX,dirY,dirZ);
     
    762760// The high energy small theta approximation is applied.
    763761// (matter1 -> matter2, or 2->1)
    764 // varAngle =2* (1 - cos(theta)) or approximately = theta*theta
     762// varAngle =2* (1 - std::cos(theta)) or approximately = theta*theta
    765763//
    766764
     
    850848  // G4cout<<"cof1 = "<<cof1<<"; cof2 = "<<cof2<<"; cofPHC = "<<cofPHC<<G4endl;
    851849
    852   cofMin  =  sqrt(cof1*cof2);
     850  cofMin  =  std::sqrt(cof1*cof2);
    853851  cofMin /= cofPHC;
    854852
     
    863861  {
    864862    tmp1 = cofPHC*k;
    865     tmp2 = sqrt(tmp1*tmp1-cof1*cof2);
     863    tmp2 = std::sqrt(tmp1*tmp1-cof1*cof2);
    866864    energy1 = (tmp1+tmp2)/cof1;
    867865    energy2 = (tmp1-tmp2)/cof1;
     
    874872        tmp1 = ( energy1*energy1*(1./fGamma/fGamma + varAngle) + fSigma1 )
    875873          * fPlateThick/(4*hbarc*energy1);
    876         tmp2 = sin(tmp1);
     874        tmp2 = std::sin(tmp1);
    877875        tmp  = energy1*tmp2*tmp2;
    878876        tmp2 = fPlateThick/(4*tmp1);
     
    880878        tmp *= (tmp1-tmp2)*(tmp1-tmp2);
    881879        tmp1 = cof1/(4*hbarc) - cof2/(4*hbarc*energy1*energy1);
    882         tmp2 = abs(tmp1);
     880        tmp2 = std::abs(tmp1);
    883881        if(tmp2 > 0.) tmp /= tmp2;
    884882        else continue;
     
    889887        tmp1 = ( energy2*energy2*(1./fGamma/fGamma + varAngle) + fSigma1 )
    890888          * fPlateThick/(4*hbarc*energy2);
    891         tmp2 = sin(tmp1);
     889        tmp2 = std::sin(tmp1);
    892890        tmp  = energy2*tmp2*tmp2;
    893891        tmp2 = fPlateThick/(4*tmp1);
     
    895893        tmp *= (tmp1-tmp2)*(tmp1-tmp2);
    896894        tmp1 = cof1/(4*hbarc) - cof2/(4*hbarc*energy2*energy2);
    897         tmp2 = abs(tmp1);
     895        tmp2 = std::abs(tmp1);
    898896        if(tmp2 > 0.) tmp /= tmp2;
    899897        else continue;
     
    940938                                             G4double varAngle    )
    941939{
    942   G4double cof, length,delta, real, image ;
     940  G4double cof, length,delta, real_v, image_v ;
    943941
    944942  length = 0.5*GetPlateFormationZone(omega,gamma,varAngle) ;
     
    946944  cof    = 1.0/(1.0 + delta*delta) ;
    947945
    948   real   = length*cof ;
    949   image  = real*delta ;
    950 
    951   G4complex zone(real,image);
     946  real_v  = length*cof ;
     947  image_v = real_v*delta ;
     948
     949  G4complex zone(real_v,image_v);
    952950  return zone ;
    953951}
     
    10131011                                           G4double varAngle    )
    10141012{
    1015   G4double cof, length,delta, real, image ;
     1013  G4double cof, length,delta, real_v, image_v ;
    10161014
    10171015  length = 0.5*GetGasFormationZone(omega,gamma,varAngle) ;
     
    10191017  cof    = 1.0/(1.0 + delta*delta) ;
    10201018
    1021   real   = length*cof ;
    1022   image  = real*delta ;
    1023 
    1024   G4complex zone(real,image);
     1019  real_v   = length*cof ;
     1020  image_v  = real_v*delta ;
     1021
     1022  G4complex zone(real_v,image_v);
    10251023  return zone ;
    10261024}
     
    10801078void G4VXTRenergyLoss::GetPlateZmuProduct()
    10811079{
    1082   ofstream outPlate("plateZmu.dat", ios::out ) ;
    1083   outPlate.setf( ios::scientific, ios::floatfield );
     1080  std::ofstream outPlate("plateZmu.dat", std::ios::out ) ;
     1081  outPlate.setf( std::ios::scientific, std::ios::floatfield );
    10841082
    10851083  G4int i ;
     
    11181116void G4VXTRenergyLoss::GetGasZmuProduct()
    11191117{
    1120   ofstream outGas("gasZmu.dat", ios::out ) ;
    1121   outGas.setf( ios::scientific, ios::floatfield );
     1118  std::ofstream outGas("gasZmu.dat", std::ios::out ) ;
     1119  outGas.setf( std::ios::scientific, std::ios::floatfield );
    11221120  G4int i ;
    11231121  G4double omega, varAngle, gamma ;
     
    12091207  if (Z < 1.5) T0 = 40.0*keV;
    12101208
    1211   G4double X   = max(GammaEnergy, T0) / electron_mass_c2;
     1209  G4double X   = std::max(GammaEnergy, T0) / electron_mass_c2;
    12121210  CrossSection = p1Z*std::log(1.+2.*X)/X
    12131211               + (p2Z + p3Z*X + p4Z*X*X)/(1. + a*X + b*X*X + c*X*X*X);
     
    12191217    G4double dT0 = 1.*keV;
    12201218    X = (T0+dT0) / electron_mass_c2 ;
    1221     G4double sigma = p1Z*log(1.+2*X)/X
     1219    G4double sigma = p1Z*std::log(1.+2*X)/X
    12221220                    + (p2Z + p3Z*X + p4Z*X*X)/(1. + a*X + b*X*X + c*X*X*X);
    12231221    G4double   c1 = -T0*(sigma-CrossSection)/(CrossSection*dT0);
    12241222    G4double   c2 = 0.150;
    1225     if (Z > 1.5) c2 = 0.375-0.0556*log(Z);
    1226     G4double    y = log(GammaEnergy/T0);
    1227     CrossSection *= exp(-y*(c1+c2*y));
     1223    if (Z > 1.5) c2 = 0.375-0.0556*std::log(Z);
     1224    G4double    y = std::log(GammaEnergy/T0);
     1225    CrossSection *= std::exp(-y*(c1+c2*y));
    12281226  }
    12291227  //  G4cout << "e= " << GammaEnergy << " Z= " << Z << " cross= " << CrossSection << G4endl;
     
    12391237// The high energy small theta approximation is applied.
    12401238// (matter1 -> matter2, or 2->1)
    1241 // varAngle =2* (1 - cos(theta)) or approximately = theta*theta
     1239// varAngle =2* (1 - std::cos(theta)) or approximately = theta*theta
    12421240//
    12431241
     
    13261324  G4double gamma, numberE ;
    13271325
    1328   ofstream outEn("numberE.dat", ios::out ) ;
    1329   outEn.setf( ios::scientific, ios::floatfield );
    1330 
    1331   ofstream outAng("numberAng.dat", ios::out ) ;
    1332   outAng.setf( ios::scientific, ios::floatfield );
     1326  std::ofstream outEn("numberE.dat", std::ios::out ) ;
     1327  outEn.setf( std::ios::scientific, std::ios::floatfield );
     1328
     1329  std::ofstream outAng("numberAng.dat", std::ios::out ) ;
     1330  outAng.setf( std::ios::scientific, std::ios::floatfield );
    13331331
    13341332  for(iTkin=0;iTkin<fTotBin;iTkin++)      // Lorentz factor loop
  • trunk/source/processes/electromagnetic/xrays/src/G4XTRTransparentRegRadModel.cc

    r819 r1337  
    3333#include "G4Gamma.hh"
    3434
    35 using namespace std;
    36 
    3735////////////////////////////////////////////////////////////////////////////
    3836//
     
    121119    if( k == kMin && kMin == G4int(cofMin) )
    122120    {
    123       sum   += 0.5*sin(tmp)*sin(tmp)*std::abs(k-cofMin)/result;
     121      sum   += 0.5*std::sin(tmp)*std::sin(tmp)*std::abs(k-cofMin)/result;
    124122    }
    125123    else
    126124    {
    127       sum   += sin(tmp)*sin(tmp)*std::abs(k-cofMin)/result;
     125      sum   += std::sin(tmp)*std::sin(tmp)*std::abs(k-cofMin)/result;
    128126    }
    129127    //  G4cout<<"k = "<<k<<";    sum = "<<sum<<G4endl;   
    130128  }
    131129  result = 4.*( cof1 + cof2 )*( cof1 + cof2 )*sum/energy;
    132   result *= ( 1. - exp(-fPlateNumber*sigma) )/( 1. - exp(-sigma) ); 
     130  result *= ( 1. - std::exp(-fPlateNumber*sigma) )/( 1. - std::exp(-sigma) ); 
    133131  return result;
    134132}
     
    159157  G4complex Cb(1.0+0.5*fGasThick*Mb/fAlphaGas,fGasThick/Zb/fAlphaGas);
    160158
    161   G4complex Ha = pow(Ca,-fAlphaPlate); 
    162   G4complex Hb = pow(Cb,-fAlphaGas);
     159  G4complex Ha = std::pow(Ca,-fAlphaPlate); 
     160  G4complex Hb = std::pow(Cb,-fAlphaGas);
    163161  G4complex H  = Ha*Hb;
    164162  G4complex F1 =   (1.0 - Ha)*(1.0 - Hb )/(1.0 - H)
    165163                 * G4double(fPlateNumber) ;
    166164  G4complex F2 =   (1.0-Ha)*(1.0-Ha)*Hb/(1.0-H)/(1.0-H)
    167                  * (1.0 - exp(-0.5*fPlateNumber*sigma)) ;
    168   //    *(1.0 - pow(H,fPlateNumber)) ;
     165                 * (1.0 - std::exp(-0.5*fPlateNumber*sigma)) ;
     166  //    *(1.0 - std::pow(H,fPlateNumber)) ;
    169167    G4complex R  = (F1 + F2)*OneInterfaceXTRdEdx(energy,gamma,varAngle);
    170168  // G4complex R  = F2*OneInterfaceXTRdEdx(energy,gamma,varAngle);
    171   result       = 2.0*real(R); 
     169  result       = 2.0*std::real(R); 
    172170  return      result;
    173171  */
     
    181179  bMb   = fGasThick*GetGasLinearPhotoAbs(energy);
    182180  sigma = aMa*fPlateThick + bMb*fGasThick;
    183   Qa    = exp(-0.5*aMa);
    184   Qb    = exp(-0.5*bMb);
     181  Qa    = std::exp(-0.5*aMa);
     182  Qb    = std::exp(-0.5*bMb);
    185183  Q     = Qa*Qb;
    186184
    187   G4complex Ha( Qa*cos(aZa), -Qa*sin(aZa)   ); 
    188   G4complex Hb( Qb*cos(bZb), -Qb*sin(bZb)    );
     185  G4complex Ha( Qa*std::cos(aZa), -Qa*std::sin(aZa)   ); 
     186  G4complex Hb( Qb*std::cos(bZb), -Qb*std::sin(bZb)    );
    189187  G4complex H  = Ha*Hb;
    190188  G4complex Hs = conj(H);
    191189  D            = 1.0 /( (1 - Q)*(1 - Q) +
    192                   4*Q*sin(0.5*(aZa + bZb))*sin(0.5*(aZa + bZb)) );
     190                  4*Q*std::sin(0.5*(aZa + bZb))*std::sin(0.5*(aZa + bZb)) );
    193191  G4complex F1 = (1.0 - Ha)*(1.0 - Hb)*(1.0 - Hs)
    194192                 * G4double(fPlateNumber)*D;
    195193  G4complex F2 = (1.0 - Ha)*(1.0 - Ha)*Hb*(1.0 - Hs)*(1.0 - Hs)
    196                    // * (1.0 - pow(H,fPlateNumber)) * D*D;
    197                  * (1.0 - exp(-0.5*fPlateNumber*sigma)) * D*D;
     194                   // * (1.0 - std::pow(H,fPlateNumber)) * D*D;
     195                 * (1.0 - std::exp(-0.5*fPlateNumber*sigma)) * D*D;
    198196  G4complex R  = (F1 + F2)*OneInterfaceXTRdEdx(energy,gamma,varAngle);
    199   result       = 2.0*real(R);
     197  result       = 2.0*std::real(R);
    200198  return      result;
    201199 
Note: See TracChangeset for help on using the changeset viewer.