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