Additional prrotection
[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);
23 virtual ~AliVertex();
24
25
26 virtual void SetXYZ(Double_t pos[3])
27 {for(Int_t j=0; j<3; j++) fPosition[j]=pos[j];}
28 virtual void SetXv(Double_t xVert) {fPosition[0]=xVert; }
29 virtual void SetYv(Double_t yVert) {fPosition[1]=yVert; }
30 virtual void SetZv(Double_t zVert) {fPosition[2]=zVert; }
31 virtual void SetDispersion(Double_t disp) { fSigma=disp; }
32 virtual void SetNContributors(Int_t nContr) {fNContributors=nContr; }
33
34 virtual void GetXYZ(Double_t position[3]) const;
35 virtual Double_t GetXv() const { return fPosition[0]; }
36 virtual Double_t GetYv() const { return fPosition[1]; }
37 virtual Double_t GetZv() const { return fPosition[2]; }
38 virtual Double_t GetDispersion() const { return fSigma; }
39 virtual Int_t GetNContributors() const { return fNContributors; }
40
41 virtual void Print(Option_t* option = "") const;
42
43 protected:
44
45 Double_t fPosition[3]; // vertex position
46 Double_t fSigma; // track dispersion around found vertex
47 Int_t fNContributors; // # of tracklets/tracks used for the estimate
48
49
50 ClassDef(AliVertex,1) // Class for Primary Vertex
51};
52
53#endif