EIC Software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Acts::SharedBField< BField > Class Template Reference

allows to use a shared magnetic field in several places and with multiple steppers mainly targeted to save memory More...

#include <acts/blob/sPHENIX/Core/include/Acts/MagneticField/SharedBField.hpp>

Public Types

using Cache = typename BField::Cache
 

Public Member Functions

 SharedBField ()=delete
 Disallow construction without a valid underlying field.
 
 SharedBField (std::shared_ptr< const BField > bField)
 
Vector3D getField (const Vector3D &position) const
 retrieve magnetic field value
 
Vector3D getField (const Vector3D &position, Cache &cache) const
 Retrieve magnetic field value.
 
Vector3D getFieldGradient (const Vector3D &position, ActsMatrixD< 3, 3 > &derivative) const
 retrieve magnetic field value & its gradient
 
Vector3D getFieldGradient (const Vector3D &position, ActsMatrixD< 3, 3 > &derivative, Cache &cache) const
 retrieve magnetic field value & its gradient
 

Private Attributes

std::shared_ptr< const BField > m_bField
 

Detailed Description

template<typename BField>
class Acts::SharedBField< BField >

allows to use a shared magnetic field in several places and with multiple steppers mainly targeted to save memory

Definition at line 23 of file SharedBField.hpp.

View newest version in sPHENIX GitHub at line 23 of file SharedBField.hpp

Member Typedef Documentation

template<typename BField>
using Acts::SharedBField< BField >::Cache = typename BField::Cache

Definition at line 26 of file SharedBField.hpp.

View newest version in sPHENIX GitHub at line 26 of file SharedBField.hpp

Constructor & Destructor Documentation

template<typename BField>
Acts::SharedBField< BField >::SharedBField ( )
delete

Disallow construction without a valid underlying field.

template<typename BField>
Acts::SharedBField< BField >::SharedBField ( std::shared_ptr< const BField >  bField)
inline

Constructur with a shared pointer from a shared pointer.

Note
Since it is a shared field, we enforce it to be const
Template Parameters
bFieldis the shared BField to be stored

Definition at line 34 of file SharedBField.hpp.

View newest version in sPHENIX GitHub at line 34 of file SharedBField.hpp

Member Function Documentation

template<typename BField>
Vector3D Acts::SharedBField< BField >::getField ( const Vector3D position) const
inline

retrieve magnetic field value

Parameters
[in]positionglobal 3D position
Returns
magnetic field vector at given position

Definition at line 41 of file SharedBField.hpp.

View newest version in sPHENIX GitHub at line 41 of file SharedBField.hpp

References Acts::SharedBField< BField >::m_bField.

template<typename BField>
Vector3D Acts::SharedBField< BField >::getField ( const Vector3D position,
Cache cache 
) const
inline

Retrieve magnetic field value.

Parameters
[in]positionglobal 3D position
[in,out]cacheCache object, passed through to wrapped BField

Definition at line 49 of file SharedBField.hpp.

View newest version in sPHENIX GitHub at line 49 of file SharedBField.hpp

References Acts::SharedBField< BField >::m_bField.

template<typename BField>
Vector3D Acts::SharedBField< BField >::getFieldGradient ( const Vector3D position,
ActsMatrixD< 3, 3 > &  derivative 
) const
inline

retrieve magnetic field value & its gradient

Parameters
[in]positionglobal 3D position
[out]derivativegradient of magnetic field vector as (3x3) matrix
Returns
magnetic field vector
Note
currently the derivative is not calculated

Definition at line 61 of file SharedBField.hpp.

View newest version in sPHENIX GitHub at line 61 of file SharedBField.hpp

References Acts::SharedBField< BField >::m_bField.

template<typename BField>
Vector3D Acts::SharedBField< BField >::getFieldGradient ( const Vector3D position,
ActsMatrixD< 3, 3 > &  derivative,
Cache cache 
) const
inline

retrieve magnetic field value & its gradient

Parameters
[in]positionglobal 3D position
[out]derivativegradient of magnetic field vector as (3x3) matrix
[in,out]cacheCache object, passed through to wrapped BField
Returns
magnetic field vector
Note
currently the derivative is not calculated

Definition at line 75 of file SharedBField.hpp.

View newest version in sPHENIX GitHub at line 75 of file SharedBField.hpp

References Acts::SharedBField< BField >::m_bField.

Member Data Documentation

template<typename BField>
std::shared_ptr<const BField> Acts::SharedBField< BField >::m_bField
private

Definition at line 81 of file SharedBField.hpp.

View newest version in sPHENIX GitHub at line 81 of file SharedBField.hpp

Referenced by Acts::SharedBField< BField >::getField(), and Acts::SharedBField< BField >::getFieldGradient().


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