BOSS 7.0.4
BESIII Offline Software System
Loading...
Searching...
No Matches
Bfield Class Reference

#include <Bfield.h>

Public Member Functions

int fieldID (void) const
 returns B field Map ID
 
const Hep3Vector & fieldMap (double x, double y, double z) const
 returns B field
 
const Hep3Vector & fieldMap (const HepPoint3D &xyz) const
 
void fieldMap (double *position, double *bfield)
 
double bx (double x, double y, double z) const
 returns an element of B field
 
double by (double x, double y, double z) const
 
double bz (double x, double y, double z) const
 
double bx (const HepPoint3D &xyz) const
 
double by (const HepPoint3D &xyz) const
 
double bz (const HepPoint3D &xyz) const
 
int fieldID (void) const
 returns B field Map ID
 
const Hep3Vector & fieldMap (float x, float y, float z) const
 returns B field
 
const Hep3Vector & fieldMap (const HepPoint3D &xyz) const
 
void fieldMap (float *position, float *bfield)
 
float bx (float x, float y, float z) const
 returns an element of B field
 
float by (float x, float y, float z) const
 
float bz (float x, float y, float z) const
 
float bx (const HepPoint3D &xyz) const
 
float by (const HepPoint3D &xyz) const
 
float bz (const HepPoint3D &xyz) const
 
int fieldID (void) const
 returns B field Map ID
 
const Hep3Vector & fieldMap (float x, float y, float z) const
 returns B field
 
const Hep3Vector & fieldMap (const HepPoint3D &xyz) const
 
void fieldMap (float *position, float *bfield)
 
float bx (float x, float y, float z) const
 returns an element of B field
 
float by (float x, float y, float z) const
 
float bz (float x, float y, float z) const
 
float bx (const HepPoint3D &xyz) const
 
float by (const HepPoint3D &xyz) const
 
float bz (const HepPoint3D &xyz) const
 
int fieldID (void) const
 returns B field Map ID
 
const Hep3Vector & fieldMap (double x, double y, double z) const
 returns B field
 
const Hep3Vector & fieldMap (const HepPoint3D &xyz) const
 
void fieldMap (double *position, double *bfield)
 
double bx (double x, double y, double z) const
 returns an element of B field
 
double by (double x, double y, double z) const
 
double bz (double x, double y, double z) const
 
double bx (const HepPoint3D &xyz) const
 
double by (const HepPoint3D &xyz) const
 
double bz (const HepPoint3D &xyz) const
 
int fieldID (void) const
 returns B field Map ID
 
const Hep3Vector & fieldMap (float x, float y, float z) const
 returns B field
 
const Hep3Vector & fieldMap (const HepPoint3D &xyz) const
 
void fieldMap (float *position, float *bfield)
 
float bx (float x, float y, float z) const
 returns an element of B field
 
float by (float x, float y, float z) const
 
float bz (float x, float y, float z) const
 
float bx (const HepPoint3D &xyz) const
 
float by (const HepPoint3D &xyz) const
 
float bz (const HepPoint3D &xyz) const
 
int fieldID (void) const
 returns B field Map ID
 
const Hep3Vector & fieldMap (float x, float y, float z) const
 returns B field
 
const Hep3Vector & fieldMap (const HepPoint3D &xyz) const
 
void fieldMap (float *position, float *bfield)
 
float bx (float x, float y, float z) const
 returns an element of B field
 
float by (float x, float y, float z) const
 
float bz (float x, float y, float z) const
 
float bx (const HepPoint3D &xyz) const
 
float by (const HepPoint3D &xyz) const
 
float bz (const HepPoint3D &xyz) const
 

Static Public Member Functions

static BfieldgetBfield (int)
 returns Bfield object.
 
static BfieldgetBfield (int)
 returns Bfield object.
 
static BfieldgetBfield (int)
 returns Bfield object.
 
static BfieldgetBfield (int)
 returns Bfield object.
 
static BfieldgetBfield (int)
 returns Bfield object.
 
static BfieldgetBfield (int)
 returns Bfield object.
 

Protected Member Functions

 Bfield (int)
 Constructor, Destructor.
 
virtual ~Bfield (void)
 
 Bfield (int)
 Constructor, Destructor.
 
 Bfield (int)
 Constructor, Destructor.
 
 Bfield (int)
 Constructor, Destructor.
 
