CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros 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
 Field value ad specified global point, in Tesla. More...
 
GlobalVector inTeslaUnchecked (const GlobalPoint &gp) const
 
bool isDefined (const GlobalPoint &gp) const
 True if the point is within the region where the concrete field. More...
 
float Kr (const float R2) const
 
 ParabolicParametrizedMagneticField ()
 Constructor. More...
 
virtual ~ParabolicParametrizedMagneticField ()
 Constructor. Parameters taken from a PSet. 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

const float a = 2.43878e-11
 
const float b0 = -3.94991e-06
 
const float b1 = 7.53701e-06
 
const float c1 = 3.8114
 

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 17 of file ParabolicParametrizedMagneticField.h.

Constructor & Destructor Documentation

ParabolicParametrizedMagneticField::ParabolicParametrizedMagneticField ( )
explicit

Constructor.

Definition at line 13 of file ParabolicParametrizedMagneticField.cc.

13 {}
ParabolicParametrizedMagneticField::~ParabolicParametrizedMagneticField ( )
virtual

Constructor. Parameters taken from a PSet.

Destructor

Definition at line 20 of file ParabolicParametrizedMagneticField.cc.

20 {}

Member Function Documentation

float ParabolicParametrizedMagneticField::B0Z ( const float  a) const
inline
GlobalVector ParabolicParametrizedMagneticField::inTesla ( const GlobalPoint gp) const
virtual

Field value ad specified global point, in Tesla.

Implements MagneticField.

Definition at line 24 of file ParabolicParametrizedMagneticField.cc.

References LogDebug.

24  {
25  if (isDefined(gp)) {
26  return inTeslaUnchecked(gp);
27  } else {
28  LogDebug("MagneticField|FieldOutsideValidity") << " Point " << gp << " is outside the validity region of ParabolicParametrizedMagneticField";
29  return GlobalVector();
30  }
31 }
#define LogDebug(id)
bool isDefined(const GlobalPoint &gp) const
True if the point is within the region where the concrete field.
GlobalVector inTeslaUnchecked(const GlobalPoint &gp) const
Global3DVector GlobalVector
Definition: GlobalVector.h:10
GlobalVector ParabolicParametrizedMagneticField::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 33 of file ParabolicParametrizedMagneticField.cc.

References PV3DBase< T, PVType, FrameType >::perp2(), and PV3DBase< T, PVType, FrameType >::z().

33  {
34  float B=B0Z(gp.z())*Kr(gp.perp2());
35  return GlobalVector(0, 0, B);
36 }
T perp2() const
Definition: PV3DBase.h:71
T z() const
Definition: PV3DBase.h:64
Global3DVector GlobalVector
Definition: GlobalVector.h:10
bool ParabolicParametrizedMagneticField::isDefined ( const GlobalPoint gp) const
inlinevirtual

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

Reimplemented from MagneticField.

Definition at line 46 of file ParabolicParametrizedMagneticField.cc.

References f, PV3DBase< T, PVType, FrameType >::perp2(), and PV3DBase< T, PVType, FrameType >::z().

46  {
47  return (gp.perp2()<(13225.f) && fabs(gp.z())<280.f);
48 }
T perp2() const
Definition: PV3DBase.h:71
T z() const
Definition: PV3DBase.h:64
double f[11][100]
float ParabolicParametrizedMagneticField::Kr ( const float  R2) const
inline

Definition at line 42 of file ParabolicParametrizedMagneticField.cc.

References a.

42  {
43  return a*R2 +1.;
44 }

Member Data Documentation

const float ParabolicParametrizedMagneticField::a = 2.43878e-11
private

Definition at line 42 of file ParabolicParametrizedMagneticField.h.

const float ParabolicParametrizedMagneticField::b0 = -3.94991e-06
private

Definition at line 39 of file ParabolicParametrizedMagneticField.h.

const float ParabolicParametrizedMagneticField::b1 = 7.53701e-06
private

Definition at line 40 of file ParabolicParametrizedMagneticField.h.

const float ParabolicParametrizedMagneticField::c1 = 3.8114
private

Definition at line 41 of file ParabolicParametrizedMagneticField.h.