49 lines
2.0 KiB
Plaintext
49 lines
2.0 KiB
Plaintext
//
|
|
// ********************************************************************
|
|
// * DISCLAIMER *
|
|
// * *
|
|
// * The following disclaimer summarizes all the specific disclaimers *
|
|
// * of contributors to this software. The specific disclaimers,which *
|
|
// * govern, are listed with their locations in: *
|
|
// * http://cern.ch/geant4/license *
|
|
// * *
|
|
// * Neither the authors of this software system, nor their employing *
|
|
// * institutes,nor the agencies providing financial support for this *
|
|
// * work make any representation or warranty, express or implied, *
|
|
// * regarding this software system or assume any liability for its *
|
|
// * use. *
|
|
// * *
|
|
// * This code implementation is the intellectual property of the *
|
|
// * GEANT4 collaboration. *
|
|
// * By copying, distributing or modifying the Program (or any work *
|
|
// * based on the Program) you indicate your acceptance of this *
|
|
// * statement, and all its terms. *
|
|
// ********************************************************************
|
|
//
|
|
//
|
|
// $Id: G4MagHelicalStepper.icc,v 1.4.4.1 2001/06/28 19:08:16 gunter Exp $
|
|
// GEANT4 tag $Name: $
|
|
//
|
|
|
|
// linear Step in regions of no field
|
|
|
|
inline void
|
|
G4MagHelicalStepper::LinearStep( const G4double yIn[],
|
|
G4double h,
|
|
G4double yLinear[])
|
|
{
|
|
for( G4int i = 0; i < 3; i++ ) {
|
|
yLinear[i] = yIn[i] + h * yIn[i+3];
|
|
yLinear[i+3] = yIn[i+3];
|
|
}
|
|
}
|
|
|
|
inline void
|
|
G4MagHelicalStepper::MagFieldEvaluate(const G4double y[],
|
|
G4ThreeVector& Bfield )
|
|
{
|
|
G4double B[3];
|
|
GetEquationOfMotion()-> GetFieldValue(y, B);
|
|
Bfield= G4ThreeVector( B[0], B[1], B[2] );
|
|
}
|