virtual ~Bfield (void)
 
 Bfield (int)
 Constructor, Destructor.
 
 Bfield (int)
 Constructor, Destructor.
 

Detailed Description

Constructor & Destructor Documentation

◆ Bfield() [1/6]

Bfield::Bfield ( int  imap)
protected

Constructor, Destructor.

Definition at line 58 of file KalFitAlg/KalFitAlg-00-07-55-p03/src/coil/Bfield.cxx.

58 {
59 std::cout << std::endl;
60 std::cout << "***********************************************" << std::endl;
61 std::cout << " Bfield class MAP ID = " << imap << std::endl;
62 std::cout << " #### R < 174 cm, -152 < Z < 246 cm #### " << std::endl;
63 std::cout << " C++ version 1.00 " << std::endl;
64 std::cout << "***********************************************" << std::endl;
65
66 const double uniformBz[10] = {0, 15, 14.5, 14, 13, 12.5, 12, 11, 10, 15.5};
67
68 //...initialization
69 for(int i=0; i<175; i++)
70 for(int j=0; j<399; j++) {
71 _Bz[i][j] = 0;
72 _Br[i][j] = 0;
73 _Bz[i][j] = 0;
74 if(i<101 && j<163) {
75 _BzQR[i][j] = 0;
76 _BrQR[i][j] = 0;
77 _BphiQR[i][j] = 0;
78 }
79 }
80 for(int i=0; i<17; i++)
81 for(int j=0; j<51; j++)
82 for(int k=0; k<52; k++) {
83 _BzQL[i][j][k] = 0;
84 _BrQL[i][j][k] = 0;
85 _BphiQL[i][j][k] =0;
86 }
87
88 //...
89 _fieldID = imap;
90
91 //...read B field map
92
93 if(imap<10){
94 //
95 // uniform B field map
96 //
97 m_Bx = 0.;
98 m_By = 0.;
99 m_Bz = uniformBz[imap];
100 m_Bfld.setX((double) m_Bx);
101 m_Bfld.setY((double) m_By);
102 m_Bfld.setZ((double) m_Bz);
103 std::cout << "Bfield class >> creating uniform B field with id = " << imap;
104 std::cout << ", (Bx,By,Bz) = "<<m_Bfld<<std::endl;
105 } else {
106 //
107 // non-uniform B field map
108 //
109 std::cout << "Bfield class >> loading non-uniform B field map" << std::endl;
110/*wangdy
111 geo_coil_readmap_(&imap, _Bz, _Br, _Bphi);
112 if( _fieldID == 21 ) {
113 std::cout << "Bfield class >> loading QCS" << std::endl;
114 geo_coil_readqcsrmap_(_BzQR,_BrQR, _BphiQR);
115 geo_coil_readqcslmap_(_BzQL,_BrQL, _BphiQL);
116 }
117 */
118 updateCache(0., 0., 0.);
119 }
120 std::cout << std::endl;
121
122}

◆ ~Bfield() [1/2]

virtual Bfield::~Bfield ( void  )
inlineprotectedvirtual

Definition at line 52 of file InstallArea/include/KalFitAlg/KalFitAlg/coil/Bfield.h.

52{};

◆ Bfield() [2/6]

Bfield::Bfield ( int  )
protected

Constructor, Destructor.

◆ Bfield() [3/6]

Bfield::Bfield ( int  )
protected

Constructor, Destructor.

◆ Bfield() [4/6]

Bfield::Bfield ( int  )
protected

Constructor, Destructor.

◆ ~Bfield() [2/2]

virtual Bfield::~Bfield ( void  )
inlineprotectedvirtual

◆ Bfield() [5/6]

Bfield::Bfield ( int  )
protected

Constructor, Destructor.

◆ Bfield() [6/6]

Bfield::Bfield ( int  )
protected

Constructor, Destructor.

Member Function Documentation

◆ bx() [1/12]

float Bfield::bx ( const HepPoint3D xyz) const

Definition at line 194 of file KalFitAlg/KalFitAlg-00-07-55-p03/src/coil/Bfield.cxx.

194 {
195
196 if(_fieldID > 10){
197 double x = xyz.x();
198 double y = xyz.y();
199 double z = xyz.z();
200 if(x != m_x || y != m_y || z != m_z) updateCache(x, y, z);
201 }
202
203 return m_Bx;
204}
Double_t x[10]

◆ bx() [2/12]

float Bfield::bx ( const HepPoint3D xyz) const

◆ bx() [3/12]

float Bfield::bx ( const HepPoint3D xyz) const

◆ bx() [4/12]

double Bfield::bx ( const HepPoint3D xyz) const

◆ bx() [5/12]

float Bfield::bx ( const HepPoint3D xyz) const

◆ bx() [6/12]

float Bfield::bx ( const HepPoint3D xyz) const

◆ bx() [7/12]

double Bfield::bx ( double  x,
double  y,
double  z 
) const

returns an element of B field

Definition at line 164 of file KalFitAlg/KalFitAlg-00-07-55-p03/src/coil/Bfield.cxx.

164 {
165
166 if(_fieldID > 10){
167 if(x != m_x || y != m_y || z != m_z) updateCache(x, y, z);
168 }
169
170 return m_Bx;
171}

◆ bx() [8/12]

double Bfield::bx ( double  x,
double  y,
double  z 
) const

returns an element of B field

◆ bx() [9/12]

float Bfield::bx ( float  x,
float  y,
float  z 
) const

returns an element of B field

Definition at line 132 of file TrackUtil/TrackUtil-00-00-08/src/Bfield.cxx.

132 {
133
134 if(_fieldID > 10){
135 if(x != m_x || y != m_y || z != m_z) updateCache(x, y, z);
136 }
137
138 return m_Bx;
139}

◆ bx() [10/12]

float Bfield::bx ( float  x,
float  y,
float  z 
) const

returns an element of B field

◆ bx() [11/12]

float Bfield::bx ( float  x,
float  y,
float  z 
) const

returns an element of B field

◆ bx() [12/12]

float Bfield::bx ( float  x,
float  y,
float  z 
) const

returns an element of B field

◆ by() [1/12]

float Bfield::by ( const HepPoint3D xyz) const

Definition at line 207 of file KalFitAlg/KalFitAlg-00-07-55-p03/src/coil/Bfield.cxx.

207 {
208
209 if(_fieldID > 10){
210 double x = xyz.x();
211 double y = xyz.y();
212 double z = xyz.z();
213 if(x != m_x || y != m_y || z != m_z) updateCache(x, y, z);
214 }
215
216 return m_By;
217}

◆ by() [2/12]

float Bfield::by ( const HepPoint3D xyz) const

◆ by() [3/12]

float Bfield::by ( const HepPoint3D xyz) const

◆ by() [4/12]

double Bfield::by ( const HepPoint3D xyz) const

◆ by() [5/12]

float Bfield::by ( const HepPoint3D xyz) const

◆ by() [6/12]

float Bfield::by ( const HepPoint3D xyz) const

◆ by() [7/12]

double Bfield::by ( double  x,
double  y,
double  z 
) const

Definition at line 174 of file KalFitAlg/KalFitAlg-00-07-55-p03/src/coil/Bfield.cxx.

174 {
175
176 if(_fieldID > 10){
177 if(x != m_x || y != m_y || z != m_z) updateCache(x, y, z);
178 }
179
180 return m_By;
181}

◆ by() [8/12]

double Bfield::by ( double  x,
double  y,
double  z 
) const

◆ by() [9/12]

float Bfield::by ( float  x,
float  y,
float  z 
) const

Definition at line 142 of file TrackUtil/TrackUtil-00-00-08/src/Bfield.cxx.

142 {
143
144 if(_fieldID > 10){
145 if(x != m_x || y != m_y || z != m_z) updateCache(x, y, z);
146 }
147
148 return m_By;
149}

◆ by() [10/12]

float Bfield::by ( float  x,
float  y,
float  z 
) const

◆ by() [11/12]

float Bfield::by ( float  x,
float  y,
float  z 
) const

◆ by() [12/12]

float Bfield::by ( float  x,
float  y,
float  z 
) const

◆ bz() [1/12]

float Bfield::bz ( const HepPoint3D xyz) const

Definition at line 220 of file KalFitAlg/KalFitAlg-00-07-55-p03/src/coil/Bfield.cxx.

220 {
221
222 if(_fieldID > 10){
223 double x = xyz.x();
224 double y = xyz.y();
225 double z = xyz.z();
226 if(x != m_x || y != m_y || z != m_z) updateCache(x, y, z);
227 }
228 return m_Bz;
229}

