BOSS 8.0.0
BESIII Offline Software System
Loading...
Searching...
No Matches
MdcxFittedHel Class Reference

#include <MdcxFittedHel.h>

Inheritance diagram for MdcxFittedHel:

Public Member Functions

 MdcxFittedHel ()
 MdcxFittedHel (HepAList< MdcxHit > &XHitList, MdcxHel &hel, double Sfac=1.0)
virtual ~MdcxFittedHel ()
float Chisq () const
float Rcs () const
float Prob () const
float Fittime () const
int Nhits () const
int Itofit () const
int Quality () const
int Origin () const
double Sfac () const
void SetQuality (const int &q)
void SetUsedOnHel (const int &i)
int GetUsedOnHel () const
int SuperLayer (int hitno=0) const
int Layer (int hitno=0) const
const HepAList< MdcxHit > & XHitList () const
float Residual (int i)
float Pull (int i)
int Fail (float Probmin=0.0) const
int ReFit ()
int FitPrint ()
int FitPrint (MdcxHel &hel, std::ostream &o)
void VaryRes ()
MdcxFittedHeloperator= (const MdcxHel &)
MdcxFittedHeloperator= (const MdcxFittedHel &)
MdcxFittedHelGrow (const MdcxFittedHel &, const HepAList< MdcxHit > &)
void SetBailOut (int i)
void SetChiDofBail (float r)
void SetNiter (int i)
 MdcxFittedHel ()
 MdcxFittedHel (HepAList< MdcxHit > &XHitList, MdcxHel &hel, double Sfac=1.0)
virtual ~MdcxFittedHel ()
float Chisq () const
float Rcs () const
float Prob () const
float Fittime () const
int Nhits () const
int Itofit () const
int Quality () const
int Origin () const
double Sfac () const
void SetQuality (const int &q)
void SetUsedOnHel (const int &i)
int GetUsedOnHel () const
int SuperLayer (int hitno=0) const
int Layer (int hitno=0) const
const HepAList< MdcxHit > & XHitList () const
float Residual (int i)
float Pull (int i)
int Fail (float Probmin=0.0) const
int ReFit ()
int FitPrint ()
int FitPrint (MdcxHel &hel, std::ostream &o)
void VaryRes ()
MdcxFittedHeloperator= (const MdcxHel &)
MdcxFittedHeloperator= (const MdcxFittedHel &)
MdcxFittedHelGrow (const MdcxFittedHel &, const HepAList< MdcxHit > &)
void SetBailOut (int i)
void SetChiDofBail (float r)
void SetNiter (int i)
 MdcxFittedHel ()
 MdcxFittedHel (HepAList< MdcxHit > &XHitList, MdcxHel &hel, double Sfac=1.0)
virtual ~MdcxFittedHel ()
float Chisq () const
float Rcs () const
float Prob () const
float Fittime () const
int Nhits () const
int Itofit () const
int Quality () const
int Origin () const
double Sfac () const
void SetQuality (const int &q)
void SetUsedOnHel (const int &i)
int GetUsedOnHel () const
int SuperLayer (int hitno=0) const
int Layer (int hitno=0) const
const HepAList< MdcxHit > & XHitList () const
float Residual (int i)
float Pull (int i)
int Fail (float Probmin=0.0) const
int ReFit ()
int FitPrint ()
int FitPrint (MdcxHel &hel, std::ostream &o)
void VaryRes ()
MdcxFittedHeloperator= (const MdcxHel &)
MdcxFittedHeloperator= (const MdcxFittedHel &)
MdcxFittedHelGrow (const MdcxFittedHel &, const HepAList< MdcxHit > &)
void SetBailOut (int i)
void SetChiDofBail (float r)
void SetNiter (int i)
Public Member Functions inherited from MdcxHel
 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 &)
 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 &)
 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 &)

Static Public Attributes

static int debug = 0

Protected Member Functions

int DoFit ()
int IterateFit ()
int DoFit ()
int IterateFit ()
int DoFit ()
int IterateFit ()
Protected Member Functions inherited from MdcxHel
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)
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)
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

