Back to home page

EIC code displayed by LXR

 
 

    


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

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 // G4FieldManager inline implementation 
0027 //
0028 // Author: John Apostolakis, 10.03.97 - design and implementation
0029 // -------------------------------------------------------------------
0030 
0031 inline
0032 const G4Field* G4FieldManager::GetDetectorField() const
0033 { 
0034    // If pointer is null, should this raise an exception ??
0035 
0036    return fDetectorField;
0037 } 
0038 
0039 inline
0040 G4bool G4FieldManager::DoesFieldExist() const
0041 { 
0042    return (fDetectorField != nullptr);
0043 } 
0044 
0045 inline  
0046 void G4FieldManager::SetChordFinder(G4ChordFinder* aChordFinder)
0047 {
0048    fChordFinder= aChordFinder;
0049 }
0050 
0051 inline  
0052 G4ChordFinder* G4FieldManager::GetChordFinder()
0053 {  
0054    return fChordFinder;
0055 }
0056 
0057 inline  
0058 const G4ChordFinder* G4FieldManager::GetChordFinder() const
0059 {
0060    return fChordFinder;
0061 }
0062 
0063 inline
0064 G4double G4FieldManager::GetDeltaIntersection() const
0065 {
0066    return fDelta_Intersection_Val;
0067 }
0068 
0069 inline
0070 G4double G4FieldManager::GetDeltaOneStep() const
0071 {
0072    return fDelta_One_Step_Value;
0073 }
0074 
0075 inline
0076 void G4FieldManager::SetDeltaOneStep(G4double valDeltaOneStep)
0077 { 
0078    fDelta_One_Step_Value= valDeltaOneStep;  
0079 }
0080 
0081 inline
0082 void G4FieldManager::SetDeltaIntersection(G4double valDeltaIntersection)
0083 {
0084    fDelta_Intersection_Val = valDeltaIntersection;
0085 }
0086 
0087 inline
0088 void G4FieldManager::SetAccuraciesWithDeltaOneStep(G4double valDeltaOneStep)
0089 { 
0090    fDelta_One_Step_Value= valDeltaOneStep;  
0091    fDelta_Intersection_Val = 0.4 * fDelta_One_Step_Value;
0092 }
0093 
0094 inline G4bool G4FieldManager::DoesFieldChangeEnergy() const
0095 {
0096    return fFieldChangesEnergy;
0097 }
0098 
0099 inline void G4FieldManager::SetFieldChangesEnergy(G4bool value)
0100 {
0101    fFieldChangesEnergy = value;
0102 }
0103 
0104 // Minimum for Relative accuracy of any Step
0105 //
0106 inline 
0107 G4double G4FieldManager::GetMinimumEpsilonStep() const
0108 {
0109    return fEpsilonMin; 
0110 }
0111 
0112 // Maximum for Relative accuracy of any Step
0113 //
0114 inline 
0115 G4double G4FieldManager::GetMaximumEpsilonStep() const
0116 {
0117    return fEpsilonMax; 
0118 }
0119 
0120 inline
0121 void G4FieldManager::ChangeDetectorField(G4Field* detectorField)
0122 {
0123    G4int errorType = 2; // Fatal !
0124    SetDetectorField( detectorField, errorType ); 
0125 }
0126 
0127 inline
0128 void G4FieldManager::ProposeDetectorField(G4Field* detectorField)
0129 {
0130   // Note: this is equivalent to 
0131   //       this->SetDetectorField( detectorField, 0 );
0132   //       but simpler!
0133 
0134   fDetectorField = detectorField;
0135   InitialiseFieldChangesEnergy();
0136 }