Analysis Software
Documentation for sPHENIX simulation software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
ActsExamples::ScalableBField Exception Referencefinal

A constant magnetic field that is scaled depending on the event context. More...

#include <acts/blob/sPHENIX/Examples/Detectors/MagneticField/include/ActsExamples/MagneticField/ScalableBField.hpp>

+ Inheritance diagram for ActsExamples::ScalableBField:
+ Collaboration diagram for ActsExamples::ScalableBField:

Classes

struct  Cache
 

Public Member Functions

 ScalableBField (Acts::Vector3 B)
 construct constant magnetic field from field vector
 
 ScalableBField (Acts::ActsScalar Bx=0, Acts::ActsScalar By=0, Acts::ActsScalar Bz=0)
 construct constant magnetic field from components
 
Acts::Result< Acts::Vector3getField (const Acts::Vector3 &, MagneticFieldProvider::Cache &gCache) const override
 retrieve magnetic field value
 
Acts::Result< Acts::Vector3getFieldGradient (const Acts::Vector3 &, Acts::ActsMatrix< 3, 3 > &, MagneticFieldProvider::Cache &gCache) const override
 retrieve magnetic field value & its gradient
 
Acts::MagneticFieldProvider::Cache makeCache (const Acts::MagneticFieldContext &mctx) const override
 
bool isInside (const Acts::Vector3 &) const
 check whether given 3D position is inside look-up domain
 
void setField (double Bx, double By, double Bz)
 update magnetic field vector from components
 
void setField (const Acts::Vector3 &B)
 update magnetic field vector
 

Private Attributes

Acts::Vector3 m_BField
 magnetic field vector
 

Detailed Description

A constant magnetic field that is scaled depending on the event context.

Definition at line 23 of file ScalableBField.hpp.

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

Constructor & Destructor Documentation

ActsExamples::ScalableBField::ScalableBField ( Acts::Vector3  B)
inlineexplicit

construct constant magnetic field from field vector

Parameters
[in]Bmagnetic field vector in global coordinate system

Definition at line 37 of file ScalableBField.hpp.

View newest version in sPHENIX GitHub at line 37 of file ScalableBField.hpp

ActsExamples::ScalableBField::ScalableBField ( Acts::ActsScalar  Bx = 0,
Acts::ActsScalar  By = 0,
Acts::ActsScalar  Bz = 0 
)
inline

construct constant magnetic field from components

Parameters
[in]Bxmagnetic field component in global x-direction
[in]Bymagnetic field component in global y-direction
[in]Bzmagnetic field component in global z-direction

Definition at line 44 of file ScalableBField.hpp.

View newest version in sPHENIX GitHub at line 44 of file ScalableBField.hpp

Member Function Documentation

Acts::Result<Acts::Vector3> ActsExamples::ScalableBField::getField ( const Acts::Vector3 ,
MagneticFieldProvider::Cache &  gCache 
) const
inlineoverride

retrieve magnetic field value

Parameters
[in]positionglobal position
[in]cacheCache object (is ignored)
Returns
magnetic field vector
Note
The position is ignored and only kept as argument to provide a consistent interface with other magnetic field services.

Definition at line 56 of file ScalableBField.hpp.

View newest version in sPHENIX GitHub at line 56 of file ScalableBField.hpp

References m_BField, and ActsExamples::ScalableBField::Cache::scalor.

Acts::Result<Acts::Vector3> ActsExamples::ScalableBField::getFieldGradient ( const Acts::Vector3 ,
Acts::ActsMatrix< 3, 3 > &  ,
MagneticFieldProvider::Cache &  gCache 
) const
inlineoverride

retrieve magnetic field value & its gradient

Parameters
[in]positionglobal position
[out]derivativegradient of magnetic field vector as (3x3) matrix
[in]cacheCache object (is ignored)
Returns
magnetic field vector
Note
The position is ignored and only kept as argument to provide a consistent interface with other magnetic field services.
currently the derivative is not calculated

Definition at line 75 of file ScalableBField.hpp.

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

References m_BField, and ActsExamples::ScalableBField::Cache::scalor.

bool ActsExamples::ScalableBField::isInside ( const Acts::Vector3 ) const
inline

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

Parameters
[in]positionglobal 3D position
Returns
true if position is inside the defined look-up grid, otherwise false
Note
The method will always return true for the constant B-Field

Definition at line 93 of file ScalableBField.hpp.

View newest version in sPHENIX GitHub at line 93 of file ScalableBField.hpp

Acts::MagneticFieldProvider::Cache ActsExamples::ScalableBField::makeCache ( const Acts::MagneticFieldContext mctx) const
inlineoverride

Definition at line 82 of file ScalableBField.hpp.

View newest version in sPHENIX GitHub at line 82 of file ScalableBField.hpp

void ActsExamples::ScalableBField::setField ( double  Bx,
double  By,
double  Bz 
)
inline

update magnetic field vector from components

Parameters
[in]Bxmagnetic field component in global x-direction
[in]Bymagnetic field component in global y-direction
[in]Bzmagnetic field component in global z-direction

Definition at line 100 of file ScalableBField.hpp.

View newest version in sPHENIX GitHub at line 100 of file ScalableBField.hpp

References Acts::IntegrationTest::Bz, and m_BField.

void ActsExamples::ScalableBField::setField ( const Acts::Vector3 B)
inline

update magnetic field vector

Parameters
[in]Bmagnetic field vector in global coordinate system

Definition at line 105 of file ScalableBField.hpp.

View newest version in sPHENIX GitHub at line 105 of file ScalableBField.hpp

References m_BField.

Member Data Documentation

Acts::Vector3 ActsExamples::ScalableBField::m_BField
private

magnetic field vector

Definition at line 109 of file ScalableBField.hpp.

View newest version in sPHENIX GitHub at line 109 of file ScalableBField.hpp

Referenced by getField(), getFieldGradient(), and setField().


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