int fail
float chisq
float rcs
float prob
float fittime
int nhits
int itofit
int quality
int origin
HepAList< MdcxHitxHitList
double sfac
int usedonhel
Protected Attributes inherited from MdcxHel
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

Constructor & Destructor Documentation

◆ MdcxFittedHel() [1/6]

MdcxFittedHel::MdcxFittedHel ( )

Definition at line 60 of file MdcxFittedHel.cxx.

60{ basics(); }

Referenced by FitPrint(), Grow(), MdcxSeg::MdcxSeg(), operator=(), and operator=().

◆ MdcxFittedHel() [2/6]

MdcxFittedHel::MdcxFittedHel ( HepAList< MdcxHit > & XHitList,
MdcxHel & hel,
double Sfac = 1.0 )

◆ ~MdcxFittedHel() [1/3]

MdcxFittedHel::~MdcxFittedHel ( )
virtual

Definition at line 71 of file MdcxFittedHel.cxx.

71{} // endof ~MdcxFittedHel

◆ MdcxFittedHel() [3/6]

MdcxFittedHel::MdcxFittedHel ( )

◆ MdcxFittedHel() [4/6]

MdcxFittedHel::MdcxFittedHel ( HepAList< MdcxHit > & XHitList,
MdcxHel & hel,
double Sfac = 1.0 )

◆ ~MdcxFittedHel() [2/3]

virtual MdcxFittedHel::~MdcxFittedHel ( )
virtual

◆ MdcxFittedHel() [5/6]

MdcxFittedHel::MdcxFittedHel ( )

◆ MdcxFittedHel() [6/6]

MdcxFittedHel::MdcxFittedHel ( HepAList< MdcxHit > & XHitList,
MdcxHel & hel,
double Sfac = 1.0 )

◆ ~MdcxFittedHel() [3/3]

virtual MdcxFittedHel::~MdcxFittedHel ( )
virtual

Member Function Documentation

◆ Chisq() [1/3]

◆ Chisq() [2/3]

float MdcxFittedHel::Chisq ( ) const
inline

◆ Chisq() [3/3]

float MdcxFittedHel::Chisq ( ) const
inline

◆ DoFit() [1/3]

int MdcxFittedHel::DoFit ( )
protected

Definition at line 229 of file MdcxFittedHel.cxx.

