|
||||
File indexing completed on 2025-01-18 09:59:01
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 // G4QSSDriver 0027 // 0028 // QSS Interpolator Driver 0029 0030 // Authors: Lucio Santi, Rodrigo Castro - 2018-2021 0031 // -------------------------------------------------------------------- 0032 #ifndef G4QSSDriver_HH 0033 #define G4QSSDriver_HH 0034 0035 #include "G4InterpolationDriver.hh" 0036 #include "G4QSSMessenger.hh" 0037 0038 template <class T> 0039 class G4QSSDriver : public G4InterpolationDriver<T, true> 0040 { 0041 public: 0042 0043 G4QSSDriver(T* stepper); 0044 0045 // Hacky way of getting and setting precision parameters 0046 // from messenger on first run 0047 void OnStartTracking() override; 0048 0049 G4QSSDriver(const G4QSSDriver&) = delete; 0050 const G4QSSDriver& operator=(const G4QSSDriver&) = delete; 0051 0052 G4double AdvanceChordLimited(G4FieldTrack& track, 0053 G4double hstep, 0054 G4double eps, 0055 G4double chordDistance) override; 0056 0057 void OnComputeStep(const G4FieldTrack* track) override 0058 { 0059 Base::OnComputeStep(track); 0060 #ifdef GEANT4_DUMP_STEPPER_STATS 0061 this->GetStepper()->stats.steps++; 0062 #endif 0063 } 0064 0065 void SetPrecision(G4double dq_rel, G4double dq_min); 0066 0067 G4double OneGoodStep(typename G4InterpolationDriver<T, true>::StepperIterator it, 0068 field_utils::State& y, 0069 field_utils::State& dydx, 0070 G4double& hstep, 0071 G4double epsStep, 0072 G4double curveLength, 0073 G4FieldTrack* track) override; 0074 0075 private: 0076 0077 using Base = G4InterpolationDriver<T, true>; 0078 0079 G4bool initializedOnFirstRun = false; 0080 }; 0081 0082 #include "G4QSSDriver.icc" 0083 0084 #endif
[ Source navigation ] | [ Diff markup ] | [ Identifier search ] | [ general search ] |
This page was automatically generated by the 2.3.7 LXR engine. The LXR team |