Skip to content

Commit

Permalink
isStarted and restIsWrong are really just yes/no flags
Browse files Browse the repository at this point in the history
  • Loading branch information
genevb committed Mar 27, 2024
1 parent ee3652f commit 8ca5456
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions StRoot/Sti/StiKalmanTrack.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -1657,7 +1657,8 @@ static int nCall=0;nCall++;

StiKTNIterator source;
StiKalmanTrackNode *pNode = 0,*targetNode;
int iNode=0, status = 0,isStarted=0,restIsWrong=0;
int iNode=0, status = 0;
bool isStarted=false,restIsWrong=false;
sTNH.setDir(1);
for (source=rbegin();source!=rend();source++) {
iNode++;
Expand All @@ -1669,15 +1670,15 @@ static int nCall=0;nCall++;
if ( targetNode->getChi2()>1000) targetNode->setInvalid();
if (!targetNode->isValid()) continue;
}
isStarted++;
isStarted = true;
sTNH.set(pNode,targetNode);
status = sTNH.makeFit(0);
if (status) {restIsWrong = 2005; targetNode->setInvalid();}
if (status) {restIsWrong = true; targetNode->setInvalid();}
if (!targetNode->isValid()) continue;
pNode = targetNode;
}//end for of nodes

pNode = 0; iNode=0;isStarted=0;restIsWrong=0;
pNode = 0; iNode=0;isStarted=false;restIsWrong=false;
sTNH.setDir(0);
for (source=begin();source!=end();source++) {
iNode++;
Expand All @@ -1688,10 +1689,10 @@ static int nCall=0;nCall++;
if ( targetNode->getChi2()>1000) targetNode->setInvalid();
if (!targetNode->isValid()) continue;
}
isStarted++;
isStarted = true;
sTNH.set(pNode,targetNode);
status = sTNH.makeFit(1);
if (status) {restIsWrong = 2005; targetNode->setInvalid();}
if (status) {restIsWrong = true; targetNode->setInvalid();}
if (!targetNode->isValid()) continue;
pNode = targetNode;
}//end for of nodes
Expand Down

0 comments on commit 8ca5456

Please sign in to comment.