Belle II Software development
G4MonopoleEquation Class Reference

Monopole equation of motion class. More...

#include <G4MonopoleEquation.h>

Inheritance diagram for G4MonopoleEquation:

Public Member Functions

 G4MonopoleEquation (G4MagneticField *mField)
 Constructor.
 
 ~G4MonopoleEquation ()
 Destructor.
 
virtual void SetChargeMomentumMass (G4ChargeState particleChargeState, G4double momentum, G4double mass)
 G4EquationOfMotion::SetChargeMomentumMass() implementation.
 
virtual void EvaluateRhsGivenB (const G4double y[], const G4double Field[], G4double dydx[]) const
 Given the value of the electromagnetic field, this function calculates the value of the derivative dydx.
 

Private Attributes

G4double fMagCharge
 Magnetic charge of the monopole, in e+ units.
 
G4double fElCharge
 Electric charge in case of a dyon.
 
G4double fMassCof
 Square of the monopole mass.
 

Detailed Description

Monopole equation of motion class.

Equation of motion define stepper in G4, which defines chord finder, which is required to perform transportation process.

Definition at line 30 of file G4MonopoleEquation.h.

Constructor & Destructor Documentation

◆ G4MonopoleEquation()

G4MonopoleEquation ( G4MagneticField *  mField)
explicit

Constructor.

Parameters
mFieldPointer to the field in which the particle will propagate.

Definition at line 22 of file G4MonopoleEquation.cc.

23 : G4EquationOfMotion(mField)
24{}

◆ ~G4MonopoleEquation()

Destructor.

Definition at line 26 of file G4MonopoleEquation.cc.

27{}

Member Function Documentation

◆ EvaluateRhsGivenB()

void EvaluateRhsGivenB ( const G4double  y[],
const G4double  Field[],
G4double  dydx[] 
) const
virtual

Given the value of the electromagnetic field, this function calculates the value of the derivative dydx.

Parameters
yy[6]: 0-2 dr/ds - velocity, 3-5 dp/ds - momentum derivatives.
FieldField[3]: Field components.
dydxdydx[8]: Where to store results.

Definition at line 46 of file G4MonopoleEquation.cc.

49{
50 // Components of y:
51 // 0-2 dr/ds,
52 // 3-5 dp/ds - momentum derivatives
53
54 G4double pSquared = y[3] * y[3] + y[4] * y[4] + y[5] * y[5] ;
55
56 G4double Energy = std::sqrt(pSquared + fMassCof);
57
58 G4double pModuleInverse = 1.0 / std::sqrt(pSquared);
59
60 G4double inverse_velocity = Energy * pModuleInverse / c_light;
61
62 G4double cofEl = fElCharge * pModuleInverse ;
63 G4double cofMag = fMagCharge * Energy * pModuleInverse;
64
65
66 dydx[0] = y[3] * pModuleInverse ;
67 dydx[1] = y[4] * pModuleInverse ;
68 dydx[2] = y[5] * pModuleInverse ;
69
70 // G4double magCharge = twopi * hbar_Planck / (eplus * mu0);
71 // magnetic charge in SI units A*m convention
72 // see http://en.wikipedia.org/wiki/Magnetic_monopole
73 // G4cout << "Magnetic charge: " << magCharge << G4endl;
74 // dp/ds = dp/dt * dt/ds = dp/dt / v = Force / velocity
75 // dydx[3] = fMagCharge * Field[0] * inverse_velocity * c_light;
76 // multiplied by c_light to convert to MeV/mm
77 // dydx[4] = fMagCharge * Field[1] * inverse_velocity * c_light;
78 // dydx[5] = fMagCharge * Field[2] * inverse_velocity * c_light;
79
80 dydx[3] = cofMag * Field[0] + cofEl * (y[4] * Field[2] - y[5] * Field[1]);
81 dydx[4] = cofMag * Field[1] + cofEl * (y[5] * Field[0] - y[3] * Field[2]);
82 dydx[5] = cofMag * Field[2] + cofEl * (y[3] * Field[1] - y[4] * Field[0]);
83
84 // G4cout << std::setprecision(5)<< "E=" << Energy
85 // << "; p="<< 1/pModuleInverse
86 // << "; mC="<< magCharge
87 // <<"; x=" << y[0]
88 // <<"; y=" << y[1]
89 // <<"; z=" << y[2]
90 // <<"; dydx[3]=" << dydx[3]
91 // <<"; dydx[4]=" << dydx[4]
92 // <<"; dydx[5]=" << dydx[5]
93 // << G4endl;
94
95 dydx[6] = 0.;//not used
96
97 // Lab Time of flight
98 dydx[7] = inverse_velocity;
99 return;
100}
G4double fElCharge
Electric charge in case of a dyon.
G4double fMagCharge
Magnetic charge of the monopole, in e+ units.
G4double fMassCof
Square of the monopole mass.

◆ SetChargeMomentumMass()

void SetChargeMomentumMass ( G4ChargeState  particleChargeState,
G4double  momentum,
G4double  mass 
)
virtual

G4EquationOfMotion::SetChargeMomentumMass() implementation.

Reads particle properties for equation of motion definition.

Parameters
particleChargeStateCharge information about the particle. Luckily, G4ChargeState have magnetic charge member variable. Magnetic charge is taken from it in e+ untis.
momentumThis argument of base function is ignored.
massMass of the particle.

Definition at line 30 of file G4MonopoleEquation.cc.

33{
34 G4double particleMagneticCharge = particleChargeState.MagneticCharge();
35 G4double particleElectricCharge = particleChargeState.GetCharge();
36
37 // fElCharge = particleElectricCharge;
38 fElCharge = eplus * particleElectricCharge * c_light;
39
40 fMagCharge = eplus * particleMagneticCharge * c_light ;
41
42 fMassCof = particleMass * particleMass ;
43}

Member Data Documentation

◆ fElCharge

G4double fElCharge
private

Electric charge in case of a dyon.

Definition at line 74 of file G4MonopoleEquation.h.

◆ fMagCharge

G4double fMagCharge
private

Magnetic charge of the monopole, in e+ units.

Definition at line 73 of file G4MonopoleEquation.h.

◆ fMassCof

G4double fMassCof
private

Square of the monopole mass.

Definition at line 75 of file G4MonopoleEquation.h.


The documentation for this class was generated from the following files: