Skip to content

Commit

Permalink
Re-work Victor's attempt to keep tracks with bad first hit
Browse files Browse the repository at this point in the history
  • Loading branch information
genevb committed Mar 27, 2024
1 parent 8ca5456 commit 829f60b
Showing 1 changed file with 6 additions and 8 deletions.
14 changes: 6 additions & 8 deletions StRoot/Sti/StiKalmanTrack.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 829f60b

Please sign in to comment.