Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2026-09-10 09:10:31

0001 //
0002 // ********************************************************************
0003 // * License and Disclaimer                                           *
0004 // *                                                                  *
0005 // * The  Geant4 software  is  copyright of the Copyright Holders  of *
0006 // * the Geant4 Collaboration.  It is provided  under  the terms  and *
0007 // * conditions of the Geant4 Software License,  included in the file *
0008 // * LICENSE and available at  http://cern.ch/geant4/license .  These *
0009 // * include a list of copyright holders.                             *
0010 // *                                                                  *
0011 // * Neither the authors of this software system, nor their employing *
0012 // * institutes,nor the agencies providing financial support for this *
0013 // * work  make  any representation or  warranty, express or implied, *
0014 // * regarding  this  software system or assume any liability for its *
0015 // * use.  Please see the license in the file  LICENSE  and URL above *
0016 // * for the full disclaimer and the limitation of liability.         *
0017 // *                                                                  *
0018 // * This  code  implementation is the result of  the  scientific and *
0019 // * technical work of the GEANT4 collaboration.                      *
0020 // * By using,  copying,  modifying or  distributing the software (or *
0021 // * any work based  on the software)  you  agree  to acknowledge its *
0022 // * use  in  resulting  scientific  publications,  and indicate your *
0023 // * acceptance of all terms of the Geant4 Software license.          *
0024 // ********************************************************************
0025 //
0026 // G4OldMagIntDriver inline methods implementation
0027 //
0028 // Author: Vladimir Grichine (CERN), 07.10.1996 - Created
0029 // --------------------------------------------------------------------
0030 
0031 inline
0032 G4double G4OldMagIntDriver::
0033 AdvanceChordLimited(G4FieldTrack& track, G4double stepMax, 
0034                     G4double epsStep, G4double chordDistance)
0035 {
0036   return ChordFinderDelegate::AdvanceChordLimitedImpl(track, stepMax,
0037                                                       epsStep, chordDistance);
0038 }
0039 
0040 inline
0041 void G4OldMagIntDriver::OnStartTracking()
0042 {
0043   ChordFinderDelegate::ResetStepEstimate();
0044 }
0045 
0046 inline
0047 void G4OldMagIntDriver::OnComputeStep(const G4FieldTrack*)
0048 {
0049 }
0050 
0051 inline
0052 G4bool G4OldMagIntDriver::DoesReIntegrate() const
0053 {
0054   return true;
0055 }
0056 
0057 inline
0058 G4double G4OldMagIntDriver::GetHmin() const
0059 {
0060   return fMinimumStep;
0061 } 
0062 
0063 inline
0064 G4double G4OldMagIntDriver::Hmin() const
0065 {
0066   return fMinimumStep;
0067 }
0068 
0069 inline
0070 G4double G4OldMagIntDriver::GetSafety() const
0071 {
0072   return safety;
0073 }
0074 
0075 inline
0076 G4double G4OldMagIntDriver::GetPshrnk() const
0077 {
0078   return pshrnk;
0079 } 
0080 
0081 inline
0082 G4double G4OldMagIntDriver::GetPgrow() const
0083 {
0084   return pgrow;
0085 }
0086  
0087 inline
0088 G4double G4OldMagIntDriver::GetErrcon() const
0089 {
0090   return errcon;
0091 }
0092 
0093 inline
0094 void G4OldMagIntDriver::SetHmin(G4double newval)
0095 {
0096   fMinimumStep = newval;
0097 } 
0098 
0099 inline
0100 G4double G4OldMagIntDriver::ComputeAndSetErrcon()
0101 {
0102   errcon = std::pow(max_stepping_increase/GetSafety(),1.0/GetPgrow());
0103   return errcon;
0104 } 
0105 
0106 inline
0107 void G4OldMagIntDriver::ReSetParameters(G4double new_safety)
0108 {
0109   safety = new_safety;
0110   pshrnk = -1.0 / pIntStepper->IntegratorOrder();
0111   pgrow  = -1.0 / (1.0 + pIntStepper->IntegratorOrder());
0112   ComputeAndSetErrcon();
0113 }
0114 
0115 inline
0116 void G4OldMagIntDriver::SetSafety(G4double val)
0117 { 
0118   safety = val;
0119   ComputeAndSetErrcon();
0120 }
0121 
0122 inline
0123 void G4OldMagIntDriver::SetPgrow(G4double  val)
0124 { 
0125   pgrow = val;
0126   ComputeAndSetErrcon(); 
0127 }
0128 
0129 inline
0130 void G4OldMagIntDriver::SetErrcon(G4double val)
0131 { 
0132   errcon = val;
0133 }
0134 
0135 inline
0136 G4int G4OldMagIntDriver::GetMaxNoSteps() const
0137 {
0138   return fMaxNoSteps;
0139 }
0140 
0141 inline
0142 void G4OldMagIntDriver::SetMaxNoSteps(G4int val)
0143 {
0144   fMaxNoSteps = val;
0145 }
0146 
0147 inline
0148 G4int G4OldMagIntDriver::GetVerboseLevel() const
0149 {
0150   return fVerboseLevel;
0151 } 
0152 
0153 inline 
0154 void G4OldMagIntDriver::SetVerboseLevel(G4int newLevel)
0155 {
0156   fVerboseLevel = newLevel;
0157 }
0158 
0159 inline
0160 G4double G4OldMagIntDriver::GetSmallestFraction() const
0161 {
0162   return fSmallestFraction; 
0163 }