BOSS 7.0.6
BESIII Offline Software System
Loading...
Searching...
No Matches
MdcTrackListBase Class Referenceabstract

#include <MdcTrackListBase.h>

+ Inheritance diagram for MdcTrackListBase:

Public Member Functions

 MdcTrackListBase (const MdcTrackParams &tkPar)
 
virtual ~MdcTrackListBase ()
 
int nTrack () const
 
void setPlot (int plotFlag)
 
void newParams (const MdcTrackParams &tkPar)
 
void plot () const
 
void store (RecMdcTrackCol *, RecMdcHitCol *)
 
virtual int createFromSegs (MdcSegList *, const MdcHitMap *, const MdcDetector *, TrkContext &, double bunchTime)=0
 
int arbitrateHits ()
 
void dropMultiHotInLayer (const MdcTrack *tk)
 
void remove (MdcTrack *atrack)
 
void setD0Cut (double d0Cut)
 
void setZ0Cut (double z0Cut)
 
void setPtCut (double ptCut)
 
void setNoInner (bool noInnerFlag)
 

Static Public Attributes

static double m_d0Cut = -999.
 
static double m_z0Cut = -999.
 
static double m_ptCut = -999.
 

Protected Attributes

MdcTrackParams tkParam
 
bool m_noInner
 

Detailed Description

Definition at line 33 of file MdcTrackListBase.h.

Constructor & Destructor Documentation

◆ MdcTrackListBase()

MdcTrackListBase::MdcTrackListBase ( const MdcTrackParams tkPar)

Definition at line 63 of file MdcTrackListBase.cxx.

63 {
64 //*************************************************************************
65 tkParam = tkPar;
66 m_noInner = false;
67 return;
68}
MdcTrackParams tkParam

◆ ~MdcTrackListBase()

MdcTrackListBase::~MdcTrackListBase ( )
virtual

Definition at line 71 of file MdcTrackListBase.cxx.

71{}

Member Function Documentation

◆ arbitrateHits()

int MdcTrackListBase::arbitrateHits ( )

Definition at line 105 of file MdcTrackListBase.cxx.

