BOSS 7.1.1
BESIII Offline Software System
Loading...
Searching...
No Matches
MdcxHel Class Reference

#include <MdcxHel.h>

+ Inheritance diagram for MdcxHel:

Public Member Functions

 MdcxHel ()
 
 MdcxHel (double D0, double Phi0, double Omega, double Z0=0.0, double Tanl=0.0, double T0=0.0, int Code=11111, int Mode=0, double X=0.0, double Y=0.0)
 
virtual ~MdcxHel ()
 
double D0 () const
 
double Phi0 () const
 
double Omega () const
 
double Z0 () const
 
double Tanl () const
 
double X () const
 
double Xref () const
 
double Y () const
 
double Yref () const
 
double T0 () const
 
double CosPhi0 () const
 
double SinPhi0 () const
 
double Doca_Len () const
 
double Doca_FLen () const
 
double Doca_Tof () const
 
double Doca_Zh () const
 
int Doca_Samb () const
 
int Doca_Wamb () const
 
double Doca_Eang () const
 
double Omin () const
 
int Mode () const
 
int Code () const
 
int Nfree () const
 
int Ominfl () const
 
int Qd0 () const
 
int Qphi0 () const
 
int Qomega () const
 
int Qz0 () const
 
int Qtanl () const
 
int Qt0 () const
 
double Xc () const
 
double Yc () const
 
double X0 () const
 
double Y0 () const
 
double Xh (double l) const
 
double Yh (double l) const
 
double Zh (double l) const
 
double Px (double l=0.0) const
 
double Py (double l=0.0) const
 
double Pz (double l=0.0) const
 
double Ptot (double l=0.0) const
 
double Lmax () const
 
double Doca (double WX, double WY, double WZ, double X, double Y, double Z=0.0)
 
double Doca (const MdcxHit &h)
 
void print () const
 
void flip ()
 
std::vector< float > derivatives (const MdcxHit &h)
 
void SetRef (double x, double y)
 
void SetMode (int n)
 
void SetD0 (int n)
 
void SetPhi0 (int n)
 
void SetOmega (int n)
 
void SetZ0 (int n)
 
void SetTanl (int n)
 
void SetT0 (int n)
 
void SetTurnFlag (const int &i)
 
int GetTurnFlag () const
 
MdcxHeloperator= (const MdcxHel &)
 

Protected Member Functions

double CalcPhi (double xf, double yf, double xl, double yl) const
 
int deltaq (int i, int j) const
 
void decode (const int i, int &i1, int &i2, int &i3, int &i4, int &i5, int &i6, int &n)
 
void copy (const MdcxHel &hel)
 

Protected Attributes

double d0
 
double phi0
 
double omega
 
double z0
 
double tanl
 
double t0
 
double xref
 
double yref
 
double cphi0
 
double sphi0
 
double x0
 
double y0
 
double xc
 
double yc
 
int code
 
int mode
 
int qd0
 
int qphi0
 
int qomega
 
int qz0
 
int qtanl
 
int qt0
 
int nfree
 
int ominfl
 
int turnflag
 
double omin
 
double len
 
double phi
 
double xh
 
double yh
 
double zh
 
double vx
 
double vy
 
double vz
 
double cosl
 
double sinl
 
double f0
 
double tx
 
double ty
 
double tz
 
Hep3Vector wvec
 
Hep3Vector tvec
 
Hep3Vector vhat
 
Hep3Vector dvec
 
int samb
 
int wamb
 
double eang
 

Detailed Description

Definition at line 37 of file MdcxHel.h.

Constructor & Destructor Documentation

◆ MdcxHel() [1/2]

MdcxHel::MdcxHel ( )

Definition at line 32 of file MdcxHel.cxx.

32{ }

◆ MdcxHel() [2/2]

MdcxHel::MdcxHel ( double D0,
double Phi0,
double Omega,
double Z0 = 0.0,
double Tanl = 0.0,
double T0 = 0.0,
int Code = 11111,
int Mode = 0,
double X = 0.0,
double Y = 0.0 )

FIXME

Definition at line 34 of file MdcxHel.cxx.

