+void AliVertex::ResetVertices()
+{
+// Reset the stored vertex list and delete all connecting tracks which
+// were generated automatically via connect=1 in AddVertex().
+// The max. number of vertices is set to the default value again.
+// All physics quantities are updated according to the removal of the
+// connecting tracks.
+ AliTrack* t;
+ if (fConnects)
+ {
+ for (Int_t i=0; i<=fConnects->GetLast(); i++)
+ {
+ t=(AliTrack*)fConnects->At(i);
+ AliTrack* test=(AliTrack*)fTracks->Remove(t);
+ if (test)
+ {
+ fNtrk--;
+ (Ali4Vector&)(*this)-=(Ali4Vector&)(*t);
+ fQ-=t->GetCharge();
+ }
+ }
+ fTracks->Compress();
+ }
+
+ fNvtx=0;
+ if (fNvmax>0) SetNvmax(fNvmax);
+ if (fConnects)
+ {
+ fConnects->Delete();
+ delete fConnects;
+ fConnects=0;
+ }
+}
+///////////////////////////////////////////////////////////////////////////