105 {
106 //*************************************************************************
107 // Look at all hits used in two or more tracks. Assign hits to the track
108 // that gives the lower residual. If, however, many hits are shared by
109 // a pair of tracks, assign them all to one or the other.
110 // Refit any tracks that have had hits dropped.
111 // The implementation is very clumsy, since the arrays were originally
112 // indexed by id # => there is an unneeded layer of indexing.
113
114 // return # of tracks deleted
115
116 if (8 == tkParam.lPrint){
117 std::cout << "=======Print before arbitrateHits=======" << std::endl;
118 }
119
120 int nDeleted = 0;
121 std::vector<MdcTrack*> trksToKill;
122 trksToKill.reserve(4);
123
124 MdcMap<long,long> idMap;
125
126 //usedInTrackNum records how many shared hits track has with each other track
127 int* usedInTrackNum = new int [nTrack()];
128 // to navigate from track id # to track pointer:
129 MdcTrack** trkXRef = new MdcTrack* [nTrack()];
130 //refitTrack flags track id #s of tracks to be refit
131 int *refitTrack = new int [nTrack()];
132 for (int i = 0; i < nTrack(); i++) {
133 refitTrack[i] = 0;
134 }
135
136 // Fill xref table
137 int itrack;
138 for (itrack = 0; itrack < nTrack(); itrack++) {
139 MdcTrack *atrack = (*this)[itrack];
140 if (atrack == 0) continue; // I don't think it can be, but . . .
141 idMap.put(atrack->track().id(), itrack);
142 trkXRef[itrack] = atrack;
143 }
144 // Loop through the tracks
145 for (itrack = 0; itrack < nTrack(); itrack++) {
146
147 if (8 == tkParam.lPrint) std::cout<<"arbitrate track No."<<itrack<< std::endl;
148 MdcTrack *atrack = (*this)[itrack];
149 if (atrack == 0) continue;
150 TrkRecoTrk& aRecoTrk = atrack->track();
151 int lRefit = 0;
152 int trackOld = -1;
153 const TrkFit* tkFit = aRecoTrk.fitResult();
154 assert (tkFit != 0);
155 TrkHitList* hitList = aRecoTrk.hits();
156 assert (hitList != 0);
157restart:
158 for (int ii = 0; ii < nTrack(); ii++) usedInTrackNum[ii] = 0;
159
160 // Loop through hits on track, counting # used in other tracks
161 int nPrev = 0;
162 int nHitDeleted = 0;
163 int maxGapLength = 0;//yzhang 2011-07-29 # of max continuous no hits layer for a track, Gap defined as missing layer >=2
164 int nGapGE2= 0;//yzhang 2011-07-29 # of no hits gap for a track
165 int nGapGE3= 0;//yzhang 2011-07-29 # of no hits gap for a track
166 int nHitInLayer[43];//yzhang 2010-09-20 for bad tracking testing
167 int nDeleteInLayer[43];//yzhang 2010-09-20
168 for(int i=0;i<43;i++){
169 nHitInLayer[i]=0;
170 nDeleteInLayer[i]=0;
171 }
172 if(8 == tkParam.lPrint) std::cout<< "--arbitrate--"<<std::endl;
173 for (TrkHitList::hot_iterator ihit(hitList->begin()); ihit != hitList->end(); ++ihit){
174 int nUsed = ihit->hit()->nUsedHits();
175 if (8 == tkParam.lPrint){
176 std::cout<<"nUsed="<<nUsed<<":";
177 ihit->hit()->printAll(std::cout);
178 }
179 if (8 == tkParam.lPrint) {
180 double deltaChi = -999;
181 ihit->getFitStuff(deltaChi);
182 std::cout<< "deltaChi="<<deltaChi<<std::endl;
183 }
184 int layer = ihit->layerNumber();
185 nHitInLayer[layer]++;
186
187 if (!ihit->isActive()) {
188 //-----------------------------------
189 //yzhang delete not ACT hit 2010-05-14
190 //-----------------------------------
191 if(tkParam.lRemoveInActive ) {//2010-05-16
192 nDeleteInLayer[layer]++;
193 if (8 == tkParam.lPrint) {
194 std::cout<< "=remove above inactive "<<std::endl;
195 }
196 TrkFundHit* hit = const_cast<TrkFundHit*> (ihit->hit());
197 hitList->removeHit(hit);
198 if(ihit == hitList->end()) break;
199 --ihit;//be careful of the iterator, yzhang
200 }
201 continue; // active hits only yzhang 2009-11-03 delete
202 }
203 if (nUsed > 1) {
204 bool wasUsed = false;
205 std::pair<TrkFundHit::hot_iterator,TrkFundHit::hot_iterator> q =
206 ihit->hit()->getUsedHits();
207 for (TrkFundHit::hot_iterator i = q.first; i != q.second; ++i) {
208 if ( !i->isActive() ) continue; //yzhang 2009-11-03 delete
209 TrkRecoTrk * recoTrk=i->parentTrack();
210 //zhangjin
211 int wasDel=0;
212 for(int idel = 0;idel<trksToKill.size();idel++){
213 if( recoTrk == &(trksToKill[idel]->track()) ) wasDel = 1;
214 }
215 if(wasDel==1) continue;
216 //zhangjin
217 int id = recoTrk->id();
218 if (id == aRecoTrk.id()) continue; //skip same track
219 long index = 0;
220 bool findKey = idMap.get(id, index);
221 // if( findKey == false ) continue; //zhangjin 2017/6/27
222 assert(index >= 0);
223 usedInTrackNum[index]++;
224 if (8 == tkParam.lPrint){
225 std::cout<<" track "<<itrack<<"&" <<index
226 << " shared hits "<<usedInTrackNum[index]<<":";
227 ihit->printAll(std::cout);
228 }
229 wasUsed = true;
230 }
231 if (wasUsed) nPrev++;
232 }// end nUsed > 1
233 } // end loop over hits
234
235 int testGap = 0;
236 //std::cout<< __FILE__ << " " << itrack<< " "<<std::endl;
237 for (int i=0;i<43;i++){
238 //std::cout<< __FILE__ << " " << i<< " nHitInLayer "<<nHitInLayer[i]<<" nDeleteInLayer "<<nDeleteInLayer[i]<<std::endl;
239 if (8 == tkParam.lPrint) {
240 std::cout<<i<<" nHitInLayer "<<nHitInLayer[i]
241 <<" nDeleteInLayer "<<nDeleteInLayer[i]<<std::endl;
242 }
243 //1.only hit in layer deleted; 2.no hits in layer; 3.got hits in layer;
244 if(nHitInLayer[i]>0 && (nHitInLayer[i]-nDeleteInLayer[i])==0) {
245 //only hit in layer i has been deleted
246 nHitDeleted++;
247 if (8 == tkParam.lPrint) {
248 cout << "rec hits have been deleted in this layer"<<std::endl;
249 }
250 testGap++;
251 //std::cout<< __FILE__ << " " << __LINE__ << " testGap3 "<<testGap<<std::endl;
252 }else if(nHitInLayer[i]==0){
253 //no hits in this layer i
254 testGap++;
255 //std::cout<< __FILE__ << " " << __LINE__ << " testGap3 "<<testGap<<std::endl;
256 }else{
257 //std::cout<< __FILE__ << " " << __LINE__ << " testGap3 "<<testGap<<std::endl;
258 //got hit in layer i
259 if(testGap>=2){
260 nGapGE2++;
261 if(testGap>=3){ nGapGE3++; }
262 if(testGap>maxGapLength) maxGapLength=testGap;
263 //std::cout<< __FILE__ << " " << __LINE__ << " maxGapLength "<<maxGapLength<<std::endl;
264 }
265 testGap=0;
266 }//end for layer 43
267 }
268
269 bool toBeDeleted = false;
270
271 if(tkParam.lPrint>1) std::cout<< "arbitrateHits tkNo:"<<itrack<<" nGapGE2= "<<nGapGE2 << " nGapGE3= "<<nGapGE3 << " maxGapLength= "<<maxGapLength<<std::endl;
272 //yzhang add nHitDeleted cut 2010-09-13
273 // remove track if # not Active
274 if (nHitDeleted >= tkParam.nHitDeleted) {
275 if (tkParam.lPrint>1) {
276 cout << "arbitrateHits: nHitDeleted "<<nHitDeleted<<" >= "<<tkParam.nHitDeleted
277 <<" Killing tkNo " << itrack << endl;
278 }
279 toBeDeleted = true;
280 }
281
282 //yzhang add nGap cut 2011-07-29
283 // remove track with gaps and big gap
284 if (nGapGE2 >= tkParam.nGapGE2) {
285 if (tkParam.lPrint>1) {
286 cout << "arbitrateHits: nGapGE2 "<<nGapGE2<<" >= "<<tkParam.nGapGE2 <<" Killing tkNo " << itrack << endl;
287 }
288 toBeDeleted = true;
289 }
290 if (nGapGE3 >= tkParam.nGapGE3) {
291 if (tkParam.lPrint>1) {
292 cout << "arbitrateHits: nGapGE3 "<<nGapGE3<<" >= "<<tkParam.nGapGE3 <<" Killing tkNo " << itrack << endl;
293 }
294 toBeDeleted = true;
295 }
296 if (maxGapLength >= tkParam.maxGapLength) {
297 if (tkParam.lPrint>1) {
298 cout << "arbitrateHits: maxGapLength "<<maxGapLength<<" >= "<<tkParam.maxGapLength<<" Killing tkNo " << itrack << endl;
299 }
300 toBeDeleted = true;
301 }
302
303 if(toBeDeleted){
304 nDeleted++;
305 delete &(atrack->track()); // Delete the RecoTrk inside atrack
306 atrack->setTrack(0);
307 trksToKill.push_back(atrack);
308 continue;
309 }
310
311 //*******
312 // How many hits are shared with a single track?
313 int nMost = 0;
314 int trackMost = 0;
315 for (int ii = 0; ii < nTrack(); ii++) {
316 if (8 == tkParam.lPrint){
317 std::cout<<"tk:"<<itrack<<"&"<<ii
318 <<" shared "<<usedInTrackNum[ii]<<" hits "<< std::endl;
319 }
320 if (usedInTrackNum[ii] > nMost) {
321 nMost = usedInTrackNum[ii];
322 trackMost = ii; //index of track w/ most hits in common w/ current trk
323 }
324 }
325
326 // A little precaution against infinite loops:
327 if (trackMost == trackOld) {
328 std::cout << "ErrMsg(error) MdcTrackListBase:"
329 << "Something ghastly happened in MdcTrackListBase::arbitrateHits"
330 << std::endl;
331 return 0;
332 }
333 trackOld = trackMost;
334
335
336 //******
337 // Decide whether to handle hits individually or in group
338 double groupDiff = 0.0; // relative quality of grouped hits for the two
339 // tracks; > 0. => current track worse
340 int nFound = 0; // # of grouped hits located so far
341 TrkHitOnTrk **theseHits = 0; // grouped hits as seen in current track
342 TrkHitOnTrk **thoseHits = 0; // grouped hits as seen in the other track
343 int lGroupHits = 0;
344
345 if (nMost >= tkParam.nOverlap) {
346 if (8 == tkParam.lPrint){
347 std::cout<<"track "<<trackMost<<" shared "<<nMost<<" hits > Cut nOverlap "
348 <<tkParam.nOverlap<<", group hits!"<<std::endl;
349 }
350 lGroupHits = 1;
351 theseHits = new TrkHitOnTrk*[nMost];
352 thoseHits = new TrkHitOnTrk*[nMost];
353 }
354
355 //*********
356 // Go back through hits on this track, looking up the overlap of each
357 // if grouping hits, only deal with hits shared with trackMost on this pass
358 // otherwise, deal with all shared hits as encountered
359 if(8 == tkParam.lPrint) std::cout<<"Go back through hits, looking up overlap hits"<< std::endl;
360 if (nMost > 0) {
361 if (8 == tkParam.lPrint) std::cout<<" nHits= "<< hitList->nHit()<< std::endl;
362 for (TrkHitList::hot_iterator ihit(hitList->begin()); ihit != hitList->end(); ++ihit) {
363 int nUsed = ihit->hit()->nUsedHits();
364
365 if (8 == tkParam.lPrint){
366 std::cout<< "--hit go back, nUsed="<<nUsed<<":";
367 ihit->hit()->printAll(std::cout);
368 }
369
370 // only shared hits
371 if (nUsed < 2) { continue; }
372
373 // active hits only
374 if (!ihit->isActive()) {
375 if (8 == tkParam.lPrint){ std::cout<<"act=0 continue"<<std::endl; }
376 continue;
377 }
378
379 //*** look at all overlaps for this hit
380 std::pair<TrkFundHit::hot_iterator,TrkFundHit::hot_iterator> q = ihit->hit()->getUsedHits();
381 while (q.first!=q.second) { // nUsed > 0
382 int dropThisHit = 0;
383 TrkHitOnTrk *otherHot = const_cast<TrkHitOnTrk*>((--q.second).get());
384 TrkRecoTrk *otherTrack = otherHot->parentTrack();
385
386 if (!otherHot->isActive()) continue;
387
388 // Again, skip "overlap" of track with itself
389 if ( &aRecoTrk == otherTrack) continue;
390 int otherId = otherTrack->id();
391 long otherIndex = -1;
392 idMap.get(otherId, otherIndex); assert(otherIndex >= 0);
393
394 // if grouping hits, only look at hits shared with trackMost
395 if (lGroupHits && otherIndex != trackMost) continue;
396
397 if (lGroupHits) {
398 if (8 == tkParam.lPrint) {
399 std::cout<<"group hits "<< std::endl;
400 }
401 // Calculate contribution of group to each chisq/dof
402 // groupDiff += fabs(ihit->resid(0)) -
403 // fabs(otherHot->resid(0));
404 // Hack to handle tracks with 5 active hits:
405 int aDof = tkFit->nActive() - 5;
406 assert (otherTrack->fitResult() != 0);
407 int otherDof = otherTrack->fitResult()->nActive() - 5;
408 if (aDof <= 0) {groupDiff = 999;}
409 else if (otherDof <= 0) {groupDiff = -999;}
410 else {
411 groupDiff += ihit->resid(0) * ihit->resid(0) * ihit->weight() /
412 aDof -
413 otherHot->resid(0) * otherHot->resid(0) * otherHot->weight() /
414 otherDof;
415 }
416 theseHits[nFound] = const_cast<TrkHitOnTrk*>(ihit.get());
417 thoseHits[nFound] = otherHot;
418 nFound++;
419 dropThisHit = 1;
420 } else { // handle hits individually
421
422 if (8 == tkParam.lPrint) {
423 std::cout<<"handle hits individually"<< std::endl;
424 }
425 nFound++;
426 if (fabs(ihit->resid(0)) > fabs(otherHot->resid(0)) ) {
427 // turn off (inactivate) hit on this track
428 lRefit = 1;
429 // ihit->hit()->setUnusedHit(ihit.get());
430 //Should I be setting inactive, or deleting the hit???????
431 const_cast<TrkHitOnTrk*>(ihit.get())->setActivity(0);
432 dropThisHit = 1;
433 if (8 == tkParam.lPrint) {
434 std::cout<<"dorp hit ";
435 const_cast<TrkHitOnTrk*>(ihit.get())->print(std::cout);
436 }
437 break; // found other hit, so quit loop
438 } else {
439 // inactivate hit on other track
440 refitTrack[otherIndex] = 1;
441 // otherHot->hit()->setUnusedHit(otherHot);
442 otherHot->setActivity(0);
443 if (8 == tkParam.lPrint) {
444 std::cout<<"inactive hit on other track";
445 const_cast<TrkHitOnTrk*>(ihit.get())->print(std::cout);
446 }
447 break; // found other hit, so quit loop
448 }
449 } // end grouped/individual treatment
450
451 if (dropThisHit == 1) break; // don't look for other matches since
452 // this hit is now turned off
453 } // end loop over nUsed
454
455 // Quit if we've found all of the shared hits on this track
456 if (lGroupHits && nFound == nMost || nFound == nPrev) {
457 if (8 == tkParam.lPrint) {
458 std::cout<<"we've found all of the shared hits on this track,Quit"<<std::endl;
459 }
460 break;
461 }
462
463 } // end loop over hits
464
465 // Decide which track grouped hits belong with and inactivate accordingly
466 if (lGroupHits) {
467 if (8 == tkParam.lPrint) {
468 cout << "nGroup: " << nMost << " groupDiff: " << groupDiff << endl;
469 cout << "Track: " << aRecoTrk.id() << " nHit: "
470 << hitList->nHit() << " nActive: "
471 << tkFit->nActive() << " chisq/dof: " <<
472 tkFit->chisq()/(tkFit->nActive() - 5) << endl;
473 TrkRecoTrk& othTrack = trkXRef[trackMost]->track();
474 cout << "Track: "<< othTrack.id() << " nHit: " <<
475 othTrack.hits()->nHit() << " nActive: " <<
476 othTrack.fitResult()->nActive() << " chisq/dof: " <<
477 othTrack.fitResult()->chisq() /
478 (othTrack.fitResult()->nActive() - 5) << endl;
479 }
480
481 if (groupDiff > 0.0) {
482 // inactivate hits on this track
483 lRefit = 1;
484 for (int ii = 0; ii < nMost; ii++) {
485 TrkHitOnTrk *alink = theseHits[ii];
486 TrkFundHit* hit = const_cast<TrkFundHit*> (alink->hit());
487 hitList->removeHit(hit);//yzhang 2011-02-12
488 //alink->setActivity(0);
489 }
490 if (8 == tkParam.lPrint) std::cout<<"inactive hits on this track, No."<<aRecoTrk.id()<< std::endl;
491 } else {
492 // inactivate hits on other track
493 refitTrack[trackMost] = 1;
494 for (int ii = 0; ii < nMost; ii++) {
495 TrkHitOnTrk *alink = thoseHits[ii];
496 TrkFundHit* hit = const_cast<TrkFundHit*> (alink->hit());
497 TrkRecoTrk& othTrack = trkXRef[trackMost]->track();//zhangjin
498 othTrack.hits()->removeHit(hit);//zhangjin
499 //hitList->removeHit(hit);//yzhang 2011-02-12
500 //alink->setActivity(0);
501 }
502 if (8 == tkParam.lPrint) std::cout<<"inactive hits on other track "<< std::endl;
503 }
504 delete [] theseHits;
505 delete [] thoseHits;
506
507 } // end if lGroupHits
508
509 } // end if nMost > 0
510
511 //*********
512 // Refit this track, if any hits have been dropped
513 TrkErrCode fitResult;
514 long index = -1;
515 idMap.get(aRecoTrk.id(), index); assert (index >= 0);
516
517 if (lRefit || refitTrack[index] == 1) {
518 if (8 == tkParam.lPrint) {
519 std::cout<<"after group ,refit track"<<aRecoTrk.id()<< std::endl;
520 }
521 fitResult = hitList->fit();
522 aRecoTrk.status()->addHistory(
523 TrkErrCode(fitResult.success()?TrkErrCode::succeed:TrkErrCode::fail,14,"Arbitrated"), "MdcTrkRecon");
524 if (fitResult.failure() && (8 == tkParam.lPrint )) {
525 fitResult.print(std::cerr);
526 }
527
528
529 double chisqperDOF;
530 bool badFit = true;
531 if (fitResult.success()) {
532 badFit = false;
533 int nDOF = tkFit->nActive() - 5;
534 if (nDOF > 5){
535 chisqperDOF = tkFit->chisq() / nDOF;
536 }else{
537 chisqperDOF = tkFit->chisq();
538 }
539
540 if (chisqperDOF > tkParam.maxChisq) badFit = true;
541 if (tkFit->nActive() < tkParam.minHits) badFit = true;
542 double tem2 = (float) hitList->nHit() - tkFit->nActive();
543 if (tkParam.lUseQualCuts) {
544 if (tem2 >= tkParam.maxNmissTrack) badFit = true;
545 if (tem2 /float(hitList->nHit()) > tkParam.maxNmissNorm){
546 badFit = true;
547 }
548 }
549 if(8== tkParam.lPrint) std::cout<<"fit quality:"<<
550 " chisqperDof "<<chisqperDOF<<"?>"<<tkParam.maxChisq<<
551 " nActive "<<tkFit->nActive()<<"?<"<<tkParam.minHits<<
552 " nHit "<<hitList->nHit()<<" nhit-act "<<tem2<<"?>= nMiss "<<tkParam.maxNmissTrack<<
553 " hit-act/nhit "<<tem2/float(hitList->nHit())<<"?> MissNorm "<<tkParam.maxNmissNorm
554 << std::endl;
555
556
557 }
558 if (8 == tkParam.lPrint) {
559 cout << "Refitting track " << aRecoTrk.id() << " success = "
560 << fitResult.success() << "\n";
561 }
562 // If the track no longer passes cuts, delete it
563 if (fitResult.failure() || badFit ) {
564 nDeleted++;
565 // Don't change the track list while we're iterating through it!
566 // remove(atrack);
567 //int id = aRecoTrk.id();
568 if (8 == tkParam.lPrint) {
569 cout << "fitResult.failure? "<<fitResult.failure()
570 <<" badFit? "<<badFit <<" Killing tkNo " << itrack << endl;
571 }
572 //delete &(atrack->track()); // Delete the RecoTrk inside atrack
573 //atrack->setTrack(0);
574 trksToKill.push_back(atrack);
575 continue;
576 }
577 } // end if lRefit
578
579 if (lGroupHits) goto restart;
580
581 } // end loop over tracks
582 if (8 == tkParam.lPrint) std::cout<<"end of loop over tracks"<< std::endl;
583
584 // Remove dead track husks
585 for (int itk = 0; itk < (int)trksToKill.size(); itk++) {
586 delete &(trksToKill[itk]->track()); //zhangjin
587 trksToKill[itk]->setTrack(0); //zhangjin
588 remove(trksToKill[itk]);
589 if (8 == tkParam.lPrint) std::cout<<"remode dead track No."<<itk<< std::endl;
590 }
591 if (8 == tkParam.lPrint) std::cout<<"---end of arbitrateHits"<< std::endl;
592
593 delete [] usedInTrackNum;
594 delete [] refitTrack;
595 delete [] trkXRef;
596 return nDeleted;
597}
****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
Definition: MdcMap.h:21
bool get(const K &theKey, V &theAnswer) const
void put(const K &, const V &)
int nTrack() const
void remove(MdcTrack *atrack)
double maxNmissTrack
void setTrack(TrkRecoTrk *trk)
Definition: MdcTrack.h:29
TrkRecoTrk & track()
Definition: MdcTrack.h:27
virtual double chisq() const =0
void print(std::ostream &ostr) const
Definition: TrkErrCode.cxx:79
int success() const
Definition: TrkErrCode.h:62
int failure() const
Definition: TrkErrCode.h:61
virtual void addHistory(const TrkErrCode &status, const char *modulename)
Definition: TrkFit.h:23
virtual int nActive() const =0
TrkErrCode fit()
Definition: TrkHitList.cxx:59
hot_iterator begin() const
Definition: TrkHitList.h:45
unsigned nHit() const
Definition: TrkHitList.h:44
hot_iterator end() const
Definition: TrkHitList.h:46
bool removeHit(const TrkFundHit *theHit)
Definition: TrkHitList.cxx:69
void setActivity(bool turnOn)
Definition: TrkHitOnTrk.cxx:96
double resid(bool exclude=false) const
double weight() const
TrkRecoTrk * parentTrack() const
const TrkFundHit * hit() const
Definition: TrkHitOnTrk.h:75
bool isActive() const
Definition: TrkHitOnTrk.h:200
TrkHitList * hits()
Definition: TrkRecoTrk.h:107
const TrkId & id() const
Definition: TrkRecoTrk.cxx:134
const TrkFit * fitResult() const
Definition: TrkRecoTrk.cxx:387
const TrkFitStatus * status() const
Definition: TrkRecoTrk.cxx:400