36 :
37d0(D0), phi0(Phi0), omega(Omega), z0(Z0), tanl(Tanl), t0(T0),
38xref(X), yref(Y), code(Code), mode(Mode), omin(0.000005) {
39
40 ominfl = (fabs(omega) < omin) ? 0 : 1;
41 double m_2pi = 2.0*M_PI;
42 if (phi0 > M_PI) phi0 -= m_2pi;
43 if (phi0 < -M_PI) phi0 += m_2pi;
44 cphi0 = cos(phi0);
45 sphi0 = sin(phi0);
46 x0 = X0();
47 y0 = Y0();
48 xc = Xc();
49 yc = Yc();
51 turnflag = 1; ///FIXME
52 //std::cout << "MdcxHel::MdcxHel() -> (x0, y0) (" << x0 << ", " << y0 << ")" << std::endl;
53}//endof MdcxHel
double sin(const BesAngle a)
Definition BesAngle.h:210
double cos(const BesAngle a)
Definition BesAngle.h:213
#define M_PI
Definition TConstant.h:4
Definition Code.h:31
double Y() const
Definition MdcxHel.h:60
double Phi0() const
Definition MdcxHel.h:54
double z0
Definition MdcxHel.h:126
double t0
Definition MdcxHel.h:128
double T0() const
Definition MdcxHel.h:62
double sphi0
Definition MdcxHel.h:132
int ominfl
Definition MdcxHel.h:154
double X0() const
Definition MdcxHel.cxx:77
double D0() const
Definition MdcxHel.h:53
int turnflag
Definition MdcxHel.h:155
double Yc() const
Definition MdcxHel.cxx:68
double Xc() const
Definition MdcxHel.cxx:59
double X() const
Definition MdcxHel.h:58
int nfree
Definition MdcxHel.h:153
double yc
Definition MdcxHel.h:136
double omin
Definition MdcxHel.h:158
double yref
Definition MdcxHel.h:130
int mode
Definition MdcxHel.h:145
double d0
Definition MdcxHel.h:123
void decode(const int i, int &i1, int &i2, int &i3, int &i4, int &i5, int &i6, int &n)
Definition MdcxHel.cxx:199
double Omega() const
Definition MdcxHel.h:55
double tanl
Definition MdcxHel.h:127
int qtanl
Definition MdcxHel.h:151
double xc
Definition MdcxHel.h:135
int qomega
Definition MdcxHel.h:149
double Y0() const
Definition MdcxHel.cxx:81
int qphi0
Definition MdcxHel.h:148
double phi0
Definition MdcxHel.h:124
double xref
Definition MdcxHel.h:129
double Z0() const
Definition MdcxHel.h:56
int qt0
Definition MdcxHel.h:152
double omega
Definition MdcxHel.h:125
double x0
Definition MdcxHel.h:133
int code
Definition MdcxHel.h:137
double Tanl() const
Definition MdcxHel.h:57
int qd0
Definition MdcxHel.h:147
double cphi0
Definition MdcxHel.h:131
int Mode() const
Definition MdcxHel.h:73
double y0
Definition MdcxHel.h:134
int qz0
Definition MdcxHel.h:150

◆ ~MdcxHel()

MdcxHel::~MdcxHel ( )
virtual

Definition at line 55 of file MdcxHel.cxx.

55{ }

Member Function Documentation

◆ CalcPhi()

double MdcxHel::CalcPhi ( double xf,
double yf,
double xl,
double yl ) const
inlineprotected

Definition at line 167 of file MdcxHel.h.

167 {
168 double phit=atan2(yl-yf,xl-xf); return phit<0?phit+2*M_PI:phit;
169 }//endof CalcPhi

◆ Code()

int MdcxHel::Code ( ) const
inline

Definition at line 74 of file MdcxHel.h.

74{return code;}

Referenced by copy(), and MdcxFindTracks::TakeToOrigin().

◆ copy()

void MdcxHel::copy ( const MdcxHel & hel)
protected

Definition at line 219 of file MdcxHel.cxx.

220{
221 //FIXME
222 omega=rhs.Omega(); phi0=rhs.Phi0(); d0=rhs.D0(); t0=rhs.T0();
223 tanl=rhs.Tanl(); z0=rhs.Z0();
224 cphi0=rhs.CosPhi0(); sphi0=rhs.SinPhi0();
225 x0=rhs.X0(); y0=rhs.Y0(); xc=rhs.Xc(); yc=rhs.Yc();
226 xref=rhs.Xref(); yref=rhs.Yref();
227 qomega=rhs.Qomega(); qphi0=rhs.Qphi0(); qd0=rhs.Qd0(); qt0=rhs.Qt0();
228 qtanl=rhs.Qtanl(); qz0=rhs.Qz0();
229 mode=rhs.Mode(); nfree=rhs.Nfree();
230 code=rhs.Code(); ominfl=rhs.Ominfl(); omin=rhs.Omin();
231 turnflag=rhs.GetTurnFlag();
232}//endof copy

Referenced by MdcxFittedHel::Grow(), MdcxFittedHel::operator=(), MdcxFittedHel::operator=(), and operator=().

◆ CosPhi0()

double MdcxHel::CosPhi0 ( ) const
inline

Definition at line 63 of file MdcxHel.h.

63{return cphi0;}

Referenced by copy(), and MdcxFindTracks::TakeToOrigin().

◆ D0()

double MdcxHel::D0 ( ) const
inline

◆ decode()

void MdcxHel::decode ( const int i,
int & i1,
int & i2,
int & i3,
int & i4,
int & i5,
int & i6,
int & n )
protected

FIXME use bit code ?

Definition at line 199 of file MdcxHel.cxx.

201{ ///FIXME use bit code ?
202 int temp = code;
203 temp=temp/1000000; temp=code-1000000*temp;
204 i6=temp/100000; temp=temp-100000*i6;
205 i5=temp/10000; temp=temp-10000*i5;
206 i4=temp/1000; temp=temp-1000*i4;
207 i3=temp/100; temp=temp-100*i3;
208 i2=temp/10; i1=temp-10*i2;
209 n = 0;
210 if(i6 == 1) n++; else i6 = 0;
211 if(i5 == 1) n++; else i5 = 0;
212 if(i4 == 1) n++; else i4 = 0;
213 if(i3 == 1) n++; else i3 = 0;
214 if(i2 == 1) n++; else i2 = 0;
215 if(i1 == 1) n++; else i1 = 0;
216}//endof decode
const Int_t n

Referenced by MdcxHel().

◆ deltaq()

int MdcxHel::deltaq ( int i,
int j ) const
inlineprotected

Definition at line 170 of file MdcxHel.h.

170{ return i==j?0:i==0?1:-1; } //integer comparisons

Referenced by SetD0(), SetOmega(), SetPhi0(), SetT0(), SetTanl(), and SetZ0().

◆ derivatives()

std::vector< float > MdcxHel::derivatives ( const MdcxHit & h)

Definition at line 324 of file MdcxHel.cxx.

325{
326 double doca = Doca(hit);
327 std::vector<float> temp(nfree+1);
328 temp[0] = doca;
329 double fac = 1.0;
330 if((mode==0) && (doca<0.0)) fac = -fac;
331 if(mode == 0) temp[0] = fabs(temp[0]);
332
333 int bump = 0;
334 if (qd0) temp[++bump] = (-vx*sphi0 + vy*cphi0) * fac;
335 if (qphi0) {
336 //double dddp0=-(yh-y0)*vx+(xh-x0)*vy;
337 double dddp0 = -(yh-y0+f0*ty)*vx + (xh-x0+f0*tx)*vy;
338 dddp0 *= (1.0 + d0*omega);
339 temp[++bump] = dddp0*fac;
340 }
341 if (qomega) {
342 double dddom;
343 if (ominfl) {
344 dddom = ((len*cos(phi)-xh+x0)*vx + (len*sin(phi)-yh+y0)*vy)/omega;
345 dddom += f0*len*cosl*(-sin(phi)*vx+cos(phi)*vy);
346 } else {
347 dddom = 0.5*len*len*(-vx*sphi0+vy*cphi0);
348 }
349 temp[++bump] = dddom * fac;
350 }
351 if (qz0) temp[++bump] = vz * fac;
352 if (qtanl) temp[++bump] = (vz *len) * fac;
353 if (qt0) temp[++bump] = -hit.v();
354 return temp;
355}//endof derivatives
double vy
Definition MdcxHel.h:162
double vz
Definition MdcxHel.h:162
double vx
Definition MdcxHel.h:162
double len
Definition MdcxHel.h:162
double f0
Definition MdcxHel.h:162
double Doca(double WX, double WY, double WZ, double X, double Y, double Z=0.0)
Definition MdcxHel.cxx:239
double xh
Definition MdcxHel.h:162
double yh
Definition MdcxHel.h:162
double cosl
Definition MdcxHel.h:162
double tx
Definition MdcxHel.h:162
double phi
Definition MdcxHel.h:162
double ty
Definition MdcxHel.h:162

Referenced by MdcxHit::derivatives().

◆ Doca() [1/2]

double MdcxHel::Doca ( const MdcxHit & h)

Definition at line 234 of file MdcxHel.cxx.

234 {
235 //std::cout<< __FILE__ << " " << __LINE__ << " hit("<<h.Layer()<<","<<h.WireNo()<<")";
236 return Doca( h.wx(), h.wy(), h.wz(), h.x(), h.y() );
237}
float wy() const
Definition MdcxHit.h:76
float x() const
Definition MdcxHit.h:69
float y() const
Definition MdcxHit.h:70
float wx() const
Definition MdcxHit.h:75
float wz() const
Definition MdcxHit.h:77

◆ Doca() [2/2]

double MdcxHel::Doca ( double WX,
double WY,
double WZ,
double X,
double Y,
double Z = 0.0 )

calc the phi of point(i)

FIXME

Definition at line 239 of file MdcxHel.cxx.

