Analysis Software
Documentation for sPHENIX simulation software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
genfit::FieldManager Class Reference

Singleton which provides access to magnetic field maps. More...

#include <GenFit/blob/master/core/include/FieldManager.h>

+ Collaboration diagram for genfit::FieldManager:

Public Member Functions

AbsBFieldgetField ()
 
TVector3 getFieldVal (const TVector3 &position)
 This does NOT use the cache!
 
void getFieldVal (const double &posX, const double &posY, const double &posZ, double &Bx, double &By, double &Bz)
 
void init (AbsBField *b)
 set the magnetic field here. Magnetic field classes must be derived from AbsBField.
 
void destruct ()
 
bool isInitialized ()
 
void checkInitialized ()
 
void useCache (bool opt=true, unsigned int nBuckets=8)
 Cache last lookup positions, and use stored field values if a lookup at (almost) the same position is done.
 

Static Public Member Functions

static void checkInstanciated ()
 
static FieldManagergetInstance ()
 Get singleton instance.
 

Private Member Functions

 FieldManager ()
 
 ~FieldManager ()
 

Static Private Attributes

static FieldManagerinstance_ = nullptr
 
static AbsBFieldfield_ = nullptr
 
static bool useCache_
 
static unsigned int n_buckets_
 
static fieldCachecache_
 

Detailed Description

Singleton which provides access to magnetic field maps.

Author
Christian Höppner (Technische Universität München, original author)
Sebastian Neubert (Technische Universität München, original author)

Definition at line 53 of file FieldManager.h.

View newest version in sPHENIX GitHub at line 53 of file FieldManager.h

Constructor & Destructor Documentation

genfit::FieldManager::FieldManager ( )
inlineprivate

Definition at line 129 of file FieldManager.h.

View newest version in sPHENIX GitHub at line 129 of file FieldManager.h

Referenced by getInstance().

+ Here is the caller graph for this function:

genfit::FieldManager::~FieldManager ( )
inlineprivate

Definition at line 131 of file FieldManager.h.

View newest version in sPHENIX GitHub at line 131 of file FieldManager.h

References cache_.

Member Function Documentation

void genfit::FieldManager::checkInitialized ( )
inline

Definition at line 91 of file FieldManager.h.

View newest version in sPHENIX GitHub at line 91 of file FieldManager.h

References check_license::err(), genfit::errorOut, isInitialized(), and TauVsDIS_MachineLearning_Differentiation::msg.

Referenced by getField(), and getFieldVal().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static void genfit::FieldManager::checkInstanciated ( )
inlinestatic

Definition at line 100 of file FieldManager.h.

View newest version in sPHENIX GitHub at line 100 of file FieldManager.h

References check_license::err(), genfit::errorOut, instance_, and TauVsDIS_MachineLearning_Differentiation::msg.

+ Here is the call graph for this function:

void genfit::FieldManager::destruct ( )
inline

Definition at line 82 of file FieldManager.h.

View newest version in sPHENIX GitHub at line 82 of file FieldManager.h

References instance_.

Referenced by genfit::RKTrackRepTests::TearDown(), and genfit::ConstFieldInitializedTests::TearDown().

+ Here is the caller graph for this function:

AbsBField* genfit::FieldManager::getField ( )
inline

Definition at line 57 of file FieldManager.h.

View newest version in sPHENIX GitHub at line 57 of file FieldManager.h

References checkInitialized(), and field_.

+ Here is the call graph for this function:

TVector3 genfit::FieldManager::getFieldVal ( const TVector3 &  position)
inline

This does NOT use the cache!

Definition at line 63 of file FieldManager.h.

View newest version in sPHENIX GitHub at line 63 of file FieldManager.h

References checkInitialized(), field_, and genfit::AbsBField::get().

Referenced by genfit::HelixTrackModel::HelixTrackModel(), genfit::GFRaveMagneticField::inTesla(), PHGenFitTrackProjection::process_event(), genfit::GFGbl::processTrackWithRep(), genfit::GblFitter::processTrackWithRep(), genfit::MplTrackRep::RKPropagate(), and genfit::RKTrackRep::RKPropagate().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void genfit::FieldManager::getFieldVal ( const double posX,
const double posY,
const double posZ,
double Bx,
double By,
double Bz 
)
static FieldManager* genfit::FieldManager::getInstance ( )
inlinestatic

Get singleton instance.

Definition at line 119 of file FieldManager.h.

View newest version in sPHENIX GitHub at line 119 of file FieldManager.h

References FieldManager(), and instance_.

Referenced by PHGenFit::Fitter::Fitter(), genfit::HelixTrackModel::HelixTrackModel(), genfit::GFRaveMagneticField::inTesla(), main(), PHGenFitTrackProjection::process_event(), genfit::GFGbl::processTrackWithRep(), genfit::GblFitter::processTrackWithRep(), genfit::MplTrackRep::RKPropagate(), genfit::RKTrackRep::RKPropagate(), genfit::RKTrackRepTests::SetUp(), genfit::ConstFieldInitializedTests::SetUp(), genfit::RKTrackRepTests::TearDown(), genfit::ConstFieldInitializedTests::TearDown(), and genfit::TEST_F().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void genfit::FieldManager::init ( AbsBField b)
inline

set the magnetic field here. Magnetic field classes must be derived from AbsBField.

Definition at line 78 of file FieldManager.h.

View newest version in sPHENIX GitHub at line 78 of file FieldManager.h

References KFPMath::b, and field_.

Referenced by PHGenFit::Fitter::Fitter(), main(), genfit::RKTrackRepTests::SetUp(), and genfit::ConstFieldInitializedTests::SetUp().

+ Here is the caller graph for this function:

bool genfit::FieldManager::isInitialized ( )
inline

Definition at line 89 of file FieldManager.h.

View newest version in sPHENIX GitHub at line 89 of file FieldManager.h

References field_.

Referenced by checkInitialized().

+ Here is the caller graph for this function:

void genfit::FieldManager::useCache ( bool  opt = true,
unsigned int  nBuckets = 8 
)

Cache last lookup positions, and use stored field values if a lookup at (almost) the same position is done.

Referenced by main().

+ Here is the caller graph for this function:

Member Data Documentation

fieldCache* genfit::FieldManager::cache_
staticprivate

Definition at line 141 of file FieldManager.h.

View newest version in sPHENIX GitHub at line 141 of file FieldManager.h

Referenced by ~FieldManager().

AbsBField * genfit::FieldManager::field_ = nullptr
staticprivate

Definition at line 136 of file FieldManager.h.

View newest version in sPHENIX GitHub at line 136 of file FieldManager.h

Referenced by getField(), getFieldVal(), init(), and isInitialized().

FieldManager * genfit::FieldManager::instance_ = nullptr
staticprivate

Definition at line 135 of file FieldManager.h.

View newest version in sPHENIX GitHub at line 135 of file FieldManager.h

Referenced by checkInstanciated(), destruct(), and getInstance().

unsigned int genfit::FieldManager::n_buckets_
staticprivate

Definition at line 140 of file FieldManager.h.

View newest version in sPHENIX GitHub at line 140 of file FieldManager.h

bool genfit::FieldManager::useCache_
staticprivate

Definition at line 139 of file FieldManager.h.

View newest version in sPHENIX GitHub at line 139 of file FieldManager.h


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