CMS 3D CMS Logo

ParabolicParametrizedMagneticField.cc
Go to the documentation of this file.
1 
9 
10 using namespace std;
11 
12 // Default parameters are the best fit of 3.8T to the OAEParametrizedMagneticField parametrization.
14  : c1(3.8114), b0(-3.94991e-06), b1(7.53701e-06), a(2.43878e-11) {}
15 
17  : c1(parameters[0]), b0(parameters[1]), b1(parameters[2]), a(parameters[3]) {}
18 
20 
22  if (isDefined(gp)) {
23  return inTeslaUnchecked(gp);
24  } else {
25  LogDebug("MagneticField|FieldOutsideValidity")
26  << " Point " << gp << " is outside the validity region of ParabolicParametrizedMagneticField";
27  return GlobalVector();
28  }
29 }
30 
32  return GlobalVector(0, 0, B0Z(gp.z()) * Kr(gp.perp2()));
33 }
34 
35 inline float ParabolicParametrizedMagneticField::B0Z(const float z) const { return b0 * z * z + b1 * z + c1; }
36 
37 inline float ParabolicParametrizedMagneticField::Kr(const float R2) const { return a * R2 + 1.; }
38 
40  return (gp.perp2() < (13225.f) && fabs(gp.z()) < 280.f);
41 }
Vector3DBase
Definition: Vector3DBase.h:8
BeamSpotPI::parameters
parameters
Definition: BeamSpotPayloadInspectorHelper.h:30
MessageLogger.h
f
double f[11][100]
Definition: MuScleFitUtils.cc:78
detailsBasic3DVector::z
float float float z
Definition: extBasic3DVector.h:14
ParabolicParametrizedMagneticField::a
float a
Definition: ParabolicParametrizedMagneticField.h:44
GlobalVector
Global3DVector GlobalVector
Definition: GlobalVector.h:10
ParabolicParametrizedMagneticField::Kr
float Kr(const float R2) const
Definition: ParabolicParametrizedMagneticField.cc:37
ParabolicParametrizedMagneticField::~ParabolicParametrizedMagneticField
~ParabolicParametrizedMagneticField() override
Destructor.
Definition: ParabolicParametrizedMagneticField.cc:19
b1
static constexpr float b1
Definition: L1EGammaCrystalsEmulatorProducer.cc:83
ParabolicParametrizedMagneticField::c1
float c1
Definition: ParabolicParametrizedMagneticField.h:41
DDAxes::z
Point3DBase< float, GlobalTag >
ParabolicParametrizedMagneticField::ParabolicParametrizedMagneticField
ParabolicParametrizedMagneticField()
Default constructor, use default values for 3.8T map.
Definition: ParabolicParametrizedMagneticField.cc:13
ParabolicParametrizedMagneticField::b0
float b0
Definition: ParabolicParametrizedMagneticField.h:42
runTauDisplay.gp
gp
Definition: runTauDisplay.py:431
LogDebug
#define LogDebug(id)
Definition: MessageLogger.h:233
a
double a
Definition: hdecay.h:119
ParabolicParametrizedMagneticField::B0Z
float B0Z(const float a) const
Definition: ParabolicParametrizedMagneticField.cc:35
ParabolicParametrizedMagneticField.h
ParabolicParametrizedMagneticField::isDefined
bool isDefined(const GlobalPoint &gp) const override
True if the point is within the region where the concrete field.
Definition: ParabolicParametrizedMagneticField.cc:39
alignmentValidation.c1
c1
do drawing
Definition: alignmentValidation.py:1025
ParabolicParametrizedMagneticField::b1
float b1
Definition: ParabolicParametrizedMagneticField.h:43
b0
static constexpr float b0
Definition: L1EGammaCrystalsEmulatorProducer.cc:83
ParabolicParametrizedMagneticField::inTesla
GlobalVector inTesla(const GlobalPoint &gp) const override
Field value ad specified global point, in Tesla.
Definition: ParabolicParametrizedMagneticField.cc:21
std
Definition: JetResolutionObject.h:76
ParabolicParametrizedMagneticField::inTeslaUnchecked
GlobalVector inTeslaUnchecked(const GlobalPoint &gp) const override
Definition: ParabolicParametrizedMagneticField.cc:31
ParameterSet.h
MillePedeFileConverter_cfg.e
e
Definition: MillePedeFileConverter_cfg.py:37