◆ createFromSegs()

virtual int MdcTrackListBase::createFromSegs ( MdcSegList ,
const MdcHitMap ,
const MdcDetector ,
TrkContext ,
double  bunchTime 
)
pure virtual

Implemented in MdcTrackList, and MdcTrackListCsmc.

◆ dropMultiHotInLayer()

void MdcTrackListBase::dropMultiHotInLayer ( const MdcTrack tk)

◆ newParams()

void MdcTrackListBase::newParams ( const MdcTrackParams tkPar)

Definition at line 601 of file MdcTrackListBase.cxx.

601 {
602 //**************************************************************************
603 tkParam = tkPar;
604}

◆ nTrack()

int MdcTrackListBase::nTrack ( ) const
inline

Definition at line 39 of file MdcTrackListBase.h.

39{return length();}

Referenced by arbitrateHits(), plot(), and store().

◆ plot()

void MdcTrackListBase::plot ( ) const

Definition at line 93 of file MdcTrackListBase.cxx.

93 {
94 //*************************************************************************
95 std::cout<< "nTrack "<<nTrack() << std::endl;//yzhang debug
96 for (int itrack = 0; itrack < nTrack(); itrack++) {
97 MdcTrack *atrack = (*this)[itrack];
98 if (atrack == NULL) continue;
99 atrack->track().printAll(cout);
100 }
101}
virtual void printAll(std::ostream &) const
Definition: TrkRecoTrk.cxx:195

