Belle II Software  release-05-02-19
MagneticFieldComponent.h
1 /**************************************************************************
2  * BASF2 (Belle Analysis Framework 2) *
3  * Copyright(C) 2015 - Belle II Collaboration *
4  * *
5  * Author: The Belle II Collaboration *
6  * Contributors: Martin Ritter *
7  * *
8  * This software is provided "as is" without any warranty. *
9  **************************************************************************/
10 
11 #pragma once
12 #include <framework/geometry/B2Vector3.h>
13 
14 namespace Belle2 {
30  class MagneticFieldComponent {
31  public:
36  explicit MagneticFieldComponent(bool exclusive): m_exclusive(exclusive) {}
38  void setExclusive(bool exclusive) { m_exclusive = exclusive; }
40  bool isExclusive() const { return m_exclusive; }
42  virtual bool inside(const B2Vector3D& pos) const = 0;
44  virtual B2Vector3D getField(const B2Vector3D& pos) const = 0;
47 
50  private:
52  bool m_exclusive{false};
53  };
55 }
Belle2::MagneticFieldComponent::m_exclusive
bool m_exclusive
whether or not the component is exclusive
Definition: MagneticFieldComponent.h:60
Belle2::MagneticFieldComponent::getField
virtual B2Vector3D getField(const B2Vector3D &pos) const =0
return the field at point pos
Belle2::MagneticFieldComponent::ClassDef
ClassDef(MagneticFieldComponent, 1)
ROOT Dictionary.
Belle2::MagneticFieldComponent::inside
virtual bool inside(const B2Vector3D &pos) const =0
check whether the point pos is inside the volume covered by the component
Belle2::MagneticFieldComponent::isExclusive
bool isExclusive() const
returns whether the field is set to exclusive mode
Definition: MagneticFieldComponent.h:48
Belle2::B2Vector3< double >
Belle2::B2Vector3D
B2Vector3< double > B2Vector3D
typedef for common usage with double
Definition: B2Vector3.h:507
Belle2
Abstract base class for different kinds of events.
Definition: MillepedeAlgorithm.h:19
Belle2::MagneticFieldComponent
Abstract base class for BField components.
Definition: MagneticFieldComponent.h:38
Belle2::MagneticFieldComponent::~MagneticFieldComponent
virtual ~MagneticFieldComponent()
destructor
Definition: MagneticFieldComponent.h:54
Belle2::MagneticFieldComponent::setExclusive
void setExclusive(bool exclusive)
set the state of the exclusive flag
Definition: MagneticFieldComponent.h:46
Belle2::MagneticFieldComponent::MagneticFieldComponent
MagneticFieldComponent(bool exclusive)
Constructor.
Definition: MagneticFieldComponent.h:44