Ignore:
Timestamp:
Nov 5, 2010, 3:45:55 PM (14 years ago)
Author:
garnier
Message:

update ti head

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/source/geometry/magneticfield/src/G4UniformMagField.cc

    r1337 r1340  
    2525//
    2626//
    27 // $Id: G4UniformMagField.cc,v 1.11 2006/06/29 18:24:58 gunter Exp $
    28 // GEANT4 tag $Name: geant4-09-04-beta-01 $
     27// $Id: G4UniformMagField.cc,v 1.12 2010/07/14 10:00:36 gcosmo Exp $
     28// GEANT4 tag $Name: field-V09-03-03 $
    2929//
    3030//
     
    5656                                     G4double vPhi    )
    5757{
    58    if(vField >= 0 &&
    59       vTheta >= 0 && vTheta <= pi &&
    60       vPhi >= 0 && vPhi <= twopi)
    61    {
    62       fFieldComponents[0] = vField*std::sin(vTheta)*std::cos(vPhi) ;
    63       fFieldComponents[1] = vField*std::sin(vTheta)*std::sin(vPhi) ;
    64       fFieldComponents[2] = vField*std::cos(vTheta) ;
    65    }
    66    else
     58   if ( (vField<0) || (vTheta<0) || (vTheta>pi) || (vPhi<0) || (vPhi>twopi) )
    6759   {
    6860      G4Exception("G4UniformMagField::G4UniformMagField()",
    6961                  "WrongArgumentValue", FatalException, "Invalid parameters.") ;
    7062   }
     63   fFieldComponents[0] = vField*std::sin(vTheta)*std::cos(vPhi) ;
     64   fFieldComponents[1] = vField*std::sin(vTheta)*std::sin(vPhi) ;
     65   fFieldComponents[2] = vField*std::cos(vTheta) ;
    7166}
    7267
Note: See TracChangeset for help on using the changeset viewer.