]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - ITS/AliITSVertexer3D.h
Changing once more (hopefully we get it correct this time...) the logic to trig the...
[u/mrichter/AliRoot.git] / ITS / AliITSVertexer3D.h
index 7fdb0b0b350c78222e75496654a52b8eb4481d6b..6d05d9a4dfbacf10e357c3f6a629288dfe87966c 100644 (file)
@@ -14,6 +14,7 @@
 #include <TClonesArray.h>
 #include <AliESDVertex.h>
 #include <TH3F.h>
+#include <TBits.h>
 
 class AliITSVertexer3D : public AliITSVertexer {
 
@@ -22,30 +23,44 @@ class AliITSVertexer3D : public AliITSVertexer {
   AliITSVertexer3D();
   virtual ~AliITSVertexer3D();
   virtual AliESDVertex* FindVertexForCurrentEvent(TTree *itsClusterTree);
+  void FindVertex3DIterative();
+  void FindVertex3DIterativeMM();
+  void FindVertex3D(TTree *itsClusterTree);
   AliESDVertex GetVertex3D() const {return fVert3D;}
   virtual void PrintStatus() const;
-  void SetWideFiducialRegion(Float_t dz = 20.0, Float_t dr=2.5){
+  static Bool_t DistBetweenVertices(AliESDVertex &a, AliESDVertex &b, Double_t test, Double_t &dist);
+  void SetWideFiducialRegion(Double_t dz = 40.0, Double_t dr=2.5){
     SetCoarseMaxRCut(dr);
     SetZCutDiamond(dz);
   }
-  void SetNarrowFiducialRegion(Float_t dz = 0.5, Float_t dr=0.5){
+  void SetNarrowFiducialRegion(Double_t dz = 0.5, Double_t dr=0.5){
     SetMaxRCut(dr);
     SetMaxZCut(dz);
   }
-  void SetDeltaPhiCuts(Float_t dphiloose=0.5, Float_t dphitight=0.01){
+  void SetDeltaPhiCuts(Double_t dphiloose=0.5, Double_t dphitight=0.025){
     SetCoarseDiffPhiCut(dphiloose);
     SetDiffPhiMax(dphitight);
   }
-  void SetCoarseDiffPhiCut(Float_t dphi = 0.5){fCoarseDiffPhiCut=dphi;}
-  void SetCoarseMaxRCut(Float_t rad = 2.5){fCoarseMaxRCut=rad;}
-  void SetMaxRCut(Float_t rad = 0.5){fMaxRCut=rad;}
-  void SetZCutDiamond(Float_t zcut = 20.0){fZCutDiamond=zcut;}
-  void SetMaxZCut(Float_t dz = 0.5){fMaxZCut=dz;}
-  void SetDCACut(Float_t dca=0.1){fDCAcut=dca;} 
-  void SetDiffPhiMax(Float_t pm = 0.01){fDiffPhiMax = pm;}
-  void SetMeanPSelTracks(Float_t pGeV=0.875){fMeanPSelTrk = pGeV;}
-  void SetMeanPtSelTracks(Float_t ptGeV=0.630){fMeanPtSelTrk = ptGeV;}
-  void SetMeanPPtSelTracks(Float_t fieldTesla);
+  void SetCoarseDiffPhiCut(Double_t dphi = 0.5){fCoarseDiffPhiCut=dphi;}
+  void SetFineDiffPhiCut(Double_t dphi = 0.05){fFineDiffPhiCut=dphi;}
+  void SetCutOnPairs(Double_t cp = 0.15){fCutOnPairs = cp;}
+  void SetCoarseMaxRCut(Double_t rad = 2.5){fCoarseMaxRCut=rad;}
+  void SetMaxRCut(Double_t rad = 0.5){fMaxRCut=rad;}
+  void SetMaxRCutAlgo2(Double_t rad = 0.2){fMaxRCut2=rad;}
+  void SetZCutDiamond(Double_t zcut = 20.0){fZCutDiamond=zcut;}
+  void SetMaxZCut(Double_t dz = 0.5){fMaxZCut=dz;}
+  void SetDCACut(Double_t dca=0.1){fDCAcut=dca;} 
+  void SetDiffPhiMax(Double_t pm = 0.025){fDiffPhiMax = pm;}
+  void SetMeanPSelTracks(Double_t pGeV=0.875){fMeanPSelTrk = pGeV;}
+  void SetMeanPtSelTracks(Double_t ptGeV=0.630){fMeanPtSelTrk = ptGeV;}
+  void SetMeanPPtSelTracks(Double_t fieldTesla);
+  void SetMinDCAforPileup(Double_t mindist=0.1) {fDCAforPileup=mindist;}
+  void SetDeltaPhiforPileup(Double_t dphi=0.01) {fDiffPhiforPileup=dphi;}
+  void SetPileupAlgo(UShort_t optalgo=1){fPileupAlgo=optalgo;}
+  void SetBinSizeR(Double_t siz=0.1){fBinSizeR=siz;}
+  void SetBinSizeZ(Double_t siz=0.8){fBinSizeZ=siz;}
+  void SetMaxNumOfClusters(Int_t ncl){fMaxNumOfCl=ncl;}
+  Int_t GetMaxNumOfClusters() const {return fMaxNumOfCl;}
 
 protected:
   AliITSVertexer3D(const AliITSVertexer3D& vtxr);
@@ -54,21 +69,41 @@ protected:
   Int_t Prepare3DVertex(Int_t optCuts);
   void ResetVert3D();
   void FindPeaks(TH3F* histo, Double_t *peak, Int_t &nOfTracklets, Int_t &nOfTimes);
+  void PileupFromZ();
+  void MarkUsedClusters();
+  Int_t RemoveTracklets();
+  void  FindOther3DVertices(TTree *itsClusterTree);
 
+  enum {kMaxCluPerMod=250};
 
   TClonesArray fLines;      //! array of tracklets
   AliESDVertex fVert3D;        // 3D Vertex
-  Float_t fCoarseDiffPhiCut; // loose cut on DeltaPhi for RecPoint matching 
-  Float_t fCoarseMaxRCut; // cut on tracklet DCA to Z axis
-  Float_t fMaxRCut; // cut on tracklet DCA to beam axis
-  Float_t fZCutDiamond;   // cut on +-Z of the diamond
-  Float_t fMaxZCut;   // cut on Z distance from estimated vertex
-  Float_t fDCAcut; // cut on tracklet to tracklet and tracklet to vertex DCA
-  Float_t fDiffPhiMax;     // Maximum delta phi allowed among corr. pixels
-  Float_t fMeanPSelTrk; // GeV, mean P for tracks with dphi<0.01 rad
-  Float_t fMeanPtSelTrk; // GeV, mean Pt for tracks with dphi<0.01 rad
+  Double_t fCoarseDiffPhiCut; // loose cut on DeltaPhi for RecPoint matching
+  Double_t fFineDiffPhiCut; // tight value of DeltaPhi for RP matching (2nd method) 
+  Double_t fCutOnPairs; //cut on distance between pairs of tracklets 
+  Double_t fCoarseMaxRCut; // cut on tracklet DCA to Z axis
+  Double_t fMaxRCut;     // cut on tracklet DCA to beam axis
+  Double_t fMaxRCut2;    // cut on tracklet DCA to beam axis - algo2
+  Double_t fZCutDiamond;   // cut on +-Z of the diamond
+  Double_t fMaxZCut;   // cut on Z distance from estimated vertex
+  Double_t fDCAcut; // cut on tracklet to tracklet and tracklet to vertex DCA
+  Double_t fDiffPhiMax;     // Maximum delta phi allowed among corr. pixels
+  Double_t fMeanPSelTrk; // GeV, mean P for tracks with dphi<0.01 rad
+  Double_t fMeanPtSelTrk; // GeV, mean Pt for tracks with dphi<0.01 rad
+  TBits   fUsedCluster;  // flag for used clusters in vertex calculation
+  TH1F *fZHisto;           //! histogram with coarse z distribution
+  Double_t  fDCAforPileup;  // Minimum DCA to 1st vertex for pileup tracklets 
+  Double_t  fDiffPhiforPileup;  // Cut on delta phi for pileup 
+  Double_t  fBinSizeR;      // Histo3D bin size along radius
+  Double_t  fBinSizeZ;      // Histo3D bin size along z
+  UShort_t fPileupAlgo;    // Algo for pileup identification
+                           // 0->VertexerZ pileup algo
+                           // 1->Unused RecPoints algo
+  Int_t fMaxNumOfCl;       // max number of clusters on L1 or L2
 
-  ClassDef(AliITSVertexer3D,6);
+  static const Int_t fgkMaxNumOfClDefault; // Default max number of clusters
+
+  ClassDef(AliITSVertexer3D,13);
 
 };