|
|
|||
File indexing completed on 2026-09-19 09:21:10
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 // G4ElectroMagneticField 0027 // 0028 // Class description: 0029 // 0030 // A full electromagnetic field, containing both electric and magnetic fields. 0031 // It is an abstract class, and a derived type of this field must be 0032 // created by the user to describe his/her field configuration. 0033 // 0034 // We have established a convention for the electromagnetic field components: 0035 // In the GetValue() method, the return values of Bfield will have 0036 // the following meaning 0037 // - Components 0, 1 and 2 are the Magnetic Field (x, y, z respectively); 0038 // - Components 3, 4 and 5 are the Electric field (x, y, z respectively). 0039 // 0040 // Note 1: one or the other field could optional, depending on the Equation 0041 // Note 2: such a convention is required between any field and its 0042 // corresponding equation of motion. 0043 0044 // Author: John Apostolakis (CERN), 12.11.1998 - Created 0045 // Vladimir Grichine(CERN), 08.11.2001 - Extended "Point" to add time 0046 // ------------------------------------------------------------------- 0047 #ifndef G4ELECTROMAGNETIC_FIELD_HH 0048 #define G4ELECTROMAGNETIC_FIELD_HH 0049 0050 #include "G4Field.hh" 0051 0052 class G4ElectroMagneticField : public G4Field 0053 { 0054 public: 0055 0056 /** 0057 * Constructor and default Destructor. 0058 */ 0059 G4ElectroMagneticField(); 0060 ~G4ElectroMagneticField() override = default; 0061 0062 /** 0063 * Copy constructor and assignment operator. 0064 */ 0065 G4ElectroMagneticField(const G4ElectroMagneticField& r) = default; 0066 G4ElectroMagneticField& operator = (const G4ElectroMagneticField& p); 0067 0068 /** 0069 * Interface for returning the field value 'Bfield' on given time 'Point'. 0070 * Returns as Bfield[0], [1], [2] the magnetic field x, y & z components 0071 * and as Bfield[3], [4], [5] the electric field x, y & z components. 0072 */ 0073 void GetFieldValue(const G4double Point[4], 0074 G4double* Bfield ) const override = 0; 0075 0076 /** 0077 * For field with an electric component it should return true. 0078 * For pure magnetic field it should return false. 0079 * Alternative: default safe implementation is to return true. 0080 */ 0081 G4bool DoesFieldChangeEnergy() const override = 0; 0082 0083 /** 0084 * Returns the field type-ID, "kElectroMagnetic". 0085 */ 0086 inline G4FieldType GetFieldType() const override { return kElectroMagnetic; } 0087 }; 0088 0089 #endif
| [ Source navigation ] | [ Diff markup ] | [ Identifier search ] | [ general search ] |
|
This page was automatically generated by the 2.3.7 LXR engine. The LXR team |
|