Belle II Software development
MagneticFieldComponent Class Referenceabstract

Abstract base class for BField components. More...

#include <MagneticFieldComponent.h>

Inheritance diagram for MagneticFieldComponent:
BFieldFrameworkInterface MagneticFieldComponent3D MagneticFieldComponentConstant

Public Member Functions

 MagneticFieldComponent (bool exclusive)
 Constructor.
 
void setExclusive (bool exclusive)
 set the state of the exclusive flag
 
bool isExclusive () const
 returns whether the field is set to exclusive mode
 
virtual bool inside (const ROOT::Math::XYZVector &pos) const =0
 check whether the point pos is inside the volume covered by the component
 
virtual ROOT::Math::XYZVector getField (const ROOT::Math::XYZVector &pos) const =0
 return the field at point pos
 
virtual ~MagneticFieldComponent ()
 destructor
 
 ClassDef (MagneticFieldComponent, 1)
 ROOT Dictionary.
 

Private Attributes

bool m_exclusive {false}
 whether or not the component is exclusive
 

Detailed Description

Abstract base class for BField components.

This class is the base class for all magnetic field components. Each concrete component needs to implement the inside() and getField() members which should check if the point is inside the area covered by the component and return the field at that given point respectively.

All defined components will be added together to get the total magnetic field. If some of the components are flagged as exclusive the field from the first exclusive component where the point is inside the range will be used as the full field.

Definition at line 29 of file MagneticFieldComponent.h.

Constructor & Destructor Documentation

◆ MagneticFieldComponent()

MagneticFieldComponent ( bool  exclusive)
inlineexplicit

Constructor.

Parameters
exclusiveif set to true this component will be exclusive and the field of other components will not be added

Definition at line 35 of file MagneticFieldComponent.h.

35: m_exclusive(exclusive) {}
bool m_exclusive
whether or not the component is exclusive

◆ ~MagneticFieldComponent()

virtual ~MagneticFieldComponent ( )
inlinevirtual

destructor

Definition at line 45 of file MagneticFieldComponent.h.

45{}

Member Function Documentation

◆ getField()

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

return the field at point pos

Implemented in MagneticFieldComponent3D, and BFieldFrameworkInterface.

◆ inside()

virtual bool inside ( const ROOT::Math::XYZVector &  pos) const
pure virtual

check whether the point pos is inside the volume covered by the component

Implemented in BFieldFrameworkInterface, MagneticFieldComponentConstant, and MagneticFieldComponent3D.

◆ isExclusive()

bool isExclusive ( ) const
inline

returns whether the field is set to exclusive mode

Definition at line 39 of file MagneticFieldComponent.h.

39{ return m_exclusive; }

◆ setExclusive()

void setExclusive ( bool  exclusive)
inline

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}
private

whether or not the component is exclusive

Definition at line 51 of file MagneticFieldComponent.h.


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