]>
Commit | Line | Data |
---|---|---|
a3a3a28f | 1 | #ifndef ALIITSMEANVERTEXER_H |
2 | #define ALIITSMEANVERTEXER_H | |
3 | ||
a3a3a28f | 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 | ||
cf0b1cea | 13 | #include <TObject.h> |
199775b9 | 14 | #include <TBits.h> |
cf0b1cea | 15 | |
199775b9 | 16 | class TClonesArray; |
37add1d1 | 17 | class TH1F; |
18 | class TH2F; | |
a3a3a28f | 19 | class AliRawReader; |
a3a3a28f | 20 | class AliESDVertex; |
cf0b1cea | 21 | class AliITSDetTypeRec; |
d5eae813 | 22 | class AliITSVertexer; |
a3a3a28f | 23 | |
24 | class AliITSMeanVertexer : public TObject { | |
25 | ||
26 | public: | |
37add1d1 | 27 | // default constructor |
d5eae813 | 28 | AliITSMeanVertexer(Bool_t mode = kTRUE); |
a3a3a28f | 29 | virtual ~AliITSMeanVertexer(); |
37add1d1 | 30 | |
31 | Bool_t Init(); | |
32 | ||
33 | void SetFilterOnContributors(Int_t nc=1){fFilterOnContributors = nc;} | |
d5eae813 | 34 | Bool_t Reconstruct(AliRawReader *rawReader); |
199775b9 | 35 | void SetCutOnErrX(Double_t cut=3.){fErrXCut = cut;} |
36 | void SetCutOnR(Double_t cut=0.2){fRCut = cut;} | |
37 | void SetCutOnCls(UInt_t vmin=50, UInt_t vmax=4000){fLowSPD0=vmin; fHighSPD0=vmax;} | |
37add1d1 | 38 | void WriteVertices(const char *filename); |
a3a3a28f | 39 | |
cf0b1cea | 40 | const TH2F*GetVertexXY() const { return fVertexXY; } |
41 | const TH1F*GetVertexZ() const { return fVertexZ; } | |
199775b9 | 42 | |
43 | // Methods used for debug purposes | |
44 | Int_t GetArrayEntries() const {return fVertArray.GetEntries();} | |
45 | const AliESDVertex* GetElementAt(Int_t i) const {return (AliESDVertex*)fVertArray[i];} | |
46 | UInt_t GetSPD0cls(Int_t i) const {return fClu0[i];} | |
47 | Bool_t IsGoodVertex(Int_t i) const {return (fAccEvents.TestBitNumber(i)); } | |
a3a3a28f | 48 | |
37add1d1 | 49 | private: |
50 | // copy constructor (NO copy allowed) | |
a3a3a28f | 51 | AliITSMeanVertexer(const AliITSMeanVertexer& vtxr); |
52 | // assignment operator (NO assignment allowed) | |
53 | AliITSMeanVertexer& operator=(const AliITSMeanVertexer& /* vtxr */); | |
37add1d1 | 54 | |
199775b9 | 55 | Bool_t Filter(AliESDVertex *vert,UInt_t mult); |
37add1d1 | 56 | void AddToMean(AliESDVertex *vert); |
199775b9 | 57 | Bool_t ComputeMean(Bool_t killOutliers); |
58 | void Reset(); | |
a3a3a28f | 59 | |
199775b9 | 60 | static const Int_t fgkMaxNumOfEvents; // max. number of events |
37add1d1 | 61 | AliITSDetTypeRec *fDetTypeRec; //! ITS reco class |
62 | TH2F *fVertexXY; //! histogram with transverse vertex distribution (vertex diamond) | |
63 | TH1F *fVertexZ; //! histogram with longitudinal vertex distribution | |
64 | ||
762133f4 | 65 | Double_t fWeighPosSum[3]; //! weighted average position sum (transient) |
66 | Double_t fWeighSigSum[3]; //! weighted average position sum (transient) | |
67 | Double_t fAverPosSum[3]; //! average position sum (transient) | |
68 | Double_t fAverPosSqSum[3][3];//! average square position sum for covariance (transient) | |
69 | Double_t fWeighPos[3]; //! weighted average position | |
70 | Double_t fWeighSig[3]; //! errors on weighted average position | |
71 | Double_t fAverPos[3]; //! average position | |
72 | Double_t fAverPosSq[3][3]; //! average square position for covariance | |
73 | Int_t fNoEventsContr; //! number of events used for mean vertex | |
199775b9 | 74 | Double_t fTotContributors; //! Integrated number of contributors |
75 | Double_t fAverContributors; //! Average number of contributors | |
a3a3a28f | 76 | Int_t fFilterOnContributors; //! Numb. of contrib must be > fFilter... |
d5eae813 | 77 | Bool_t fMode; //! kTRUE for Vertexer3D; |
78 | //! kFALSE for VertexerTapan | |
79 | AliITSVertexer* fVertexer; //! vertexer | |
a3a3a28f | 80 | |
199775b9 | 81 | TBits fAccEvents; //! bit string: 1 for good events 0 for bad ones |
82 | TClonesArray fVertArray; //! array of vertices to be averaged | |
83 | UInt_t *fClu0; //! number of clusters on SPD inner layer | |
84 | Int_t fIndex; //! current index on the arrays | |
85 | Double_t fErrXCut; //! cut on error on X (error*1000<fErrXCut) | |
86 | Double_t fRCut; //| cut on distance from first estimate (mm) | |
87 | UInt_t fLowSPD0; //! low SPD0 cls value to accept event | |
88 | UInt_t fHighSPD0; //! high SPD0 cls value to accept event | |
89 | ||
cf0b1cea | 90 | ClassDef(AliITSMeanVertexer,0) |
a3a3a28f | 91 | }; |
92 | ||
93 | #endif |