Geant4
9.6.p02
Main Page
Related Pages
Modules
Namespaces
Classes
Files
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Groups
Pages
geant4_9_6_p02
source
geometry
magneticfield
include
G4EquationOfMotion.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
//
27
// $Id: G4EquationOfMotion.hh 69786 2013-05-15 09:38:51Z gcosmo $
28
//
29
//
30
// class G4EquationOfMotion
31
//
32
// Class description:
33
//
34
// Abstract Base Class for the right hand size of the equation of
35
// motion of a particle in a field.
36
37
// History:
38
// - Created. J.Apostolakis
39
// -------------------------------------------------------------------
40
41
#ifndef G4_EquationOfMotion_DEF
42
#define G4_EquationOfMotion_DEF
43
44
#include "
G4Types.hh
"
// "globals.hh"
45
#include "
G4Field.hh
"
// required in inline method implementations
46
47
class
G4EquationOfMotion
48
{
49
public
:
// with description
50
51
G4EquationOfMotion
(
G4Field
*Field );
52
virtual
~G4EquationOfMotion
();
53
// Constructor and virtual destructor. No operations.
54
55
virtual
void
EvaluateRhsGivenB
(
const
G4double
y
[],
56
const
G4double
B[3],
57
G4double
dydx[] )
const
= 0;
58
// Given the value of the field "B", this function
59
// calculates the value of the derivative dydx.
60
// --------------------------------------------------------
61
// This is the _only_ function a subclass must define.
62
// The other two functions use Rhs_givenB.
63
64
virtual
void
SetChargeMomentumMass
(
G4double
particleCharge,
// in e+ units
65
G4double
MomentumXc,
66
G4double
MassXc2) = 0;
67
// Set the charge, momentum and mass of the current particle
68
// --> used to set the equation's coefficients ...
69
70
inline
71
void
RightHandSide
(
const
G4double
y[],
72
G4double
dydx[] )
const
;
73
// This calculates the value of the derivative dydx at y.
74
// It is the usual enquiry function.
75
// ---------------------------
76
// (It is not virtual, but calls the virtual function above.)
77
78
void
EvaluateRhsReturnB
(
const
G4double
y[],
79
G4double
dydx[],
80
G4double
Field[] )
const
;
81
// Same as RHS above, but also returns the value of B.
82
// Should be made the new default ? after putting dydx & B in a class.
83
84
void
GetFieldValue
(
const
G4double
Point[4],
85
G4double
Field[] )
const
;
86
// Obtain only the field - the stepper assumes it is pure Magnetic.
87
// Not protected, because G4RKG3_Stepper uses it directly.
88
89
const
G4Field
*
GetFieldObj
()
const
;
90
void
SetFieldObj
(
G4Field
* pField);
91
92
private
:
93
// static const int G4maximum_number_of_field_components = 16;
94
enum
{ G4maximum_number_of_field_components = 16 } ;
95
96
G4Field
*itsField;
97
98
};
99
100
#include "G4EquationOfMotion.icc"
101
102
#endif
/* G4_EquationOfMotion_DEF */
Generated on Sat May 25 2013 14:33:10 for Geant4 by
1.8.4