G4MagIntegratorDriver.icc

Go to the documentation of this file.
00001 //
00002 // ********************************************************************
00003 // * License and Disclaimer                                           *
00004 // *                                                                  *
00005 // * The  Geant4 software  is  copyright of the Copyright Holders  of *
00006 // * the Geant4 Collaboration.  It is provided  under  the terms  and *
00007 // * conditions of the Geant4 Software License,  included in the file *
00008 // * LICENSE and available at  http://cern.ch/geant4/license .  These *
00009 // * include a list of copyright holders.                             *
00010 // *                                                                  *
00011 // * Neither the authors of this software system, nor their employing *
00012 // * institutes,nor the agencies providing financial support for this *
00013 // * work  make  any representation or  warranty, express or implied, *
00014 // * regarding  this  software system or assume any liability for its *
00015 // * use.  Please see the license in the file  LICENSE  and URL above *
00016 // * for the full disclaimer and the limitation of liability.         *
00017 // *                                                                  *
00018 // * This  code  implementation is the result of  the  scientific and *
00019 // * technical work of the GEANT4 collaboration.                      *
00020 // * By using,  copying,  modifying or  distributing the software (or *
00021 // * any work based  on the software)  you  agree  to acknowledge its *
00022 // * use  in  resulting  scientific  publications,  and indicate your *
00023 // * acceptance of all terms of the Geant4 Software license.          *
00024 // ********************************************************************
00025 //
00026 //
00027 // $Id: G4MagIntegratorDriver.icc 69786 2013-05-15 09:38:51Z gcosmo $
00028 //
00029 // --------------------------------------------------------------------
00030 
00031 inline
00032 G4double G4MagInt_Driver::GetHmin() const
00033 {
00034       return fMinimumStep;
00035 } 
00036 
00037 inline
00038 G4double G4MagInt_Driver::Hmin() const
00039 {
00040       return fMinimumStep;
00041 }
00042 
00043 inline
00044 G4double G4MagInt_Driver::GetSafety() const
00045 {
00046       return safety;
00047 }
00048 
00049 inline
00050 G4double G4MagInt_Driver::GetPshrnk() const
00051 {
00052       return pshrnk;
00053 } 
00054 
00055 inline
00056 G4double G4MagInt_Driver::GetPgrow() const
00057 {
00058       return pgrow;
00059 }
00060  
00061 inline
00062 G4double G4MagInt_Driver::GetErrcon() const
00063 {
00064       return errcon;
00065 }
00066 
00067 inline
00068 void G4MagInt_Driver::SetHmin(G4double newval)
00069 {
00070       fMinimumStep = newval;
00071 } 
00072 
00073 inline
00074 G4double G4MagInt_Driver::ComputeAndSetErrcon()
00075 {
00076       errcon = std::pow(max_stepping_increase/GetSafety(),1.0/GetPgrow());
00077       return errcon;
00078 } 
00079 
00080 inline
00081 void G4MagInt_Driver::ReSetParameters(G4double new_safety)
00082 {
00083       safety = new_safety;
00084       pshrnk = -1.0 / pIntStepper->IntegratorOrder();
00085       pgrow  = -1.0 / (1.0 + pIntStepper->IntegratorOrder());
00086       ComputeAndSetErrcon();
00087 }
00088 
00089 inline
00090 void G4MagInt_Driver::SetSafety(G4double val)
00091 { 
00092       safety=val;
00093       ComputeAndSetErrcon();
00094 }
00095 
00096 inline
00097 void G4MagInt_Driver::SetPgrow(G4double  val)
00098 { 
00099       pgrow=val;
00100       ComputeAndSetErrcon(); 
00101 }
00102 
00103 inline
00104 void G4MagInt_Driver::SetErrcon(G4double val)
00105 { 
00106       errcon=val;
00107 }
00108 
00109 inline
00110 void G4MagInt_Driver::RenewStepperAndAdjust(G4MagIntegratorStepper *pItsStepper)
00111 {  
00112       pIntStepper = pItsStepper; 
00113       ReSetParameters();
00114 }
00115 
00116 inline
00117 void G4MagInt_Driver::SetChargeMomentumMass(G4double particleCharge, // e+
00118                                             G4double MomentumXc,
00119                                             G4double Mass )
00120 { 
00121       pIntStepper->GetEquationOfMotion()
00122                  ->SetChargeMomentumMass(particleCharge, MomentumXc, Mass); 
00123 }
00124 
00125 inline
00126 const G4MagIntegratorStepper* G4MagInt_Driver::GetStepper() const
00127 {
00128   return pIntStepper;
00129 }
00130 
00131 inline
00132 G4int G4MagInt_Driver::GetMaxNoSteps() const
00133 {
00134   return fMaxNoSteps;
00135 }
00136 
00137 inline
00138 void G4MagInt_Driver::SetMaxNoSteps(G4int val)
00139 {
00140   fMaxNoSteps= val;
00141 }
00142 
00143 inline
00144 void G4MagInt_Driver::GetDerivatives(const G4FieldTrack &y_curr, // const, INput
00145                                            G4double     dydx[])  // OUTput
00146 { 
00147   G4double  tmpValArr[G4FieldTrack::ncompSVEC];
00148   y_curr.DumpToArray( tmpValArr  );
00149   pIntStepper -> RightHandSide( tmpValArr , dydx );
00150 }
00151 
00152 inline
00153 G4double G4MagInt_Driver::GetVerboseLevel() const
00154 {
00155       return fVerboseLevel;
00156 } 
00157 
00158 inline 
00159 void G4MagInt_Driver::SetVerboseLevel(G4int newLevel)
00160 {
00161       fVerboseLevel= newLevel;
00162 }
00163 
00164 inline
00165 G4double G4MagInt_Driver::GetSmallestFraction() const
00166 {
00167       return fSmallestFraction; 
00168 } 

Generated on Mon May 27 17:48:50 2013 for Geant4 by  doxygen 1.4.7