241{
242 double m_2pi = 2.0*M_PI;
243 // describe wire
244 //cout << " In Doca, xi = " << xi << " yi = " << yi << " zi = " << zi <<endl;
245 Hep3Vector ivec(xi, yi, zi);
246 wvec = Hep3Vector(wx, wy, wz);
247 //cout << " In Doca, wx = " << wx << " wy = " << wy << " wz = " << wz <<endl;
248 // calculate len to doca
249 double zd, xd = xi, yd = yi;
250 // cout << " In Doca, start xd = " << xd << " yd = " << yd << endl;
251 double lnew,t1,t2,dphi,dlen=1000.0;
252 len = 0.0;
253 int itry = 2;
254 // int segflg=0; if ((code==111)&&(z0==0.0)&&(tanl==0.0))segflg=1;
255 // int superseg=0; if ((code==11111)&&(xref!=0.0)&&(yref!=0.0))superseg=1;
256 double circut, circum = 10000.;
257 if (ominfl) circum = m_2pi/fabs(omega);
258 circut = 0.50 * circum;
259 while (itry) {
260 if (ominfl) {
261 ///calc the phi of point(i)
262 t1 = -xc + xd; t2 = yc - yd; phi = atan2(t1, t2);
263 if (omega < 0.0) phi += M_PI;
264 if (phi > M_PI) phi -= m_2pi;
265 dphi = phi - phi0;
266 if (omega < 0.0){
267 if (dphi > 0.0) dphi -= m_2pi;
268 if (dphi < -m_2pi) dphi += m_2pi;
269 }else{
270 if (dphi < 0.0) dphi += m_2pi;
271 if (dphi > m_2pi) dphi -= m_2pi;
272 }
273 lnew = dphi/omega;
274 // if ((lnew>circut)&&(segflg))lnew-=circum;
275 // if ((lnew>circut)&&(superseg))lnew-=circum;
276 if ((lnew>circut)&&(turnflag)) lnew -= circum; //FIXME attention
277
278 zh = Zh(lnew);
279 xd=xi+(zh-zi)*wx/wz; yd=yi+(zh-zi)*wy/wz; zd=zh;
280 // cout << " In Doca, xd = " << xd << " yd = " << yd << " zh = " << zh;
281 // cout << " lnew = " << lnew << endl;
282 dlen=fabs(lnew-len); len=lnew;
283 // if (segflg)break;
284 //std::cout<< __FILE__ << __LINE__<<" Doca() dlen " << dlen<< " zh "<<zh<<" >?"
285 //<<MdcxParameters::maxMdcZLen<<std::endl;
286 if (fabs(zh) > MdcxParameters::maxMdcZLen) break; //FIXME attention
287 if ( (0.0==wx) && (0.0==wy) )break; if (dlen < 0.000001)break; itry--;
288 } else {
289 len = (xi-xref)*cphi0 + (yi-yref)*sphi0;
290 zh = z0 + tanl*len;
291 phi = phi0;
292 break;
293 }
294 }
295 // Hep3Vector Dvec(xd,yd,zd);
296 xh = Xh(len); yh = Yh(len);
297 Hep3Vector hvec(xh, yh, zh);
298// cout << " In Doca, xh = " << xh << " yh = " << yh << " zh = " << zh << " len=" << len << " om " << omega << endl;
299 double lamb = atan(tanl);
300 cosl = cos(lamb); sinl = sin(lamb);
301 tx = cosl*cos(phi); ty = cosl*sin(phi); tz = sinl;
302 tvec = Hep3Vector(tx, ty, tz);
303 Hep3Vector vvec = wvec.cross(tvec);
304 vhat = vvec.unit(); vx = vhat.x(); vy = vhat.y(); vz = vhat.z();
305 // cout << " In Doca, vx = " << vx << " vy = " << vy << " vz = " << vz << endl;
306 dvec = ivec - hvec;
307 double doca = dvec*vhat;
308 // cout << " doca = " << doca << endl;
309 double f1 = dvec*tvec; double f2 = wvec*tvec; double f3 = dvec*wvec;
310 f0 = (f1 - f2*f3) / (1.0 - f2*f2);
311 samb = (doca > 0.0) ? -1 : +1;
312 double wirephi = atan2(yd, xd);
313 eang = BesAngle(phi-wirephi);
314 wamb = (fabs(eang) < Constants::pi/2) ? samb : -samb;
315 //std::cout<< __FILE__ << __LINE__<<" Doca() dlen " << dlen<< " zh "<<zh<<" >?"
316 //<<MdcxParameters::maxMdcZLen<<std::endl;
317 if (fabs(zh) > MdcxParameters::maxMdcZLen) doca = 1000.0; ///FIXME
318 //if(doca == 1000.0) cout << " In Doca, zh = " << zh << " len=" << len << " om " << omega <<" "<< ominfl<<
319 //" z0 " << z0 << "tanl " << tanl <<endl;
320 //cout << " doca = " << doca << endl;
321 return doca;
322}//endof Doca
TFile * f1
static const double pi
Definition Constants.h:38
double eang
Definition MdcxHel.h:164
Hep3Vector tvec
Definition MdcxHel.h:163
int wamb
Definition MdcxHel.h:164
double tz
Definition MdcxHel.h:162
Hep3Vector dvec
Definition MdcxHel.h:163
Hep3Vector wvec
Definition MdcxHel.h:163
double zh
Definition MdcxHel.h:162
Hep3Vector vhat
Definition MdcxHel.h:163
double Yh(double l) const
Definition MdcxHel.cxx:94
double Zh(double l) const
Definition MdcxHel.cxx:103
double Xh(double l) const
Definition MdcxHel.cxx:85
double sinl
Definition MdcxHel.h:162
int samb
Definition MdcxHel.h:164
static const double maxMdcZLen

Referenced by MdcxHit::d(), derivatives(), Doca(), MdcxFindTracks::drophits(), MdcxFindTracks::process(), MdcxHit::pull(), MdcxHit::residual(), and MdcxFindTracks::resout().

◆ Doca_Eang()

double MdcxHel::Doca_Eang ( ) const
inline

Definition at line 71 of file MdcxHel.h.

71{return eang;}

Referenced by MdcxHit::d(), MdcxHit::derivatives(), MdcxHit::pull(), and MdcxHit::residual().

◆ Doca_FLen()

double MdcxHel::Doca_FLen ( ) const
inline

Definition at line 66 of file MdcxHel.h.

66{return len*sqrt(1.0+tanl*tanl);}

◆ Doca_Len()

double MdcxHel::Doca_Len ( ) const
inline

Definition at line 65 of file MdcxHel.h.

65{return len;}

Referenced by MdcxAddHits::GetAssociates(), and MdcxFindTracks::process().

◆ Doca_Samb()

int MdcxHel::Doca_Samb ( ) const
inline

Definition at line 69 of file MdcxHel.h.

69{return samb;}

◆ Doca_Tof()

double MdcxHel::Doca_Tof ( ) const
inline

Definition at line 67 of file MdcxHel.h.

67{return len*sqrt(1.0+tanl*tanl)/MdcxParameters::c;}
static const double c
constants

Referenced by MdcxHit::d(), MdcxHit::derivatives(), MdcxHit::pull(), MdcxHit::residual(), and MdcxFindTracks::resout().

◆ Doca_Wamb()

int MdcxHel::Doca_Wamb ( ) const
inline

Definition at line 70 of file MdcxHel.h.

70{return wamb;}

