Belle II Software development
GFGeant4Field Class Reference

Interface of the Belle II B-field with GenFit. More...

#include <GFGeant4Field.h>

Inheritance diagram for GFGeant4Field:

Public Member Functions

 GFGeant4Field ()
 Constructor.
 
TVector3 get (const TVector3 &position) const override
 Getter for the magnetic field.
 

Detailed Description

Interface of the Belle II B-field with GenFit.

Definition at line 16 of file GFGeant4Field.h.

Constructor & Destructor Documentation

◆ GFGeant4Field()

GFGeant4Field ( )
inline

Constructor.

The same B field as in the simulation is used. If you want to use a different field in reconstruction, please run two jobs and change the used B field in the geometry data (Belle2.xml file).

Definition at line 24 of file GFGeant4Field.h.

24: genfit::AbsBField() {}

Member Function Documentation

◆ get()

TVector3 get ( const TVector3 &  position) const
inlineoverride

Getter for the magnetic field.

As Genfit uses kGauss, but we use T in basf2, we need to apply a factor 10 in the calculation.

Parameters
positionPosition at which the magnetic field should be evaluated.

Definition at line 31 of file GFGeant4Field.h.

32 {
33 static double conversion{1. / Belle2::Unit::kGauss};
34 return Belle2::B2Vector3D(Belle2::BFieldManager::getField(ROOT::Math::XYZVector(position)) * conversion);
35 }
static const double kGauss
[kilogauss]
Definition: Unit.h:123
B2Vector3< double > B2Vector3D
typedef for common usage with double
Definition: B2Vector3.h:516
static void getField(const double *pos, double *field)
return the magnetic field at a given position.
Definition: BFieldManager.h:91

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