EIC Software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
eASTMagneticFieldMap Class Reference

#include <east/blob/main/Core/include/eASTMagneticField.hh>

+ Collaboration diagram for eASTMagneticFieldMap:

Public Member Functions

 eASTMagneticFieldMap (const G4String &name)
 
 ~eASTMagneticFieldMap ()=default
 
bool Load (const G4String &filename)
 
void GetFieldValue (const G4double point[4], G4double *field) const
 
void AddFieldValue (const G4double point[4], G4double *field) const
 
void PrintFieldValue (const G4ThreeVector &point)
 
void SetFieldUnit (const G4String &unit)
 
void SetGridUnit (unsigned int i, const G4String &unit)
 
void SetGridExtent (unsigned int i, const G4ThreeVector &extent)
 
void SetInterpolationType (const G4String &type)
 
EInterpolationType GetInterpolationType () const
 

Private Types

enum  EFileFormat { kFileFormatUndefined, kFileFormatRZPhi, kFileFormatRZ }
 
enum  EInterpolationType { kLinear, kCubic }
 

Private Member Functions

double _linearInterpolate (const double p[2<< 0], double x) const
 
double _bilinearInterpolate (const double p[2<< 1], const double x[2]) const
 
double _trilinearInterpolate (const double p[2<< 2], const double x[3]) const
 
double _cubicInterpolate (const double p[4<< 0], double x) const
 
double _bicubicInterpolate (const double p[4<< 1], const double x[2]) const
 
double _tricubicInterpolate (const double p[4<< 2], const double x[3]) const
 

Private Attributes

G4String fName {""}
 
G4GenericMessenger fFieldMapMessenger
 
EFileFormat fFileFormat {kFileFormatUndefined}
 
double fFieldUnit {CLHEP::tesla}
 
std::array< double, 3 > fGridUnit {CLHEP::cm, CLHEP::cm, CLHEP::deg}
 
std::array< std::tuple< double,
double, double >, 3 > 
fGridExtent
 
std::array< unsigned int, 3 > fGridSize {0,0,0}
 
std::vector< std::vector
< std::vector< std::vector
< double > > > > 
fMap
 
EInterpolationType fInterpolationType {kLinear}
 

Static Private Attributes

static const int kLinearMap [8][3]
 
static const int kCubicMap [64][3]
 

Detailed Description

Definition at line 28 of file eASTMagneticField.hh.

View newest version in sPHENIX GitHub at line 28 of file eASTMagneticField.hh

Member Enumeration Documentation

Enumerator:
kFileFormatUndefined 
kFileFormatRZPhi 
kFileFormatRZ 

Definition at line 72 of file eASTMagneticField.hh.

View newest version in sPHENIX GitHub at line 72 of file eASTMagneticField.hh

Enumerator:
kLinear 
kCubic 

Definition at line 112 of file eASTMagneticField.hh.

View newest version in sPHENIX GitHub at line 112 of file eASTMagneticField.hh

Constructor & Destructor Documentation

eASTMagneticFieldMap::eASTMagneticFieldMap ( const G4String &  name)

Definition at line 62 of file eASTMagneticField.cc.

View newest version in sPHENIX GitHub at line 62 of file eASTMagneticField.cc

References fFieldMapMessenger, Load(), PrintFieldValue(), SetFieldUnit(), SetGridExtent(), SetGridUnit(), and SetInterpolationType().

+ Here is the call graph for this function:

eASTMagneticFieldMap::~eASTMagneticFieldMap ( )
default

Member Function Documentation

double eASTMagneticFieldMap::_bicubicInterpolate ( const double  p[4<< 1],
const double  x[2] 
) const
inlineprivate

Definition at line 151 of file eASTMagneticField.hh.

View newest version in sPHENIX GitHub at line 151 of file eASTMagneticField.hh

References _cubicInterpolate(), c, and p.

Referenced by _tricubicInterpolate().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

double eASTMagneticFieldMap::_bilinearInterpolate ( const double  p[2<< 1],
const double  x[2] 
) const
inlineprivate

Definition at line 132 of file eASTMagneticField.hh.

View newest version in sPHENIX GitHub at line 132 of file eASTMagneticField.hh

References _linearInterpolate(), c, and p.

Referenced by _trilinearInterpolate().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

