- Three classes by MinJung Kweon AliHFEpriVtx, AliHFEsecVtx and AliHFEmcQA for primar...
[u/mrichter/AliRoot.git] / STEER / AliESDVertex.h
CommitLineData
d681bb2d 1#ifndef ALIESDVERTEX_H
2#define ALIESDVERTEX_H
0fc5cc25 3/* Copyright(c) 1998-2003, ALICE Experiment at CERN, All rights reserved. *
c5f0f3c1 4 * See cxx source for full Copyright notice */
504de69b 5
2257f27e 6/* $Id$ */
c5f0f3c1 7
8//-------------------------------------------------------
9// Primary Vertex Class
af7ba10c 10// for the Event Data Summary Class
c5f0f3c1 11// Origin: A.Dainese, Padova, andrea.dainese@pd.infn.it
12//-------------------------------------------------------
13
14/*****************************************************************************
15 * *
16 * This class deals with primary vertex. *
d681bb2d 17 * AliESDVertex objects are created by the class AliITSVertexer and its *
c5f0f3c1 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) *
d681bb2d 23 * This class replaces the previous version of AliESDVertex, designed *
c5f0f3c1 24 * originally only for A-A collisions. The functionalities of the old class *
25 * are maintained in the AliITSVertexerIons class *
26 * *
27 *****************************************************************************/
28
090026bf 29#include <TMath.h>
c5f0f3c1 30
d65adc48 31#include "AliVertex.h"
8a553be2 32
33class AliESDVertex : public AliVertex {
504de69b 34
35 public:
36
d681bb2d 37 AliESDVertex();
38 AliESDVertex(Double_t positionZ,Double_t sigmaZ,Int_t nContributors,
a27d7b02 39 const Char_t *vtxName="Vertex");
d681bb2d 40 AliESDVertex(Double_t position[3],Double_t covmatrix[6],
c5f0f3c1 41 Double_t chi2,Int_t nContributors,
a27d7b02 42 const Char_t *vtxName="Vertex");
d681bb2d 43 AliESDVertex(Double_t position[3],Double_t sigma[3],
a27d7b02 44 const Char_t *vtxName="Vertex");
d681bb2d 45 AliESDVertex(Double_t position[3],Double_t sigma[3],Double_t snr[3],
a27d7b02 46 const Char_t *vtxName="Vertex");
de04aa35 47 AliESDVertex(const AliESDVertex &source);
48 AliESDVertex &operator=(const AliESDVertex &source);
732a24fe 49 virtual void Copy(TObject &obj) const;
c5f0f3c1 50
de04aa35 51 virtual ~AliESDVertex() {}
c5f0f3c1 52
c5f0f3c1 53 void GetSigmaXYZ(Double_t sigma[3]) const;
54 void GetCovMatrix(Double_t covmatrix[6]) const;
bdd011d6 55 void GetCovarianceMatrix(Double_t covmatrix[6]) const
56 {GetCovMatrix(covmatrix);}
c5f0f3c1 57 void GetSNR(Double_t snr[3]) const;
58
8a553be2 59 Double_t GetXRes() const {return TMath::Sqrt(fCovXX);}
60 Double_t GetYRes() const {return TMath::Sqrt(fCovYY);}
61 Double_t GetZRes() const {return TMath::Sqrt(fCovZZ);}
c5f0f3c1 62 Double_t GetXSNR() const { return fSNR[0]; }
63 Double_t GetYSNR() const { return fSNR[1]; }
64 Double_t GetZSNR() const { return fSNR[2]; }
65
c5f0f3c1 66 Double_t GetChi2() const { return fChi2; }
67 Double_t GetChi2toNDF() const
68 { return fChi2/(2.*(Double_t)fNContributors-3.); }
bdd011d6 69 Double_t GetChi2perNDF() const { return GetChi2toNDF();}
70 Int_t GetNDF() const {return (2*fNContributors-3);}
c5f0f3c1 71
5f7789fc 72 void Print(Option_t* option = "") const;
73 void PrintStatus() const {Print();}
bf25155c 74
de04aa35 75 void Reset() { SetToZero(); SetName("Vertex"); }
bf25155c 76
6dc21f57 77 void SetID(Char_t id) {fID=id;}
78 Char_t GetID() const {return fID;}
79
0fc5cc25 80 protected:
81
a5886c40 82 Double32_t fCovXX,fCovXY,fCovYY,fCovXZ,fCovYZ,fCovZZ; // vertex covariance matrix
83 Double32_t fSNR[3]; // S/N ratio
84 Double32_t fChi2; // chi2 of vertex fit
af7ba10c 85
6dc21f57 86 Char_t fID; // ID of this vertex within an ESD event
87
af7ba10c 88 private:
89
90 void SetToZero();
91
6dc21f57 92 ClassDef(AliESDVertex,7) // Class for Primary Vertex
af7ba10c 93};
504de69b 94
95#endif
c5f0f3c1 96
97
98
99
100
101
102