BOSS 8.0.0
BESIII Offline Software System
Loading...
Searching...
No Matches
KalmanFit::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 (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 (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

Static Public Member Functions

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.
virtual ~Bfield (void)
 Bfield (int)
 Constructor, Destructor.
virtual ~Bfield (void)

Detailed Description

Constructor & Destructor Documentation

◆ Bfield() [1/3]

Bfield::Bfield ( int imap)
protected

Constructor, Destructor.

Definition at line 51 of file KalFitAlg/src/coil/Bfield.cxx.

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

Referenced by bz(), and getBfield().

◆ ~Bfield() [1/3]

virtual KalmanFit::Bfield::~Bfield ( void )
inlineprotectedvirtual

◆ Bfield() [2/3]

KalmanFit::Bfield::Bfield ( int )
protected

Constructor, Destructor.

◆ ~Bfield() [2/3]

virtual KalmanFit::Bfield::~Bfield ( void )
inlineprotectedvirtual

◆ Bfield() [3/3]

KalmanFit::Bfield::Bfield ( int )
protected

Constructor, Destructor.

◆ ~Bfield() [3/3]

virtual KalmanFit::Bfield::~Bfield ( void )
inlineprotectedvirtual

Member Function Documentation

◆ bx() [1/6]

double Bfield::bx ( const HepPoint3D & xyz) const

Definition at line 191 of file KalFitAlg/src/coil/Bfield.cxx.

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

◆ bx() [2/6]

double KalmanFit::Bfield::bx ( const HepPoint3D & xyz) const

◆ bx() [3/6]

double KalmanFit::Bfield::bx ( const HepPoint3D & xyz) const

◆ bx() [4/6]

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

returns an element of B field

Definition at line 161 of file KalFitAlg/src/coil/Bfield.cxx.

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

◆ bx() [5/6]

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

returns an element of B field

◆ bx() [6/6]

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

returns an element of B field

◆ by() [1/6]

double Bfield::by ( const HepPoint3D & xyz) const

Definition at line 204 of file KalFitAlg/src/coil/Bfield.cxx.

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

◆ by() [2/6]

double KalmanFit::Bfield::by ( const HepPoint3D & xyz) const

◆ by() [3/6]

double KalmanFit::Bfield::by ( const HepPoint3D & xyz) const

◆ by() [4/6]

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

Definition at line 171 of file KalFitAlg/src/coil/Bfield.cxx.

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

◆ by() [5/6]

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

◆ by() [6/6]

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

◆ bz() [1/6]

double Bfield::bz ( const HepPoint3D & xyz) const

Definition at line 217 of file KalFitAlg/src/coil/Bfield.cxx.

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

◆ bz() [2/6]

double KalmanFit::Bfield::bz ( const HepPoint3D & xyz) const

◆ bz() [3/6]

double KalmanFit::Bfield::bz ( const HepPoint3D & xyz) const

◆ bz() [4/6]

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

Definition at line 181 of file KalFitAlg/src/coil/Bfield.cxx.

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

◆ bz() [5/6]

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

◆ bz() [6/6]

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

◆ fieldID() [1/3]

int KalmanFit::Bfield::fieldID ( void ) const
inline

returns B field Map ID

Definition at line 50 of file InstallArea/x86_64-el9-gcc13-dbg/include/KalFitAlg/coil/Bfield.h.

50{ return _fieldID; }

◆ fieldID() [2/3]

int KalmanFit::Bfield::fieldID ( void ) const
inline

returns B field Map ID

Definition at line 50 of file InstallArea/x86_64-el9-gcc13-opt/include/KalFitAlg/coil/Bfield.h.

50{ return _fieldID; }

◆ fieldID() [3/3]

int KalmanFit::Bfield::fieldID ( void ) const
inline

returns B field Map ID

Definition at line 50 of file Reconstruction/KalFitAlg/include/KalFitAlg/coil/Bfield.h.

50{ return _fieldID; }

◆ fieldMap() [1/9]

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

Definition at line 134 of file KalFitAlg/src/coil/Bfield.cxx.

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

◆ fieldMap() [2/9]

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

◆ fieldMap() [3/9]

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

◆ fieldMap() [4/9]

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

Definition at line 147 of file KalFitAlg/src/coil/Bfield.cxx.

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

◆ fieldMap() [5/9]

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

◆ fieldMap() [6/9]

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

◆ fieldMap() [7/9]

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

returns B field

Definition at line 124 of file KalFitAlg/src/coil/Bfield.cxx.

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

Referenced by get_bfield_().

◆ fieldMap() [8/9]

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

returns B field

◆ fieldMap() [9/9]

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

returns B field

◆ getBfield() [1/3]

Bfield * Bfield::getBfield ( int imap)
static

returns Bfield object.

Definition at line 46 of file KalFitAlg/src/coil/Bfield.cxx.

46 {
47 if ( !_field[imap] ) _field[imap] = new Bfield( imap );
48 return _field[imap];
49}
Bfield(int)
Constructor, Destructor.

Referenced by get_bfield_().

◆ getBfield() [2/3]

Bfield * KalmanFit::Bfield::getBfield ( int )
static

returns Bfield object.

◆ getBfield() [3/3]

Bfield * KalmanFit::Bfield::getBfield ( int )
static

returns Bfield object.


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