Back to home page

EIC code displayed by LXR

 
 

    


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

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 // Created: J.Apostolakis, 12.11.1998
0045 // Modified: V.Grichine, 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     G4ElectroMagneticField();
0057    ~G4ElectroMagneticField() override;
0058 
0059     G4ElectroMagneticField(const G4ElectroMagneticField& r);
0060     G4ElectroMagneticField& operator = (const G4ElectroMagneticField& p);
0061       // Copy constructor & assignment operators.
0062 
0063     void  GetFieldValue(const G4double Point[4],
0064                               G4double *Bfield ) const override = 0;
0065       // Return as Bfield[0], [1], [2] the magnetic field x, y & z components
0066       // and    as Bfield[3], [4], [5] the electric field x, y & z components
0067 
0068     G4bool DoesFieldChangeEnergy() const override = 0;
0069       // For field with an electric component this should be true
0070       // For pure magnetic field this should be false
0071       // Alternative: default safe implementation { return true; }
0072 };
0073 
0074 #endif