CMS 3D CMS Logo

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

#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...
 
float inverseBzAtOriginInGeV () const
 The inverse of field z component for this map in GeV. 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
 

Additional Inherited Members

- Protected Member Functions inherited from MagneticField
void setNominalValue ()
 

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::ParabolicParametrizedMagneticField ( )
explicit
ParabolicParametrizedMagneticField::ParabolicParametrizedMagneticField ( const std::vector< double > &  parameters)
explicit
ParabolicParametrizedMagneticField::~ParabolicParametrizedMagneticField ( )
override

Destructor.

Definition at line 23 of file ParabolicParametrizedMagneticField.cc.

23 {}

Member Function Documentation

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

Field value ad specified global point, in Tesla.

Implements MagneticField.

Definition at line 25 of file ParabolicParametrizedMagneticField.cc.

References inTeslaUnchecked(), isDefined(), and LogDebug.

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

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

Referenced by inTesla().

35  {
36  return GlobalVector(0, 0, B0Z(gp.z()) * Kr(gp.perp2()));
37 }
T perp2() const
Definition: PV3DBase.h:68
T z() const
Definition: PV3DBase.h:61
Global3DVector GlobalVector
Definition: GlobalVector.h:10
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 43 of file ParabolicParametrizedMagneticField.cc.

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

Referenced by inTesla().

43  {
44  return (gp.perp2() < (13225.f) && fabs(gp.z()) < 280.f);
45 }
float ParabolicParametrizedMagneticField::Kr ( const float  R2) const
inline

Definition at line 41 of file ParabolicParametrizedMagneticField.cc.

References a.

Referenced by inTeslaUnchecked().

Member Data Documentation

float ParabolicParametrizedMagneticField::a
private

Definition at line 44 of file ParabolicParametrizedMagneticField.h.

Referenced by Kr().

float ParabolicParametrizedMagneticField::b0
private

Definition at line 42 of file ParabolicParametrizedMagneticField.h.

Referenced by B0Z().

float ParabolicParametrizedMagneticField::b1
private

Definition at line 43 of file ParabolicParametrizedMagneticField.h.

Referenced by B0Z().

float ParabolicParametrizedMagneticField::c1
private

Definition at line 41 of file ParabolicParametrizedMagneticField.h.

Referenced by B0Z().