+ // Double_t sy2= ErrY2(&t,cl);
+ // Double_t sz2= ErrZ2(&t,cl);
+ // Double_t chi2= t.GetPredictedChi2(cl);
+ // UpdateTrack(&t,cl,chi2,index);
+
+ t.fCurrentCluster = cl;
+ t.fCurrentClusterIndex1 = krow.GetIndex(index);
+ t.fCurrentClusterIndex2 = index;
+ Double_t sy2=ErrY2(&t,t.fCurrentCluster);
+ Double_t sz2=ErrZ2(&t,t.fCurrentCluster);
+
+ Double_t sdistancey = TMath::Sqrt(sy2+t.GetSigmaY2());
+ Double_t sdistancez = TMath::Sqrt(sz2+t.GetSigmaZ2());
+
+ Double_t rdistancey = TMath::Abs(t.fCurrentCluster->GetY()-t.GetY());
+ Double_t rdistancez = TMath::Abs(t.fCurrentCluster->GetZ()-t.GetZ());
+
+ Double_t rdistance = TMath::Sqrt(TMath::Power(rdistancey/sdistancey,2)+TMath::Power(rdistancez/sdistancez,2));
+
+
+ // printf("\t%f\t%f\t%f\n",rdistancey/sdistancey,rdistancez/sdistancez,rdistance);
+ if ( (rdistancey>1) || (rdistancez>1)) return 0;
+ if (rdistance>4) return 0;
+
+ if ((rdistancey/sdistancey>2.5 || rdistancez/sdistancez>2.5) && t.fCurrentCluster->GetType()==0)
+ return 0; //suspisiouce - will be changed
+
+ if ((rdistancey/sdistancey>2. || rdistancez/sdistancez>2.0) && t.fCurrentCluster->GetType()>0)
+ // strict cut on overlaped cluster
+ return 0; //suspisiouce - will be changed
+
+ if ( (rdistancey/sdistancey>1. || rdistancez/sdistancez>2.5 ||t.fCurrentCluster->GetQ()<70 )
+ && t.fCurrentCluster->GetType()<0)
+ return 0;
+
+ // t.SetSampledEdx(0.3*t.fCurrentCluster->GetQ()/l,t.GetNumberOfClusters(), GetSigmaY(&t), GetSigmaZ(&t));
+ UpdateTrack(&t,t.fCurrentCluster,t.GetPredictedChi2(t.fCurrentCluster),t.fCurrentClusterIndex1);
+