Belle II Software  release-08-01-10
BFieldMap Class Reference

This class represents the magnetic field of the Belle II detector. More...

#include <BFieldMap.h>

Collaboration diagram for BFieldMap:

Public Member Functions

template<class BFIELDCOMP >
BFIELDCOMP & addBFieldComponent ()
 Adds a new BField component to the Belle II magnetic field. More...
 
void initialize ()
 Initialize the magnetic field after adding all components.
 
void clear ()
 Clear the existing components.
 

Static Public Member Functions

static BFieldMapInstance ()
 Static method to get a reference to the BFieldMap instance. More...
 

Protected Attributes

std::list< BFieldComponentAbs * > m_components
 The components of the magnetic field.
 

Private Member Functions

ROOT::Math::XYZVector getBField (const ROOT::Math::XYZVector &point) const
 Returns the magnetic field of the Belle II detector at the specified space point. More...
 
 BFieldMap ()
 The constructor is hidden to avoid that someone creates an instance of this class.
 
 BFieldMap (const BFieldMap &)
 Disable/Hide the copy constructor.
 
BFieldMapoperator= (const BFieldMap &)
 Disable/Hide the copy assignment operator.
 
virtual ~BFieldMap ()
 The destructor of the BFieldMap class.
 

Private Attributes

bool m_isMapInitialized
 If false the map hasn't been initialized yet.
 

Friends

struct std::default_delete< BFieldMap >
 allow destruction of instance
 
class BFieldFrameworkInterface
 only allow lookup by framework payload interface from now on
 

Detailed Description

This class represents the magnetic field of the Belle II detector.

Its main method is getBField() which returns the Bfield vector at the specified space point.

It is designed as a singleton.

Definition at line 30 of file BFieldMap.h.

Member Function Documentation

◆ Instance()

BFieldMap & Instance ( )
static

Static method to get a reference to the BFieldMap instance.

Returns
A reference to an instance of this class.

Definition at line 15 of file BFieldMap.cc.

16 {
17  static std::unique_ptr<BFieldMap> instance(new BFieldMap());
18  return *instance;
19 }
BFieldMap()
The constructor is hidden to avoid that someone creates an instance of this class.
Definition: BFieldMap.cc:44

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