ATLAS Offline Software
Public Member Functions | Private Member Functions | Private Attributes | List of all members
Genfun::AtlasBComponent Class Reference

#include <AtlasBComponent.h>

Inheritance diagram for Genfun::AtlasBComponent:
Collaboration diagram for Genfun::AtlasBComponent:

Public Member Functions

 AtlasBComponent (unsigned int index, MagField::AtlasFieldCache *fieldCache)
 
virtual ~AtlasBComponent ()
 
 AtlasBComponent (const AtlasBComponent &right)
 
virtual unsigned int dimensionality () const override
 
virtual double operator() (double argument) const override
 
virtual double operator() (const Argument &a) const override
 

Private Member Functions

AtlasBComponentoperator= (const AtlasBComponent &)
 

Private Attributes

unsigned int m_index
 
MagField::AtlasFieldCache *m_fieldCache ATLAS_THREAD_SAFE {}
 

Detailed Description

Definition at line 14 of file AtlasBComponent.h.

Constructor & Destructor Documentation

◆ AtlasBComponent() [1/2]

Genfun::AtlasBComponent::AtlasBComponent ( unsigned int  index,
MagField::AtlasFieldCache fieldCache 
)

Definition at line 17 of file AtlasBComponent.cxx.

18  : AbsFunction()
19  , m_index(index)
20  , m_fieldCache(fieldCache) {}

◆ ~AtlasBComponent()

Genfun::AtlasBComponent::~AtlasBComponent ( )
virtual

Definition at line 23 of file AtlasBComponent.cxx.

23 {}

◆ AtlasBComponent() [2/2]

Genfun::AtlasBComponent::AtlasBComponent ( const AtlasBComponent right)

Definition at line 26 of file AtlasBComponent.cxx.

27  : AbsFunction()
28  , m_index(right.m_index)
29  , m_fieldCache(right.m_fieldCache) {}

Member Function Documentation

◆ dimensionality()

unsigned int Genfun::AtlasBComponent::dimensionality ( ) const
overridevirtual

Definition at line 32 of file AtlasBComponent.cxx.

32 { return 3;}

◆ operator()() [1/2]

double Genfun::AtlasBComponent::operator() ( const Argument &  a) const
overridevirtual

Definition at line 36 of file AtlasBComponent.cxx.

36  {
37  // Changes from doubles to floats and back
38  double XYZ_in_mm[3] , BXYZ_in_kgmm[3];
39  for (int i=0;i<3;++i) *(XYZ_in_mm+i) = a[i];
40  m_fieldCache->getField( XYZ_in_mm , BXYZ_in_kgmm ); // const-violation, see comment in header file
41  return BXYZ_in_kgmm[m_index]*kilogauss;
42  }

◆ operator()() [2/2]

double Genfun::AtlasBComponent::operator() ( double  argument) const
overridevirtual

Definition at line 34 of file AtlasBComponent.cxx.

34 { throw "Invalid parameter!"; }

◆ operator=()

AtlasBComponent& Genfun::AtlasBComponent::operator= ( const AtlasBComponent )
private

Member Data Documentation

◆ ATLAS_THREAD_SAFE

MagField::AtlasFieldCache* m_fieldCache Genfun::AtlasBComponent::ATLAS_THREAD_SAFE {}
private

Definition at line 49 of file AtlasBComponent.h.

◆ m_index

unsigned int Genfun::AtlasBComponent::m_index
private

Definition at line 37 of file AtlasBComponent.h.


The documentation for this class was generated from the following files:
index
Definition: index.py:1
python.SystemOfUnits.kilogauss
int kilogauss
Definition: SystemOfUnits.py:231
lumiFormat.i
int i
Definition: lumiFormat.py:85
a
TList * a
Definition: liststreamerinfos.cxx:10
Genfun::AtlasBComponent::m_index
unsigned int m_index
Definition: AtlasBComponent.h:37