Belle II Software  release-06-00-14
MagneticFieldComponent.h
1 /**************************************************************************
2  * basf2 (Belle II Analysis Software Framework) *
3  * Author: The Belle II Collaboration *
4  * *
5  * See git log for contributors and copyright holders. *
6  * This file is licensed under LGPL-3.0, see LICENSE.md. *
7  **************************************************************************/
8 
9 #pragma once
10 #include <framework/geometry/B2Vector3.h>
11 
12 namespace Belle2 {
29  public:
34  explicit MagneticFieldComponent(bool exclusive): m_exclusive(exclusive) {}
36  void setExclusive(bool exclusive) { m_exclusive = exclusive; }
38  bool isExclusive() const { return m_exclusive; }
40  virtual bool inside(const B2Vector3D& pos) const = 0;
42  virtual B2Vector3D getField(const B2Vector3D& pos) const = 0;
45 
48  private:
50  bool m_exclusive{false};
51  };
53 }
Abstract base class for BField components.
ClassDef(MagneticFieldComponent, 1)
ROOT Dictionary.
virtual bool inside(const B2Vector3D &pos) const =0
check whether the point pos is inside the volume covered by the component
bool isExclusive() const
returns whether the field is set to exclusive mode
void setExclusive(bool exclusive)
set the state of the exclusive flag
virtual B2Vector3D getField(const B2Vector3D &pos) const =0
return the field at point pos
virtual ~MagneticFieldComponent()
destructor
MagneticFieldComponent(bool exclusive)
Constructor.
bool m_exclusive
whether or not the component is exclusive
Abstract base class for different kinds of events.