]> git.uio.no Git - u/mrichter/AliRoot.git/blob - HLT/global/AliFlatESDVertex.h
67044909e5987296f77bffeafecf0405767a18bf
[u/mrichter/AliRoot.git] / HLT / global / AliFlatESDVertex.h
1 #ifndef ALIFLATESDVERTEX_H
2 #define ALIFLATESDVERTEX_H
3
4 /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
5  * See cxx source for full Copyright notice                               *
6  * Primary Authors : Sergey Gorbunov, Jochen Thaeder, Chiara Zampolli     */
7
8 /**
9  * >> Flat structure representing a ESD vertex <<
10  */
11
12 #include "Rtypes.h"
13 #include "AliVVvertex.h"
14 #include "AliESDVertex.h"
15
16 class AliFlatESDVertex: public AliVVvertex
17 //class AliFlatESDVertex
18 {
19   public:
20   Double32_t fPosition[3];    // vertex position
21   Double32_t fCov[6];  // vertex covariance matrix
22   Int_t    fNContributors;  // # of tracklets/tracks used for the estimate   
23   Double32_t fChi2;  // chi2 of vertex fit
24   /*
25     Double32_t fSigma;          // track dispersion around found vertex
26     Char_t fID;       // ID of this vertex within an ESD event
27     Char_t fBCID;     // BC ID assigned to vertex
28   */
29
30         AliFlatESDVertex(Bool_t){}
31
32   AliFlatESDVertex() :fNContributors(0), fChi2(0){
33     for( int i=0; i<3; i++) fPosition[i] = -9999;
34     for( int i=0; i<6; i++) fCov[i] = -9999;
35   }
36
37   void Set(const AliESDVertex &v );
38
39   Double32_t GetX() const { return fPosition[0]; }
40   Double32_t GetY() const { return fPosition[1]; }
41   Double32_t GetZ() const { return fPosition[2]; }
42   
43   void GetXYZ(Double_t pos[3]) const { for(Int_t j=0; j<3; j++) pos[j]=fPosition[j]; }
44   void SetXYZ(Double_t pos[3]) { for(Int_t j=0; j<3; j++) fPosition[j]=pos[j]; }
45
46   void   SetX(Double_t xVert) {fPosition[0]=xVert; }
47   void   SetY(Double_t yVert) {fPosition[1]=yVert; }
48   void   SetZ(Double_t zVert) {fPosition[2]=zVert; } 
49   void   SetNContributors(Int_t nContr) {fNContributors=nContr; }
50
51
52   Int_t    GetNContributors() const { return fNContributors; }
53
54   /*
55   void     GetCovarianceMatrix(Double_t covmatrix[6]) const;
56   void     SetCovarianceMatrix(const Double_t *) {}
57   
58   Double_t GetChi2perNDF() const {return -999.;}
59   Double_t GetChi2() const {return -999.;}
60   void     SetChi2(Double_t ) {}
61   Int_t    GetNDF() const {return -999;}
62
63   void     GetSigmaXYZ(Double_t sigma[3]) const;
64   void     GetCovMatrix(Double_t covmatrix[6]) const;
65   void     GetCovarianceMatrix(Double_t covmatrix[6]) const 
66                     {GetCovMatrix(covmatrix);}
67   void     GetSNR(Double_t snr[3]) const;
68   void     SetCovarianceMatrix(const Double_t *cov);
69
70   Double_t GetXRes() const {return TMath::Sqrt(fCovXX);}
71   Double_t GetYRes() const {return TMath::Sqrt(fCovYY);}
72   Double_t GetZRes() const {return TMath::Sqrt(fCovZZ);}
73   Double_t GetXSNR() const { return fSNR[0]; }
74   Double_t GetYSNR() const { return fSNR[1]; }
75   Double_t GetZSNR() const { return fSNR[2]; }
76   void     SetSNR(double snr, int i) {if (i<3 && i>=0) fSNR[i] = snr;}
77
78   Double_t GetChi2() const { return fChi2; }
79   void     SetChi2(Double_t chi) { fChi2 = chi; }
80   Double_t GetChi2toNDF() const 
81     { return fChi2/(2.*(Double_t)fNContributors-3.); }
82   Double_t GetChi2perNDF() const { return GetChi2toNDF();}
83   Int_t    GetNDF() const {return (2*fNContributors-3);}
84
85   void     Print(Option_t* option = "") const;
86   void     PrintStatus() const {Print();}
87
88   void     Reset() { SetToZero(); SetName("Vertex"); }
89
90   void     SetID(Char_t id) {fID=id;}
91   Char_t   GetID() const {return fID;}
92   //
93   Double_t GetWDist(const AliESDVertex* v) const;
94   */
95
96
97  
98 };
99
100 #endif