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/G4UniformElectricField.cc

    r1337 r1340  
    2525//
    2626//
    27 // $Id: G4UniformElectricField.cc,v 1.12 2006/06/29 18:24:56 gunter Exp $
    28 // GEANT4 tag $Name: geant4-09-04-beta-01 $
     27// $Id: G4UniformElectricField.cc,v 1.13 2010/07/14 10:00:36 gcosmo Exp $
     28// GEANT4 tag $Name: field-V09-03-03 $
    2929//
    3030//
     
    5252                                               G4double vPhi    )
    5353{
    54    if(vField >= 0 &&
    55       vTheta >= 0 && vTheta <= pi &&
    56       vPhi >= 0 && vPhi <= twopi)
    57    {
    58       fFieldComponents[0] = 0.0;
    59       fFieldComponents[1] = 0.0;
    60       fFieldComponents[2] = 0.0;
    61       fFieldComponents[3] = vField*std::sin(vTheta)*std::cos(vPhi) ;
    62       fFieldComponents[4] = vField*std::sin(vTheta)*std::sin(vPhi) ;
    63       fFieldComponents[5] = vField*std::cos(vTheta) ;
    64    }
    65    else
     54   if ( (vField<0) || (vTheta<0) || (vTheta>pi) || (vPhi<0) || (vPhi>twopi) )
    6655   {
    6756      G4Exception("G4UniformElectricField::G4UniformElectricField()",
    6857                  "WrongArgumentValue", FatalException, "Invalid parameters.");
    6958   }
     59
     60   fFieldComponents[0] = 0.0;
     61   fFieldComponents[1] = 0.0;
     62   fFieldComponents[2] = 0.0;
     63   fFieldComponents[3] = vField*std::sin(vTheta)*std::cos(vPhi) ;
     64   fFieldComponents[4] = vField*std::sin(vTheta)*std::sin(vPhi) ;
     65   fFieldComponents[5] = vField*std::cos(vTheta) ;
    7066}
    7167
Note: See TracChangeset for help on using the changeset viewer.