+/**************************************************************************
+ * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
+ * *
+ * Author: The ALICE Off-line Project. *
+ * Contributors are mentioned in the code where appropriate. *
+ * *
+ * Permission to use, copy, modify and distribute this software and its *
+ * documentation strictly for non-commercial purposes is hereby granted *
+ * without fee, provided that the above copyright notice appears in all *
+ * copies and that both the copyright notice and this permission notice *
+ * appear in the supporting documentation. The authors make no claims *
+ * about the suitability of this software for any purpose. It is *
+ * provided "as is" without express or implied warranty. *
+ **************************************************************************/
+
+// $Id$
+
+///////////////////////////////////////////////////////////////////////////
+// Class AliVertex
+// Creation and investigation of an AliVertex.
+// An AliVertex can be constructed by adding AliTracks and/or AliJets.
+//
+// Note : Also (secondary) vertices can be added to a vertex.
+//
+// To provide maximal flexibility to the user, two modes of vertex storage
+// are provided by means of the memberfunction SetVertexCopy().
+// The same holds for the storage of jets via SetJetCopy().
+//
+// a) SetVertexCopy(0) (which is the default).
+// Only the pointers of the 'added' vertices are stored.
+// This mode is typically used by making vertex studies based on a fixed list
+// of vertices which stays under user control or is contained for instance
+// in an AliEvent.
+// In this way the AliVertex just represents a 'logical structure' for the
+// physics analysis which can be embedded in e.g. an AliEvent or AliVertex.
+//
+// Note :
+// Modifications made to the original vertices also affect the AliVertex objects
+// which are stored.
+//
+// b) SetVertexCopy(1).
+// Of every 'added' vertex a private copy will be made of which the pointer
+// will be stored.
+// In this way the AliVertex represents an entity on its own and modifications
+// made to the original vertices do not affect the AliVertex objects which are
+// stored.
+// This mode will allow 'adding' many different AliVertex objects by
+// creating only one AliVertex instance in the main programme and using the
+// AliVertex::Reset, AliVertex::AddTrack and parameter setting memberfunctions.
+//
+// Coding example to make 3 vertices v1, v2 and v3.
+// ------------------------------------------------
+// v1 contains the tracks 1,2,3 and 4
+// v2 contains many different tracks
+// v3 contains the jets 1 and 2
+//
+// AliTrack t1,t2,t3,t4;
+// ...
+// ... // code to fill the track data
+// ...
+//
+// AliJet j1,j2;
+// ...
+// ... // code to fill the jet data
+// ...
+//
+// AliVertex v1;
+// v1.SetVertexCopy(1);
+//
+// v1.AddTrack(t1);
+// v1.AddTrack(t2);
+// v1.AddTrack(t3);
+// v1.AddTrack(t4);
+//
+// Float_t r1[3]={2.4,0.1,-8.5};
+// v1.SetPosition(r1,"car");
+//
+// AliVertex v2;
+// v2.SetTrackCopy(1);
+//
+// AliTrack* tx=new AliTrack();
+// for (Int_t i=0; i<10; i++)
+// {
+// ...
+// ... // code to fill the track data
+// ...
+// v2.AddTrack(tx);
+// tx->Reset();
+// }
+//
+// Float_t r2[3]={1.6,-3.2,5.7};
+// v2.SetPosition(r2,"car");
+//
+// AliVertex v3;
+//
+// v3.AddJet(j1);
+// v3.AddJet(j2);
+//
+// Float_t r3[3]={6.2,4.8,1.3};
+// v3.SetPosition(r3,"car");
+//
+// v1.Info("sph");
+// v2.ListAll();
+// v3.List("cyl");
+//
+// Float_t e1=v1.GetEnergy();
+// Ali3Vector p1=v1.Get3Momentum();
+// Float_t loc[3];
+// v1.GetPosition(loc,"sph");
+// AliPosition r=v2.GetPosition();
+// r.Info();
+// Int_t nt=v2.GetNtracks();
+// AliTrack* tv=v2.GetTrack(1); // Access track number 1 of Vertex v2
+//
+// Specify the vertices v2 and v3 as secondary vertices of v1
+//
+// v1.AddVertex(v2);
+// v1.AddVertex(v3);
+//
+// v1.List();
+//
+// Int_t nv=v1.GetNvtx();
+// AliVertex* vx=v1.GetVertex(1); // Access 1st secondary vertex of v1
+// Float_t e=vx->GetEnergy();
+//
+// Float_t M=v1.GetInvmass();
+//
+// Reconstruct Vertex v1 from scratch
+//
+// v1.Reset();
+// v1.SetNvmax(25); // Increase initial no. of sec. vertices
+// v1.AddTrack(t3);
+// v1.AddTrack(t4);
+// v1.AddJet(j2);
+// Float_t pos[3]={7,9,4};
+// v1.SetPosition(pos,"car");
+//
+// Note : All quantities are in GeV, GeV/c or GeV/c**2
+//
+//--- Author: Nick van Eijndhoven 04-apr-1998 UU-SAP Utrecht
+//- Modified: NvE $Date$ UU-SAP Utrecht
+///////////////////////////////////////////////////////////////////////////
+