Line data Source code
1 : #ifndef ALIESDVERTEX_H
2 : #define ALIESDVERTEX_H
3 : /* Copyright(c) 1998-2003, ALICE Experiment at CERN, All rights reserved. *
4 : * See cxx source for full Copyright notice */
5 :
6 : /* $Id$ */
7 :
8 : //-------------------------------------------------------
9 : // Primary Vertex Class
10 : // for the Event Data Summary Class
11 : // Origin: A.Dainese, Padova, andrea.dainese@pd.infn.it
12 : //-------------------------------------------------------
13 :
14 : /*****************************************************************************
15 : * *
16 : * This class deals with primary vertex. *
17 : * AliESDVertex objects are created by the class AliITSVertexer and its *
18 : * derived classes. *
19 : * Different constructors are provided: *
20 : * - for primary vertex determined with pixels in pp (only Z) *
21 : * - for primary vertex determined with pixels in ion-ion (X,Y,Z) *
22 : * - for primary vertex determined with ITS tracks in pp (X,Y,Z) *
23 : * This class replaces the previous version of AliESDVertex, designed *
24 : * originally only for A-A collisions. The functionalities of the old class *
25 : * are maintained in the AliITSVertexerIons class *
26 : * *
27 : *****************************************************************************/
28 :
29 : #include <TMath.h>
30 :
31 : #include "AliVertex.h"
32 : class AliVTrack;
33 :
34 : class AliESDVertex : public AliVertex {
35 :
36 : public:
37 :
38 : AliESDVertex();
39 : AliESDVertex(Double_t positionZ,Double_t sigmaZ,Int_t nContributors,
40 : const Char_t *vtxName="Vertex");
41 : AliESDVertex(const Double_t position[3],const Double_t covmatrix[6],
42 : Double_t chi2,Int_t nContributors,
43 : const Char_t *vtxName="Vertex");
44 : AliESDVertex(Double_t position[3],Double_t sigma[3],
45 : const Char_t *vtxName="Vertex");
46 : AliESDVertex(Double_t position[3],Double_t sigma[3],Double_t snr[3],
47 : const Char_t *vtxName="Vertex");
48 : AliESDVertex(const AliESDVertex &source);
49 : AliESDVertex &operator=(const AliESDVertex &source);
50 : virtual void Copy(TObject &obj) const;
51 :
52 1588 : virtual ~AliESDVertex() {}
53 :
54 : void GetSigmaXYZ(Double_t sigma[3]) const;
55 : void GetCovMatrix(Double_t covmatrix[6]) const;
56 : void GetCovarianceMatrix(Double_t covmatrix[6]) const
57 1576 : {GetCovMatrix(covmatrix);}
58 : void GetSNR(Double_t snr[3]) const;
59 : void SetCovarianceMatrix(const Double_t *cov);
60 :
61 80 : Double_t GetXRes() const {return TMath::Sqrt(fCovXX);}
62 32 : Double_t GetYRes() const {return TMath::Sqrt(fCovYY);}
63 48 : Double_t GetZRes() const {return TMath::Sqrt(fCovZZ);}
64 0 : Double_t GetXSNR() const { return fSNR[0]; }
65 0 : Double_t GetYSNR() const { return fSNR[1]; }
66 0 : Double_t GetZSNR() const { return fSNR[2]; }
67 0 : void SetSNR(double snr, int i) {if (i<3 && i>=0) fSNR[i] = snr;}
68 :
69 16 : Double_t GetChi2() const { return fChi2; }
70 0 : void SetChi2(Double_t chi) { fChi2 = chi; }
71 : Double_t GetChi2toNDF() const
72 48 : { return fChi2/(2.*(Double_t)fNContributors-3.); }
73 0 : Double_t GetChi2perNDF() const { return GetChi2toNDF();}
74 0 : Int_t GetNDF() const {return (2*fNContributors-3);}
75 :
76 : void Print(Option_t* option = "") const;
77 0 : void PrintStatus() const {Print();}
78 :
79 0 : void Reset() { SetToZero(); SetName("Vertex"); }
80 :
81 16 : void SetID(Char_t id) {fID=id;}
82 588 : Char_t GetID() const {return fID;}
83 : //
84 216 : void SetBC(Int_t bc) {fBCID = bc;}
85 280 : Int_t GetBC() const {return fBCID;}
86 : Double_t GetWDist(const AliESDVertex* v) const;
87 :
88 : protected:
89 :
90 : Double32_t fCovXX,fCovXY,fCovYY,fCovXZ,fCovYZ,fCovZZ; // vertex covariance matrix
91 : Double32_t fSNR[3]; // S/N ratio
92 : Double32_t fChi2; // chi2 of vertex fit
93 :
94 : Char_t fID; // ID of this vertex within an ESD event
95 : Char_t fBCID; // BC ID assigned to vertex
96 : private:
97 :
98 : void SetToZero();
99 :
100 552 : ClassDef(AliESDVertex,8) // Class for Primary Vertex
101 : };
102 :
103 : #endif
104 :
105 :
106 :
107 :
108 :
109 :
110 :
|