Added two missing includes to allow macro compilation (thanks to Laurent for remarkin...
[u/mrichter/AliRoot.git] / ITS / AliITSMeanVertexer.h
1 #ifndef ALIITSMEANVERTEXER_H
2 #define ALIITSMEANVERTEXER_H
3
4 ///////////////////////////////////////////////////////////////////////
5 //                                                                   //
6 // Class to compute vertex position using SPD local reconstruction   //
7 // An average vertex position using all the events                   //
8 // is built and saved                                                //
9 ///////////////////////////////////////////////////////////////////////
10
11 /* $Id$ */
12
13 #include <TObject.h>
14
15 class TH1F;
16 class TH2F;
17 class AliRawReader;
18 class AliMultiplicity;
19 class AliESDVertex;
20 class AliITSDetTypeRec;
21
22 class AliITSMeanVertexer : public TObject {
23
24  public:
25   // default constructor
26     AliITSMeanVertexer();   
27     virtual ~AliITSMeanVertexer();
28  
29     Bool_t Init();
30  
31     void   SetFilterOnContributors(Int_t nc=1){fFilterOnContributors = nc;}
32     void   SetFilterOnTracklets(Int_t nc=1){fFilterOnTracklets = nc;}
33     Bool_t Reconstruct(AliRawReader *rawReader, Bool_t mode = kTRUE);
34     void   WriteVertices(const char *filename);
35
36     const TH2F*GetVertexXY() const { return fVertexXY; }
37     const TH1F*GetVertexZ()  const { return fVertexZ;  }
38  
39  private:
40     // copy constructor (NO copy allowed)
41     AliITSMeanVertexer(const AliITSMeanVertexer& vtxr);
42     // assignment operator (NO assignment allowed)
43     AliITSMeanVertexer& operator=(const AliITSMeanVertexer& /* vtxr */);
44
45     Bool_t Filter(AliESDVertex *vert,AliMultiplicity *mult);
46     void   AddToMean(AliESDVertex *vert);
47     Bool_t ComputeMean();
48
49     AliITSDetTypeRec *fDetTypeRec; //! ITS reco class
50     TH2F    *fVertexXY;        //! histogram with transverse vertex distribution (vertex diamond)
51     TH1F    *fVertexZ;         //! histogram with longitudinal vertex distribution
52
53     Double_t fWeighPosSum[3];    //! weighted average position sum (transient)
54     Double_t fWeighSigSum[3];    //! weighted average position sum (transient)
55     Double_t fAverPosSum[3];     //! average position sum (transient)
56     Double_t fAverPosSqSum[3][3];//! average square position sum for covariance (transient)
57     Double_t fWeighPos[3];       //! weighted average position
58     Double_t fWeighSig[3];       //! errors on weighted average position
59     Double_t fAverPos[3];        //! average position
60     Double_t fAverPosSq[3][3];   //! average square position for covariance
61     Int_t fNoEventsContr;        //! number of events used for mean vertex
62     Float_t fTotTracklets;       //! total number of tracklets used (integrated)
63     Float_t fAverTracklets;      //! average number of tracklets per event
64     Float_t fTotTrackletsSq;     //! total squared number of tracklets (transient)
65     Float_t fSigmaOnAverTracks;  //! RMS of fAverTracklets
66     Int_t fFilterOnContributors; //! Numb. of contrib must be > fFilter...
67     Int_t fFilterOnTracklets;    //! Numb. of tracklets must be > fFilterOnTr...
68
69     ClassDef(AliITSMeanVertexer,0)
70 };
71
72 #endif