Geant4  10.03.p01
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
G4KM_OpticalEqRhs Class Reference

#include <G4KM_OpticalEqRhs.hh>

Inheritance diagram for G4KM_OpticalEqRhs:
Collaboration diagram for G4KM_OpticalEqRhs:

Public Member Functions

 G4KM_OpticalEqRhs (G4KM_DummyField *field, G4V3DNucleus *nucleus)
 
 ~G4KM_OpticalEqRhs ()
 
virtual void EvaluateRhsGivenB (const G4double y[], const G4double B[3], G4double dydx[]) const
 
virtual void SetChargeMomentumMass (G4ChargeState particleCharge, G4double MomentumXc, G4double MassXc2)
 
void SetFactor (G4double mass, G4double opticalParameter)
 
- Public Member Functions inherited from G4Mag_EqRhs
 G4Mag_EqRhs (G4MagneticField *magField)
 
virtual ~G4Mag_EqRhs ()
 
G4double FCof () const
 
- Public Member Functions inherited from G4EquationOfMotion
 G4EquationOfMotion (G4Field *Field)
 
virtual ~G4EquationOfMotion ()
 
void RightHandSide (const G4double y[], G4double dydx[]) const
 
void EvaluateRhsReturnB (const G4double y[], G4double dydx[], G4double Field[]) const
 
void GetFieldValue (const G4double Point[4], G4double Field[]) const
 
const G4FieldGetFieldObj () const
 
void SetFieldObj (G4Field *pField)
 

Detailed Description

Definition at line 49 of file G4KM_OpticalEqRhs.hh.

Constructor & Destructor Documentation

G4KM_OpticalEqRhs::G4KM_OpticalEqRhs ( G4KM_DummyField field,
G4V3DNucleus nucleus 
)

Definition at line 45 of file G4KM_OpticalEqRhs.cc.

46  :
47  G4Mag_EqRhs(field), theNucleus(nucleus)
48 {
49  theFactor = 0;
50  theMass = 0;
51 }
G4Mag_EqRhs(G4MagneticField *magField)
Definition: G4Mag_EqRhs.cc:50
G4KM_OpticalEqRhs::~G4KM_OpticalEqRhs ( )
inline

Definition at line 69 of file G4KM_OpticalEqRhs.hh.

70 { }

Member Function Documentation

void G4KM_OpticalEqRhs::EvaluateRhsGivenB ( const G4double  y[],
const G4double  B[3],
G4double  dydx[] 
) const
virtual

Implements G4Mag_EqRhs.

Definition at line 71 of file G4KM_OpticalEqRhs.cc.

73 {
74  G4double yMod = std::sqrt(y[0]*y[0]+y[1]*y[1]+y[2]*y[2]);
75  G4double e = std::sqrt(theMass*theMass+y[3]*y[3]+y[4]*y[4]+y[5]*y[5]);
76  dydx[0] = c_light*y[3]/e; //
77  dydx[1] = c_light*y[4]/e; // dq/dt=dH/dp = c*p/e
78  dydx[2] = c_light*y[5]/e; //
79 
80 // V=K*rho(r) ==> dydx[3] = -dV/dr*dr/dx = -K*d(rho)/dr*dr/dx.
81 // Idem for dydx[4] and dydx[5]
82 
83  const G4VNuclearDensity * nuclearDensity=theNucleus->GetNuclearDensity();
84 
85  G4ThreeVector pos(y[0],y[1],y[2]);
86  G4double deriv = theFactor*nuclearDensity->GetDeriv(pos);
87 
88  dydx[3] = yMod == 0 ? 0 : -deriv*y[0]/yMod*c_light;
89  dydx[4] = yMod == 0 ? 0 : -deriv*y[1]/yMod*c_light;
90  dydx[5] = yMod == 0 ? 0 : -deriv*y[2]/yMod*c_light;
91 }
virtual const G4VNuclearDensity * GetNuclearDensity() const =0
virtual G4double GetDeriv(const G4ThreeVector &point) const =0
static constexpr double c_light
double G4double
Definition: G4Types.hh:76
static const G4double pos

Here is the call graph for this function:

void G4KM_OpticalEqRhs::SetChargeMomentumMass ( G4ChargeState  particleCharge,
G4double  MomentumXc,
G4double  MassXc2 
)
virtual

Reimplemented from G4Mag_EqRhs.

Definition at line 94 of file G4KM_OpticalEqRhs.cc.

95 {
96 }
void G4KM_OpticalEqRhs::SetFactor ( G4double  mass,
G4double  opticalParameter 
)

Definition at line 54 of file G4KM_OpticalEqRhs.cc.

55 {
56  G4double A = theNucleus->GetMassNumber();
57  G4double Z = theNucleus->GetCharge();
59  G4double nucleusMass = Z*proton_mass_c2+(A-Z)*neutron_mass_c2+bindingEnergy;
60  G4double reducedMass = mass*nucleusMass/(mass+nucleusMass);
61 
62  G4double nucleonMass = (proton_mass_c2+neutron_mass_c2)/2;
63 
64 // _factor in (MeV*fermi)*fermi/MeV = fermi*fermi -- need to have A as density normalized to 1
65  theFactor = 2*pi*hbarc*hbarc*(1+mass/nucleonMass)* opticalParameter/reducedMass * A;
66 
67  theMass = mass;
68 }
virtual G4int GetCharge()=0
static constexpr double proton_mass_c2
static constexpr double hbarc
virtual G4int GetMassNumber()=0
double A(double temperature)
static constexpr double neutron_mass_c2
static G4double GetBindingEnergy(const G4int A, const G4int Z)
int G4lrint(double ad)
Definition: templates.hh:163
static constexpr double pi
Definition: G4SIunits.hh:75
double G4double
Definition: G4Types.hh:76
G4double bindingEnergy(G4int A, G4int Z)

Here is the call graph for this function:

Here is the caller graph for this function:


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