ROOT logo
#ifndef ALIITSVERTEXERZD_H
#define ALIITSVERTEXERZD_H

#include<AliITSVertexer.h>

///////////////////////////////////////////////////////////////////
//                                                               //
// Class for primary vertex finding with SDD                     //
//                                                               //
///////////////////////////////////////////////////////////////////

class TFile;
class TString;
class AliESDVertex;
class TH1F;

class AliITSVertexerZD : public AliITSVertexer {

 public:

  AliITSVertexerZD();
  AliITSVertexerZD(Float_t x0, Float_t y0);
  virtual ~AliITSVertexerZD();
  // The number of contributors set in the AliESDVertex object is the
  // number of tracklets used to determine the vertex position
  // If this number is <1, the procedure could not find a vertex position
  // and by default the Z coordinate is set to 0
  // Number of contributors = -1  --> No tracklets 
  // Number of contributors = -2  --> No SDD recpoints
  virtual AliESDVertex* FindVertexForCurrentEvent(TTree *itsClusterTree);
  virtual void PrintStatus() const;
  void SetDiffPhiMax(Float_t pm = 0.1){fDiffPhiMax = pm;}
  void ConfigIterations(Int_t noiter=4,Float_t *ptr=0);
  void SetFirstLayerModules(Int_t m1 = 240, Int_t m2 = 323){fFirstL1 = m1; fLastL1 = m2;}
  void SetSecondLayerModules(Int_t m1 = 324, Int_t m2 = 499){fFirstL2 = m1; fLastL2 = m2;}
  void SetLowLimit(Float_t lim=-70.){fLowLim = lim;}
  void SetHighLimit(Float_t lim=70.){fHighLim = lim;}
  Float_t GetLowLimit() const {return fLowLim;}
  Float_t GetHighLimit() const {return fHighLim;}
  void SetBinWidthCoarse(Float_t bw=0.01){fStepCoarse = bw;}
  void SetPPsetting(Float_t cl2=250., Float_t coarsebin=0.02){fPPsetting[0]=cl2; fPPsetting[1]=coarsebin;}
  static Int_t GetPeakRegion(TH1F* h, Int_t &binmin, Int_t &binmax);
  static Int_t FindSecondPeak(TH1F* h, Int_t binmin,Int_t binmax, Float_t& secPeakPos);
  Float_t GetBinWidthCoarse() const {return fStepCoarse;}
  void SetTolerance(Float_t tol = 20./10000.){fTolerance = tol;}
  void SetWindowWidth(Float_t ww=0.2){fWindowWidth=ww;}
  Float_t GetTolerance() const {return fTolerance;}
  //  virtual void MakeTracklet(Double_t * /* pA */, Double_t * /*pB */, Int_t & /* nolines */) {} // implemented in a derived class

  void SetSearchForPileup(Bool_t opt){fSearchForPileup=opt;}
  Bool_t IsSearchForPileupActive() const { return fSearchForPileup;}

 protected:
  void ResetHistograms();
  void VertexZFinder(TTree *itsClusterTree);
  Float_t GetPhiMaxIter(Int_t i) const {return fPhiDiffIter[i];}


  Int_t fFirstL1;          // first module of the first pixel layer used
  Int_t fLastL1;           // last module of the first pixel layer used
  Int_t fFirstL2;          // first module of the second pixel layer used
  Int_t fLastL2;           // last module of the second pixel layer used
  Float_t fDiffPhiMax;     // Maximum delta phi allowed among corr. pixels
  Float_t fZFound;         //! found value for the current event
  Float_t fZsig;           //! RMS of Z
  TH1F *fZCombc;           //! histogram with coarse z distribution
  Float_t fLowLim;         // low limit for fZComb histograms
  Float_t fHighLim;        // high limit for fZComb histograms
  Float_t fStepCoarse;     // bin width for fZCombc
  Float_t fTolerance;      // tolerance on the symmetry of the Z interval 
  Float_t fPPsetting[2];   // [0] is the max. number of clusters on L2 to use [1] as fStepCoarse
  Int_t fMaxIter;            // Maximum number of iterations (<=5)
  Float_t fPhiDiffIter[5];   // Delta phi used in iterations
  Float_t fWindowWidth;      // Z window width for symmetrization
  Bool_t  fSearchForPileup;  // flag to switch pileup off/on

