#include <MagneticField.h>
Definition at line 47 of file MagneticField.h.
mag::MagneticField::~MagneticField |
( |
| ) |
|
|
inline |
G4ThreeVector const MagneticField::FieldAtPoint |
( |
G4ThreeVector const & |
p = G4ThreeVector(0) | ) |
const |
Definition at line 81 of file MagneticField_service.cc.
86 double point[3] = {
p.x(),
p.y(),
p.z() };
92 if(fd.fGeoVol->Contains(point))
return fd.fField;
96 return G4ThreeVector(0);
std::vector< MagneticFieldDescription > fFieldDescriptions
Descriptions of the fields.
Definition at line 54 of file MagneticField.h.
std::vector< MagneticFieldDescription > fFieldDescriptions
Descriptions of the fields.
std::string const& mag::MagneticField::MagnetizedVolume |
( |
size_t |
f | ) |
const |
|
inline |
Definition at line 57 of file MagneticField.h.
std::vector< MagneticFieldDescription > fFieldDescriptions
Descriptions of the fields.
size_t mag::MagneticField::NumFields |
( |
| ) |
const |
|
inline |
Definition at line 55 of file MagneticField.h.
std::vector< MagneticFieldDescription > fFieldDescriptions
Descriptions of the fields.
Definition at line 41 of file MagneticField_service.cc.
43 auto fieldDescriptions = pset.get<std::vector<fhicl::ParameterSet> >(
"FieldDescriptions");
45 MagneticFieldDescription fieldDescription;
46 for(
auto itr : fieldDescriptions){
56 fieldDescription.fVolume = itr.get<
std::string>(
"MagnetizedVolume");
57 fieldDescription.fGeoVol = gGeoManager->FindVolumeFast(fieldDescription.fVolume.c_str());
60 if( fieldDescription.fGeoVol ==
nullptr )
62 <<
"cannot locat volume " 63 << fieldDescription.fVolume
64 <<
" in gGeoManager, bail";
68 std::vector<double> field = itr.get<std::vector<double> >(
"ConstantField");
72 for(
size_t i = 0; i < 3; ++i) fieldDescription.fField[i] = field[i];
std::vector< MagneticFieldDescription > fFieldDescriptions
Descriptions of the fields.
enum mag::MagneticFieldMode MagFieldMode_t
cet::coded_exception< error, detail::translate > exception
G4ThreeVector const MagneticField::UniformFieldInVolume |
( |
std::string const & |
volName | ) |
const |
Definition at line 100 of file MagneticField_service.cc.
106 if (fd.fVolume.compare(volName) == 0)
return fd.fField;
110 return G4ThreeVector(0);
std::vector< MagneticFieldDescription > fFieldDescriptions
Descriptions of the fields.
Definition at line 56 of file MagneticField.h.
std::vector< MagneticFieldDescription > fFieldDescriptions
Descriptions of the fields.
The documentation for this class was generated from the following files: