]>
Commit | Line | Data |
---|---|---|
251a2c81 | 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" | |
50ff8c36 | 13 | #include "AliVVvertex.h" |
251a2c81 | 14 | #include "AliESDVertex.h" |
f009a562 | 15 | #include "AliFlatESDMisc.h" |
251a2c81 | 16 | |
8dbbdcd3 | 17 | class AliFlatESDVertex: public AliVVvertex |
18 | //class AliFlatESDVertex | |
251a2c81 | 19 | { |
f009a562 | 20 | friend class AliFlatESDEvent; |
21 | public: | |
251a2c81 | 22 | Double32_t fPosition[3]; // vertex position |
23 | Double32_t fCov[6]; // vertex covariance matrix | |
24 | Int_t fNContributors; // # of tracklets/tracks used for the estimate | |
25 | Double32_t fChi2; // chi2 of vertex fit | |
26 | /* | |
27 | Double32_t fSigma; // track dispersion around found vertex | |
28 | Char_t fID; // ID of this vertex within an ESD event | |
29 | Char_t fBCID; // BC ID assigned to vertex | |
30 | */ | |
31 | ||
8fcd8556 | 32 | virtual ~AliFlatESDVertex() {} |
488e1434 | 33 | |
251a2c81 | 34 | AliFlatESDVertex() :fNContributors(0), fChi2(0){ |
35 | for( int i=0; i<3; i++) fPosition[i] = -9999; | |
36 | for( int i=0; i<6; i++) fCov[i] = -9999; | |
37 | } | |
38 | ||
39 | void Set(const AliESDVertex &v ); | |
40 | ||
41 | Double32_t GetX() const { return fPosition[0]; } | |
42 | Double32_t GetY() const { return fPosition[1]; } | |
43 | Double32_t GetZ() const { return fPosition[2]; } | |
44 | ||
45 | void GetXYZ(Double_t pos[3]) const { for(Int_t j=0; j<3; j++) pos[j]=fPosition[j]; } | |
46 | void SetXYZ(Double_t pos[3]) { for(Int_t j=0; j<3; j++) fPosition[j]=pos[j]; } | |
47 | ||
48 | void SetX(Double_t xVert) {fPosition[0]=xVert; } | |
49 | void SetY(Double_t yVert) {fPosition[1]=yVert; } | |
50 | void SetZ(Double_t zVert) {fPosition[2]=zVert; } | |
51 | void SetNContributors(Int_t nContr) {fNContributors=nContr; } | |
52 | ||
53 | ||
54 | Int_t GetNContributors() const { return fNContributors; } | |
55 | ||
56 | /* | |
57 | void GetCovarianceMatrix(Double_t covmatrix[6]) const; | |
58 | void SetCovarianceMatrix(const Double_t *) {} | |
59 | ||
60 | Double_t GetChi2perNDF() const {return -999.;} | |
61 | Double_t GetChi2() const {return -999.;} | |
62 | void SetChi2(Double_t ) {} | |
63 | Int_t GetNDF() const {return -999;} | |
64 | ||
65 | void GetSigmaXYZ(Double_t sigma[3]) const; | |
66 | void GetCovMatrix(Double_t covmatrix[6]) const; | |
67 | void GetCovarianceMatrix(Double_t covmatrix[6]) const | |
68 | {GetCovMatrix(covmatrix);} | |
69 | void GetSNR(Double_t snr[3]) const; | |
70 | void SetCovarianceMatrix(const Double_t *cov); | |
71 | ||
72 | Double_t GetXRes() const {return TMath::Sqrt(fCovXX);} | |
73 | Double_t GetYRes() const {return TMath::Sqrt(fCovYY);} | |
74 | Double_t GetZRes() const {return TMath::Sqrt(fCovZZ);} | |
75 | Double_t GetXSNR() const { return fSNR[0]; } | |
76 | Double_t GetYSNR() const { return fSNR[1]; } | |
77 | Double_t GetZSNR() const { return fSNR[2]; } | |
78 | void SetSNR(double snr, int i) {if (i<3 && i>=0) fSNR[i] = snr;} | |
79 | ||
80 | Double_t GetChi2() const { return fChi2; } | |
81 | void SetChi2(Double_t chi) { fChi2 = chi; } | |
82 | Double_t GetChi2toNDF() const | |
83 | { return fChi2/(2.*(Double_t)fNContributors-3.); } | |
84 | Double_t GetChi2perNDF() const { return GetChi2toNDF();} | |
85 | Int_t GetNDF() const {return (2*fNContributors-3);} | |
86 | ||
87 | void Print(Option_t* option = "") const; | |
88 | void PrintStatus() const {Print();} | |
89 | ||
90 | void Reset() { SetToZero(); SetName("Vertex"); } | |
91 | ||
92 | void SetID(Char_t id) {fID=id;} | |
93 | Char_t GetID() const {return fID;} | |
94 | // | |
95 | Double_t GetWDist(const AliESDVertex* v) const; | |
96 | */ | |
97 | ||
f009a562 | 98 | private: |
99 | ||
100 | AliFlatESDVertex(AliFlatESDSpecialConstructorFlag f); | |
251a2c81 | 101 | |
102 | }; | |
103 | ||
251a2c81 | 104 | #endif |