#include <PolyFit3DParametrizedMagneticField.h>
Public Member Functions | |
GlobalVector | inTesla (const GlobalPoint &gp) const |
Field value ad specified global point, in Tesla. | |
GlobalVector | inTeslaUnchecked (const GlobalPoint &gp) const |
bool | isDefined (const GlobalPoint &gp) const |
True if the point is within the region where the concrete field. | |
PolyFit3DParametrizedMagneticField (const edm::ParameterSet ¶meters) | |
Constructor. Parameters taken from a PSet. | |
PolyFit3DParametrizedMagneticField (double bVal=3.8114) | |
virtual | ~PolyFit3DParametrizedMagneticField () |
Destructor. | |
Private Attributes | |
magfieldparam::BFit3D * | theParam |
Magnetic Field engine wrapper for V. Maroussov's 3D parametrization of the MT data.
Definition at line 20 of file PolyFit3DParametrizedMagneticField.h.
PolyFit3DParametrizedMagneticField::PolyFit3DParametrizedMagneticField | ( | double | bVal = 3.8114 | ) |
Constructor. Fitted bVal for the nominal currents are: 2.0216; 3.5162; 3.8114; 4.01242188708911
Definition at line 18 of file PolyFit3DParametrizedMagneticField.cc.
References magfieldparam::BFit3D::SetField(), and theParam.
PolyFit3DParametrizedMagneticField::PolyFit3DParametrizedMagneticField | ( | const edm::ParameterSet & | parameters | ) |
Constructor. Parameters taken from a PSet.
Definition at line 25 of file PolyFit3DParametrizedMagneticField.cc.
References edm::ParameterSet::getParameter(), magfieldparam::BFit3D::SetField(), and theParam.
: theParam(new BFit3D()) { theParam->SetField(parameters.getParameter<double>("BValue")); // Additional options (documentation by Vassili): // By default, the package accepts signed value of "r". That means, // one can cross r=0 and orientation of the coordinate "orts" // e_r and e_phi will not be flipped over. // In other words for an r<0 the e_r points inward, in the direction r=0. // This is a "natural" mode. However, the default behavior may be // changed by the call // theParam->UseSignedRad(false); // In that case with crossing of r=0 e_r and e_phi will be flipped in // such a way that e_r always points outward. In other words instead of // (r<0, phi) the (abs(r), phi+PI) will be used in this mode. // The expansion coefficients for a nominal field in between measurement // field values (2.0T, 3.5T, 3.8T and 4.0T) by default are calculated by // means of a linear piecewise interpolation. Another provided // interpolation mode is cubic spline. This mode can be switched // on by the call: // theParam->UseSpline(true); // From practical point of view the use of spline interpolation doesn't // change much, but it makes the coefficients' behavior a bit more // physical at very low/high field values. }
PolyFit3DParametrizedMagneticField::~PolyFit3DParametrizedMagneticField | ( | ) | [virtual] |
Destructor.
Definition at line 57 of file PolyFit3DParametrizedMagneticField.cc.
References theParam.
{ delete theParam; }
GlobalVector PolyFit3DParametrizedMagneticField::inTesla | ( | const GlobalPoint & | gp | ) | const [virtual] |
Field value ad specified global point, in Tesla.
Implements MagneticField.
Definition at line 63 of file PolyFit3DParametrizedMagneticField.cc.
References inTeslaUnchecked(), and isDefined().
{ if (isDefined(gp)) { return inTeslaUnchecked(gp); } else { edm::LogWarning("MagneticField|FieldOutsideValidity") << " Point " << gp << " is outside the validity region of PolyFit3DParametrizedMagneticField"; return GlobalVector(); } }
GlobalVector PolyFit3DParametrizedMagneticField::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 74 of file PolyFit3DParametrizedMagneticField.cc.
References funct::cos(), magfieldparam::BFit3D::GetField(), PV3DBase< T, PVType, FrameType >::perp(), PV3DBase< T, PVType, FrameType >::phi(), funct::sin(), theParam, and PV3DBase< T, PVType, FrameType >::z().
Referenced by inTesla().
bool PolyFit3DParametrizedMagneticField::isDefined | ( | const GlobalPoint & | gp | ) | const [virtual] |
True if the point is within the region where the concrete field.
Reimplemented from MagneticField.
Definition at line 88 of file PolyFit3DParametrizedMagneticField.cc.
References PV3DBase< T, PVType, FrameType >::perp(), alignCSCRings::r, PV3DBase< T, PVType, FrameType >::z(), and z.
Referenced by inTesla().
Definition at line 39 of file PolyFit3DParametrizedMagneticField.h.
Referenced by inTeslaUnchecked(), PolyFit3DParametrizedMagneticField(), and ~PolyFit3DParametrizedMagneticField().