CMS 3D CMS Logo

List of all members | Public Member Functions | Private Attributes
UniformMagneticField Class Referencefinal

#include <UniformMagneticField.h>

Inheritance diagram for UniformMagneticField:
MagneticField

Public Member Functions

GlobalVector inTesla (const GlobalPoint &) 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...
 
void set (float value)
 
void set (GlobalVector value)
 
 UniformMagneticField (float value)
 Construct passing the Z field component in Tesla. More...
 
 UniformMagneticField (GlobalVector value)
 
 ~UniformMagneticField () override
 
- 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

GlobalVector theField
 

Detailed Description

A MagneticField engine that returns a constant programmable field value.

Author
N. Amapane - CERN

Definition at line 13 of file UniformMagneticField.h.

Constructor & Destructor Documentation

◆ UniformMagneticField() [1/2]

UniformMagneticField::UniformMagneticField ( float  value)
inline

Construct passing the Z field component in Tesla.

Definition at line 16 of file UniformMagneticField.h.

16 : theField(0.f, 0.f, value) {}

◆ UniformMagneticField() [2/2]

UniformMagneticField::UniformMagneticField ( GlobalVector  value)
inline

Definition at line 18 of file UniformMagneticField.h.

18 : theField(value) {}

◆ ~UniformMagneticField()

UniformMagneticField::~UniformMagneticField ( )
inlineoverride

Definition at line 23 of file UniformMagneticField.h.

23 {}

Member Function Documentation

◆ inTesla()

GlobalVector UniformMagneticField::inTesla ( const GlobalPoint gp) const
inlineoverridevirtual

Field value ad specified global point, in Tesla.

Implements MagneticField.

Definition at line 25 of file UniformMagneticField.h.

25 { return theField; }

References theField.

◆ inTeslaUnchecked()

GlobalVector UniformMagneticField::inTeslaUnchecked ( const GlobalPoint gp) const
inlineoverridevirtual

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

Reimplemented from MagneticField.

Definition at line 27 of file UniformMagneticField.h.

27 { return theField; }

References theField.

◆ isDefined()

bool UniformMagneticField::isDefined ( const GlobalPoint ) const
inlineoverridevirtual

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

Reimplemented from MagneticField.

Definition at line 29 of file UniformMagneticField.h.

29 { return true; }

◆ set() [1/2]

void UniformMagneticField::set ( float  value)
inline

Definition at line 21 of file UniformMagneticField.h.

21 { set(GlobalVector(0.f, 0.f, value)); }

References f, and set().

Referenced by set().

◆ set() [2/2]

void UniformMagneticField::set ( GlobalVector  value)
inline

Definition at line 20 of file UniformMagneticField.h.

20 { theField = value; }

References theField, and relativeConstraints::value.

Referenced by MultiHitGeneratorFromChi2::initES().

Member Data Documentation

◆ theField

GlobalVector UniformMagneticField::theField
private

Definition at line 32 of file UniformMagneticField.h.

Referenced by inTesla(), inTeslaUnchecked(), and set().

f
double f[11][100]
Definition: MuScleFitUtils.cc:78
GlobalVector
Global3DVector GlobalVector
Definition: GlobalVector.h:10
UniformMagneticField::set
void set(GlobalVector value)
Definition: UniformMagneticField.h:20
value
Definition: value.py:1
relativeConstraints.value
value
Definition: relativeConstraints.py:53
UniformMagneticField::theField
GlobalVector theField
Definition: UniformMagneticField.h:32