◆ remove()

void MdcTrackListBase::remove ( MdcTrack atrack)

Definition at line 608 of file MdcTrackListBase.cxx.

608 {
609 //--------------------------------------------------------------------
610 if (atrack != 0) {
612 delete atrack;
613 }
614}

Referenced by arbitrateHits().

◆ setD0Cut()

void MdcTrackListBase::setD0Cut ( double  d0Cut)
inline

Definition at line 57 of file MdcTrackListBase.h.

57{m_d0Cut = d0Cut;}//yzhang add
static double m_d0Cut

◆ setNoInner()

void MdcTrackListBase::setNoInner ( bool  noInnerFlag)
inline

Definition at line 63 of file MdcTrackListBase.h.

63{m_noInner= noInnerFlag;}

◆ setPlot()

void MdcTrackListBase::setPlot ( int  plotFlag)
inline

Definition at line 40 of file MdcTrackListBase.h.

40{ tkParam.lPlot = plotFlag;};

◆ setPtCut()

void MdcTrackListBase::setPtCut ( double  ptCut)
inline

Definition at line 59 of file MdcTrackListBase.h.

59{m_ptCut = ptCut;}//yzhang add 2009-10-27
static double m_ptCut

◆ setZ0Cut()

void MdcTrackListBase::setZ0Cut ( double  z0Cut)
inline