◆ bz() [2/12]

float Bfield::bz ( const HepPoint3D xyz) const

◆ bz() [3/12]

float Bfield::bz ( const HepPoint3D xyz) const

◆ bz() [4/12]

double Bfield::bz ( const HepPoint3D xyz) const

◆ bz() [5/12]

float Bfield::bz ( const HepPoint3D xyz) const

◆ bz() [6/12]

float Bfield::bz ( const HepPoint3D xyz) const

◆ bz() [7/12]

double Bfield::bz ( double  x,
double  y,
double  z 
) const

Definition at line 184 of file KalFitAlg/KalFitAlg-00-07-55-p03/src/coil/Bfield.cxx.

184 {
185
186 if(_fieldID > 10){
187 if(x != m_x || y != m_y || z != m_z) updateCache(x, y, z);
188 }
189
190 return m_Bz;
191}

◆ bz() [8/12]

double Bfield::bz ( double  x,
double  y,
double  z 
) const

◆ bz() [9/12]

float Bfield::bz ( float  x,
float  y,
float  z 
) const

Definition at line 152 of file TrackUtil/TrackUtil-00-00-08/src/Bfield.cxx.

152 {
153
154 if(_fieldID > 10){
155 if(x != m_x || y != m_y || z != m_z) updateCache(x, y, z);
156 }
157
158 return m_Bz;
159}

◆ bz() [10/12]

float Bfield::bz ( float  x,
float  y,
float  z 
) const

◆ bz() [11/12]

float Bfield::bz ( float  x,
float  y,
float  z 
) const

◆ bz() [12/12]

float Bfield::bz ( float  x,
float  y,
float  z 
) const

◆ fieldID() [1/6]

int Bfield::fieldID ( void  ) const
inline

returns B field Map ID

Definition at line 57 of file InstallArea/include/KalFitAlg/KalFitAlg/coil/Bfield.h.

57{return _fieldID;}

◆ fieldID() [2/6]

int Bfield::fieldID ( void  ) const
inline

returns B field Map ID

Definition at line 49 of file InstallArea/include/TrackUtil/TrackUtil/Bfield.h.

49{return _fieldID;}

◆ fieldID() [3/6]

int Bfield::fieldID ( void  ) const
inline

returns B field Map ID

Definition at line 49 of file InstallArea/include/TrkReco/TrkReco/Bfield.h.

49{return _fieldID;}

◆ fieldID() [4/6]

int Bfield::fieldID ( void  ) const
inline

returns B field Map ID

Definition at line 57 of file Reconstruction/KalFitAlg/KalFitAlg-00-07-55-p03/KalFitAlg/coil/Bfield.h.

57{return _fieldID;}

◆ fieldID() [5/6]

int Bfield::fieldID ( void  ) const
inline

returns B field Map ID

Definition at line 49 of file Reconstruction/TrackUtil/TrackUtil-00-00-08/TrackUtil/Bfield.h.

49{return _fieldID;}

◆ fieldID() [6/6]

int Bfield::fieldID ( void  ) const
inline

returns B field Map ID

Definition at line 49 of file Reconstruction/TrkReco/TrkReco-00-08-59-patch4-slc6tag/TrkReco/Bfield.h.

49{return _fieldID;}

◆ fieldMap() [1/18]

const Hep3Vector & Bfield::fieldMap ( const HepPoint3D xyz) const

Definition at line 137 of file KalFitAlg/KalFitAlg-00-07-55-p03/src/coil/Bfield.cxx.

137 {
138
139 if(_fieldID > 10){
140 double x = xyz.x();
141 double y = xyz.y();
142 double z = xyz.z();
143 if(x != m_x || y != m_y || z != m_z) updateCache(x, y, z);
144 }
145
146 return m_Bfld;
147}

◆ fieldMap() [2/18]

const Hep3Vector & Bfield::fieldMap ( const HepPoint3D xyz) const

◆ fieldMap() [3/18]

const Hep3Vector & Bfield::fieldMap ( const HepPoint3D xyz) const

◆ fieldMap() [4/18]

const Hep3Vector & Bfield::fieldMap ( const HepPoint3D xyz) const

◆ fieldMap() [5/18]

const Hep3Vector & Bfield::fieldMap ( const HepPoint3D xyz) const

