#include <MagneticField/ParametrizedEngine/src/OAEParametrizedMagneticField.h>
Public Member Functions | |
GlobalVector | inTesla (const GlobalPoint &gp) const |
Field value ad specified global point, in Tesla. | |
GlobalVector | inTeslaUnchecked (const GlobalPoint &gp) const |
Optional implementation that derived classes can implement to provide faster query by skipping the check to isDefined. | |
bool | isDefined (const GlobalPoint &gp) const |
True if the point is within the region where the concrete field. | |
OAEParametrizedMagneticField (const edm::ParameterSet ¶meters) | |
Constructor. Parameters taken from a PSet. | |
OAEParametrizedMagneticField (std::string T="3_8T") | |
Constructor. | |
virtual | ~OAEParametrizedMagneticField () |
Destructor. | |
Private Attributes | |
magfieldparam::TkBfield * | theParam |
Karimaki's "off-axis expansion" of the TOSCA field version 1103l_071212 (2, 3, 3.4, 3.8, 4 T) valid in the region r<1.15 m and |z|<2.8 m For details, cf TkBfield.h
Definition at line 22 of file OAEParametrizedMagneticField.h.
OAEParametrizedMagneticField::OAEParametrizedMagneticField | ( | std::string | T = "3_8T" |
) |
Constructor.
OAEParametrizedMagneticField::OAEParametrizedMagneticField | ( | const edm::ParameterSet & | parameters | ) |
Constructor. Parameters taken from a PSet.
Definition at line 22 of file OAEParametrizedMagneticField.cc.
References edm::ParameterSet::getParameter(), and theParam.
00022 { 00023 theParam = new TkBfield(parameters.getParameter<string>("BValue")); 00024 }
OAEParametrizedMagneticField::~OAEParametrizedMagneticField | ( | ) | [virtual] |
Destructor.
Definition at line 27 of file OAEParametrizedMagneticField.cc.
References theParam.
00027 { 00028 delete theParam; 00029 }
GlobalVector OAEParametrizedMagneticField::inTesla | ( | const GlobalPoint & | gp | ) | const [virtual] |
Field value ad specified global point, in Tesla.
Implements MagneticField.
Definition at line 33 of file OAEParametrizedMagneticField.cc.
References inTeslaUnchecked(), and isDefined().
00033 { 00034 if (isDefined(gp)) { 00035 return inTeslaUnchecked(gp); 00036 } else { 00037 edm::LogWarning("MagneticField|FieldOutsideValidity") << " Point " << gp << " is outside the validity region of OAEParametrizedMagneticField"; 00038 return GlobalVector(); 00039 } 00040 }
GlobalVector OAEParametrizedMagneticField::inTeslaUnchecked | ( | const GlobalPoint & | gp | ) | const [virtual] |
Optional implementation that derived classes can implement to provide faster query by skipping the check to isDefined.
Reimplemented from MagneticField.
Definition at line 43 of file OAEParametrizedMagneticField.cc.
References magfieldparam::TkBfield::getBxyz(), theParam, PV3DBase< T, PVType, FrameType >::x(), x, PV3DBase< T, PVType, FrameType >::y(), and PV3DBase< T, PVType, FrameType >::z().
Referenced by inTesla().
00043 { 00044 double x[3] = {gp.x()/100., gp.y()/100., gp.z()/100.}; 00045 double B[3]; 00046 theParam->getBxyz(x,B); 00047 return GlobalVector(B[0], B[1], B[2]); 00048 }
bool OAEParametrizedMagneticField::isDefined | ( | const GlobalPoint & | gp | ) | const [virtual] |
True if the point is within the region where the concrete field.
Reimplemented from MagneticField.
Definition at line 52 of file OAEParametrizedMagneticField.cc.
References PV3DBase< T, PVType, FrameType >::perp(), and PV3DBase< T, PVType, FrameType >::z().
Referenced by inTesla().
Definition at line 40 of file OAEParametrizedMagneticField.h.
Referenced by inTeslaUnchecked(), OAEParametrizedMagneticField(), and ~OAEParametrizedMagneticField().