ACTS
Experiment-independent tracking
Loading...
Searching...
No Matches
Acts::NullBField Class Referencefinal

Null bfield which returns 0 always. More...

#include <Acts/MagneticField/NullBField.hpp>

Inheritance diagram for Acts::NullBField:
[legend]
Collaboration diagram for Acts::NullBField:
[legend]

Classes

struct  Cache

Public Member Functions

 NullBField ()=default
 Default constructor.
Result< Vector3getField (const Vector3 &position, MagneticFieldProvider::Cache &cache) const override
 Retrieve magnetic field value at a given location.
bool isInside (const Vector3 &) const
 check whether given 3D position is inside look-up domain
Acts::MagneticFieldProvider::Cache makeCache (const Acts::MagneticFieldContext &mctx) const override
 Make an opaque cache for the magnetic field.
Public Member Functions inherited from Acts::MagneticFieldProvider
virtual ~MagneticFieldProvider ()=default

Additional Inherited Members

Public Types inherited from Acts::MagneticFieldProvider
using Cache = Acts::AnyBase<sizeof(char) * 512>
 Opaque cache type that can store arbitrary implementation specific cache data.

Detailed Description

Null bfield which returns 0 always.

Constructor & Destructor Documentation

◆ NullBField()

Acts::NullBField::NullBField ( )
default

Default constructor.

Member Function Documentation

◆ getField()

Result< Vector3 > Acts::NullBField::getField ( const Vector3 & position,
MagneticFieldProvider::Cache & cache ) const
overridevirtual

Retrieve magnetic field value at a given location.

Requires an instance of Acts::MagneticFieldProvider::Cache created through makeCache.

Parameters
[in]positionglobal 3D position for the lookup
[in,out]cacheField provider specific cache object
Returns
magnetic field vector at given position
Note
The position is ignored and only kept as argument to provide a consistent interface with other magnetic field services.

Implements Acts::MagneticFieldProvider.

◆ isInside()

bool Acts::NullBField::isInside ( const Vector3 & ) const

check whether given 3D position is inside look-up domain

Returns
true if position is inside the defined look-up grid, otherwise false
Note
The method will always return true for the null B-Field

◆ makeCache()

Acts::MagneticFieldProvider::Cache Acts::NullBField::makeCache ( const Acts::MagneticFieldContext & mctx) const
overridevirtual

Make an opaque cache for the magnetic field.

Instructs the specific implementation to generate a Acts::MagneticFieldProvider::Cache instance for magnetic field lookup.

Parameters
mctxThe magnetic field context to generate cache for
Returns
Cache The opaque cache object

Implements Acts::MagneticFieldProvider.