double eASTMagneticFieldMap::_cubicInterpolate ( const double  p[4<< 0],
double  x 
) const
inlineprivate

Definition at line 146 of file eASTMagneticField.hh.

View newest version in sPHENIX GitHub at line 146 of file eASTMagneticField.hh

References p.

Referenced by _bicubicInterpolate(), and _tricubicInterpolate().

+ Here is the caller graph for this function:

double eASTMagneticFieldMap::_linearInterpolate ( const double  p[2<< 0],
double  x 
) const
inlineprivate

Definition at line 129 of file eASTMagneticField.hh.

View newest version in sPHENIX GitHub at line 129 of file eASTMagneticField.hh

References p.

Referenced by _bilinearInterpolate(), and _trilinearInterpolate().

+ Here is the caller graph for this function:

double eASTMagneticFieldMap::_tricubicInterpolate ( const double  p[4<< 2],
const double  x[3] 
) const
inlineprivate

Definition at line 159 of file eASTMagneticField.hh.

View newest version in sPHENIX GitHub at line 159 of file eASTMagneticField.hh

References _bicubicInterpolate(), _cubicInterpolate(), c, and p.

+ Here is the call graph for this function:

double eASTMagneticFieldMap::_trilinearInterpolate ( const double  p[2<< 2],
const double  x[3] 
) const
inlineprivate

Definition at line 138 of file eASTMagneticField.hh.

View newest version in sPHENIX GitHub at line 138 of file eASTMagneticField.hh

References _bilinearInterpolate(), _linearInterpolate(), c, and p.

Referenced by AddFieldValue().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void eASTMagneticFieldMap::AddFieldValue ( const G4double  point[4],
G4double *  field 
) const

Definition at line 188 of file eASTMagneticField.cc.

View newest version in sPHENIX GitHub at line 188 of file eASTMagneticField.cc

References _trilinearInterpolate(), cos(), fFileFormat, fGridExtent, fGridSize, fGridUnit, fInterpolationType, fMap, kCubic, kCubicMap, kFileFormatRZPhi, kLinear, kLinearMap, n, and Acts::Test::values.

Referenced by GetFieldValue(), and PrintFieldValue().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void eASTMagneticFieldMap::GetFieldValue ( const G4double  point[4],
G4double *  field 
) const
inline

Definition at line 51 of file eASTMagneticField.hh.

View newest version in sPHENIX GitHub at line 51 of file eASTMagneticField.hh

References AddFieldValue().

+ Here is the call graph for this function:

EInterpolationType eASTMagneticFieldMap::GetInterpolationType ( ) const
inline

Definition at line 122 of file eASTMagneticField.hh.

View newest version in sPHENIX GitHub at line 122 of file eASTMagneticField.hh

References fInterpolationType.

bool eASTMagneticFieldMap::Load ( const G4String &  filename)

Definition at line 85 of file eASTMagneticField.cc.

View newest version in sPHENIX GitHub at line 85 of file eASTMagneticField.cc

References fFieldUnit, fFileFormat, fGridExtent, fGridSize, fMap, run_skim::inputfile, kFileFormatRZ, kFileFormatRZPhi, kFileFormatUndefined, and vector().

Referenced by eASTMagneticFieldMap().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void eASTMagneticFieldMap::PrintFieldValue ( const G4ThreeVector &  point)

Definition at line 269 of file eASTMagneticField.cc.

View newest version in sPHENIX GitHub at line 269 of file eASTMagneticField.cc

References AddFieldValue(), Acts::UnitConstants::m, and p.

Referenced by eASTMagneticFieldMap().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void eASTMagneticFieldMap::SetFieldUnit ( const G4String &  unit)
inline

Definition at line 86 of file eASTMagneticField.hh.

View newest version in sPHENIX GitHub at line 86 of file eASTMagneticField.hh

References fFieldUnit.

Referenced by eASTMagneticFieldMap().

+ Here is the caller graph for this function:

void eASTMagneticFieldMap::SetGridExtent ( unsigned int  i,
const G4ThreeVector &  extent 
)
inline

Definition at line 96 of file eASTMagneticField.hh.

View newest version in sPHENIX GitHub at line 96 of file eASTMagneticField.hh

References fGridExtent.