229 {
230 int ftemp = 1301;
231 // if(nfree>nhits) {return Fail;}
232 if ( nfree > nhits ) return ftemp;
233 double m_2pi = 2.0 * M_PI;
234 ftemp = 0;
235 // pointloop
236 if ( 6 == debug )
237 {
238 std::cout << "in MdcxFittedHel::DoFit() nfree = " << nfree << " nhits = " << nhits
239 << std::endl;
240 }
241
242 int norder = nfree;
243 double A[10][10] = { { 0. } }, B[10] = { 0. }, D[10] = { 0. }, det;
244 chisq = 0.0;
245
246 if ( 6 == debug )
247 {
248 std::cout << "xHitList.length " << xHitList.length() << " ";
249 for ( int ii = 0; ii < xHitList.length(); ii++ ) { xHitList[ii]->print( std::cout, ii ); }
250 std::cout << std::endl << "sfac = " << sfac << std::endl;
251 }
252
253 for ( int i = 0; i < nhits; i++ )
254 {
255 std::vector<float> derivs = xHitList[i]->derivatives( *this );
256 if ( 6 == debug )
257 {
258 cout << "derivs " << i << " ";
259 for ( unsigned int ii = 0; ii < derivs.size(); ii++ )
260 { cout << setw( 15 ) << derivs[ii]; }
261 std::cout << std::endl;
262 }
263 if ( sfac != 1.0 )
264 {
265 for ( unsigned int ipar = 0; ipar < derivs.size(); ipar++ )
266 {
267 derivs[ipar] /= sfac;
268 if ( 6 == debug ) cout << " derivs[" << ipar << "] = " << derivs[ipar];
269 }
270 if ( 6 == debug ) std::cout << std::endl;
271 }
272 chisq += derivs[0] * derivs[0];
273 // outer parameter loop
274 for ( int ipar = 0; ipar < norder; ipar++ )
275 {
276 D[ipar] += derivs[0] * derivs[ipar + 1];
277 // inner parameter loop
278 for ( int jpar = 0; jpar < norder; jpar++ )
279 { A[ipar][jpar] += derivs[ipar + 1] * derivs[jpar + 1]; } // endof inner parameter loop
280 } // endof outer parameter loop
281 } // pointloop
282 if ( 6 == debug ) cout << "chisq = " << chisq << endl;
283 if ( chisq == 0 && nhits != 3 )
284 { // zoujh: chisq is invalid??? FIXME
285 ftemp = 1310;
286 return ftemp;
287 }
288 if ( 6 == debug )
289 {
290 for ( int ii = 0; ii < norder; ii++ )
291 {
292 cout << "D[" << ii << "]: " << D[ii] << " A:";
293 for ( int jj = 0; jj < norder; jj++ ) cout << " " << A[ii][jj];
294 cout << endl;
295 }
296 }
297 // invert A
298 int ierr;
299 if ( bailout )
300 {
301 ftemp = 1308; // bailout
302 int ndof = nhits - nfree;
303 if ( ndof > 0 )
304 {
305 if ( 6 == debug )
306 {
307 cout << "chisq " << chisq << " ndof " << ndof << " chiperdof " << chisq / ndof
308 << " >?chidofbail " << chidofbail << endl;
309 }
310 float chiperdof = chisq / ndof;
311 if ( chiperdof > chidofbail ) return ftemp;
312 }
313 else
314 {
315 if ( 6 == debug )
316 {
317 cout << " ndof <=0 : chisq " << chisq << " >? chidofbail/2.5 " << chidofbail / 2.5
318 << endl;
319 }
320 if ( chisq > chidofbail / 2.5 ) return ftemp; // FIXME
321 }
322 } // (bailout)
323 ftemp = 0;
324 ierr = Mdcxmatinv( &A[0][0], &norder, &det );
325 if ( 6 == debug ) cout << "ierr = " << ierr << endl;
326 if ( ierr == 0 )
327 {
328 for ( int ii = 0; ii < norder; ii++ )
329 for ( int jj = 0; jj < norder; jj++ ) B[ii] += A[ii][jj] * D[jj];
330 if ( 6 == debug )
331 {
332 for ( int ii = 0; ii < norder; ii++ )
333 {
334 cout << "B[" << ii << "]: " << B[ii] << " A:";
335 for ( int jj = 0; jj < norder; jj++ ) cout << " " << A[ii][jj];
336 cout << endl;
337 }
338 }
339 int bump = -1;
340 if ( qd0 ) d0 -= B[++bump];
341 if ( qphi0 )
342 {
343 phi0 -= B[++bump];
344 if ( phi0 > M_PI ) phi0 -= m_2pi;
345 if ( phi0 < -M_PI ) phi0 += m_2pi;
346 cphi0 = cos( phi0 );
347 sphi0 = sin( phi0 );
348 }
349 if ( qomega )
350 {
351 omega -= B[++bump];
352 ominfl = ( fabs( omega ) < omin ) ? 0 : 1;
353 }
354 if ( qz0 ) z0 -= B[++bump];
355 if ( qtanl ) tanl -= B[++bump];
356 if ( qt0 ) t0 -= B[++bump];
357
358 x0 = X0();
359 y0 = Y0();
360 xc = Xc();
361 yc = Yc();
362 if ( fabs( d0 ) > MdcxParameters::maxMdcRadius ) ftemp = 1305;
363 // if(g_fitOmega)g_fitOmega->fill(omega);
364 if ( fabs( omega ) > 10.0 ) ftemp = 1306; // Too tight (r < 1 cm)//yzhang FIXME 2009-11-03
365 }
366 else { ftemp = ierr; }
367 return ftemp;
368} // endof DoFit
int Mdcxmatinv(double *array, int *norder, double *det)
Definition Mdcxmatinv.cxx:7
#define M_PI
Definition TConstant.h:4
double X0() const
Definition MdcxHel.cxx:85
double Yc() const
Definition MdcxHel.cxx:76
double Xc() const
Definition MdcxHel.cxx:67
double Y0() const
Definition MdcxHel.cxx:87

