G4ExactHelixStepper Class Reference

#include <G4ExactHelixStepper.hh>

Inheritance diagram for G4ExactHelixStepper:

G4MagHelicalStepper G4MagIntegratorStepper

Public Member Functions

 G4ExactHelixStepper (G4Mag_EqRhs *EqRhs)
 ~G4ExactHelixStepper ()
void Stepper (const G4double y[], const G4double dydx[], G4double h, G4double yout[], G4double yerr[])
void DumbStepper (const G4double y[], G4ThreeVector Bfld, G4double h, G4double yout[])
G4double DistChord () const
virtual G4int IntegratorOrder () const

Detailed Description

Definition at line 49 of file G4ExactHelixStepper.hh.


Constructor & Destructor Documentation

G4ExactHelixStepper::G4ExactHelixStepper ( G4Mag_EqRhs EqRhs  ) 

Definition at line 45 of file G4ExactHelixStepper.cc.

00046   : G4MagHelicalStepper(EqRhs),
00047     fBfieldValue(DBL_MAX, DBL_MAX, DBL_MAX),
00048     fPtrMagEqOfMot(EqRhs)
00049 {
00050   ;
00051 }

G4ExactHelixStepper::~G4ExactHelixStepper (  ) 

Definition at line 53 of file G4ExactHelixStepper.cc.

00053 {} 


Member Function Documentation

G4double G4ExactHelixStepper::DistChord (  )  const [virtual]

Reimplemented from G4MagHelicalStepper.

Definition at line 99 of file G4ExactHelixStepper.cc.

References G4MagHelicalStepper::GetAngCurve(), G4MagHelicalStepper::GetRadHelix(), and G4INCL::Math::pi.

00100 {
00101   // Implementation : must check whether h/R >  pi  !!
00102   //   If( h/R <  pi)   DistChord=h/2*std::tan(Ang_curve/4)
00103   //   Else             DistChord=R_helix
00104 
00105   G4double distChord;
00106   G4double Ang_curve=GetAngCurve();
00107 
00108   if (Ang_curve<=pi)
00109   {
00110     distChord=GetRadHelix()*(1-std::cos(0.5*Ang_curve));
00111   }
00112   else if(Ang_curve<twopi)
00113   {
00114     distChord=GetRadHelix()*(1+std::cos(0.5*(twopi-Ang_curve)));
00115   }
00116   else
00117   {
00118     distChord=2.*GetRadHelix();  
00119   }
00120 
00121   return distChord;
00122 }   

void G4ExactHelixStepper::DumbStepper ( const G4double  y[],
G4ThreeVector  Bfld,
G4double  h,
G4double  yout[] 
) [virtual]

Implements G4MagHelicalStepper.

Definition at line 81 of file G4ExactHelixStepper.cc.

References G4MagHelicalStepper::AdvanceHelix(), FatalException, and G4Exception().

00085 {
00086   // Assuming a constant field: solution is a helix
00087 
00088   AdvanceHelix(yIn, Bfld, h, yOut);
00089 
00090   G4Exception("G4ExactHelixStepper::DumbStepper",
00091               "GeomField0002", FatalException,
00092               "Should not be called. Stepper must do all the work." ); 
00093 }  

G4int G4ExactHelixStepper::IntegratorOrder (  )  const [virtual]

Implements G4MagIntegratorStepper.

Definition at line 125 of file G4ExactHelixStepper.cc.

00126 {
00127   return 1; 
00128 }

void G4ExactHelixStepper::Stepper ( const G4double  y[],
const G4double  dydx[],
G4double  h,
G4double  yout[],
G4double  yerr[] 
) [virtual]

Reimplemented from G4MagHelicalStepper.


The documentation for this class was generated from the following files:
Generated on Mon May 27 17:51:56 2013 for Geant4 by  doxygen 1.4.7