// // ******************************************************************** // * License and Disclaimer * // * * // * The Geant4 software is copyright of the Copyright Holders of * // * the Geant4 Collaboration. It is provided under the terms and * // * conditions of the Geant4 Software License, included in the file * // * LICENSE and available at http://cern.ch/geant4/license . These * // * include a list of copyright holders. * // * * // * Neither the authors of this software system, nor their employing * // * institutes,nor the agencies providing financial support for this * // * work make any representation or warranty, express or implied, * // * regarding this software system or assume any liability for its * // * use. Please see the license in the file LICENSE and URL above * // * for the full disclaimer and the limitation of liability. * // * * // * This code implementation is the result of the scientific and * // * technical work of the GEANT4 collaboration. * // * By using, copying, modifying or distributing the software (or * // * any work based on the software) you agree to acknowledge its * // * use in resulting scientific publications, and indicate your * // * acceptance of all terms of the Geant4 Software license. * // ******************************************************************** // // G4FieldManager inline implementation // // Author: John Apostolakis (CERN), 10.03.1997 - Design and implementation // ------------------------------------------------------------------- inline const G4Field* G4FieldManager::GetDetectorField() const { // If pointer is null, should this raise an exception ?? return fDetectorField; } inline G4bool G4FieldManager::DoesFieldExist() const { return (fDetectorField != nullptr); } inline void G4FieldManager::SetChordFinder(G4ChordFinder* aChordFinder) { fChordFinder= aChordFinder; } inline G4ChordFinder* G4FieldManager::GetChordFinder() { return fChordFinder; } inline const G4ChordFinder* G4FieldManager::GetChordFinder() const { return fChordFinder; } inline G4double G4FieldManager::GetDeltaIntersection() const { return fDelta_Intersection_Val; } inline G4double G4FieldManager::GetDeltaOneStep() const { return fDelta_One_Step_Value; } inline void G4FieldManager::SetDeltaOneStep(G4double valDeltaOneStep) { fDelta_One_Step_Value= valDeltaOneStep; } inline void G4FieldManager::SetDeltaIntersection(G4double valDeltaIntersection) { fDelta_Intersection_Val = valDeltaIntersection; } inline void G4FieldManager::SetAccuraciesWithDeltaOneStep(G4double valDeltaOneStep) { fDelta_One_Step_Value= valDeltaOneStep; fDelta_Intersection_Val = 0.4 * fDelta_One_Step_Value; } inline G4bool G4FieldManager::DoesFieldChangeEnergy() const { return fFieldChangesEnergy; } inline void G4FieldManager::SetFieldChangesEnergy(G4bool value) { fFieldChangesEnergy = value; } // Minimum for Relative accuracy of any Step // inline G4double G4FieldManager::GetMinimumEpsilonStep() const { return fEpsilonMin; } // Maximum for Relative accuracy of any Step // inline G4double G4FieldManager::GetMaximumEpsilonStep() const { return fEpsilonMax; } inline void G4FieldManager::ChangeDetectorField(G4Field* detectorField) { G4int errorType = 2; // Fatal ! SetDetectorField( detectorField, errorType ); } inline void G4FieldManager::ProposeDetectorField(G4Field* detectorField) { // Note: this is equivalent to // this->SetDetectorField( detectorField, 0 ); // but simpler! fDetectorField = detectorField; InitialiseFieldChangesEnergy(); } inline void G4FieldManager::SetGlobalFieldManager(G4FieldManager* fieldManager) { fGlobalFieldManager = fieldManager; } inline G4FieldManager* G4FieldManager::GetGlobalFieldManager() { return fGlobalFieldManager; }