Referenced by IterateFit().

◆ DoFit() [2/3]

int MdcxFittedHel::DoFit ( )
protected

◆ DoFit() [3/3]

int MdcxFittedHel::DoFit ( )
protected

◆ Fail() [1/3]

int MdcxFittedHel::Fail ( float Probmin = 0.0) const

Definition at line 161 of file MdcxFittedHel.cxx.

161 {
162 if ( fail ) return fail;
163 if ( prob < Probmin ) return 1303;
164 // now done in DoFit if(fabs(omega)>omegmax) {return 1306;}
165 return 0;
166} // endof Fail

Referenced by Grow(), MdcxMergeDups::MdcxMergeDups(), operator=(), and MdcxFindTracks::process().

◆ Fail() [2/3]

int MdcxFittedHel::Fail ( float Probmin = 0.0) const

◆ Fail() [3/3]

int MdcxFittedHel::Fail ( float Probmin = 0.0) const

◆ FitPrint() [1/6]

int MdcxFittedHel::FitPrint ( )

Definition at line 385 of file MdcxFittedHel.cxx.

385 {
386 cout << " d0 " << d0;
387 cout << " phi0 " << phi0;
388 cout << " omega " << omega;
389 cout << " z0 " << z0;
390 cout << " tanl " << tanl << endl;
391 cout << " fail " << fail;
392 cout << " chisq " << chisq;
393 cout << " iter to fit " << itofit;
394 cout << " sfac " << sfac;
395 cout << " rcs " << rcs;
396 cout << " prob " << prob;
397 cout << " fittime " << fittime << endl;
398 cout << " nhits= " << nhits << " xHitList.length " << xHitList.length() << endl;
399 for ( int ii = 0; ii < xHitList.length(); ii++ ) { xHitList[ii]->print( cout, ii ); }
400 cout << endl;
401
402 return 0;
403} // endof FitPrint

Referenced by MdcxFindTracks::process(), and MdcxFindTracks::resout().

◆ FitPrint() [2/6]

int MdcxFittedHel::FitPrint ( )

◆ FitPrint() [3/6]

int MdcxFittedHel::FitPrint ( )

◆ FitPrint() [4/6]

int MdcxFittedHel::FitPrint ( MdcxHel & hel,
std::ostream & o )

◆ FitPrint() [5/6]

int MdcxFittedHel::FitPrint ( MdcxHel & hel,
std::ostream & o )

◆ FitPrint() [6/6]

int MdcxFittedHel::FitPrint ( MdcxHel & hel,
std::ostream & o )

◆ Fittime() [1/3]

float MdcxFittedHel::Fittime ( ) const
inline

Definition at line 48 of file InstallArea/x86_64-el9-gcc13-dbg/include/MdcxReco/MdcxFittedHel.h.

48{ return fittime; }

Referenced by operator=().

◆ Fittime() [2/3]

float MdcxFittedHel::Fittime ( ) const
inline

◆ Fittime() [3/3]

float MdcxFittedHel::Fittime ( ) const
inline

◆ GetUsedOnHel() [1/3]

int MdcxFittedHel::GetUsedOnHel ( ) const
inline

◆ GetUsedOnHel() [2/3]

int MdcxFittedHel::GetUsedOnHel ( ) const
inline

◆ GetUsedOnHel() [3/3]

int MdcxFittedHel::GetUsedOnHel ( ) const
inline

◆ Grow() [1/3]

MdcxFittedHel & MdcxFittedHel::Grow ( const MdcxFittedHel & rhs,
const HepAList< MdcxHit > & ListOAdds )

Definition at line 100 of file MdcxFittedHel.cxx.

