3 ///////////////////////////////////////////////////////////////////////////
5 // Creation and investigation of an AliVertex.
6 // An AliVertex can be constructed by adding AliTracks and/or AliJets.
8 // Note : Also (secondary) vertices can be added to a vertex.
10 // Coding example to make 3 vertices v1, v2 and v3.
11 // ------------------------------------------------
12 // v1 contains the tracks 1,2,3 and 4
13 // v2 contains the tracks 5,6 and 7
14 // v3 contains the jets 1 and 2
16 // AliTrack t1,t2,t3,t4,t5,t6,t7;
18 // ... // code to fill the track data
23 // ... // code to fill the jet data
33 // Float_t r1[3]={2.4,0.1,-8.5};
34 // v1.SetPosition(r1,"car");
41 // Float_t r2[3]={1.6,-3.2,5.7};
42 // v2.SetPosition(r2,"car");
49 // Float_t r3[3]={6.2,4.8,1.3};
50 // v3.SetPosition(r3,"car");
56 // Float_t e1=v1.GetEnergy();
57 // Ali3Vector p1=v1.Get3Momentum();
59 // v1.GetPosition(loc,"sph");
60 // AliPosition r=v2.GetPosition();
62 // Int_t nt=v2.GetNtracks();
63 // AliTrack* tv=v2.GetTrack(1); // Access track number 1 of Vertex v2
65 // Specify the vertices v2 and v3 as secondary vertices of v1
72 // Int_t nv=v1.GetNvtx();
73 // AliVertex* vx=v1.GetVertex(1); // Access 1st secondary vertex of v1
74 // Float_t e=vx->GetEnergy();
76 // Float_t M=v1.GetInvmass();
78 // Reconstruct Vertex v1 from scratch
81 // v1.SetNvmax(25); // Increase initial no. of sec. vertices
85 // Float_t pos[3]={7,9,4};
86 // v1.SetPosition(pos,"car");
88 // Note : All quantities are in GeV, GeV/c or GeV/c**2
90 //--- NvE 04-apr-1998 UU-SAP Utrecht
91 //--- Modified : NvE 08-apr-1999 UU-SAP Utrecht to inherit from AliJet
92 ///////////////////////////////////////////////////////////////////////////
98 #include "TObjArray.h"
101 #include "AliPosition.h"
103 class AliVertex : public AliJet,public AliPosition
106 AliVertex(); // Default constructor
107 AliVertex(Int_t n); // Create a vertex to hold initially n tracks
108 ~AliVertex(); // Default destructor
109 void Reset(); // Reset all values
110 void Add(AliJet& j); // Add a jet of tracks to the vertex
111 void Add(AliVertex& v); // Add a (secondary) vertex to the current vertex
112 void Add(AliJet* j) { Add(*j); }
113 void Add(AliVertex* v) { Add(*v); }
114 void Info(TString f="car"); // Print the vertex info within coordinate frame f
115 void List(TString f="car"); // Print vertex prim. track information for coord. frame f
116 void ListAll(TString f="car"); // Print prim. + sec. vertex full track info for coord. frame f
117 Int_t GetNvertices(); // Return the number of (secondary) vertices
118 AliVertex* GetVertex(Int_t i); // Provide i-th (secondary) vertex
119 void SetNvmax(Int_t n=2); // Set the initial max. number of (secondary) vertices
122 Int_t fNvmax; // The maximum number of (secondary) vertices
123 Int_t fNvtx; // The number of (secondary) vertices
124 TObjArray* fVertices; // Array to hold the pointers to the (secondary) vertices
127 void Dump(AliVertex* v,Int_t n,TString f); // Recursively print all sec. vertices
129 ClassDef(AliVertex,1) // Class definition to enable ROOT I/O