Some pointers initialized
[u/mrichter/AliRoot.git] / STEER / AliVertex.h
CommitLineData
8a553be2 1#ifndef ALIVERTEX_H
2#define ALIVERTEX_H
3/* Copyright(c) 1998-2003, ALICE Experiment at CERN, All rights reserved. *
4 * See cxx source for full Copyright notice */
5
6
7//-------------------------------------------------------
8// Base Vertex Class
9// Used for secondary vertices and as a base class for primary vertices
10// Origin: F. Prino, Torino, prino@to.infn.it
11//-------------------------------------------------------
12
13
14#include <TNamed.h>
15
16class AliVertex : public TNamed {
17
18 public:
19
20 AliVertex();
21 AliVertex(Double_t position[3],Double_t dispersion,
22 Int_t nContributors);
2d57349e 23 AliVertex(const AliVertex &source);
24 AliVertex &operator=(const AliVertex &source);
8a553be2 25 virtual ~AliVertex();
26
27
28 virtual void SetXYZ(Double_t pos[3])
29 {for(Int_t j=0; j<3; j++) fPosition[j]=pos[j];}
30 virtual void SetXv(Double_t xVert) {fPosition[0]=xVert; }
31 virtual void SetYv(Double_t yVert) {fPosition[1]=yVert; }
32 virtual void SetZv(Double_t zVert) {fPosition[2]=zVert; }
33 virtual void SetDispersion(Double_t disp) { fSigma=disp; }
34 virtual void SetNContributors(Int_t nContr) {fNContributors=nContr; }
35
36 virtual void GetXYZ(Double_t position[3]) const;
37 virtual Double_t GetXv() const { return fPosition[0]; }
38 virtual Double_t GetYv() const { return fPosition[1]; }
39 virtual Double_t GetZv() const { return fPosition[2]; }
40 virtual Double_t GetDispersion() const { return fSigma; }
41 virtual Int_t GetNContributors() const { return fNContributors; }
c1b20d31 42 virtual Int_t GetNIndices() const { return fNIndices; }
31135a30 43 virtual Bool_t GetStatus() const {
44 if(fNContributors>0) return 1;
45 return 0;
46 }
8a553be2 47
48 virtual void Print(Option_t* option = "") const;
c1b20d31 49 virtual void SetIndices(Int_t nindices,UShort_t *indices);
50 virtual UShort_t *GetIndices() const { return fIndices; }
51 virtual Bool_t UsesTrack(Int_t index) const;
52 virtual void PrintIndices() const { if(fNIndices>0)
53 for(Int_t i=0;i<fNIndices;i++) printf("AliVertex uses track %d\n",fIndices[i]); return; }
8a553be2 54
55 protected:
56
c1b20d31 57 Double_t fPosition[3]; // vertex position
58 Double_t fSigma; // track dispersion around found vertex
8a553be2 59 Int_t fNContributors; // # of tracklets/tracks used for the estimate
c1b20d31 60 Int_t fNIndices; // # of indices
61 UShort_t *fIndices; //[fNIndices] indices of tracks used for vertex
8a553be2 62
63
c1b20d31 64 ClassDef(AliVertex,2) // Class for Primary Vertex
8a553be2 65};
66
67#endif