101 {
102 copy( rhs );
103 fail = rhs.Fail();
104 chisq = rhs.Chisq();
105 // rcs=rhs.Rcs();
106 // prob=rhs.Prob();
107 fittime = 0.0;
108 nhits = rhs.Nhits();
109 itofit = 0;
110 quality = rhs.Quality();
111 origin = rhs.Origin();
112 xHitList = rhs.XHitList();
113 sfac = rhs.Sfac();
114 usedonhel = rhs.GetUsedOnHel();
115 bailout = 1;
116 chidofbail = 1200.0;
117 niter = 10;
118 int kkk = 0;
119 while ( ListOAdds[kkk] )
120 {
121 ListOAdds[kkk]->SetUsedOnHel( 0 );
122 kkk++;
123 }
124 kkk = 0;
125 while ( xHitList[kkk] )
126 {
127 xHitList[kkk]->SetUsedOnHel( 1 );
128 kkk++;
129 }
130 double spull;
131 MdcxHel* temp = (MdcxHel*)( &rhs );
132 kkk = 0;
133 while ( ListOAdds[kkk] )
134 {
135 if ( ListOAdds[kkk]->GetUsedOnHel() == 0 )
136 {
137 spull = ListOAdds[kkk]->pull( *temp ) / sfac;
138 chisq += spull * spull;
139 xHitList.append( ListOAdds[kkk] );
140 nhits++;
141 }
142 kkk++;
143 }
144
145 int ndof = nhits - nfree;
146 prob = Mdcxprobab( ndof, chisq );
147 rcs = chisq / ndof;
148 return *this;
149} // endof MdcxFittedHel::Grow
float Mdcxprobab(int &ndof, float &chisq)
Definition Mdcxprobab.cxx:4
int Fail(float Probmin=0.0) const
void copy(const MdcxHel &hel)
Definition MdcxHel.cxx:226
MdcxHel()
Definition MdcxHel.cxx:32

Referenced by MdcxFindTracks::process().

◆ Grow() [2/3]

MdcxFittedHel & MdcxFittedHel::Grow ( const MdcxFittedHel & ,
const HepAList< MdcxHit > &  )

◆ Grow() [3/3]

MdcxFittedHel & MdcxFittedHel::Grow ( const MdcxFittedHel & ,
const HepAList< MdcxHit > &  )

◆ IterateFit() [1/3]

int MdcxFittedHel::IterateFit ( )
protected

FIXME

Definition at line 180 of file MdcxFittedHel.cxx.

180 {
181 int ftemp = 1301; // not enough hits
182 if ( nfree > nhits ) return ftemp;
183 ftemp = 0;
184
185 if ( 6 == debug ) std::cout << "IterateFit niter=" << niter << std::endl;
186 if ( niter >= 1 )
187 {
188 float prevchisq = 0.0;
189 for ( int i = 0; i < niter; i++ )
190 {
191 itofit = i + 1;
192 ftemp = DoFit();
193 if ( 6 == debug )
194 {
195 if ( nfree == 5 )
196 {
197 cout << " iteration number= " << i << " chisq= " << chisq;
198 cout << " nhits= " << nhits << " "
199 << " fail= " << ftemp << endl;
200 }
201 print();
202 }
203 if ( ftemp != 0 ) break;
204 if ( 6 == debug )
205 std::cout << "in MdcxFittedHel::IterateFit() chisq=" << chisq
206 << " prechi2=" << prevchisq << std::endl; // yzhang debug
207 if ( ( fabs( chisq - prevchisq ) < 0.01 * chisq ) || ( chisq < 0.001 ) ) break; /// FIXME
208 prevchisq = chisq;
209 } // endof iter loop
210 }
211 else
212 {
213 float prevchisq = 0.0;
214 chisq = 1000000.0;
215 int iter = 0;
216 while ( ( fabs( chisq - prevchisq ) > 0.01 ) && ( iter++ < 1000 ) )
217 {
218 prevchisq = chisq;
219 ftemp = DoFit();
220 if ( ftemp != 0 ) break;
221 } // endof (fabs(chisq-oldchisq).gt.0.01)
222 } // endof (niter>=1)
223 int ndof = nhits - nfree;
224 prob = Mdcxprobab( ndof, chisq );
225 rcs = chisq / ndof;
226 return ftemp;
227} // endof IterateFit
EvtStreamInputIterator< typename Generator::result_type > iter(Generator gen, int N=0)
void print() const
Definition MdcxHel.cxx:403

