]> git.uio.no Git - u/mrichter/AliRoot.git/blob - ITS/AliITSMeanVertexer.h
Updated survey information for ladder 2 of SDD layer 3 (M. Poghosyan)
[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 class AliITSVertexer;
22
23 class AliITSMeanVertexer : public TObject {
24
25  public:
26   // default constructor
27     AliITSMeanVertexer(Bool_t mode = kTRUE);   
28     virtual ~AliITSMeanVertexer();
29  
30     Bool_t Init();
31  
32     void   SetFilterOnContributors(Int_t nc=1){fFilterOnContributors = nc;}
33     void   SetFilterOnTracklets(Int_t nc=1){fFilterOnTracklets = nc;}
34     Bool_t Reconstruct(AliRawReader *rawReader);
35     void   WriteVertices(const char *filename);
36
37     const TH2F*GetVertexXY() const { return fVertexXY; }
38     const TH1F*GetVertexZ()  const { return fVertexZ;  }
39  
40  private:
41     // copy constructor (NO copy allowed)
42     AliITSMeanVertexer(const AliITSMeanVertexer& vtxr);
43     // assignment operator (NO assignment allowed)
44     AliITSMeanVertexer& operator=(const AliITSMeanVertexer& /* vtxr */);
45
46     Bool_t Filter(AliESDVertex *vert,AliMultiplicity *mult);
47     void   AddToMean(AliESDVertex *vert);
48     Bool_t ComputeMean();
49
50     AliITSDetTypeRec *fDetTypeRec; //! ITS reco class
51     TH2F    *fVertexXY;        //! histogram with transverse vertex distribution (vertex diamond)
52     TH1F    *fVertexZ;         //! histogram with longitudinal vertex distribution
53
54     Double_t fWeighPosSum[3];    //! weighted average position sum (transient)
55     Double_t fWeighSigSum[3];    //! weighted average position sum (transient)
56     Double_t fAverPosSum[3];     //! average position sum (transient)
57     Double_t fAverPosSqSum[3][3];//! average square position sum for covariance (transient)
58     Double_t fWeighPos[3];       //! weighted average position
59     Double_t fWeighSig[3];       //! errors on weighted average position
60     Double_t fAverPos[3];        //! average position
61     Double_t fAverPosSq[3][3];   //! average square position for covariance
62     Int_t fNoEventsContr;        //! number of events used for mean vertex
63     Float_t fTotTracklets;       //! total number of tracklets used (integrated)
64     Float_t fAverTracklets;      //! average number of tracklets per event
65     Float_t fTotTrackletsSq;     //! total squared number of tracklets (transient)
66     Float_t fSigmaOnAverTracks;  //! RMS of fAverTracklets
67     Int_t fFilterOnContributors; //! Numb. of contrib must be > fFilter...
68     Int_t fFilterOnTracklets;    //! Numb. of tracklets must be > fFilterOnTr...
69     Bool_t fMode;                //! kTRUE for Vertexer3D; 
70                                  //! kFALSE for VertexerTapan
71     AliITSVertexer* fVertexer;   //! vertexer
72
73     ClassDef(AliITSMeanVertexer,0)
74 };
75
76 #endif