Geant4 11.4.0
Toolkit for the simulation of the passage of particles through matter
Loading...
Searching...
No Matches
G4MonopoleEq.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// G4MonopoleEq
27//
28// Class description:
29//
30// This is the right-hand side of equation of motion for monopole
31// in a combined electric and magnetic field:
32// d(p_c)/ds=g{c-energyB_ - p_c x E}/pc.
33
34// Author: Vladimir Grichine (CERN), 17.11.2009
35// -------------------------------------------------------------------
36#ifndef G4EQMAGELECTRICFIELD_HH
37#define G4EQMAGELECTRICFIELD_HH
38
39#include "G4ChargeState.hh"
40#include "G4EquationOfMotion.hh"
42
43/**
44 * @brief G4MonopoleEq defines the right-hand side of equation of motion
45 * for monopole in a combined electric and magnetic field:
46 * d(p_c)/ds=g{c-energyB_ - p_c x E}/pc.
47 */
48
50{
51 public:
52
53 /**
54 * Constructor for G4MonopoleEq.
55 * @param[in] emField Pointer to the field.
56 */
58
59 /**
60 * Default Destructor.
61 */
62 ~G4MonopoleEq() override = default;
63
64 /**
65 * Sets the charge, momentum and mass of the current particle.
66 * Used to set the equation's coefficients.
67 * @param[in] particleCharge Magnetic charge and moments in e+ units.
68 * @param[in] MomentumXc Particle momentum.
69 * @param[in] mass Particle mass.
70 */
71 void SetChargeMomentumMass(G4ChargeState particleCharge,
72 G4double MomentumXc,
73 G4double mass) override;
74
75 /**
76 * Calculates the value of the derivative, given the value of the field.
77 * @param[in] y Coefficients array.
78 * @param[in] Field Field value.
79 * @param[out] dydx Derivatives array.
80 */
81 void EvaluateRhsGivenB(const G4double y[],
82 const G4double Field[],
83 G4double dydx[] ) const override;
84
85 /**
86 * Returns the equation type-ID, "kEqMonopole".
87 */
88 inline G4EquationType GetEquationType() const override { return kEqMonopole; }
89
90 private:
91
92 G4double fElectroMagCof = 0.0;
93 G4double fMassCof = 0.0;
94};
95
96#endif
G4EquationType
G4EquationType defines the types of equations of motion of a particle in a field in Geant4.
@ kEqMonopole
double G4double
Definition G4Types.hh:83
G4ChargeState is a container for magnetic charge and moments.
G4EquationOfMotion(G4Field *Field)
G4MonopoleEq(G4ElectroMagneticField *emField)
void SetChargeMomentumMass(G4ChargeState particleCharge, G4double MomentumXc, G4double mass) override
void EvaluateRhsGivenB(const G4double y[], const G4double Field[], G4double dydx[]) const override
G4EquationType GetEquationType() const override
~G4MonopoleEq() override=default