Referenced by MdcxHit::d(), MdcxHit::derivatives(), MdcxHit::pull(), and MdcxHit::residual().

◆ Doca_Zh()

double MdcxHel::Doca_Zh ( ) const
inline

Definition at line 68 of file MdcxHel.h.

68{return zh;}

Referenced by MdcxHit::d(), MdcxHit::derivatives(), MdcxHit::pull(), MdcxHit::residual(), and MdcxFindTracks::resout().

◆ flip()

void MdcxHel::flip ( )

Definition at line 375 of file MdcxHel.cxx.

375 {
376 double m_2pi = 2.0*M_PI;
377 if (ominfl) {
378 if ( (fabs(d0) + 2.0/fabs(omega)) > 80.0 ) return;
379 double lturn = m_2pi/fabs(omega);
380 double zturn = Zh(lturn);
381 // cout << "z0 " << z0 << " zturn " << zturn << endl;
382 if (fabs(zturn) < fabs(z0)) {
383 z0 = zturn;
384 tanl = -tanl;
385 omega = -omega;
386 d0 = -d0;
387 phi0 = phi0 - M_PI;
388 if (phi0 < -M_PI) phi0 += m_2pi;
389 cphi0 = cos(phi0);
390 sphi0 = sin(phi0);
391 x0 = X0();
392 y0 = Y0();
393 }
394 }
395}//endof flip

Referenced by MdcxFindTracks::process().

◆ GetTurnFlag()

int MdcxHel::GetTurnFlag ( ) const
inline

Definition at line 116 of file MdcxHel.h.

116{return turnflag;}

Referenced by copy().

◆ Lmax()

double MdcxHel::Lmax ( ) const

FIXME

Definition at line 142 of file MdcxHel.cxx.

142 {
143 double lmax = MdcxParameters::maxTrkLength;
144 if (ominfl) {
145 double rmax = 1.0/fabs(omega);
146 double dmax = fabs(d0) + 2.0*rmax;
147 if (dmax > MdcxParameters::maxMdcRadius) lmax = M_PI*rmax; ///FIXME
148 }
149 return lmax;
150}//endof Lmax
static const double maxTrkLength
static const double maxMdcRadius
MDC Geometry.

Referenced by MdcxAddHits::GetAssociates(), and MdcxFindTracks::process().

◆ Mode()

int MdcxHel::Mode ( ) const
inline

Definition at line 73 of file MdcxHel.h.

73{return mode;}

Referenced by copy(), MdcxHit::pull(), and MdcxHit::residual().

◆ Nfree()

int MdcxHel::Nfree ( ) const
inline

Definition at line 75 of file MdcxHel.h.

75{return nfree;}

Referenced by copy().

◆ Omega()

double MdcxHel::Omega ( ) const
inline

◆ Omin()

double MdcxHel::Omin ( ) const
inline

Definition at line 72 of file MdcxHel.h.

72{return omin;}

Referenced by copy().

◆ Ominfl()

int MdcxHel::Ominfl ( ) const
inline

Definition at line 76 of file MdcxHel.h.

76{return ominfl;}

Referenced by copy(), and MdcxAddHits::GetAssociates().

◆ operator=()

MdcxHel & MdcxHel::operator= ( const MdcxHel & rhs)

Definition at line 193 of file MdcxHel.cxx.

193 {
194 copy(rhs);
195 return *this;
196}
void copy(const MdcxHel &hel)
Definition MdcxHel.cxx:219

◆ Phi0()

double MdcxHel::Phi0 ( ) const
inline

◆ print()

void MdcxHel::print ( ) const

Definition at line 357 of file MdcxHel.cxx.

357 {
358 cout << "MdcxHel(";
359 cout << d0<<",";
360 cout << phi0<<",";
361 cout << omega<<",";
362 cout << z0<<",";
363 cout << tanl<<")"<<endl;
364 cout << " t0 = " << t0 ;
365 cout << " nfree = " << nfree ;
366 cout << " (x0,y0) " << x0<<","<<y0;
367 cout << " (xc,yc) " << xc<<","<<yc;
368 cout << " (xref,yref) " << xref<<","<<yref;
369 cout << " code = " << code;
370 cout << " mode = " << mode;
371 cout << " ominfl = " << ominfl;
372 cout << " " << endl;
373}//endof print

Referenced by MdcxAddHits::GetAssociates(), MdcxFittedHel::IterateFit(), and MdcxFindTracks::process().

◆ Ptot()

double MdcxHel::Ptot ( double l = 0.0) const

Definition at line 134 of file MdcxHel.cxx.

134 {
135 if(ominfl) {
136 return 0.003*sqrt(1.0+tanl*tanl)/fabs(omega);
137 } else {
138 return 1000.0*sqrt(1.0+tanl*tanl);
139 }//ominfl
140}//endof Ptot

◆ Px()

double MdcxHel::Px ( double l = 0.0) const

pt=0.003*r (0.003 -> q*B)

Definition at line 107 of file MdcxHel.cxx.

107 {
108 if(ominfl) {
109 double phit = phi0 + omega*l;
110 return 0.003*cos(phit)/fabs(omega); /// pt=0.003*r (0.003 -> q*B)
111 } else {
112 return 1000.0*cphi0;
113 }//ominfl
114}//endof Px

◆ Py()

double MdcxHel::Py ( double l = 0.0) const

Definition at line 116 of file MdcxHel.cxx.

