Class that defines a magnetic field composed from many fields.
More...
#include <ShipCompField.h>
|
| ShipCompField (const std::string &label, TVirtualMagField *firstField) |
| Main constructor.
|
|
| ShipCompField (const std::string &label, TVirtualMagField *firstField, TVirtualMagField *secondField) |
| Secondary constructor.
|
|
| ShipCompField (const std::string &label, const std::vector< TVirtualMagField * > &theFields) |
| More general constructor.
|
|
virtual | ~ShipCompField () |
| Destructor.
|
|
virtual void | Field (const Double_t *position, Double_t *B) |
| The total magnetic field from all of the composite sources (linear superposition)
|
|
size_t | nComposite () const |
| Get the number of fields in the composite.
|
|
std::vector< TVirtualMagField * > | getCompFields () const |
| Get the vector of fields.
|
|
| ClassDef (ShipCompField, 1) |
| ClassDef for ROOT.
|
|
|
std::vector< TVirtualMagField * > | theFields_ |
| The vector of the various magnetic field pointers comprising the composite.
|
|
Class that defines a magnetic field composed from many fields.
- Author
- John Back J.J.B.nosp@m.ack@.nosp@m.warwi.nosp@m.ck.a.nosp@m.c.uk
Definition at line 14 of file ShipCompField.h.
◆ ShipCompField() [1/4]
ShipCompField::ShipCompField |
( |
const std::string & |
label, |
|
|
TVirtualMagField * |
firstField |
|
) |
| |
Main constructor.
- Parameters
-
[in] | label | A descriptive name/title/lable for the composite field |
[in] | firstField | The first magnetic field for the composite |
Definition at line 10 of file ShipCompField.cxx.
11 :
12 TVirtualMagField(
label.c_str()),
14{
16}
std::vector< TVirtualMagField * > theFields_
The vector of the various magnetic field pointers comprising the composite.
◆ ShipCompField() [2/4]
ShipCompField::ShipCompField |
( |
const std::string & |
label, |
|
|
TVirtualMagField * |
firstField, |
|
|
TVirtualMagField * |
secondField |
|
) |
| |
Secondary constructor.
- Parameters
-
[in] | label | A descriptive name/title/lable for the composite field |
[in] | firstField | The first magnetic field pointer for the composite |
[in] | secondField | The second magnetic field pointer for the composite |
Definition at line 18 of file ShipCompField.cxx.
20 :
21 TVirtualMagField(
label.c_str()),
23{
26}
◆ ShipCompField() [3/4]
ShipCompField::ShipCompField |
( |
const std::string & |
label, |
|
|
const std::vector< TVirtualMagField * > & |
theFields |
|
) |
| |
More general constructor.
- Parameters
-
[in] | label | A descriptive name/title/lable for the composite field |
[in] | theFields | A vector of magnetic field pointers for the composite |
Definition at line 28 of file ShipCompField.cxx.
29 :
30 TVirtualMagField(
label.c_str()),
32{
33}
◆ ~ShipCompField()
ShipCompField::~ShipCompField |
( |
| ) |
|
|
virtual |
◆ ShipCompField() [4/4]
Private copy and assignment operators.
◆ ClassDef()
◆ Field()
void ShipCompField::Field |
( |
const Double_t * |
position, |
|
|
Double_t * |
B |
|
) |
| |
|
virtual |
The total magnetic field from all of the composite sources (linear superposition)
- Parameters
-
[in] | position | The x,y,z global co-ordinates of the point |
[out] | B | The x,y,z components of the magnetic field |
Definition at line 41 of file ShipCompField.cxx.
42{
43
44
45
46
47 B[0] = 0.0,
B[1] = 0.0,
B[2] = 0.0;
48
49 std::vector<TVirtualMagField*>::const_iterator iter;
51
52 TVirtualMagField* theField = *iter;
53 if (theField) {
54
55
56
57
58 Double_t BVect[3] = {0.0, 0.0, 0.0};
59 theField->Field(position, BVect);
60
61
65
66
67
68
69 }
70
71 }
72
73}
◆ getCompFields()
std::vector< TVirtualMagField * > ShipCompField::getCompFields |
( |
| ) |
const |
|
inline |
Get the vector of fields.
- Returns
- the vector of fields
Definition at line 62 of file ShipCompField.h.
◆ nComposite()
size_t ShipCompField::nComposite |
( |
| ) |
const |
|
inline |
Get the number of fields in the composite.
- Returns
- the number of fields used in the composite
Definition at line 56 of file ShipCompField.h.
◆ operator=()
◆ theFields_
std::vector<TVirtualMagField*> ShipCompField::theFields_ |
|
private |
The vector of the various magnetic field pointers comprising the composite.
Definition at line 76 of file ShipCompField.h.
The documentation for this class was generated from the following files: