Geant4 11.4.0
Toolkit for the simulation of the passage of particles through matter
Loading...
Searching...
No Matches
G4LineCurrentMagField.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// G4LineCurrentMagField
27//
28// Class description:
29//
30// Class describing line current magnetic field.
31// 'fFieldConstant' determines the coefficient in the field law.
32// The line current is directed along Z axis and crosses the XY
33// plane in the origin point (0,0).
34
35// Author: Vladimir Grichine (CERN), 03.02.1997
36// --------------------------------------------------------------------
37#ifndef G4LINECURRENTMAGFIELD_HH
38#define G4LINECURRENTMAGFIELD_HH
39
40#include "G4MagneticField.hh"
41
42/**
43 * @brief G4LineCurrentMagField is a class describing a line current magnetic
44 * field. The line current is directed along the Z axis and crosses the XY
45 * plane in the origin point.
46 */
47
49{
50 public:
51
52 /**
53 * Constructor for G4LineCurrentMagField.
54 * @param[in] pFieldConstant Value of the constant field.
55 */
56 G4LineCurrentMagField(G4double pFieldConstant);
57
58 /**
59 * Default Destructor.
60 */
61 ~G4LineCurrentMagField() override = default;
62
63 /**
64 * Returns the field value on the given position 'yTrack'.
65 * @param[in] yTrack Time position array.
66 * @param[out] B The returned field array.
67 */
68 void GetFieldValue(const G4double yTrack[], G4double B[]) const override;
69
70 /**
71 * Returns a pointer to a new allocated clone of this object.
72 */
73 G4Field* Clone() const override;
74
75 private:
76
77 G4double fFieldConstant = 0.0;
78};
79
80#endif
G4double B(G4double temperature)
double G4double
Definition G4Types.hh:83
G4Field(G4bool gravityOn=false)
Definition G4Field.cc:33
G4Field * Clone() const override
~G4LineCurrentMagField() override=default
G4LineCurrentMagField(G4double pFieldConstant)
void GetFieldValue(const G4double yTrack[], G4double B[]) const override