CMS 3D CMS Logo

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules Pages
List of all members | Public Member Functions | Private Attributes
ParabolicParametrizedMagneticField Class Reference

#include <ParabolicParametrizedMagneticField.h>

Inheritance diagram for ParabolicParametrizedMagneticField:
MagneticField

Public Member Functions

float B0Z (const float a) const
 
GlobalVector inTesla (const GlobalPoint &gp) const override
 Field value ad specified global point, in Tesla. More...
 
GlobalVector inTeslaUnchecked (const GlobalPoint &gp) const override
 
bool isDefined (const GlobalPoint &gp) const override
 True if the point is within the region where the concrete field. More...
 
float Kr (const float R2) const
 
 ParabolicParametrizedMagneticField ()
 Default constructor, use default values for 3.8T map. More...
 
 ParabolicParametrizedMagneticField (const std::vector< double > &parameters)
 Constructor with explicit parameter list (b0, b1, c1, a) More...
 
 ~ParabolicParametrizedMagneticField () override
 Destructor. More...
 
- Public Member Functions inherited from MagneticField
virtual MagneticFieldclone () const
 
GlobalVector inInverseGeV (const GlobalPoint &gp) const
 Field value ad specified global point, in 1/Gev. More...
 
GlobalVector inKGauss (const GlobalPoint &gp) const
 Field value ad specified global point, in KGauss. More...
 
 MagneticField ()
 
 MagneticField (const MagneticField &orig)
 
int nominalValue () const
 The nominal field value for this map in kGauss. More...
 
virtual ~MagneticField ()
 

Private Attributes

float a
 
float b0
 
float b1
 
float c1
 

Detailed Description

A simple parametrization of the Bz component in the tracker region using the product of two parabolas

Author
G. Ortona - Torino

Definition at line 19 of file ParabolicParametrizedMagneticField.h.

Constructor & Destructor Documentation

◆ ParabolicParametrizedMagneticField() [1/2]

ParabolicParametrizedMagneticField::ParabolicParametrizedMagneticField ( )
explicit

Default constructor, use default values for 3.8T map.

Definition at line 13 of file ParabolicParametrizedMagneticField.cc.

14  : c1(3.8114), b0(-3.94991e-06), b1(7.53701e-06), a(2.43878e-11) {}

◆ ParabolicParametrizedMagneticField() [2/2]

ParabolicParametrizedMagneticField::ParabolicParametrizedMagneticField ( const std::vector< double > &  parameters)
explicit

Constructor with explicit parameter list (b0, b1, c1, a)

Definition at line 16 of file ParabolicParametrizedMagneticField.cc.

17  : c1(parameters[0]), b0(parameters[1]), b1(parameters[2]), a(parameters[3]) {}

◆ ~ParabolicParametrizedMagneticField()

ParabolicParametrizedMagneticField::~ParabolicParametrizedMagneticField ( )
override

Destructor.

Definition at line 19 of file ParabolicParametrizedMagneticField.cc.

19 {}

Member Function Documentation

◆ B0Z()

float ParabolicParametrizedMagneticField::B0Z ( const float  a) const
inline

Definition at line 35 of file ParabolicParametrizedMagneticField.cc.

35 { return b0 * z * z + b1 * z + c1; }

References b0, b1, c1, and z.

Referenced by inTeslaUnchecked().

◆ inTesla()

GlobalVector ParabolicParametrizedMagneticField::inTesla ( const GlobalPoint gp) const
overridevirtual

Field value ad specified global point, in Tesla.

Implements MagneticField.

Definition at line 21 of file ParabolicParametrizedMagneticField.cc.

21  {
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 }

References runTauDisplay::gp, inTeslaUnchecked(), isDefined(), and LogDebug.

◆ inTeslaUnchecked()

GlobalVector ParabolicParametrizedMagneticField::inTeslaUnchecked ( const GlobalPoint gp) const
overridevirtual

Optional implementation that derived classes can implement to provide faster query by skipping the check to isDefined.

Reimplemented from MagneticField.

Definition at line 31 of file ParabolicParametrizedMagneticField.cc.

31  {
32  return GlobalVector(0, 0, B0Z(gp.z()) * Kr(gp.perp2()));
33 }

References B0Z(), runTauDisplay::gp, and Kr().

Referenced by inTesla().

◆ isDefined()

bool ParabolicParametrizedMagneticField::isDefined ( const GlobalPoint ) const
inlineoverridevirtual

True if the point is within the region where the concrete field.

Reimplemented from MagneticField.

Definition at line 39 of file ParabolicParametrizedMagneticField.cc.

39  {
40  return (gp.perp2() < (13225.f) && fabs(gp.z()) < 280.f);
41 }

References f, and runTauDisplay::gp.

Referenced by inTesla().

◆ Kr()

float ParabolicParametrizedMagneticField::Kr ( const float  R2) const
inline

Definition at line 37 of file ParabolicParametrizedMagneticField.cc.

37 { return a * R2 + 1.; }

References a.

Referenced by inTeslaUnchecked().

Member Data Documentation

◆ a

float ParabolicParametrizedMagneticField::a
private

Definition at line 44 of file ParabolicParametrizedMagneticField.h.

Referenced by Kr().

◆ b0

float ParabolicParametrizedMagneticField::b0
private

Definition at line 42 of file ParabolicParametrizedMagneticField.h.

Referenced by B0Z().

◆ b1

float ParabolicParametrizedMagneticField::b1
private

Definition at line 43 of file ParabolicParametrizedMagneticField.h.

Referenced by B0Z().

◆ c1

float ParabolicParametrizedMagneticField::c1
private

Definition at line 41 of file ParabolicParametrizedMagneticField.h.

Referenced by B0Z().

f
double f[11][100]
Definition: MuScleFitUtils.cc:78
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
parameters
parameters
Definition: BeamSpot_PayloadInspector.cc:14
ParabolicParametrizedMagneticField::c1
float c1
Definition: ParabolicParametrizedMagneticField.h:41
DDAxes::z
ParabolicParametrizedMagneticField::b0
float b0
Definition: ParabolicParametrizedMagneticField.h:42
runTauDisplay.gp
gp
Definition: runTauDisplay.py:431
LogDebug
#define LogDebug(id)
Definition: MessageLogger.h:670
ParabolicParametrizedMagneticField::B0Z
float B0Z(const float a) const
Definition: ParabolicParametrizedMagneticField.cc:35
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
ParabolicParametrizedMagneticField::b1
float b1
Definition: ParabolicParametrizedMagneticField.h:43
ParabolicParametrizedMagneticField::inTeslaUnchecked
GlobalVector inTeslaUnchecked(const GlobalPoint &gp) const override
Definition: ParabolicParametrizedMagneticField.cc:31
MillePedeFileConverter_cfg.e
e
Definition: MillePedeFileConverter_cfg.py:37