Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2026-10-03 09:09:51

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 // G4UniformElectricField
0027 //
0028 // Class description:
0029 //
0030 // Class for creation of Uniform electric Magnetic Field.
0031 
0032 // Author: Vladimir Grichine (CERN), 30.01.1997
0033 // -------------------------------------------------------------------
0034 #ifndef G4UNIFORMELECTRICFIELD_HH
0035 #define G4UNIFORMELECTRICFIELD_HH
0036 
0037 #include "G4Types.hh"
0038 #include "G4ThreeVector.hh"
0039 #include "G4ElectricField.hh"
0040 
0041 /**
0042  * @brief G4UniformElectricField is class defining a uniform
0043  * electric magnetic field.
0044  */
0045 
0046 class G4UniformElectricField : public G4ElectricField
0047 {
0048   public:
0049 
0050     /**
0051      * Constructor for G4UniformElectricField, a field with value equal
0052      * to 'FieldVector'.
0053      *  @param[in] FieldVector The field vector value.
0054      */
0055     G4UniformElectricField(const G4ThreeVector& FieldVector);
0056 
0057     /**
0058      * Alternative constructor for G4UniformElectricField.
0059      *  @param[in] vField The field component.
0060      *  @param[in] vTheta The Theta component.
0061      *  @param[in] vPhi The Phi component.
0062      */
0063     G4UniformElectricField(G4double vField,
0064                            G4double vTheta,
0065                            G4double vPhi);
0066 
0067     /**
0068      * Default Destructor.
0069      */
0070     ~G4UniformElectricField() override = default;
0071 
0072     /**
0073      * Copy constructor and assignment operator.
0074      */
0075     G4UniformElectricField(const G4UniformElectricField &p);
0076     G4UniformElectricField& operator = (const G4UniformElectricField &p);
0077 
0078     /**
0079      * Returns the field value 'field' on given time 'pos'.
0080      */
0081     void GetFieldValue(const G4double pos[4], G4double* field) const override;
0082 
0083     /**
0084      * Returns a pointer to a new allocated clone of this object.
0085      */
0086     G4Field* Clone() const override;
0087 
0088   private:
0089   
0090     G4double fFieldComponents[6];
0091 };
0092 
0093 #endif