Definition at line 58 of file MdcTrackListBase.h.

58{m_z0Cut = z0Cut;}//yzhang add 2010-05-21
static double m_z0Cut

◆ store()

void MdcTrackListBase::store ( RecMdcTrackCol trackList,
RecMdcHitCol hitList 
)

Definition at line 76 of file MdcTrackListBase.cxx.

76 {
77 // ***********************************************************************
78 int trackId = 0;
79 for (int itrack = 0; itrack < nTrack(); itrack++) {
80 MdcTrack* track = (*this)[itrack];
81 //tkStat: 0,PatRec 1,MdcxReco 2,Tsf 3,CurlFinder
82 int tkStat = 0;
83 track->storeTrack(trackId, trackList, hitList, tkStat);
84 ++trackId;
85 }
86 HepAListDeleteAll(*this); // Discard the husks
87 removeAll();
88 return;
89}
void storeTrack(int trackId, RecMdcTrackCol *trackList, RecMdcHitCol *hitList, int tkStat)
Definition: MdcTrack.cxx:143

Member Data Documentation

◆ m_d0Cut

double MdcTrackListBase::m_d0Cut = -999.
static

◆ m_noInner

bool MdcTrackListBase::m_noInner
protected

Definition at line 74 of file MdcTrackListBase.h.

Referenced by MdcTrackList::createFromSegs(), MdcTrackListBase(), and setNoInner().

◆ m_ptCut

double MdcTrackListBase::m_ptCut = -999.
static

◆ m_z0Cut

double MdcTrackListBase::m_z0Cut = -999.
static

◆ tkParam


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