From 829f60b32a88a7c6f2af1fe7833521984e137256 Mon Sep 17 00:00:00 2001 From: Gene Van Buren Date: Wed, 27 Mar 2024 17:48:30 -0400 Subject: [PATCH] Re-work Victor's attempt to keep tracks with bad first hit --- StRoot/Sti/StiKalmanTrack.cxx | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/StRoot/Sti/StiKalmanTrack.cxx b/StRoot/Sti/StiKalmanTrack.cxx index 280c4dde0ca..b1a47c6a98c 100644 --- a/StRoot/Sti/StiKalmanTrack.cxx +++ b/StRoot/Sti/StiKalmanTrack.cxx @@ -1658,42 +1658,40 @@ static int nCall=0;nCall++; StiKTNIterator source; StiKalmanTrackNode *pNode = 0,*targetNode; int iNode=0, status = 0; - bool isStarted=false,restIsWrong=false; + bool isStarted=false; sTNH.setDir(1); for (source=rbegin();source!=rend();source++) { iNode++; targetNode = &(*source); - if (restIsWrong) { targetNode->setInvalid(); continue;} if (!isStarted) { if (!targetNode->getHit()) targetNode->setInvalid(); if ( targetNode->getChi2()>1000) targetNode->setInvalid(); if (!targetNode->isValid()) continue; } - isStarted = true; sTNH.set(pNode,targetNode); status = sTNH.makeFit(0); - if (status) {restIsWrong = true; targetNode->setInvalid();} + if (status) {targetNode->setInvalid();continue;} if (!targetNode->isValid()) continue; + isStarted = true; pNode = targetNode; }//end for of nodes - pNode = 0; iNode=0;isStarted=false;restIsWrong=false; + pNode = 0; iNode=0;isStarted=false; sTNH.setDir(0); for (source=begin();source!=end();source++) { iNode++; targetNode = &(*source); - if (restIsWrong) { targetNode->setInvalid(); continue;} if (!isStarted) { if (!targetNode->getHit()) targetNode->setInvalid(); if ( targetNode->getChi2()>1000) targetNode->setInvalid(); if (!targetNode->isValid()) continue; } - isStarted = true; sTNH.set(pNode,targetNode); status = sTNH.makeFit(1); - if (status) {restIsWrong = true; targetNode->setInvalid();} + if (status) {targetNode->setInvalid();continue;} if (!targetNode->isValid()) continue; + isStarted = true; pNode = targetNode; }//end for of nodes return 0;