CGEM BOSS 6.6.5.h
BESIII Offline Software System
Loading...
Searching...
No Matches
TrkHelixFitter Class Reference

#include <TrkHelixFitter.h>

+ Inheritance diagram for TrkHelixFitter:

Public Member Functions

 TrkHelixFitter (bool allowFlips=false, bool allowDrops=false)
 
virtual ~TrkHelixFitter ()
 
TrkHelixFitteroperator= (const TrkHelixFitter &right)
 
 TrkHelixFitter (const TrkHelixFitter &)
 
TrkErrCode fit (TrkHotList &hitList, TrkSimpTraj &)
 
void setFittingPar (bool allowFlips, bool allowDrops)
 
double lastChisq () const
 
- Public Member Functions inherited from TrkHitOnTrkUpdater
virtual ~TrkHitOnTrkUpdater ()=0
 

Static Public Attributes

static bool m_debug = false
 
static double nSigmaCut [43]
 

Additional Inherited Members

- Protected Member Functions inherited from TrkHitOnTrkUpdater
TrkErrCode updateMeasurement (TrkHitOnTrk &hot, const TrkDifTraj *traj=0, bool maintainAmbiguity=false) const
 
void setActivity (TrkHitOnTrk &hot, bool active) const
 
void setParent (TrkHitOnTrk &hot, TrkRep *parent) const
 
TrkBase::Functors::updateMeasurement updateMeasurement (const TrkDifTraj *traj=0, bool maintainAmbiguity=false) const
 
TrkBase::Functors::setParent setParent (TrkRep *parent) const
 
TrkBase::Functors::setActive setActive (bool active) const
 

Detailed Description

Definition at line 29 of file TrkHelixFitter.h.

Constructor & Destructor Documentation

◆ TrkHelixFitter() [1/2]

TrkHelixFitter::TrkHelixFitter ( bool allowFlips = false,
bool allowDrops = false )

Definition at line 48 of file TrkHelixFitter.cxx.

48 :
49 //------------------------------------------------------------------------
51{
52 _allowFlips = allowFlips;
53 _allowDrops = allowDrops;
54 _lastChisq = -1.;
55}

◆ ~TrkHelixFitter()

TrkHelixFitter::~TrkHelixFitter ( )
virtual

Definition at line 44 of file TrkHelixFitter.cxx.

44{}

◆ TrkHelixFitter() [2/2]

TrkHelixFitter::TrkHelixFitter ( const TrkHelixFitter & right)

Definition at line 58 of file TrkHelixFitter.cxx.

58 :
59 //------------------------------------------------------------------------
61{
62 _allowFlips = right._allowFlips;
63 _allowDrops = right._allowDrops;
64 _lastChisq = -1.;
65}

Member Function Documentation

◆ fit()

TrkErrCode TrkHelixFitter::fit ( TrkHotList & hitList,
TrkSimpTraj & theTraj )

Definition at line 90 of file TrkHelixFitter.cxx.