◆ fieldMap() [6/18]

const Hep3Vector & Bfield::fieldMap ( const HepPoint3D xyz) const

◆ fieldMap() [7/18]

void Bfield::fieldMap ( double *  position,
double *  bfield 
)

Definition at line 150 of file KalFitAlg/KalFitAlg-00-07-55-p03/src/coil/Bfield.cxx.

150 {
151 if(_fieldID > 10){
152 double x = position[0];
153 double y = position[1];
154 double z = position[2];
155 if(x != m_x || y != m_y || z != m_z) updateCache(x, y, z);
156 }
157 field[0] = m_Bx;
158 field[1] = m_By;
159 field[2] = m_Bz;
160 return;
161}

◆ fieldMap() [8/18]

void Bfield::fieldMap ( double *  position,
double *  bfield 
)

◆ fieldMap() [9/18]

const Hep3Vector & Bfield::fieldMap ( double  x,
double  y,
double  z 
) const

returns B field

Definition at line 127 of file KalFitAlg/KalFitAlg-00-07-55-p03/src/coil/Bfield.cxx.

127 {
128
129 if(_fieldID > 10){
130 if(x != m_x || y != m_y || z != m_z) updateCache(x, y, z);
131 }
132
133 return m_Bfld;
134}

Referenced by get_bfield_().

◆ fieldMap() [10/18]

const Hep3Vector & Bfield::fieldMap ( double  x,
double  y,
double  z 
) const

returns B field

◆ fieldMap() [11/18]

void Bfield::fieldMap ( float *  position,
float *  bfield 
)

Definition at line 118 of file TrackUtil/TrackUtil-00-00-08/src/Bfield.cxx.

118 {
119 if(_fieldID > 10){
120 float x = position[0];
121 float y = position[1];
122 float z = position[2];
123 if(x != m_x || y != m_y || z != m_z) updateCache(x, y, z);
124 }
125 field[0] = m_Bx;
126 field[1] = m_By;
127 field[2] = m_Bz;
128 return;
129}

◆ fieldMap() [12/18]

void Bfield::fieldMap ( float *  position,
float *  bfield 
)

◆ fieldMap() [13/18]

void Bfield::fieldMap ( float *  position,
float *  bfield 
)

◆ fieldMap() [14/18]

void Bfield::fieldMap ( float *  position,
float *  bfield 
)

◆ fieldMap() [15/18]

const Hep3Vector & Bfield::fieldMap ( float  x,
float  y,
float  z 
) const

returns B field

Definition at line 95 of file TrackUtil/TrackUtil-00-00-08/src/Bfield.cxx.

95 {
96
97 if(_fieldID > 10){
98 if(x != m_x || y != m_y || z != m_z) updateCache(x, y, z);
99 }
100
101 return m_Bfld;
102}

◆ fieldMap() [16/18]

const Hep3Vector & Bfield::fieldMap ( float  x,
float  y,
float  z 
) const

returns B field

◆ fieldMap() [17/18]

const Hep3Vector & Bfield::fieldMap ( float  x,
float  y,
float  z 
) const

returns B field

◆ fieldMap() [18/18]

const Hep3Vector & Bfield::fieldMap ( float  x,
float  y,
float  z 
) const

returns B field

◆ getBfield() [1/6]

Bfield * Bfield::getBfield ( int  imap)
static

returns Bfield object.

Definition at line 52 of file KalFitAlg/KalFitAlg-00-07-55-p03/src/coil/Bfield.cxx.

52 {
53 if (! _field[imap]) _field[imap] = new Bfield(imap);
54 return _field[imap];
55}

Referenced by TRunge::BfieldID(), get_bfield_(), init_bfield_(), main(), and TRunge::TRunge().

◆ getBfield() [2/6]

static Bfield * Bfield::getBfield ( int  )
static

returns Bfield object.

◆ getBfield() [3/6]

static Bfield * Bfield::getBfield ( int  )
static

returns Bfield object.

◆ getBfield() [4/6]

static Bfield * Bfield::getBfield ( int  )
static

returns Bfield object.

◆ getBfield() [5/6]

static Bfield * Bfield::getBfield ( int  )
static

returns Bfield object.

◆ getBfield() [6/6]

static Bfield * Bfield::getBfield ( int  )
static

returns Bfield object.


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