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) |
| |
| size_t | nComposite () const |
| | Get the number of fields in the composite.
|
| |
| std::span< TVirtualMagField *const > | 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 19 of file ShipCompField.h.
◆ ShipCompField() [1/4]
| ShipCompField::ShipCompField |
( |
const std::string & |
label, |
|
|
TVirtualMagField * |
firstField |
|
) |
| |
Main constructor.
- Parameters
-
| [in] | label | A descriptive name/title/label for the composite field |
| [in] | firstField | The first magnetic field for the composite |
Definition at line 14 of file ShipCompField.cxx.
16 : TVirtualMagField(label.c_str()),
theFields_() {
18}
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/label 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 20 of file ShipCompField.cxx.
23 : TVirtualMagField(label.c_str()),
theFields_() {
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/label for the composite field |
| [in] | theFields | A vector of magnetic field pointers for the composite |
Definition at line 28 of file ShipCompField.cxx.
30 : TVirtualMagField(label.c_str()),
theFields_(theFields) {}
◆ ~ShipCompField()
| ShipCompField::~ShipCompField |
( |
| ) |
|
|
virtual |
◆ ShipCompField() [4/4]
Deleted 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 coordinates of the point |
| [out] | B | The x,y,z components of the magnetic field |
Definition at line 37 of file ShipCompField.cxx.
37 {
38
39
40
41 B[0] = 0.0,
B[1] = 0.0,
B[2] = 0.0;
42
44 if (theField) {
45
46
47
48 Double_t BVect[3] = {0.0, 0.0, 0.0};
49 theField->Field(position, BVect);
50
51
55
56
57
58 }
59 }
60}
◆ getCompFields()
| std::span< TVirtualMagField *const > ShipCompField::getCompFields |
( |
| ) |
const |
|
inline |
Get the vector of fields.
- Returns
- a non-owning view of the fields
Definition at line 66 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 60 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 80 of file ShipCompField.h.
The documentation for this class was generated from the following files: