CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Classes | Public Member Functions | Private Attributes
MagneticFieldGrid Class Reference

#include <MagneticFieldGrid.h>

Classes

class  BVector
 
class  HeaderType3
 

Public Member Functions

int gridType ()
 returns value of GridType (and eventually prints the type + short description) More...
 
void interpolateAtPoint (double X1, double X2, double X3, float &Bx, float &By, float &Bz)
 interpolates the magnetic field at input coordinate point and returns field values More...
 
int lineNumber (int Index1, int Index2, int Index3)
 
void load (const std::string &name)
 load grid binary file More...
 
 MagneticFieldGrid ()
 
void putCoordGetInd (double X1, double X2, double X3, int &Index1, int &Index2, int &Index3)
 
void putIndGetCoord (int Index1, int Index2, int Index3, double &X1, double &X2, double &X3)
 
void putIndicesGetB (int Index1, int Index2, int Index3, float &Bx, float &By, float &Bz)
 
 ~MagneticFieldGrid ()
 

Private Attributes

double BasicDistance0 [3]
 
double BasicDistance1 [3][3]
 
double BasicDistance2 [3][3]
 
bool EasyCoordinate [3]
 
std::vector< BVectorFieldValues
 
int GridType
 
int NumberOfPoints [3]
 
double ReferencePoint [3]
 
double RParAsFunOfPhi [4]
 

Detailed Description

load magnetic field grid from binary file remark: units are either (cm,cm,cm) or (cm,rad,cm) and Tesla for the magnetic field

additional functions either translate indices <-> coordinates, transfer data, or activate the interpolation between grid points

Author
: Volke.nosp@m.r.Dr.nosp@m.ollin.nosp@m.ger@.nosp@m.cern..nosp@m.ch

Modifications:

Definition at line 32 of file MagneticFieldGrid.h.

Constructor & Destructor Documentation

MagneticFieldGrid::MagneticFieldGrid ( )
inline

Definition at line 35 of file MagneticFieldGrid.h.

References i, and j.

35  {
36  GridType = 0;
37  for (int i=0;i<3; ++i) {NumberOfPoints[i] = 0;};
38  for (int i=0;i<3; ++i) {ReferencePoint[i] = 0.;};
39  for (int i=0;i<3; ++i) {BasicDistance0[i] = 0.;};
40  for (int i=0;i<3; ++i) {for (int j=0;j<3; ++j) {BasicDistance1[i][j] = 0.;};};
41  for (int i=0;i<3; ++i) {for (int j=0;j<3; ++j) {BasicDistance2[i][j] = 0.;};};
42  for (int i=0;i<4; ++i) {RParAsFunOfPhi[i] = 0.;};
43  for (int i=0;i<3; ++i) {EasyCoordinate[i] = false;};
44  }
int i
Definition: DBlmapReader.cc:9
int j
Definition: DBlmapReader.cc:9
double BasicDistance1[3][3]
double BasicDistance2[3][3]
MagneticFieldGrid::~MagneticFieldGrid ( )
inline

Definition at line 46 of file MagneticFieldGrid.h.

46 {}

Member Function Documentation

int MagneticFieldGrid::gridType ( )

returns value of GridType (and eventually prints the type + short description)

Definition at line 77 of file MagneticFieldGrid.cc.

Referenced by GlobalGridWrapper::valueInTesla().

void MagneticFieldGrid::interpolateAtPoint ( double  X1,
double  X2,
double  X3,
float &  Bx,
float &  By,
float &  Bz 
)

interpolates the magnetic field at input coordinate point and returns field values

Definition at line 91 of file MagneticFieldGrid.cc.

Referenced by GlobalGridWrapper::valueInTesla().

int MagneticFieldGrid::lineNumber ( int  Index1,
int  Index2,
int  Index3 
)

Definition at line 292 of file MagneticFieldGrid.cc.

void MagneticFieldGrid::load ( const std::string &  name)

load grid binary file

Definition at line 7 of file MagneticFieldGrid.cc.

Referenced by GlobalGridWrapper::GlobalGridWrapper().

void MagneticFieldGrid::putCoordGetInd ( double  X1,
double  X2,
double  X3,
int &  Index1,
int &  Index2,
int &  Index3 
)

Definition at line 148 of file MagneticFieldGrid.cc.

void MagneticFieldGrid::putIndGetCoord ( int  Index1,
int  Index2,
int  Index3,
double &  X1,
double &  X2,
double &  X3 
)

Definition at line 228 of file MagneticFieldGrid.cc.

void MagneticFieldGrid::putIndicesGetB ( int  Index1,
int  Index2,
int  Index3,
float &  Bx,
float &  By,
float &  Bz 
)

Definition at line 218 of file MagneticFieldGrid.cc.

Member Data Documentation

double MagneticFieldGrid::BasicDistance0[3]
private

Definition at line 84 of file MagneticFieldGrid.h.

double MagneticFieldGrid::BasicDistance1[3][3]
private

Definition at line 85 of file MagneticFieldGrid.h.

double MagneticFieldGrid::BasicDistance2[3][3]
private

Definition at line 86 of file MagneticFieldGrid.h.

bool MagneticFieldGrid::EasyCoordinate[3]
private

Definition at line 88 of file MagneticFieldGrid.h.

std::vector<BVector> MagneticFieldGrid::FieldValues
private

Definition at line 90 of file MagneticFieldGrid.h.

int MagneticFieldGrid::GridType
private

Definition at line 80 of file MagneticFieldGrid.h.

int MagneticFieldGrid::NumberOfPoints[3]
private

Definition at line 82 of file MagneticFieldGrid.h.

double MagneticFieldGrid::ReferencePoint[3]
private

Definition at line 83 of file MagneticFieldGrid.h.

double MagneticFieldGrid::RParAsFunOfPhi[4]
private

Definition at line 87 of file MagneticFieldGrid.h.