Import Geant4 7.0.0 source tree
This commit is contained in:
@@ -21,8 +21,8 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4NeutronBetaDecayChannel.cc,v 1.4 2002/04/03 09:05:33 kurasige Exp $
|
||||
// GEANT4 tag $Name: geant4-05-02-patch-01 $
|
||||
// $Id: G4NeutronBetaDecayChannel.cc,v 1.6 2004/12/10 18:02:04 gcosmo Exp $
|
||||
// GEANT4 tag $Name: geant4-07-00-cand-05 $
|
||||
//
|
||||
//
|
||||
// ------------------------------------------------------------
|
||||
@@ -117,7 +117,7 @@ G4DecayProducts *G4NeutronBetaDecayChannel::DecayIt(G4double)
|
||||
G4double r0;
|
||||
do {
|
||||
x = xmax*G4UniformRand();
|
||||
p = sqrt(x*(x+2.0*m));
|
||||
p = std::sqrt(x*(x+2.0*m));
|
||||
w = 1.0-2.0*G4UniformRand();
|
||||
r = p*(x+m)*(xmax-x)*(xmax-x)*(1.0+aENuCorr*p/(x+m)*w);
|
||||
r0 = G4UniformRand()*(xmax+m)*(xmax+m)*xmax*xmax*(1.0+aENuCorr);
|
||||
@@ -126,8 +126,8 @@ G4DecayProducts *G4NeutronBetaDecayChannel::DecayIt(G4double)
|
||||
//create daughter G4DynamicParticle
|
||||
// rotation materix to lab frame
|
||||
G4double costheta = 2.*G4UniformRand()-1.0;
|
||||
G4double theta = acos(costheta)*rad;
|
||||
G4double phi = 2.0*M_PI*G4UniformRand()*rad;
|
||||
G4double theta = std::acos(costheta)*rad;
|
||||
G4double phi = twopi*G4UniformRand()*rad;
|
||||
G4RotationMatrix rm;
|
||||
rm.rotateY(theta);
|
||||
rm.rotateZ(phi);
|
||||
@@ -143,7 +143,7 @@ G4DecayProducts *G4NeutronBetaDecayChannel::DecayIt(G4double)
|
||||
// daughter 1 (nutrino) in XZ plane
|
||||
G4double eNu = xmax-x;
|
||||
G4double cosn = w;
|
||||
G4double sinn = sqrt((1.0-cosn)*(1.0+cosn));
|
||||
G4double sinn = std::sqrt((1.0-cosn)*(1.0+cosn));
|
||||
|
||||
G4ThreeVector direction1(sinn, 0.0, cosn);
|
||||
direction1 = rm * direction1;
|
||||
|
||||
Reference in New Issue
Block a user