Referenced by MdcxFittedHel(), and ReFit().

◆ IterateFit() [2/3]

int MdcxFittedHel::IterateFit ( )
protected

◆ IterateFit() [3/3]

int MdcxFittedHel::IterateFit ( )
protected

◆ Itofit() [1/3]

int MdcxFittedHel::Itofit ( ) const
inline

Definition at line 50 of file InstallArea/x86_64-el9-gcc13-dbg/include/MdcxReco/MdcxFittedHel.h.

50{ return itofit; }

Referenced by operator=().

◆ Itofit() [2/3]

int MdcxFittedHel::Itofit ( ) const
inline

◆ Itofit() [3/3]

int MdcxFittedHel::Itofit ( ) const
inline

◆ Layer() [1/3]

int MdcxFittedHel::Layer ( int hitno = 0) const

Definition at line 421 of file MdcxFittedHel.cxx.

421 {
422 if ( hitno >= nhits ) return 0;
423 return xHitList[hitno]->Layer();
424} // endof Layer

Referenced by MdcxFindTracks::process().

◆ Layer() [2/3]

int MdcxFittedHel::Layer ( int hitno = 0) const

◆ Layer() [3/3]

int MdcxFittedHel::Layer ( int hitno = 0) const

◆ Nhits() [1/3]

◆ Nhits() [2/3]

int MdcxFittedHel::Nhits ( ) const
inline

◆ Nhits() [3/3]

int MdcxFittedHel::Nhits ( ) const
inline

◆ operator=() [1/6]

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

Definition at line 79 of file MdcxFittedHel.cxx.

79 {
80 // FIXME
81 copy( rhs );
82 fail = rhs.Fail();
83 chisq = rhs.Chisq();
84 rcs = rhs.Rcs();
85 prob = rhs.Prob();
86 fittime = rhs.Fittime();
87 nhits = rhs.Nhits();
88 itofit = rhs.Itofit();
89 quality = rhs.Quality();
90 origin = rhs.Origin();
91 xHitList = rhs.XHitList();
92 sfac = rhs.Sfac();
93 usedonhel = rhs.GetUsedOnHel();
94 bailout = 1;
95 chidofbail = 1200.0;
96 niter = 10;
97 return *this;
98} // endof MdcxFittedHel::operator=

◆ operator=() [2/6]

MdcxFittedHel & MdcxFittedHel::operator= ( const MdcxFittedHel & )

◆ operator=() [3/6]

MdcxFittedHel & MdcxFittedHel::operator= ( const MdcxFittedHel & )

◆ operator=() [4/6]

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

Definition at line 74 of file MdcxFittedHel.cxx.

74 {
75 copy( rhs );
76 return *this;
77} // endof MdcxFittedHel::operator=

◆ operator=() [5/6]

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

◆ operator=() [6/6]

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

◆ Origin() [1/3]

int MdcxFittedHel::Origin ( ) const
inline

◆ Origin() [2/3]

int MdcxFittedHel::Origin ( ) const
inline

◆ Origin() [3/3]

int MdcxFittedHel::Origin ( ) const
inline

◆ Prob() [1/3]

float MdcxFittedHel::Prob ( ) const
inline

◆ Prob() [2/3]

float MdcxFittedHel::Prob ( ) const
inline

◆ Prob() [3/3]

float MdcxFittedHel::Prob ( ) const
inline

◆ Pull() [1/3]

float MdcxFittedHel::Pull ( int i)

Definition at line 159 of file MdcxFittedHel.cxx.

159{ return xHitList[i]->pull( *this ); } // endof Pulls

◆ Pull() [2/3]

float MdcxFittedHel::Pull ( int i)

◆ Pull() [3/3]

float MdcxFittedHel::Pull ( int i)

◆ Quality() [1/3]

int MdcxFittedHel::Quality ( ) const
inline

Definition at line 51 of file InstallArea/x86_64-el9-gcc13-dbg/include/MdcxReco/MdcxFittedHel.h.

51{ return quality; }

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

