1 #ifndef ALIITSVERTEXER3D_H
2 #define ALIITSVERTEXER3D_H
4 #include<AliITSVertexer.h>
6 ///////////////////////////////////////////////////////////////////
8 // Class for primary vertex finding (3D reconstruction) //
10 ///////////////////////////////////////////////////////////////////
14 #include <TClonesArray.h>
16 #include <AliESDVertex.h>
20 class AliITSVertexer3D : public AliITSVertexer {
25 virtual ~AliITSVertexer3D();
26 virtual AliESDVertex* FindVertexForCurrentEvent(TTree *itsClusterTree);
27 void FindVertex3DIterative();
28 void FindVertex3DIterativeMM();
29 void FindVertex3D(TTree *itsClusterTree);
30 AliESDVertex GetVertex3D() const {return fVert3D;}
31 // Double_t *Get3DPeak() {return f3DPeak;}
32 virtual void PrintStatus() const;
33 static Bool_t DistBetweenVertices(AliESDVertex &a, AliESDVertex &b, Double_t test, Double_t &dist);
34 void SetWideFiducialRegion(Double_t dz = 40.0, Double_t dr=2.5){
38 void SetNarrowFiducialRegion(Double_t dz = 0.5, Double_t dr=0.5){
42 void SetDeltaPhiCuts(Double_t dphiloose=0.5, Double_t dphitight=0.025){
43 SetCoarseDiffPhiCut(dphiloose);
44 SetDiffPhiMax(dphitight);
46 void SetCoarseDiffPhiCut(Double_t dphi = 0.5){fCoarseDiffPhiCut=dphi;}
47 void SetFineDiffPhiCut(Double_t dphi = 0.05){fFineDiffPhiCut=dphi;}
48 void SetCutOnPairs(Double_t cp = 0.15){fCutOnPairs = cp;}
49 void SetCoarseMaxRCut(Double_t rad = 2.5){fCoarseMaxRCut=rad;}
50 void SetMaxRCut(Double_t rad = 0.5){fMaxRCut=rad;}
51 void SetMaxRCutAlgo2(Double_t rad = 0.2){fMaxRCut2=rad;}
52 void SetZCutDiamond(Double_t zcut = 40.0){fZCutDiamond=zcut;}
53 void SetMaxZCut(Double_t dz = 0.5){fMaxZCut=dz;}
54 void SetDCACut(Double_t dca=0.1){fDCAcut=dca;}
55 void SetDiffPhiMax(Double_t pm = 0.025){fDiffPhiMax = pm;}
56 void SetMeanPSelTracks(Double_t pGeV=0.875){fMeanPSelTrk = pGeV;}
57 void SetMeanPtSelTracks(Double_t ptGeV=0.630){fMeanPtSelTrk = ptGeV;}
58 void SetMeanPPtSelTracks(Double_t fieldTesla);
59 void SetMinDCAforPileup(Double_t mindist=0.1) {fDCAforPileup=mindist;}
60 void SetDeltaPhiforPileup(Double_t dphi=0.01) {fDiffPhiforPileup=dphi;}
61 void SetPileupAlgo(UShort_t optalgo=1){fPileupAlgo=optalgo;}
62 void SetBinSizeR(Double_t siz=0.1){fBinSizeR=siz;}
63 void SetBinSizeZ(Double_t siz=0.8){fBinSizeZ=siz;}
64 void SetHighMultAlgo(UChar_t n){
65 if(n<2) fHighMultAlgo=n;
66 else AliError("Only algos 0 and 1 implemented");
68 void SetHighMultDownscalingAlgo(){fHighMultAlgo=0;}
69 void SetHighMultTracesAlgo(){fHighMultAlgo=1;}
71 void SetMaxNumOfClustersForHighMult(Int_t ncl){fMaxNumOfCl=ncl;}
72 void SetMaxNumOfClustersForDownScale(Int_t ncl){fMaxNumOfClForDownScale=ncl;}
73 void SetMaxNumOfClustersForRebin(Int_t ncl){fMaxNumOfClForRebin=ncl;}
74 Int_t GetMaxNumOfClustersForHighMult() const {return fMaxNumOfCl;}
75 Int_t GetMaxNumOfClustersForDownScale() const {return fMaxNumOfClForDownScale;}
76 Int_t GetMaxNumOfClustersForRebin() const {return fMaxNumOfClForRebin;}
79 AliITSVertexer3D(const AliITSVertexer3D& vtxr);
80 AliITSVertexer3D& operator=(const AliITSVertexer3D& /* vtxr */);
81 Int_t FindTracklets(TTree *itsClusterTree, Int_t optCuts);
82 Int_t Prepare3DVertex(Int_t optCuts);
83 Int_t Prepare3DVertexPbPb();
85 void FindPeaks(TH3F* histo, Double_t *peak, Int_t &nOfTracklets, Int_t &nOfTimes);
87 void MarkUsedClusters();
88 Int_t RemoveTracklets();
89 void FindOther3DVertices(TTree *itsClusterTree);
90 Double_t GetFraction(Int_t itr) const;
92 enum {kMaxCluPerMod=250};
93 enum {kMaxPileupVertices=10};
94 TClonesArray fLines; //! array of tracklets
95 AliESDVertex fVert3D; // 3D Vertex
96 Double_t fCoarseDiffPhiCut; // loose cut on DeltaPhi for RecPoint matching
97 Double_t fFineDiffPhiCut; // tight value of DeltaPhi for RP matching (2nd method)
98 Double_t fCutOnPairs; //cut on distance between pairs of tracklets
99 Double_t fCoarseMaxRCut; // cut on tracklet DCA to Z axis
100 Double_t fMaxRCut; // cut on tracklet DCA to beam axis
101 Double_t fMaxRCut2; // cut on tracklet DCA to beam axis - algo2
102 Double_t fZCutDiamond; // cut on +-Z of the diamond
103 Double_t fMaxZCut; // cut on Z distance from estimated vertex
104 Double_t fDCAcut; // cut on tracklet to tracklet and tracklet to vertex DCA
105 Double_t fDiffPhiMax; // Maximum delta phi allowed among corr. pixels
106 Double_t fMeanPSelTrk; // GeV, mean P for tracks with dphi<0.01 rad
107 Double_t fMeanPtSelTrk; // GeV, mean Pt for tracks with dphi<0.01 rad
108 TBits fUsedCluster; // flag for used clusters in vertex calculation
109 TH1F *fZHisto; //! histogram with coarse z distribution
110 Double_t fDCAforPileup; // Minimum DCA to 1st vertex for pileup tracklets
111 Double_t fDiffPhiforPileup; // Cut on delta phi for pileup
112 Double_t fBinSizeR; // Histo3D bin size along radius
113 Double_t fBinSizeZ; // Histo3D bin size along z
114 UShort_t fPileupAlgo; // Algo for pileup identification
115 // 0->VertexerZ pileup algo
116 // 1->Unused RecPoints algo
117 Int_t fMaxNumOfCl; // max n. of clusters on L1 or L2 for high mult definition
118 Int_t fMaxNumOfClForRebin; // max n. of clusters on L1 or L2 for rebin
119 Int_t fMaxNumOfClForDownScale; // max n. of clusters on L1 or L2 for downscale
120 Int_t fNRecPLay1; // number of rec ponts on SPD layer 1
121 Int_t fNRecPLay2; // number of rec ponts on SPD layer 2
122 Float_t f3DBinSize; // Size of the 3D bins
123 Bool_t fDoDownScale; // Control downscaling of tracklets in high mult
124 TRandom3 *fGenerForDownScale; // randomnumber generator fordownscaling
125 Double_t f3DPeak[3]; // TH3F peak coords
126 UChar_t fHighMultAlgo; // algorithm used for high mult. events
127 Bool_t fSwitchAlgorithm; // Switch between two algoritms in testing phase
129 static const Int_t fgkMaxNumOfClDefault; // Default max n. of clusters for downscale
130 static const Int_t fgkMaxNumOfClRebinDefault; // Default max n. of clusters for rebin
131 static const Int_t fgkMaxNumOfClDownscaleDefault; // Default max n. of clusters for rebin
132 static const Float_t fgk3DBinSizeDefault; // Default 3D bins size
134 ClassDef(AliITSVertexer3D,15);