]> git.uio.no Git - u/mrichter/AliRoot.git/blob - STEER/ESD/AliMeanVertex.cxx
CTP raw data simulation changed to Run2 payload.
[u/mrichter/AliRoot.git] / STEER / ESD / AliMeanVertex.cxx
1 /**************************************************************************
2  * Copyright(c) 2007-2009, ALICE Experiment at CERN, All rights reserved. *
3  *                                                                        *
4  * Author: The ALICE Off-line Project.                                    *
5  * Contributors are mentioned in the code where appropriate.              *
6  *                                                                        *
7  * Permission to use, copy, modify and distribute this software and its   *
8  * documentation strictly for non-commercial purposes is hereby granted   *
9  * without fee, provided that the above copyright notice appears in all   *
10  * copies and that both the copyright notice and this permission notice   *
11  * appear in the supporting documentation. The authors make no claims     *
12  * about the suitability of this software for any purpose. It is          *
13  * provided "as is" without express or implied warranty.                  *
14  **************************************************************************/
15
16 #include "AliMeanVertex.h"
17
18 /* $Id$ */
19
20 /*****************************************************************************
21  *                                                                           *
22  * This class contains the coordinates of the mean primary vertex position   *
23  * computed by AliITSMeanVertex                                              *
24  *                                                                           *
25 *****************************************************************************/
26
27 ClassImp(AliMeanVertex)
28
29 //--------------------------------------------------------------------------
30 AliMeanVertex::AliMeanVertex() :
31   AliESDVertex(),
32   fTotTracklets(0.),
33   fAverTracklets(0.),
34   fSigmaOnAverTrack(0.) {
35   //
36   // Default Constructor, set everything to 0
37   //
38   for(Int_t i=0;i<3;i++){
39     fErrW[i]=0.;
40   }
41 }
42
43 //--------------------------------------------------------------------------
44 AliMeanVertex::AliMeanVertex(Double_t pos[3],Double_t err[3],Double_t cov[6],Int_t nevents, Float_t notracklets, Float_t avertracklets, Float_t signotrackl) :
45   AliESDVertex(pos,cov,0.,nevents,"MeanVertex"),
46   fTotTracklets(notracklets),
47   fAverTracklets(avertracklets),
48   fSigmaOnAverTrack(signotrackl) {
49   //
50   // Standard Constructor
51   //
52   for(Int_t i=0;i<3;i++){
53     fErrW[i]=err[i];
54   }
55 }
56
57 //--------------------------------------------------------------------------
58 void AliMeanVertex::GetErrorsOnPosition(Double_t err[3]) const {
59   //
60   // Return errors on vertex average position (weighted mean on several events)
61   //
62   err[0] = fErrW[0];
63   err[1] = fErrW[1];
64   err[2] = fErrW[2];
65
66   return;
67 }