Referenced by eASTMagneticFieldMap().

+ Here is the caller graph for this function:

void eASTMagneticFieldMap::SetGridUnit ( unsigned int  i,
const G4String &  unit 
)
inline

Definition at line 89 of file eASTMagneticField.hh.

View newest version in sPHENIX GitHub at line 89 of file eASTMagneticField.hh

References fGridExtent, and fGridUnit.

Referenced by eASTMagneticFieldMap().

+ Here is the caller graph for this function:

void eASTMagneticFieldMap::SetInterpolationType ( const G4String &  type)
inline

Definition at line 118 of file eASTMagneticField.hh.

View newest version in sPHENIX GitHub at line 118 of file eASTMagneticField.hh

References fInterpolationType, kCubic, and kLinear.

Referenced by eASTMagneticFieldMap().

+ Here is the caller graph for this function:

Member Data Documentation

G4GenericMessenger eASTMagneticFieldMap::fFieldMapMessenger
private

Definition at line 67 of file eASTMagneticField.hh.

View newest version in sPHENIX GitHub at line 67 of file eASTMagneticField.hh

Referenced by eASTMagneticFieldMap().

double eASTMagneticFieldMap::fFieldUnit {CLHEP::tesla}
private

Definition at line 78 of file eASTMagneticField.hh.

View newest version in sPHENIX GitHub at line 78 of file eASTMagneticField.hh

Referenced by Load(), and SetFieldUnit().

EFileFormat eASTMagneticFieldMap::fFileFormat {kFileFormatUndefined}
private

Definition at line 73 of file eASTMagneticField.hh.

View newest version in sPHENIX GitHub at line 73 of file eASTMagneticField.hh

Referenced by AddFieldValue(), and Load().

std::array<std::tuple<double,double,double>,3> eASTMagneticFieldMap::fGridExtent
private

Definition at line 80 of file eASTMagneticField.hh.

View newest version in sPHENIX GitHub at line 80 of file eASTMagneticField.hh

Referenced by AddFieldValue(), Load(), SetGridExtent(), and SetGridUnit().

std::array<unsigned int,3> eASTMagneticFieldMap::fGridSize {0,0,0}
private

Definition at line 81 of file eASTMagneticField.hh.

View newest version in sPHENIX GitHub at line 81 of file eASTMagneticField.hh

Referenced by AddFieldValue(), and Load().

std::array<double,3> eASTMagneticFieldMap::fGridUnit {CLHEP::cm, CLHEP::cm, CLHEP::deg}
private

Definition at line 79 of file eASTMagneticField.hh.

View newest version in sPHENIX GitHub at line 79 of file eASTMagneticField.hh

Referenced by AddFieldValue(), and SetGridUnit().

EInterpolationType eASTMagneticFieldMap::fInterpolationType {kLinear}
private

Definition at line 113 of file eASTMagneticField.hh.

View newest version in sPHENIX GitHub at line 113 of file eASTMagneticField.hh

Referenced by AddFieldValue(), GetInterpolationType(), and SetInterpolationType().

std::vector<std::vector<std::vector<std::vector<double> > > > eASTMagneticFieldMap::fMap
private

Definition at line 107 of file eASTMagneticField.hh.

View newest version in sPHENIX GitHub at line 107 of file eASTMagneticField.hh

Referenced by AddFieldValue(), and Load().

G4String eASTMagneticFieldMap::fName {""}
private

Definition at line 43 of file eASTMagneticField.hh.

View newest version in sPHENIX GitHub at line 43 of file eASTMagneticField.hh

const int eASTMagneticFieldMap::kCubicMap
staticprivate

Definition at line 38 of file eASTMagneticField.hh.

View newest version in sPHENIX GitHub at line 38 of file eASTMagneticField.hh

Referenced by AddFieldValue().

const int eASTMagneticFieldMap::kLinearMap
staticprivate
Initial value:
= {
{0, 0, 0},
{0, 0, 1},
{0, 1, 0},
{0, 1, 1},
{1, 0, 0},
{1, 0, 1},
{1, 1, 0},
{1, 1, 1},
}

Definition at line 37 of file eASTMagneticField.hh.

View newest version in sPHENIX GitHub at line 37 of file eASTMagneticField.hh

Referenced by AddFieldValue().


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