◆ Quality() [2/3]

int MdcxFittedHel::Quality ( ) const
inline

◆ Quality() [3/3]

int MdcxFittedHel::Quality ( ) const
inline

◆ Rcs() [1/3]

float MdcxFittedHel::Rcs ( ) const
inline

◆ Rcs() [2/3]

float MdcxFittedHel::Rcs ( ) const
inline

◆ Rcs() [3/3]

float MdcxFittedHel::Rcs ( ) const
inline

◆ ReFit() [1/3]

int MdcxFittedHel::ReFit ( )

Definition at line 175 of file MdcxFittedHel.cxx.

175 {
176 fail = IterateFit();
177 return fail;
178} // endof ReFit

Referenced by MdcxFindTracks::process().

◆ ReFit() [2/3]

int MdcxFittedHel::ReFit ( )

◆ ReFit() [3/3]

int MdcxFittedHel::ReFit ( )

◆ Residual() [1/3]

float MdcxFittedHel::Residual ( int i)

Definition at line 152 of file MdcxFittedHel.cxx.

152 {
153 // float pull=xHitList[i]->pull(*this);
154 // float E=xHitList[i]->e();
155 // return pull*E;
156 return xHitList[i]->residual( *this );
157} // endof Residual

◆ Residual() [2/3]

float MdcxFittedHel::Residual ( int i)

◆ Residual() [3/3]

float MdcxFittedHel::Residual ( int i)

◆ SetBailOut() [1/3]

void MdcxFittedHel::SetBailOut ( int i)
inline

Definition at line 115 of file InstallArea/x86_64-el9-gcc13-dbg/include/MdcxReco/MdcxFittedHel.h.

115{ bailout = i; }

◆ SetBailOut() [2/3]

void MdcxFittedHel::SetBailOut ( int i)
inline

Definition at line 115 of file InstallArea/x86_64-el9-gcc13-opt/include/MdcxReco/MdcxFittedHel.h.

115{ bailout = i; }

◆ SetBailOut() [3/3]

void MdcxFittedHel::SetBailOut ( int i)
inline

Definition at line 115 of file Reconstruction/MdcPatRec/MdcxReco/include/MdcxReco/MdcxFittedHel.h.

115{ bailout = i; }

◆ SetChiDofBail() [1/3]

void MdcxFittedHel::SetChiDofBail ( float r)
inline

Definition at line 116 of file InstallArea/x86_64-el9-gcc13-dbg/include/MdcxReco/MdcxFittedHel.h.

116{ chidofbail = r; }

◆ SetChiDofBail() [2/3]

void MdcxFittedHel::SetChiDofBail ( float r)
inline

Definition at line 116 of file InstallArea/x86_64-el9-gcc13-opt/include/MdcxReco/MdcxFittedHel.h.

116{ chidofbail = r; }

◆ SetChiDofBail() [3/3]

void MdcxFittedHel::SetChiDofBail ( float r)
inline

Definition at line 116 of file Reconstruction/MdcPatRec/MdcxReco/include/MdcxReco/MdcxFittedHel.h.

116{ chidofbail = r; }

◆ SetNiter() [1/3]

void MdcxFittedHel::SetNiter ( int i)
inline

Definition at line 117 of file InstallArea/x86_64-el9-gcc13-dbg/include/MdcxReco/MdcxFittedHel.h.

117{ niter = i; }

◆ SetNiter() [2/3]

void MdcxFittedHel::SetNiter ( int i)
inline

Definition at line 117 of file InstallArea/x86_64-el9-gcc13-opt/include/MdcxReco/MdcxFittedHel.h.

117{ niter = i; }

◆ SetNiter() [3/3]

void MdcxFittedHel::SetNiter ( int i)
inline

Definition at line 117 of file Reconstruction/MdcPatRec/MdcxReco/include/MdcxReco/MdcxFittedHel.h.

117{ niter = i; }

◆ SetQuality() [1/3]

void MdcxFittedHel::SetQuality ( const int & q)
inline

Definition at line 54 of file InstallArea/x86_64-el9-gcc13-dbg/include/MdcxReco/MdcxFittedHel.h.