 private:
  AliITSVertexerZD(const AliITSVertexerZD& vtxr);
  AliITSVertexerZD& operator=(const AliITSVertexerZD& vtxr );

  ClassDef(AliITSVertexerZD,1);
};

#endif
 AliITSVertexerZD.h:1
 AliITSVertexerZD.h:2
 AliITSVertexerZD.h:3
 AliITSVertexerZD.h:4
 AliITSVertexerZD.h:5
 AliITSVertexerZD.h:6
 AliITSVertexerZD.h:7
 AliITSVertexerZD.h:8
 AliITSVertexerZD.h:9
 AliITSVertexerZD.h:10
 AliITSVertexerZD.h:11
 AliITSVertexerZD.h:12
 AliITSVertexerZD.h:13
 AliITSVertexerZD.h:14
 AliITSVertexerZD.h:15
 AliITSVertexerZD.h:16
 AliITSVertexerZD.h:17
 AliITSVertexerZD.h:18
 AliITSVertexerZD.h:19
 AliITSVertexerZD.h:20
 AliITSVertexerZD.h:21
 AliITSVertexerZD.h:22
 AliITSVertexerZD.h:23
 AliITSVertexerZD.h:24
 AliITSVertexerZD.h:25
 AliITSVertexerZD.h:26
 AliITSVertexerZD.h:27
 AliITSVertexerZD.h:28
 AliITSVertexerZD.h:29
 AliITSVertexerZD.h:30
 AliITSVertexerZD.h:31
 AliITSVertexerZD.h:32
 AliITSVertexerZD.h:33
 AliITSVertexerZD.h:34
 AliITSVertexerZD.h:35
 AliITSVertexerZD.h:36
 AliITSVertexerZD.h:37
 AliITSVertexerZD.h:38
 AliITSVertexerZD.h:39
 AliITSVertexerZD.h:40
 AliITSVertexerZD.h:41
 AliITSVertexerZD.h:42
 AliITSVertexerZD.h:43
 AliITSVertexerZD.h:44
 AliITSVertexerZD.h:45
 AliITSVertexerZD.h:46
 AliITSVertexerZD.h:47
 AliITSVertexerZD.h:48
 AliITSVertexerZD.h:49
 AliITSVertexerZD.h:50
 AliITSVertexerZD.h:51
 AliITSVertexerZD.h:52
 AliITSVertexerZD.h:53
 AliITSVertexerZD.h:54
 AliITSVertexerZD.h:55
 AliITSVertexerZD.h:56
 AliITSVertexerZD.h:57
 AliITSVertexerZD.h:58
 AliITSVertexerZD.h:59
 AliITSVertexerZD.h:60
 AliITSVertexerZD.h:61
 AliITSVertexerZD.h:62
 AliITSVertexerZD.h:63
 AliITSVertexerZD.h:64
 AliITSVertexerZD.h:65
 AliITSVertexerZD.h:66
 AliITSVertexerZD.h:67
 AliITSVertexerZD.h:68
 AliITSVertexerZD.h:69
 AliITSVertexerZD.h:70
 AliITSVertexerZD.h:71
 AliITSVertexerZD.h:72
 AliITSVertexerZD.h:73
 AliITSVertexerZD.h:74
 AliITSVertexerZD.h:75
 AliITSVertexerZD.h:76
 AliITSVertexerZD.h:77
 AliITSVertexerZD.h:78
 AliITSVertexerZD.h:79
 AliITSVertexerZD.h:80
 AliITSVertexerZD.h:81
 AliITSVertexerZD.h:82
 AliITSVertexerZD.h:83
 AliITSVertexerZD.h:84