]> git.uio.no Git - u/mrichter/AliRoot.git/blame - ITS/AliITSMeanVertexer.h
add h-jet jet mass analysis class
[u/mrichter/AliRoot.git] / ITS / AliITSMeanVertexer.h
CommitLineData
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 16class TClonesArray;
37add1d1 17class TH1F;
18class TH2F;
a3a3a28f 19class AliRawReader;
a3a3a28f 20class AliESDVertex;
cf0b1cea 21class AliITSDetTypeRec;
d5eae813 22class AliITSVertexer;
a3a3a28f 23
24class 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);
51a579a9 35 void SetCutOnErrX(Double_t cut=9.5){fErrXCut = cut;}
36 void SetCutOnR(Double_t cut=0.5){fRCut = cut;}
37 void SetCutOnCls(UInt_t vmin=50, UInt_t vmax=7000){fLowSPD0=vmin; fHighSPD0=vmax;}
4f40f207 38 void SetZFiducialRegion(Double_t zcut=40.){fZCutDiamond=zcut;}
37add1d1 39 void WriteVertices(const char *filename);
a3a3a28f 40
cf0b1cea 41 const TH2F*GetVertexXY() const { return fVertexXY; }
42 const TH1F*GetVertexZ() const { return fVertexZ; }
199775b9 43
44 // Methods used for debug purposes
45 Int_t GetArrayEntries() const {return fVertArray.GetEntries();}
46 const AliESDVertex* GetElementAt(Int_t i) const {return (AliESDVertex*)fVertArray[i];}
47 UInt_t GetSPD0cls(Int_t i) const {return fClu0[i];}
48 Bool_t IsGoodVertex(Int_t i) const {return (fAccEvents.TestBitNumber(i)); }
a3a3a28f 49
37add1d1 50 private:
51 // copy constructor (NO copy allowed)
a3a3a28f 52 AliITSMeanVertexer(const AliITSMeanVertexer& vtxr);
53 // assignment operator (NO assignment allowed)
54 AliITSMeanVertexer& operator=(const AliITSMeanVertexer& /* vtxr */);
37add1d1 55
199775b9 56 Bool_t Filter(AliESDVertex *vert,UInt_t mult);
37add1d1 57 void AddToMean(AliESDVertex *vert);
199775b9 58 Bool_t ComputeMean(Bool_t killOutliers);
a1b1ad51 59 void Reset(Bool_t redefine2D,Bool_t complete);
8e2abaa0 60 void ResetArray(){fAccEvents.ResetAllBits(kTRUE); fVertArray.Clear();
61 fIndex=0; for(Int_t i=0;i<fgkMaxNumOfEvents;i++)fClu0[i]=0; }
a3a3a28f 62
199775b9 63 static const Int_t fgkMaxNumOfEvents; // max. number of events
37add1d1 64 AliITSDetTypeRec *fDetTypeRec; //! ITS reco class
65 TH2F *fVertexXY; //! histogram with transverse vertex distribution (vertex diamond)
66 TH1F *fVertexZ; //! histogram with longitudinal vertex distribution
67
762133f4 68 Double_t fWeighPosSum[3]; //! weighted average position sum (transient)
69 Double_t fWeighSigSum[3]; //! weighted average position sum (transient)
70 Double_t fAverPosSum[3]; //! average position sum (transient)
71 Double_t fAverPosSqSum[3][3];//! average square position sum for covariance (transient)
72 Double_t fWeighPos[3]; //! weighted average position
73 Double_t fWeighSig[3]; //! errors on weighted average position
74 Double_t fAverPos[3]; //! average position
75 Double_t fAverPosSq[3][3]; //! average square position for covariance
76 Int_t fNoEventsContr; //! number of events used for mean vertex
199775b9 77 Double_t fTotContributors; //! Integrated number of contributors
78 Double_t fAverContributors; //! Average number of contributors
a3a3a28f 79 Int_t fFilterOnContributors; //! Numb. of contrib must be > fFilter...
d5eae813 80 Bool_t fMode; //! kTRUE for Vertexer3D;
81 //! kFALSE for VertexerTapan
82 AliITSVertexer* fVertexer; //! vertexer
a3a3a28f 83
199775b9 84 TBits fAccEvents; //! bit string: 1 for good events 0 for bad ones
85 TClonesArray fVertArray; //! array of vertices to be averaged
86 UInt_t *fClu0; //! number of clusters on SPD inner layer
87 Int_t fIndex; //! current index on the arrays
88 Double_t fErrXCut; //! cut on error on X (error*1000<fErrXCut)
89 Double_t fRCut; //| cut on distance from first estimate (mm)
4f40f207 90 Double_t fZCutDiamond; //! -/+ fZCutDiamond is the Z fiducial region
199775b9 91 UInt_t fLowSPD0; //! low SPD0 cls value to accept event
92 UInt_t fHighSPD0; //! high SPD0 cls value to accept event
8e2abaa0 93 TH1F *fMultH; //! debug hist: mult. on SPD0 before Filter
94 TH1F *fErrXH; //! debug hist: error on X before Filter
95 TH1F *fMultHa; //! debug hist: mult. on SPD0 after Filter
96 TH1F *fErrXHa; //! debug hist: error on X after Filter
97 TH1F *fDistH; //! debug hist: distance from peak
a1b1ad51 98 TH1F *fContrH; //! debug hist: number of contributors
99 TH1F *fContrHa; //! debug hist: number of contributors - after filter
199775b9 100
cf0b1cea 101 ClassDef(AliITSMeanVertexer,0)
a3a3a28f 102};
103
104#endif