Belle II Software  release-08-01-10
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 <Math/Vector3D.h>
11 #include <TObject.h>
12 
13 namespace Belle2 {
30  public:
35  explicit MagneticFieldComponent(bool exclusive): m_exclusive(exclusive) {}
37  void setExclusive(bool exclusive) { m_exclusive = exclusive; }
39  bool isExclusive() const { return m_exclusive; }
41  virtual bool inside(const ROOT::Math::XYZVector& pos) const = 0;
43  virtual ROOT::Math::XYZVector getField(const ROOT::Math::XYZVector& pos) const = 0;
46 
49  private:
51  bool m_exclusive{false};
52  };
54 }
Abstract base class for BField components.
ClassDef(MagneticFieldComponent, 1)
ROOT Dictionary.
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
bool isExclusive() const
returns whether the field is set to exclusive mode
void setExclusive(bool exclusive)
set the state of the exclusive flag
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.