91 {
92 //------------------------------------------------------------------------
93 // Assumes that weight matrix is diagonal. */
94 /* Least-squares fit; the measured
95 quantity is the residual. The fit is accomplished by linearizing
96 the equation, using the derivatives of the residual w/r/t the
97 track parameters; because of this approximation, the fit may be iterated.
98 The fitted parameters are given by:
99 delta-param() = Vparam * Atran * Vyinv * delChi
100 where Vyinv = covariance matrix for the measurements
101 Atran = transpose of A
102 A = matrix of derivatives of delChi wrt trk params
103 (size = no. of params x no. of hits)
104 Vparam = covariance (error)" matrix of the fitted parameters
105 = (Atran * Vyinv * A)**-1
106 */
107
108 bool permitFlips = _allowFlips;
109 bool lPickHits = _allowDrops;
110 // permitFlips = 1 => permit state changes like ambiguity flips
111 // lPickHits = 1 => choose the best set of active hits on each iteration
112 int i;
114 int lPicked = 0; // = 1 => have either picked up or dropped an active hit
115 // on this iteration
116 register double chisqold;
117 double chisqnew, chichange;
118 double chitest = 0.01; //delta(chi2) < chitest => fit has converged
119 int nZ = 0, nXY = 0; // # active hits in each view
120 int nActive = 0;
121
122 // vparam = Vparam defined above ( = symmetric matrix)
123 // diffsum = Atran * Vyinv * delChi defined above (column vector)
124 // iter = iteration loop index
125 // itermax = max number of iterations
126 // delpar = change in parameters during this iteration
127 // chisqold, chisqnew = chisq before and after latest iteration
128
129 /***************************************************************************/
130 setLastChisq(-1.);
131 //bool shiftRef = false;//yzhang FIXME
132 // HepPoint3D storePoint;
133
134 // Change reference point of trajectory to be at first hit -- reduces
135 // numerical problems
136 // double oldT0 = hitlist[0]->parentTrack()->trackT0();
137 //if (shiftRef) {
138 // double firstFlight = hitlist[0]->fltLen();
139 // double newTime = hitlist[0]->parentTrack()->fitResult()->arrivalTime(firstFlight);
140 // hitlist[0]->parentTrack()->resetT0(newTime);
141 // Point3D.here = theTraj.position(firstFlight);
142 //
143 // storePoint = here;
144 // DifPoint dfPos;
145 // DifVector dfDir, dfDelDir;
146 // theTraj.getDFInfo(firstFlight, dfPos, dfDir, dfDelDir);
147 //
148 // theTraj.changePoint(here, fltOffset);
149 //}
150
151 int ncluster(0);
152 for (TrkHotList::nc_hot_iterator ihit = hitlist.begin(); ihit != hitlist.end(); ++ihit) {
153 if(typeid(*ihit)==typeid(CgemHitOnTrack))ncluster++;
154 } //end loop over hits
155 //*** Things that don't change with each iteration
156 int nhits = hitlist.nHit();
157 std::vector<double> delChi(nhits,0);
158 std::vector<double> XdelChi(ncluster,0);
159 std::vector<double> VdelChi(ncluster,0);
160 std::vector<std::vector<double> > deriv(nhits);
161 std::vector<std::vector<double> > Xderiv(ncluster);
162 std::vector<std::vector<double> > Vderiv(ncluster);
163
164 TrkParams &params = *(theTraj.parameters());
165 // int npar = params.nPar();//yzhang temp
166 int npar = theTraj.nPar();//yzhang temp
167
168 // Decide minimum numbers of hits required. This could turn out to be wrong
169 // someday.
170
171 bool l3d = (npar > 3); // I hope always true
172 const int minZ = l3d ? 2 : 0;
173 const int minXY = npar - minZ;
174 const int minAct = minZ + minXY;
175
176 HepSymMatrix vparam(npar,0);
177 HepVector diffsum(npar);
178 HepVector delpar(npar);
179
180 std::vector<std::vector<double> >::iterator ideriv = deriv.begin();
181 std::vector<std::vector<double> >::iterator iXderiv = Xderiv.begin();
182 std::vector<std::vector<double> >::iterator iVderiv = Vderiv.begin();
183 std::vector<double>::iterator idelChi = delChi.begin();
184 std::vector<double>::iterator iXdelChi = XdelChi.begin();
185 std::vector<double>::iterator iVdelChi = VdelChi.begin();
186 assert(((int)deriv.size()) ==(hitlist.end()-hitlist.begin()));
187 for (TrkHotList::nc_hot_iterator ihit = hitlist.begin(); ihit != hitlist.end(); ++ihit,++ideriv,++idelChi) {
188 ideriv->resize(npar);
189 if (ihit->isActive()) {
190 nActive++;
191 if (ihit->whatView() == TrkEnums::xyView) nXY++;
192 else if (ihit->whatView() == TrkEnums::zView) nZ++;
193 else if (ihit->whatView() == TrkEnums::bothView) {
194 nZ++;
195 nXY++;
196 }
197 }
198
199 if(typeid(*ihit)==typeid(CgemHitOnTrack)){
200 iXderiv->resize(npar);
201 iVderiv->resize(npar);
202 iXderiv++;
203 iVderiv++;
204 }
205 // Update the Hots to reflect new reference point
206 //if (shiftRef) {
207 // ihit->setFltLen( ihit->fltLen() - fltOffset );
208 //}
209 } //end loop over hits
210 if (nXY < minXY || nZ < minZ || nActive < minAct) {
211 status.setFailure(11,"Not enough hits in TrkHelixFitter! ");
212 return status;
213 }
214
215 //if (shiftRef) {
216 // double firstFlight = hitlist[0]->fltLen();
217 // Point3D.here = theTraj.position(firstFlight);
218 // DifPoint dfPos;
219 // DifVector dfDir, dfDelDir;
220 // theTraj.getDFInfo(firstFlight, dfPos, dfDir, dfDelDir);
221 // double dummy = 0.;
222 // hitlist[0]->updateFitStuff(dummy, 0, !permitFlips);
223 // hitlist[0]->updateMeasurement();
224 // hitlist[0]->updateFitStuff(dummy, 0, !permitFlips);
225 //}
226 // static HepVector derivs(npar);//yzhang temp
227 HepVector derivs(npar);//zhang change
228 HepVector Xderivs(npar);//zhang change
229 HepVector Vderivs(npar);//zhang change
230 // HepVector derivs(npar);//yzhang temp
231 TrkErrCode calcResult;
232 //**** Iterate fit.
233 size_t itermax = 12;
234 for (size_t iter = 1; iter <= itermax; iter++) {
235 if(m_debug)cout<<"iter->"<<iter<<endl;
236 bool mustIterate(false); // flag to force another iteration
237 chisqold = 0.0;
238 for (i = 0; i < npar; i++) diffsum[i] = 0.0;
239 vparam *= 0.0; // dumb way of clearing matrix
240
241 /* Loop over hits, accumulate sums, calculate chisq for current params. */
242 std::vector<std::vector<double> >::iterator ideriv = deriv.begin();
243 std::vector<std::vector<double> >::iterator iXderiv = Xderiv.begin();
244 std::vector<std::vector<double> >::iterator iVderiv = Vderiv.begin();
245 std::vector<double>::iterator idelChi = delChi.begin();
246 std::vector<double>::iterator iXdelChi = XdelChi.begin();
247 std::vector<double>::iterator iVdelChi = VdelChi.begin();
248 assert(((int)deriv.size())==(hitlist.end()-hitlist.begin()));
249 for (TrkHotList::nc_hot_iterator ihit = hitlist.begin(); ihit != hitlist.end(); ++ihit,++ideriv,++idelChi) {
250
251 // Ask the hit to do the calculations
252 calcResult = updateMeasurement(*ihit,0,!permitFlips);
253 double deltaChiNew;
254 double XdeltaChiNew;
255 double VdeltaChiNew;
256 if (calcResult.success()) {
257 if (iter < 2) { // FIXME? only update derivatives at first iteration...
258 if(typeid(*ihit)==typeid(CgemHitOnTrack)){
259 CgemHitOnTrack* cgemHot = dynamic_cast<CgemHitOnTrack*> (ihit.get());
260 calcResult = cgemHot->getFitStuff(Xderivs, XdeltaChiNew, Vderivs, VdeltaChiNew);
261 for (i=0; i<npar; ++i){
262 (*iXderiv)[i] = Xderivs[i];
263 (*iVderiv)[i] = Vderivs[i];
264 }
265 }else{
266 calcResult = ihit->getFitStuff(derivs, deltaChiNew);
267 for (i=0; i<npar; ++i) (*ideriv)[i] = derivs[i];
268 }
269
270 //if(m_debug){
271 // std::cout<<"in TrkHelixFitter " <<std::endl;//yzhang deubg
272 // cout << "deriv: ";
273 // for (i=0;i<npar;++i) cout << (*ideriv)[i] << " " ;
274 // cout << endl;
275 //}
276 } else {
277 if(typeid(*ihit)==typeid(CgemHitOnTrack)){
278 CgemHitOnTrack* cgemHot = dynamic_cast<CgemHitOnTrack*> (ihit.get());
279 calcResult = cgemHot->getFitStuff(XdeltaChiNew, VdeltaChiNew);
280 }else{
281 calcResult = ihit->getFitStuff(deltaChiNew);
282 }
283 }
284 }
285 if (calcResult.failure()) {
286 if(m_debug){
287 cout<<"ErrMsg(warning) TrkHelixFitter:"
288 << "unable to getFitStuff for hit " << *ihit << endl;
289 }
290 ihit->setUsability(false); // something bombed
291 if(typeid(*ihit)==typeid(CgemHitOnTrack)){
292 iXderiv++;
293 iVderiv++;
294 iXdelChi++;
295 iVdelChi++;
296 }
297 continue;
298 }
299 mustIterate = (mustIterate || (calcResult.success() != 1));
300 if(typeid(*ihit)==typeid(CgemHitOnTrack)){
301 *iXdelChi = XdeltaChiNew;
302 *iVdelChi = VdeltaChiNew;
303 }else{
304 *idelChi = deltaChiNew;
305 }
306///*
307 if(m_debug){
308 cout << (ihit-hitlist.begin());
309 ihit->print(std::cout);
310 cout << " dChi " << *idelChi
311 << " amb " << ihit->ambig()
312 << " resid " << ihit->resid()
313 << " rms " << ihit->hitRms()
314 << " hitlen " << ihit->hitLen()
315 << " fltlen " << ihit->fltLen() << endl;
316 }
317//*/
318 if (ihit->isActive() == false) {
319 if(m_debug) std::cout<<"SKIP not active hit"<< std::endl;
320 if(typeid(*ihit)==typeid(CgemHitOnTrack)){
321 iXderiv++;
322 iVderiv++;
323 iXdelChi++;
324 iVdelChi++;
325 }
326 continue;
327 }
328 if(typeid(*ihit)==typeid(CgemHitOnTrack)){
329 chisqold += XdeltaChiNew * XdeltaChiNew;
330 chisqold += VdeltaChiNew * VdeltaChiNew;
331 for (i = 0; i < npar; ++i) {
332 diffsum[i] += (*iXderiv)[i] * XdeltaChiNew;
333 diffsum[i] += (*iVderiv)[i] * VdeltaChiNew;
334 for (int j = 0; j < i+1; ++j) {
335 vparam.fast(i+1,j+1) += (*iXderiv)[i] * (*iXderiv)[j];
336 vparam.fast(i+1,j+1) += (*iVderiv)[i] * (*iVderiv)[j];
337 }
338 }
339 }else{
340 chisqold += deltaChiNew * deltaChiNew;
341 for (i = 0; i < npar; ++i) {
342 diffsum[i] += (*ideriv)[i] * deltaChiNew;
343 for (int j = 0; j < i+1; ++j) {
344 vparam.fast(i+1,j+1) += (*ideriv)[i] * (*ideriv)[j];
345 }
346 }
347 }
348 if(typeid(*ihit)==typeid(CgemHitOnTrack)){
349 iXderiv++;
350 iVderiv++;
351 iXdelChi++;
352 iVdelChi++;
353 }
354 if (iter < 0) {
355 if(typeid(*ihit)==typeid(CgemHitOnTrack)){
356 cout<<ihit->layerNumber()<<" "<<setw(12)<<XdeltaChiNew<<" || "<<setw(12)<<(Xderivs)[0]<<" "<<setw(12)<<(Xderivs)[1]<<" "<<setw(12)<<(Xderivs)[2]<<" "<<setw(12)<<(Xderivs)[3]<<" "<<setw(12)<<(Xderivs)[4]<<endl;
357 cout<<ihit->layerNumber()<<" "<<setw(12)<<VdeltaChiNew<<" || "<<setw(12)<<(Vderivs)[0]<<" "<<setw(12)<<(Vderivs)[1]<<" "<<setw(12)<<(Vderivs)[2]<<" "<<setw(12)<<(Vderivs)[3]<<" "<<setw(12)<<(Vderivs)[4]<<endl;
358 }else cout<<ihit->layerNumber()<<" "<<setw(12)<<deltaChiNew<<" || "<<setw(12)<<(*ideriv)[0]<<" "<<setw(12)<<(*ideriv)[1]<<" "<<setw(12)<<(*ideriv)[2]<<" "<<setw(12)<<(*ideriv)[3]<<" "<<setw(12)<<(*ideriv)[4]<<endl;
359 }
360 } // end loop over hits
361
362
363 //**** Calculate new paramters
364 int ierr;
365 vparam.invert(ierr);
366 if (ierr) {
367 if(m_debug){
368 cout<<"ErrMsg(warning) TrkHelixFitter:"
369 << "Matrix inversion failed " << endl;
370 }
371 status.setFailure(12, "Matrix inversion failed in TrkHelixFitter");
372 //break;
373 }
374 delpar = vparam * (-diffsum);
375 if(m_debug){
376 cout << " delpar = "<<delpar << endl;
377 }
378 // The following test relies on having a fixed location for phi0 in
379 // all simple params; it should be made robust somehow!!!
380 if (fabs(delpar[1]) > 1.) {
381 if(m_debug){
382 cout<<"ErrMsg(warning) TrkHelixFitter:"
383 << "Pathological fit " << endl;
384 }
385 status.setFailure(13, "Pathological fit in TrkHelixFitter.");
386 //break;
387 }
388
389 for (i = 0; i < npar; ++i) params.parameter()[i] += delpar[i];
390 if(m_debug){
391 cout << " params "<<params.parameter() << endl;
392 }
393
394 //***** Loop through the hits again, calculating the approx change
395 // in residuals and chisq., and picking which hits should be active
396 // for next iteration.
397
398 chisqnew = 0.0;
399 lPicked = 0;
400 double bigDelChi = 0.0;
401 TrkHotList::nc_hot_iterator bigHit = hitlist.end();
402
403 mustIterate = (mustIterate || (iter <= 2 && lPickHits)); // iterate until hit-dropping allowed
404 ideriv = deriv.begin();
405 iXderiv = Xderiv.begin();
406 iVderiv = Vderiv.begin();
407 idelChi = delChi.begin();
408 iXdelChi = XdelChi.begin();
409 iVdelChi = VdelChi.begin();
410 for (TrkHotList::nc_hot_iterator ihit = hitlist.begin(); ihit != hitlist.end(); ++ihit,++ideriv,++idelChi) {
411 if(m_debug) {
412 ihit->print(std::cout);
413 }
414 if(!ihit->isUsable()){
415 if(m_debug) { std::cout<<"hit NOT usable "<< std::endl; }
416 if(typeid(*ihit)==typeid(CgemHitOnTrack)){
417 iXderiv++;
418 iVderiv++;
419 iXdelChi++;
420 iVdelChi++;
421 }
422 continue;
423 }
424 //double weight = ihit->weight(); // FIXME: why isn't weight used???
425 if(typeid(*ihit)==typeid(CgemHitOnTrack)){
426 for (i = 0; i < npar; i++) {
427 *iXdelChi += (*iXderiv)[i] * delpar[i];
428 *iVdelChi += (*iVderiv)[i] * delpar[i];
429 }
430 if (ihit->isActive()){
431 chisqnew += *iXdelChi * *iXdelChi;
432 chisqnew += *iVdelChi * *iVdelChi;
433 }
434 }else{
435 for (i = 0; i < npar; i++) {
436 *idelChi += (*ideriv)[i] * delpar[i];
437 }
438 if (ihit->isActive()) chisqnew += *idelChi * *idelChi;
439 }
440 // Hit-picking
441 if (!mustIterate && lPickHits) {
442 double abDelChi;
443 if(typeid(*ihit)==typeid(CgemHitOnTrack)) abDelChi = fabs(*iXdelChi + *iVdelChi)/2;//FIXME
444 else abDelChi = fabs(*idelChi);
445 //yzhang fix nSigmaCut for each layers 2010-04-13
446 if (abDelChi <= nSigmaCut[ihit->layerNumber()] ) {
447 if(m_debug){
448 std::cout<< "abDelChi "<<abDelChi
449 <<"<?"<<nSigmaCut[ihit->layerNumber()] << std::endl;//yzhang debug
450 }
451 if (ihit->isActive() == 0) {
452 ihit->setActivity(1); // reactivate hit
453 if(m_debug){ cout << "set ACTIVE, Added " << endl; }
454 lPicked = 1;
455 nActive++;
456 if (ihit->whatView() == TrkEnums::xyView) nXY++;
457 else if (ihit->whatView() == TrkEnums::zView) nZ++;
458 else if (ihit->whatView() == TrkEnums::bothView) {
459 nZ++;
460 nXY++;
461 }
462 }
463 } else {
464 if (ihit->isActive()) {
465 if (abDelChi > bigDelChi) {
466 if(m_debug){
467 std::cout<<"bigest set INACTIVE, abDelChi = "<<abDelChi
468 <<">"<<nSigmaCut[ihit->layerNumber()] <<" bigDelChi=" <<bigDelChi<< std::endl; }
469 bigDelChi = abDelChi;
470 bigHit = ihit;
471 }
472 }
473 }
474 } // end if iter > 2 (hit-picking)
475 if(typeid(*ihit)==typeid(CgemHitOnTrack)){
476 iXderiv++;
477 iVderiv++;
478 iXdelChi++;
479 iVdelChi++;
480 }
481 } //end loop over hits
482
483 // Drop hit with worst residual
484 if (lPickHits) {
485 int lDrop = 0;
486 if (bigHit != hitlist.end() && (nActive > minAct)) {
487 if ( bigHit->whatView() == TrkEnums::xyView && nXY > minXY) {
488 nXY--;
489 lDrop = 1;
490 } else if ( bigHit->whatView() == TrkEnums::zView && nZ > minZ) {
491 nZ--;
492 lDrop = 1;
493 } else if ( bigHit->whatView() == TrkEnums::bothView && nZ > minZ &&
494 nXY > minXY) {
495 nZ--;
496 nXY--;
497 lDrop = 1;
498 }
499 if (lDrop == 1) {
500 lPicked = 1;
501 nActive--;
502 bigHit->setActivity(0); // deactivate hit
503 if(m_debug){
504 std::cout<<"---deactivate hit!! delChi2="<<bigDelChi<< std::endl;
505 std::cout<<"---";
506 bigHit->print(std::cout);
507 std::cout<<"--------------------!! "<< std::endl;
508 }
509 }
510 }
511 }// end if lPickHits
512
513 /* Test for convergence. */
514 chichange = chisqold - chisqnew;
515 if(m_debug){
516 cout << "chisq from "<<chisqold << " -> " << chisqnew << endl;
517 }
518 if (chichange < -0.5 && !mustIterate && lPicked == 0) {
519 if(m_debug){
520 cout<<"ErrMsg(warning)" << " blowing up: " << chichange << endl;
521 }
522 /* It's blowing up. */
523 setLastChisq(chisqnew);
524 status.setFailure(1);
525
526 if(m_debug) std::cout<<"failure 1 "<< std::endl;
527 break;
528 } else if (chichange < chitest && !mustIterate && lPicked ==0){
529 // We converged.
530 status.setSuccess(1);
531 setLastChisq(chisqnew);
532 if(m_debug) std::cout<<"success 1 "<< std::endl;
533 break;
534 }
535
536 if (iter == itermax) {
537 setLastChisq(chisqnew);
538 status.setSuccess(2);
539 if(m_debug) std::cout<<"success 2 "<< std::endl;
540 }
541 } /* end iteration loop */
542
543 // store the error matrix
544 params.covariance() = vparam;
545
546 // Attempt to calculate deltaChisq for this hit (compared to leaving hit
547 // out of the fit).
548 /* chisqnew = 0;
549 if (status.success()) {
550 HepVector deltaAlpha(npar);
551 for (ihit = 0; ihit < nhits; ihit++) {
552 thisHot = hitlist(ihit);
553 if (!thisHot->isActive()) continue;
554 HepVector derivs(npar, 0);
555 for (i = 0; i < npar; i++) {
556 derivs[i] = deriv[ihit][i];
557 }
558 double weight = thisHot->weight();
559 double resid = thisHot->resid();
560 deltaAlpha = vparam * derivs;
561 deltaAlpha *= (resid * weight);
562 // cout << resid * resid * weight
563 // << " " << resid * weight * dot(derivs, deltaAlpha) << endl;
564 // thisHot->chi2Contrib = -dot(deltaAlpha, temp) + resid * resid * weight
565 // + 2. * resid * weight * dot(derivs, deltaAlpha);
566 }
567 }
568 */
569
570 // Change reference point back to origin
571 //if (shiftRef) {
572 // Point3D.home(0.,0.,0.);
573 // theTraj.changePoint(home, fltOffset);
574 // hitlist[0]->parentTrack()->resetT0(oldT0);
575 //for (ihit = 0; ihit < nhits; ihit++) {
576 // thisHot = hitlist[ihit];
577 // thisHot->setFltLen( thisHot->fltLen() - fltOffset );
578 // }
579 //}
580 return status;
581}
const int nZ
EvtStreamInputIterator< typename Generator::result_type > iter(Generator gen, int N=0)
TrkErrCode getFitStuff(HepVector &derivs, HepVector &derivs2, double &sigma1, double &sigma2, double &deltaChi1, double &deltaChi2) const
HepVector & parameter()
Definition DifIndepPar.h:51
int success() const
Definition TrkErrCode.h:62
int failure() const
Definition TrkErrCode.h:61
static bool m_debug
static double nSigmaCut[43]
TrkErrCode updateMeasurement(TrkHitOnTrk &hot, const TrkDifTraj *traj=0, bool maintainAmbiguity=false) const
HepSymMatrix & covariance()
Definition TrkParams.h:54
TrkParams * parameters()
Definition TrkSimpTraj.h:80
virtual int nPar() const
Definition TrkSimpTraj.h:88
@ bothView
Definition TrkEnums.h:22

