Belle II Software development
MagneticFieldComponentConstant Class Referencefinalabstract

Describe one component of the Geometry. More...

#include <MagneticFieldComponentConstant.h>

Inheritance diagram for MagneticFieldComponentConstant:
MagneticFieldComponent

Public Member Functions

 MagneticFieldComponentConstant ()
 empty constructor for ROOT
 
 MagneticFieldComponentConstant (const ROOT::Math::XYZVector &field, float minR, float maxR, float minZ, float maxZ)
 full constructor
 
 MagneticFieldComponentConstant (const ROOT::Math::XYZVector &field)
 constructor for unlimited field
 
bool inside (const ROOT::Math::XYZVector &pos) const override
 return whether we are inside the active region for this component
 
ROOT::Math::XYZVector getField (__attribute((unused)) const ROOT::Math::XYZVector &pos) const override
 return the field assuming we are inside the active region as returned by inside()
 
void setExclusive (bool exclusive)
 set the state of the exclusive flag
 
bool isExclusive () const
 returns whether the field is set to exclusive mode
 
virtual ROOT::Math::XYZVector getField (const ROOT::Math::XYZVector &pos) const =0
 return the field at point pos
 
 ClassDef (MagneticFieldComponent, 1)
 ROOT Dictionary.
 

Private Member Functions

 ClassDefOverride (MagneticFieldComponentConstant, 2)
 ROOT dictionary.
 

Private Attributes

ROOT::Math::XYZVector m_field
 magnetic field strength
 
float m_minR {0}
 minimal R=sqrt(x^2+y^2) for which this field is present
 
float m_maxR {0}
 maximal R=sqrt(x^2+y^2) for which this field is present
 
float m_minZ {0}
 minimal Z for which this field is present
 
float m_maxZ {0}
 maximal Z for which this field is present
 
bool m_exclusive {false}
 whether or not the component is exclusive
 

Detailed Description

Describe one component of the Geometry.

Definition at line 19 of file MagneticFieldComponentConstant.h.

Constructor & Destructor Documentation

◆ MagneticFieldComponentConstant() [1/3]

empty constructor for ROOT

Definition at line 22 of file MagneticFieldComponentConstant.h.

22: MagneticFieldComponent(false) {};
MagneticFieldComponent(bool exclusive)
Constructor.

◆ MagneticFieldComponentConstant() [2/3]

MagneticFieldComponentConstant ( const ROOT::Math::XYZVector &  field,
float  minR,
float  maxR,
float  minZ,
float  maxZ 
)
inline

full constructor

Parameters
fieldmagnetic field strength inside the defined region
minRminimal R=sqrt(x^2+y^2) for which this field is present
maxRmaximal R=sqrt(x^2+y^2) for which this field is present
minZminimal Z for which this field is present
maxZmaximal Z for which this field is present

Definition at line 30 of file MagneticFieldComponentConstant.h.

32 m_field(field), m_minR(minR), m_maxR(maxR), m_minZ(minZ), m_maxZ(maxZ) {}
float m_maxR
maximal R=sqrt(x^2+y^2) for which this field is present
float m_maxZ
maximal Z for which this field is present
ROOT::Math::XYZVector m_field
magnetic field strength
float m_minZ
minimal Z for which this field is present
float m_minR
minimal R=sqrt(x^2+y^2) for which this field is present

◆ MagneticFieldComponentConstant() [3/3]

MagneticFieldComponentConstant ( const ROOT::Math::XYZVector &  field)
inlineexplicit

constructor for unlimited field

Definition at line 34 of file MagneticFieldComponentConstant.h.

35 std::numeric_limits<float>::infinity(), -std::numeric_limits<float>::infinity(),
36 std::numeric_limits<float>::infinity()) {}
MagneticFieldComponentConstant()
empty constructor for ROOT

Member Function Documentation

◆ getField() [1/2]

ROOT::Math::XYZVector getField ( __attribute((unused)) const ROOT::Math::XYZVector &  pos) const
inlineoverride

return the field assuming we are inside the active region as returned by inside()

Definition at line 45 of file MagneticFieldComponentConstant.h.

45{ return m_field; }

◆ getField() [2/2]

virtual ROOT::Math::XYZVector getField ( const ROOT::Math::XYZVector &  pos) const
pure virtualinherited

return the field at point pos

Implemented in MagneticFieldComponent3D, and BFieldFrameworkInterface.

◆ inside()

bool inside ( const ROOT::Math::XYZVector &  pos) const
inlineoverridevirtual

return whether we are inside the active region for this component

Implements MagneticFieldComponent.

Definition at line 38 of file MagneticFieldComponentConstant.h.

39 {
40 const float r = pos.Rho();
41 const float z = pos.Z();
42 return (r >= m_minR && r <= m_maxR && z >= m_minZ && z <= m_maxZ);
43 }

◆ isExclusive()

bool isExclusive ( ) const
inlineinherited

returns whether the field is set to exclusive mode

Definition at line 39 of file MagneticFieldComponent.h.

39{ return m_exclusive; }
bool m_exclusive
whether or not the component is exclusive

◆ setExclusive()

void setExclusive ( bool  exclusive)
inlineinherited

set the state of the exclusive flag

Definition at line 37 of file MagneticFieldComponent.h.

37{ m_exclusive = exclusive; }

Member Data Documentation

◆ m_exclusive

bool m_exclusive {false}
privateinherited

whether or not the component is exclusive

Definition at line 51 of file MagneticFieldComponent.h.

◆ m_field

ROOT::Math::XYZVector m_field
private

magnetic field strength

Definition at line 48 of file MagneticFieldComponentConstant.h.

◆ m_maxR

float m_maxR {0}
private

maximal R=sqrt(x^2+y^2) for which this field is present

Definition at line 52 of file MagneticFieldComponentConstant.h.

◆ m_maxZ

float m_maxZ {0}
private

maximal Z for which this field is present

Definition at line 56 of file MagneticFieldComponentConstant.h.

◆ m_minR

float m_minR {0}
private

minimal R=sqrt(x^2+y^2) for which this field is present

Definition at line 50 of file MagneticFieldComponentConstant.h.

◆ m_minZ

float m_minZ {0}
private

minimal Z for which this field is present

Definition at line 54 of file MagneticFieldComponentConstant.h.


The documentation for this class was generated from the following file: