Belle II Software development
BFieldFrameworkInterface.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
11#include <framework/dbobjects/MagneticFieldComponent.h>
12#include <framework/gearbox/Unit.h>
13#include <geometry/bfieldmap/BFieldMap.h>
14
15namespace Belle2 {
22 public:
26 virtual bool inside(const ROOT::Math::XYZVector&) const final override { return true; }
28 virtual ROOT::Math::XYZVector getField(const ROOT::Math::XYZVector& position) const final override
29 {
30 return BFieldMap::Instance().getBField(position) * Unit::T;
31 }
32 };
34}
Simple BFieldComponent to just wrap the existing BFieldMap with the new BFieldManager.
virtual ROOT::Math::XYZVector getField(const ROOT::Math::XYZVector &position) const final override
and we return the values from the exsiting BFieldMap
virtual bool inside(const ROOT::Math::XYZVector &) const final override
everything is inside this component
BFieldFrameworkInterface()
this component is exclusive: ignore all others
static BFieldMap & Instance()
Static method to get a reference to the BFieldMap instance.
Definition: BFieldMap.cc:15
Abstract base class for BField components.
static const double T
[tesla]
Definition: Unit.h:120
ROOT::Math::XYZVector getBField(const ROOT::Math::XYZVector &point) const
Returns the magnetic field of the Belle II detector at the specified space point.
Definition: BFieldMap.h:106
Abstract base class for different kinds of events.