ATLAS Offline Software
Public Member Functions | Private Attributes | List of all members
AtlasField Class Reference

G4 wrapper around the main ATLAS magnetic field cache or field svc for forward field. More...

#include <StandardFieldSvc.h>

Inheritance diagram for AtlasField:
Collaboration diagram for AtlasField:

Public Member Functions

 AtlasField (double scaleSolenoid, double scaleToroid, const MagField::AtlasFieldMap *fieldMap)
 Construct the field object from conditions object. More...
 
 AtlasField (MagField::IMagFieldSvc *m)
 Construct the field object from the IMagFieldSvc. More...
 
MagField::AtlasFieldCachefieldCache ()
 
void GetFieldValue (const double *point, double *field) const
 Implementation of G4 method to retrieve field value. More...
 

Private Attributes

MagField::AtlasFieldCache m_fieldCache ATLAS_THREAD_SAFE
 Field cache - mutable because getField modifies the cache. More...
 
MagField::IMagFieldSvcm_magFieldSvc {nullptr}
 Pointer to the magnetic field service. More...
 

Detailed Description

G4 wrapper around the main ATLAS magnetic field cache or field svc for forward field.

Definition at line 31 of file StandardFieldSvc.h.

Constructor & Destructor Documentation

◆ AtlasField() [1/2]

AtlasField::AtlasField ( double  scaleSolenoid,
double  scaleToroid,
const MagField::AtlasFieldMap fieldMap 
)
inline

Construct the field object from conditions object.

Definition at line 35 of file StandardFieldSvc.h.

36  : m_fieldCache (MagField::AtlasFieldCache( scaleSolenoid, scaleToroid, fieldMap))
37  {
38  }

◆ AtlasField() [2/2]

AtlasField::AtlasField ( MagField::IMagFieldSvc m)
inline

Construct the field object from the IMagFieldSvc.

Definition at line 40 of file StandardFieldSvc.h.

40  :
42  {}

Member Function Documentation

◆ fieldCache()

MagField::AtlasFieldCache& AtlasField::fieldCache ( )
inline

Definition at line 45 of file StandardFieldSvc.h.

45 { return m_fieldCache; }

◆ GetFieldValue()

void AtlasField::GetFieldValue ( const double *  point,
double *  field 
) const
inline

Implementation of G4 method to retrieve field value.

Definition at line 48 of file StandardFieldSvc.h.

49  {
51  else m_fieldCache.getField(point, field);
52  }

Member Data Documentation

◆ ATLAS_THREAD_SAFE

MagField::AtlasFieldCache m_fieldCache AtlasField::ATLAS_THREAD_SAFE
mutableprivate

Field cache - mutable because getField modifies the cache.

Definition at line 56 of file StandardFieldSvc.h.

◆ m_magFieldSvc

MagField::IMagFieldSvc* AtlasField::m_magFieldSvc {nullptr}
private

Pointer to the magnetic field service.

We use a raw pointer here to avoid ServiceHandle overhead.

Definition at line 60 of file StandardFieldSvc.h.


The documentation for this class was generated from the following file:
python.SystemOfUnits.m
int m
Definition: SystemOfUnits.py:91
ReadOfcFromCool.field
field
Definition: ReadOfcFromCool.py:48
AtlasField::m_magFieldSvc
MagField::IMagFieldSvc * m_magFieldSvc
Pointer to the magnetic field service.
Definition: StandardFieldSvc.h:60
MagField::IMagFieldSvc::getField
virtual void getField(const double *xyz, double *bxyz, double *deriv=nullptr) const =0
get B field value at given position
MagField::AtlasFieldCache
Local cache for magnetic field (based on MagFieldServices/AtlasFieldSvcTLS.h)
Definition: AtlasFieldCache.h:43