Referenced by TrkSimpleRep::fit().

◆ lastChisq()

double TrkHelixFitter::lastChisq ( ) const
inline

Definition at line 39 of file TrkHelixFitter.h.

39{return _lastChisq;}

Referenced by TrkSimpleRep::fit().

◆ operator=()

TrkHelixFitter & TrkHelixFitter::operator= ( const TrkHelixFitter & right)

Definition at line 69 of file TrkHelixFitter.cxx.

71{
72 if (&right == this) return *this;
73 _allowFlips = right._allowFlips;
74 _allowDrops = right._allowDrops;
75 _lastChisq = right._lastChisq;
76
77 return *this;
78}

◆ setFittingPar()

void TrkHelixFitter::setFittingPar ( bool allowFlips,
bool allowDrops )

Definition at line 82 of file TrkHelixFitter.cxx.

82 {
83 //------------------------------------------------------------------------
84 _allowFlips = allowFlips;
85 _allowDrops = allowDrops;
86}

Referenced by TrkHelixMaker::addZValues().

Member Data Documentation

◆ m_debug

bool TrkHelixFitter::m_debug = false
static

Definition at line 40 of file TrkHelixFitter.h.

Referenced by fit(), MdcTrkRecon::initialize(), and MdcxTrackFinder::initialize().

◆ nSigmaCut

double TrkHelixFitter::nSigmaCut
static
Initial value:
= {
10.,5.,5.,10., 10.,5.,5.,10.,
10.,5.,5.,5., 5.,5.,5.,5., 5.,5.,5.,10.,
10.,5.,5.,5., 5.,5.,5.,5., 5.,5.,5.,5., 5.,5.,5.,10.,
10.,5.,5.,5., 5.,5.,10.
}

Definition at line 37 of file TrkHelixFitter.h.

39 {return _lastChisq;}
40 static bool m_debug;
41 static double nSigmaCut[43];
42

Referenced by fit(), MdcTrkRecon::initialize(), MdcxTrackFinder::initialize(), and MdcFlagHold::printPar().


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