54{ quality = q; }
****INTEGER imax DOUBLE PRECISION m_pi *DOUBLE PRECISION m_amfin DOUBLE PRECISION m_Chfin DOUBLE PRECISION m_Xenph DOUBLE PRECISION m_sinw2 DOUBLE PRECISION m_GFermi DOUBLE PRECISION m_MfinMin DOUBLE PRECISION m_ta2 INTEGER m_out INTEGER m_KeyFSR INTEGER m_KeyQCD *COMMON c_Semalib $ !copy of input $ !CMS energy $ !beam mass $ !final mass $ !beam charge $ !final charge $ !smallest final mass $ !Z mass $ !Z width $ !EW mixing angle $ !Gmu Fermi $ alphaQED at q
Definition KKsem.h:33

◆ SetQuality() [2/3]

void MdcxFittedHel::SetQuality ( const int & q)
inline

◆ SetQuality() [3/3]

void MdcxFittedHel::SetQuality ( const int & q)
inline

◆ SetUsedOnHel() [1/3]

void MdcxFittedHel::SetUsedOnHel ( const int & i)
inline

◆ SetUsedOnHel() [2/3]

void MdcxFittedHel::SetUsedOnHel ( const int & i)
inline

◆ SetUsedOnHel() [3/3]

void MdcxFittedHel::SetUsedOnHel ( const int & i)
inline

◆ Sfac() [1/3]

double MdcxFittedHel::Sfac ( ) const
inline

Definition at line 53 of file InstallArea/x86_64-el9-gcc13-dbg/include/MdcxReco/MdcxFittedHel.h.

53{ return sfac; }

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

◆ Sfac() [2/3]

double MdcxFittedHel::Sfac ( ) const
inline

◆ Sfac() [3/3]

double MdcxFittedHel::Sfac ( ) const
inline

◆ SuperLayer() [1/3]

int MdcxFittedHel::SuperLayer ( int hitno = 0) const

Definition at line 427 of file MdcxFittedHel.cxx.

427 {
428 if ( hitno >= nhits ) { return 0; }
429 if ( hitno < 0 ) { return 0; }
430 return xHitList[hitno]->SuperLayer();
431} // endof SuperLayer

Referenced by MdcxSeg::printSeg(), and MdcxSeg::printSegAll().

◆ SuperLayer() [2/3]

int MdcxFittedHel::SuperLayer ( int hitno = 0) const

◆ SuperLayer() [3/3]

int MdcxFittedHel::SuperLayer ( int hitno = 0) const

◆ VaryRes() [1/3]

void MdcxFittedHel::VaryRes ( )

Definition at line 170 of file MdcxFittedHel.cxx.

170 {
171 int kbl = 0;
172 while ( xHitList[kbl] ) xHitList[kbl++]->SetConstErr( 0 );
173}

◆ VaryRes() [2/3]

void MdcxFittedHel::VaryRes ( )

◆ VaryRes() [3/3]

void MdcxFittedHel::VaryRes ( )

◆ XHitList() [1/3]

◆ XHitList() [2/3]

const HepAList< MdcxHit > & MdcxFittedHel::XHitList ( ) const
inline

◆ XHitList() [3/3]

const HepAList< MdcxHit > & MdcxFittedHel::XHitList ( ) const
inline

Member Data Documentation

◆ chisq

float MdcxFittedHel::chisq
protected

◆ debug

int MdcxFittedHel::debug = 0
static

◆ fail

int MdcxFittedHel::fail
protected

◆ fittime

float MdcxFittedHel::fittime
protected

◆ itofit

int MdcxFittedHel::itofit
protected

◆ nhits

int MdcxFittedHel::nhits
protected

◆ origin

int MdcxFittedHel::origin
protected

◆ prob

float MdcxFittedHel::prob
protected

◆ quality

int MdcxFittedHel::quality
protected

◆ rcs

float MdcxFittedHel::rcs
protected

◆ sfac

double MdcxFittedHel::sfac
protected

◆ usedonhel

int MdcxFittedHel::usedonhel
protected

◆ xHitList


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