116 {
117 if(ominfl) {
118 double phit = phi0+omega*l;
119 return 0.003*sin(phit)/fabs(omega);
120 } else {
121 return 1000.0*sphi0;
122 }//ominfl
123}//endof Py

◆ Pz()

double MdcxHel::Pz ( double l = 0.0) const

Definition at line 125 of file MdcxHel.cxx.

125 {
126 if(ominfl) {
127 return 0.003*tanl/fabs(omega);
128 }
129 else{
130 return 1000.0*tanl;
131 }//ominfl
132}//endof Pz

◆ Qd0()

int MdcxHel::Qd0 ( ) const
inline

Definition at line 77 of file MdcxHel.h.

77{return qd0;}

Referenced by copy(), and SetD0().

◆ Qomega()

int MdcxHel::Qomega ( ) const
inline

Definition at line 79 of file MdcxHel.h.

79{return qomega;}

Referenced by copy(), and SetOmega().

◆ Qphi0()

int MdcxHel::Qphi0 ( ) const
inline

Definition at line 78 of file MdcxHel.h.

78{return qphi0;}

Referenced by copy(), and SetPhi0().

◆ Qt0()

int MdcxHel::Qt0 ( ) const
inline

Definition at line 82 of file MdcxHel.h.

82{return qt0;}

Referenced by copy(), and SetT0().

◆ Qtanl()

int MdcxHel::Qtanl ( ) const
inline

Definition at line 81 of file MdcxHel.h.

81{return qtanl;}

Referenced by copy(), and SetTanl().

◆ Qz0()

int MdcxHel::Qz0 ( ) const
inline

Definition at line 80 of file MdcxHel.h.

80{return qz0;}

Referenced by copy(), and SetZ0().

◆ SetD0()

void MdcxHel::SetD0 ( int n)

Definition at line 171 of file MdcxHel.cxx.

171 {
172 nfree = nfree + deltaq(qd0, Qd0);
173 code = code + deltaq(qd0, Qd0);
174 qd0 = Qd0;
175}
int Qd0() const
Definition MdcxHel.h:77
int deltaq(int i, int j) const
Definition MdcxHel.h:170

◆ SetMode()

void MdcxHel::SetMode ( int n)

Definition at line 154 of file MdcxHel.cxx.

154{ mode = n; }

◆ SetOmega()

void MdcxHel::SetOmega ( int n)

Definition at line 161 of file MdcxHel.cxx.

161 {
163 code = code + deltaq(qomega, Qomega)*100;
164 qomega = Qomega;
165}
int Qomega() const
Definition MdcxHel.h:79

◆ SetPhi0()

void MdcxHel::SetPhi0 ( int n)

Definition at line 166 of file MdcxHel.cxx.

166 {
168 code = code + deltaq(qphi0, Qphi0)*10;
169 qphi0 = Qphi0;
170}
int Qphi0() const
Definition MdcxHel.h:78

◆ SetRef()

void MdcxHel::SetRef ( double x,
double y )

Definition at line 156 of file MdcxHel.cxx.

156 {
157 xref = x;
158 yref = y;
159}
Double_t x[10]
double y[1000]

◆ SetT0()

void MdcxHel::SetT0 ( int n)

Definition at line 186 of file MdcxHel.cxx.

186 {
187 nfree = nfree + deltaq(qt0, Qt0);
188 code = code + deltaq(qt0, Qt0)*100000;
189 qt0 = Qt0;
190}
int Qt0() const
Definition MdcxHel.h:82

◆ SetTanl()

void MdcxHel::SetTanl ( int n)

Definition at line 176 of file MdcxHel.cxx.

176 {
178 code = code + deltaq(qtanl, Qtanl)*10000;
179 qtanl = Qtanl;
180}
int Qtanl() const
Definition MdcxHel.h:81

◆ SetTurnFlag()

void MdcxHel::SetTurnFlag ( const int & i)
inline

Definition at line 115 of file MdcxHel.h.

115{turnflag=i;}

Referenced by MdcxMergeDups::MdcxMergeDups(), MdcxFindSegs::trial(), and MdcxFindSegs::trial().

◆ SetZ0()

void MdcxHel::SetZ0 ( int n)

Definition at line 181 of file MdcxHel.cxx.

181 {
182 nfree = nfree + deltaq(qz0, Qz0);
183 code = code + deltaq(qz0, Qz0)*1000;
184 qz0 = Qz0;
185}
int Qz0() const
Definition MdcxHel.h:80

◆ SinPhi0()

double MdcxHel::SinPhi0 ( ) const
inline

Definition at line 64 of file MdcxHel.h.

64{return sphi0;}

Referenced by copy(), and MdcxFindTracks::TakeToOrigin().

◆ T0()

double MdcxHel::T0 ( ) const
inline

◆ Tanl()

double MdcxHel::Tanl ( ) const
inline

Definition at line 57 of file MdcxHel.h.

57{return tanl;}

Referenced by copy(), and MdcxFindTracks::TakeToOrigin().

◆ X()

double MdcxHel::X ( ) const
inline

Definition at line 58 of file MdcxHel.h.

58{return xref;}

◆ X0()

double MdcxHel::X0 ( ) const

Definition at line 77 of file MdcxHel.cxx.

77 {
78 return (xref - sphi0*d0);
79}//endof X0

Referenced by copy(), MdcxFittedHel::DoFit(), flip(), MdcxHel(), and MdcxFindTracks::process().

◆ Xc()

double MdcxHel::Xc ( ) const

