Geant4 11.4.0
Toolkit for the simulation of the passage of particles through matter
Loading...
Searching...
No Matches
G4UniformElectricField.hh
Go to the documentation of this file.
1//
2// ********************************************************************
3// * License and Disclaimer *
4// * *
5// * The Geant4 software is copyright of the Copyright Holders of *
6// * the Geant4 Collaboration. It is provided under the terms and *
7// * conditions of the Geant4 Software License, included in the file *
8// * LICENSE and available at http://cern.ch/geant4/license . These *
9// * include a list of copyright holders. *
10// * *
11// * Neither the authors of this software system, nor their employing *
12// * institutes,nor the agencies providing financial support for this *
13// * work make any representation or warranty, express or implied, *
14// * regarding this software system or assume any liability for its *
15// * use. Please see the license in the file LICENSE and URL above *
16// * for the full disclaimer and the limitation of liability. *
17// * *
18// * This code implementation is the result of the scientific and *
19// * technical work of the GEANT4 collaboration. *
20// * By using, copying, modifying or distributing the software (or *
21// * any work based on the software) you agree to acknowledge its *
22// * use in resulting scientific publications, and indicate your *
23// * acceptance of all terms of the Geant4 Software license. *
24// ********************************************************************
25//
26// G4UniformElectricField
27//
28// Class description:
29//
30// Class for creation of Uniform electric Magnetic Field.
31
32// Author: Vladimir Grichine (CERN), 30.01.1997
33// -------------------------------------------------------------------
34#ifndef G4UNIFORMELECTRICFIELD_HH
35#define G4UNIFORMELECTRICFIELD_HH
36
37#include "G4Types.hh"
38#include "G4ThreeVector.hh"
39#include "G4ElectricField.hh"
40
41/**
42 * @brief G4UniformElectricField is class defining a uniform
43 * electric magnetic field.
44 */
45
47{
48 public:
49
50 /**
51 * Constructor for G4UniformElectricField, a field with value equal
52 * to 'FieldVector'.
53 * @param[in] FieldVector The field vector value.
54 */
55 G4UniformElectricField(const G4ThreeVector& FieldVector);
56
57 /**
58 * Alternative constructor for G4UniformElectricField.
59 * @param[in] vField The field component.
60 * @param[in] vTheta The Theta component.
61 * @param[in] vPhi The Phi component.
62 */
64 G4double vTheta,
65 G4double vPhi);
66
67 /**
68 * Default Destructor.
69 */
70 ~G4UniformElectricField() override = default;
71
72 /**
73 * Copy constructor and assignment operator.
74 */
77
78 /**
79 * Returns the field value 'field' on given time 'pos'.
80 */
81 void GetFieldValue(const G4double pos[4], G4double* field) const override;
82
83 /**
84 * Returns a pointer to a new allocated clone of this object.
85 */
86 G4Field* Clone() const override;
87
88 private:
89
90 G4double fFieldComponents[6];
91};
92
93#endif
CLHEP::Hep3Vector G4ThreeVector
double G4double
Definition G4Types.hh:83
G4ElectricField()=default
G4Field(G4bool gravityOn=false)
Definition G4Field.cc:33
void GetFieldValue(const G4double pos[4], G4double *field) const override
G4UniformElectricField & operator=(const G4UniformElectricField &p)
~G4UniformElectricField() override=default
G4Field * Clone() const override
G4UniformElectricField(const G4ThreeVector &FieldVector)