Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 09:58:39

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 // G4MagInt_Driver inline methods implementation
0027 //
0028 // V.Grichine, 07.10.1996 - Created
0029 // --------------------------------------------------------------------
0030 
0031 inline
0032 G4double G4MagInt_Driver::
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 G4MagInt_Driver::OnStartTracking()
0042 {
0043   ChordFinderDelegate::ResetStepEstimate();
0044 }
0045 
0046 inline
0047 G4double G4MagInt_Driver::GetHmin() const
0048 {
0049   return fMinimumStep;
0050 } 
0051 
0052 inline
0053 G4double G4MagInt_Driver::Hmin() const
0054 {
0055   return fMinimumStep;
0056 }
0057 
0058 inline
0059 G4double G4MagInt_Driver::GetSafety() const
0060 {
0061   return safety;
0062 }
0063 
0064 inline
0065 G4double G4MagInt_Driver::GetPshrnk() const
0066 {
0067   return pshrnk;
0068 } 
0069 
0070 inline
0071 G4double G4MagInt_Driver::GetPgrow() const
0072 {
0073   return pgrow;
0074 }
0075  
0076 inline
0077 G4double G4MagInt_Driver::GetErrcon() const
0078 {
0079   return errcon;
0080 }
0081 
0082 inline
0083 void G4MagInt_Driver::SetHmin(G4double newval)
0084 {
0085   fMinimumStep = newval;
0086 } 
0087 
0088 inline
0089 G4double G4MagInt_Driver::ComputeAndSetErrcon()
0090 {
0091   errcon = std::pow(max_stepping_increase/GetSafety(),1.0/GetPgrow());
0092   return errcon;
0093 } 
0094 
0095 inline
0096 void G4MagInt_Driver::ReSetParameters(G4double new_safety)
0097 {
0098   safety = new_safety;
0099   pshrnk = -1.0 / pIntStepper->IntegratorOrder();
0100   pgrow  = -1.0 / (1.0 + pIntStepper->IntegratorOrder());
0101   ComputeAndSetErrcon();
0102 }
0103 
0104 inline
0105 void G4MagInt_Driver::SetSafety(G4double val)
0106 { 
0107   safety = val;
0108   ComputeAndSetErrcon();
0109 }
0110 
0111 inline
0112 void G4MagInt_Driver::SetPgrow(G4double  val)
0113 { 
0114   pgrow = val;
0115   ComputeAndSetErrcon(); 
0116 }
0117 
0118 inline
0119 void G4MagInt_Driver::SetErrcon(G4double val)
0120 { 
0121   errcon = val;
0122 }
0123 
0124 inline
0125 G4int G4MagInt_Driver::GetMaxNoSteps() const
0126 {
0127   return fMaxNoSteps;
0128 }
0129 
0130 inline
0131 void G4MagInt_Driver::SetMaxNoSteps(G4int val)
0132 {
0133   fMaxNoSteps = val;
0134 }
0135 
0136 inline
0137 G4int G4MagInt_Driver::GetVerboseLevel() const
0138 {
0139   return fVerboseLevel;
0140 } 
0141 
0142 inline 
0143 void G4MagInt_Driver::SetVerboseLevel(G4int newLevel)
0144 {
0145   fVerboseLevel = newLevel;
0146 }
0147 
0148 inline
0149 G4double G4MagInt_Driver::GetSmallestFraction() const
0150 {
0151   return fSmallestFraction; 
0152 }