Definition at line 59 of file MdcxHel.cxx.

59 {
60 if(ominfl) {
61 //return (X0() - sphi0/omega);
62 return (x0 - sphi0/omega);
63 } else {
64 return 999999999.9;
65 }//(ominfl)
66}//endof Xc

Referenced by copy(), MdcxFittedHel::DoFit(), MdcxAddHits::GetAssociates(), MdcxHel(), and MdcxFindTracks::process().

◆ Xh()

double MdcxHel::Xh ( double l) const

Definition at line 85 of file MdcxHel.cxx.

85 {
86 if(ominfl){
87 double phit=phi0+omega*l;
88 return (xc+sin(phit)/omega);
89 }else{
90 return (x0+cphi0*l-0.5*l*l*omega*sphi0);
91 }//ominfl
92}//endof Xh

Referenced by Doca(), and MdcxAddHits::GetAssociates().

◆ Xref()

double MdcxHel::Xref ( ) const
inline

Definition at line 59 of file MdcxHel.h.

59{return xref;}

Referenced by copy(), MdcxSeg::printSegAll(), and MdcxFindTracks::TakeToOrigin().

◆ Y()

double MdcxHel::Y ( ) const
inline

Definition at line 60 of file MdcxHel.h.

60{return yref;}

◆ Y0()

double MdcxHel::Y0 ( ) const

Definition at line 81 of file MdcxHel.cxx.

81 {
82 return (yref + cphi0*d0);
83}//endof Y0

Referenced by copy(), MdcxFittedHel::DoFit(), flip(), MdcxHel(), and MdcxFindTracks::process().

◆ Yc()

double MdcxHel::Yc ( ) const

Definition at line 68 of file MdcxHel.cxx.

68 {
69 if(ominfl) {
70 //return (Y0()+cphi0/omega);
71 return (y0 + cphi0/omega);
72 } else {
73 return 999999999.9;
74 }//(ominfl)
75}//endof Yc

Referenced by copy(), MdcxFittedHel::DoFit(), MdcxAddHits::GetAssociates(), MdcxHel(), and MdcxFindTracks::process().

◆ Yh()

double MdcxHel::Yh ( double l) const

Definition at line 94 of file MdcxHel.cxx.

94 {
95 if(ominfl){
96 double phit=phi0+omega*l;
97 return (yc-cos(phit)/omega);
98 }else{
99 return (y0+sphi0*l+0.5*l*l*omega*cphi0);
100 }//ominfl
101}//endof Yh

Referenced by Doca(), and MdcxAddHits::GetAssociates().

◆ Yref()

double MdcxHel::Yref ( ) const
inline

Definition at line 61 of file MdcxHel.h.

61{return yref;}

Referenced by copy(), MdcxSeg::printSegAll(), and MdcxFindTracks::TakeToOrigin().

◆ Z0()

double MdcxHel::Z0 ( ) const
inline

Definition at line 56 of file MdcxHel.h.

56{return z0;}

Referenced by copy(), and MdcxFindTracks::TakeToOrigin().

◆ Zh()

double MdcxHel::Zh ( double l) const

Definition at line 103 of file MdcxHel.cxx.

103 {
104 return (z0+tanl*l);
105}//endof Zh

Referenced by Doca(), and flip().

Member Data Documentation

◆ code

int MdcxHel::code
protected

Definition at line 137 of file MdcxHel.h.

Referenced by Code(), copy(), decode(), MdcxHel(), print(), SetD0(), SetOmega(), SetPhi0(), SetT0(), SetTanl(), and SetZ0().

◆ cosl

double MdcxHel::cosl
protected

Definition at line 162 of file MdcxHel.h.

Referenced by derivatives(), and Doca().

◆ cphi0

double MdcxHel::cphi0
protected

◆ d0

◆ dvec

Hep3Vector MdcxHel::dvec
protected

Definition at line 163 of file MdcxHel.h.

Referenced by Doca().

◆ eang

double MdcxHel::eang
protected

Definition at line 164 of file MdcxHel.h.

Referenced by Doca(), and Doca_Eang().

◆ f0

double MdcxHel::f0
protected

Definition at line 162 of file MdcxHel.h.

Referenced by derivatives(), and Doca().

◆ len

double MdcxHel::len
protected

Definition at line 162 of file MdcxHel.h.

Referenced by derivatives(), Doca(), Doca_FLen(), Doca_Len(), and Doca_Tof().

◆ mode

int MdcxHel::mode
protected

Definition at line 145 of file MdcxHel.h.

Referenced by copy(), derivatives(), Mode(), print(), and SetMode().

◆ nfree

◆ omega

◆ omin

double MdcxHel::omin
protected

Definition at line 158 of file MdcxHel.h.

Referenced by copy(), MdcxFittedHel::DoFit(), MdcxHel(), and Omin().

◆ ominfl

int MdcxHel::ominfl
protected

◆ phi

double MdcxHel::phi
protected

Definition at line 162 of file MdcxHel.h.

Referenced by derivatives(), and Doca().

◆ phi0

double MdcxHel::phi0
protected

◆ qd0

int MdcxHel::qd0
protected

Definition at line 147 of file MdcxHel.h.

Referenced by copy(), derivatives(), MdcxFittedHel::DoFit(), MdcxHel(), Qd0(), and SetD0().

◆ qomega

int MdcxHel::qomega
protected

Definition at line 149 of file MdcxHel.h.

Referenced by copy(), derivatives(), MdcxFittedHel::DoFit(), MdcxHel(), Qomega(), and SetOmega().

◆ qphi0

int MdcxHel::qphi0
protected

Definition at line 148 of file MdcxHel.h.

Referenced by copy(), derivatives(), MdcxFittedHel::DoFit(), MdcxHel(), Qphi0(), and SetPhi0().

◆ qt0

int MdcxHel::qt0
protected

Definition at line 152 of file MdcxHel.h.

Referenced by copy(), derivatives(), MdcxFittedHel::DoFit(), MdcxHel(), Qt0(), and SetT0().

◆ qtanl

int MdcxHel::qtanl
protected

Definition at line 151 of file MdcxHel.h.

Referenced by copy(), derivatives(), MdcxFittedHel::DoFit(), MdcxHel(), Qtanl(), and SetTanl().

◆ qz0

int MdcxHel::qz0
protected

Definition at line 150 of file MdcxHel.h.

Referenced by copy(), derivatives(), MdcxFittedHel::DoFit(), MdcxHel(), Qz0(), and SetZ0().

◆ samb

int MdcxHel::samb
protected

Definition at line 164 of file MdcxHel.h.

Referenced by Doca(), and Doca_Samb().

◆ sinl

double MdcxHel::sinl
protected

Definition at line 162 of file MdcxHel.h.

Referenced by Doca().

◆ sphi0

double MdcxHel::sphi0
protected

◆ t0

double MdcxHel::t0
protected

Definition at line 128 of file MdcxHel.h.

Referenced by copy(), MdcxFittedHel::DoFit(), print(), and T0().

◆ tanl

double MdcxHel::tanl
protected

◆ turnflag

int MdcxHel::turnflag
protected

Definition at line 155 of file MdcxHel.h.

Referenced by copy(), Doca(), GetTurnFlag(), MdcxHel(), and SetTurnFlag().

◆ tvec

Hep3Vector MdcxHel::tvec
protected

Definition at line 163 of file MdcxHel.h.

Referenced by Doca().

◆ tx

double MdcxHel::tx
protected

Definition at line 162 of file MdcxHel.h.

Referenced by derivatives(), and Doca().

◆ ty

double MdcxHel::ty
protected

Definition at line 162 of file MdcxHel.h.

Referenced by derivatives(), and Doca().

◆ tz

double MdcxHel::tz
protected

Definition at line 162 of file MdcxHel.h.

Referenced by Doca().

◆ vhat

Hep3Vector MdcxHel::vhat
protected

Definition at line 163 of file MdcxHel.h.

Referenced by Doca().

◆ vx

double MdcxHel::vx
protected

Definition at line 162 of file MdcxHel.h.

Referenced by derivatives(), and Doca().

◆ vy

double MdcxHel::vy
protected

Definition at line 162 of file MdcxHel.h.

Referenced by derivatives(), and Doca().

◆ vz

double MdcxHel::vz
protected

Definition at line 162 of file MdcxHel.h.

Referenced by derivatives(), and Doca().

◆ wamb

int MdcxHel::wamb
protected

Definition at line 164 of file MdcxHel.h.

Referenced by Doca(), and Doca_Wamb().

◆ wvec

Hep3Vector MdcxHel::wvec
protected

Definition at line 163 of file MdcxHel.h.

Referenced by Doca().

◆ x0

double MdcxHel::x0
protected

Definition at line 133 of file MdcxHel.h.

Referenced by copy(), derivatives(), MdcxFittedHel::DoFit(), flip(), MdcxHel(), print(), Xc(), and Xh().

◆ xc

double MdcxHel::xc
protected

Definition at line 135 of file MdcxHel.h.

Referenced by copy(), Doca(), MdcxFittedHel::DoFit(), MdcxHel(), print(), and Xh().

◆ xh

double MdcxHel::xh
protected

Definition at line 162 of file MdcxHel.h.

Referenced by derivatives(), and Doca().

◆ xref

double MdcxHel::xref
protected

Definition at line 129 of file MdcxHel.h.

Referenced by copy(), Doca(), print(), SetRef(), X(), X0(), MdcxSeg::Xline_bbrrf(), and Xref().

◆ y0

double MdcxHel::y0
protected

Definition at line 134 of file MdcxHel.h.

Referenced by copy(), derivatives(), MdcxFittedHel::DoFit(), flip(), MdcxHel(), print(), Yc(), and Yh().

◆ yc

double MdcxHel::yc
protected

Definition at line 136 of file MdcxHel.h.

Referenced by copy(), Doca(), MdcxFittedHel::DoFit(), MdcxHel(), print(), and Yh().

◆ yh

double MdcxHel::yh
protected

Definition at line 162 of file MdcxHel.h.

Referenced by derivatives(), and Doca().

◆ yref

double MdcxHel::yref
protected

Definition at line 130 of file MdcxHel.h.

Referenced by copy(), Doca(), print(), SetRef(), Y(), Y0(), MdcxSeg::Yline_bbrrf(), and Yref().

◆ z0

double MdcxHel::z0
protected

Definition at line 126 of file MdcxHel.h.

Referenced by copy(), Doca(), MdcxFittedHel::DoFit(), MdcxFittedHel::FitPrint(), flip(), print(), Z0(), and Zh().

◆ zh

double MdcxHel::zh
protected

Definition at line 162 of file MdcxHel.h.

Referenced by Doca(), and Doca_Zh().


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