1 #ifndef ALIITSTRACKERSA_H
2 #define ALIITSTRACKERSA_H
6 #include "AliITStrackerMI.h"
8 /* Copyright(c) 1998-2003, ALICE Experiment at CERN, All rights reserved. *
9 * See cxx source for full Copyright notice */
11 ////////////////////////////////////////////////////
12 // Stand alone tracker class //
13 // Origin: Elisabetta Crescio //
14 // e-mail: crescio@to.infn.it //
15 ////////////////////////////////////////////////////
17 class AliITSclusterTable;
23 class AliITStrackerSA : public AliITStrackerMI {
29 AliITStrackerSA(AliITSgeom *geom);
30 AliITStrackerSA(AliITSgeom *geom,AliESDVertex *vert);
31 AliITStrackerSA(AliITSgeom *geom,AliITSVertexer *vertexer);
32 AliITStrackerSA(const AliITStrackerSA& tracker);
33 AliITStrackerSA& operator=(const AliITStrackerSA& /* trkr */);
34 virtual ~AliITStrackerSA();
35 virtual Int_t Clusters2Tracks(AliESD *event){Int_t rc = AliITStrackerMI::Clusters2Tracks(event); if(!rc) rc=FindTracks(event); return rc;}
36 Int_t FindTracks(AliESD* event);
37 void FindTracks(TTree *out,Int_t evnumber=0);
38 AliITStrackV2* FitTrack(AliITStrackSA* tr,Double_t* primaryVertex,
39 Double_t *errorprimvert);
41 AliITStrackV2* FindTrackLowChiSquare(TObjArray* tracklist, Int_t dim) const;
42 Int_t LoadClusters(TTree *cf) {Int_t rc=AliITStrackerMI::LoadClusters(cf); SetClusterTree(cf);SetSixPoints(kTRUE); return rc;}
43 void SetVertex(AliESDVertex *vtx){fVert = vtx;}
44 void SetClusterTree(TTree * itscl){fITSclusters = itscl;}
45 void SetSixPoints(Bool_t sp = kTRUE){fSixPoints = sp;}
46 Bool_t GetSixPoints() const {return fSixPoints;}
47 void SetWindowSizes(Int_t n=46, Double_t *phi=0, Double_t *lam=0);
48 void UseFoundTracksV2(Int_t evnum,TTree* treev2);
49 void UseFoundTracksV2(AliESD *event);
51 enum {kSAflag=0x8000}; //flag to mark clusters used in the SA tracker
57 void ResetForFinding();
60 static Double_t Curvature(Double_t x1,Double_t y1,Double_t x2,Double_t y2,
61 Double_t x3,Double_t y3);
63 Double_t ChoosePoint(Double_t p1, Double_t p2, Double_t pp);
65 static Int_t FindIntersection(Float_t a1, Float_t b1, Float_t c1, Float_t c2,
66 Float_t& x1,Float_t& y1, Float_t& x2, Float_t& y2);
67 static Int_t FindEquation(Float_t x1, Float_t y1, Float_t x2, Float_t y2,
68 Float_t x3, Float_t y3,Float_t& a, Float_t& b,
71 static Int_t FindLabel(Int_t l1, Int_t l2, Int_t l3, Int_t l4, Int_t l5, Int_t l6);
72 static Int_t Label(Int_t gl1, Int_t gl2, Int_t gl3, Int_t gl4, Int_t gl5,
73 Int_t gl6,Int_t gl7, Int_t gl8, Int_t gl9, Int_t gl10,Int_t gl11,
74 Int_t gl12, Int_t gl13, Int_t gl14,Int_t gl15, Int_t gl16,
75 Int_t gl17, Int_t gl18, Int_t numberofpoints=6);
77 Int_t SearchClusters(Int_t layer,Double_t phiwindow,Double_t lambdawindow,
78 AliITStrackSA* trs,Double_t zvertex,Int_t flagp);
80 Double_t fPhiEstimate; //Estimation of phi angle on next layer
81 Float_t fPoint1[2]; //! coord. of 1-st point to evaluate the curvature
82 Float_t fPoint2[2]; //! coord. of 2-nd point to evaluate the curvature
83 Float_t fPoint3[2]; //! coord. of 3-rd point to evaluate the curvature
84 Float_t fPointc[2]; //! current point coord (for curvature eval.)
85 Double_t fLambdac; //! current value of the Lambda angle in the window
86 Double_t fPhic; //! current value of the Phi angle in the window
87 Float_t fCoef1; //! param. of the equation of the circ. approx a layer
88 Float_t fCoef2; //! param. of the equation of the circ. approx a layer
89 Float_t fCoef3; //! param. of the equation of the circ. approx a layer
90 Int_t fNloop; // Number of iterqations on phi and lambda windows
91 Double_t *fPhiWin; // phi window sizes
92 Double_t *fLambdaWin; // lambda window sizes
93 AliESDVertex *fVert; //! primary vertex
94 AliITSVertexer *fVertexer; //! vertexer
95 AliITSgeom *fGeom; //! ITS geometry
96 TObjArray *fListOfTracks; //! container for found tracks
97 TTree *fITSclusters; //! pointer to ITS tree of clusters
98 Bool_t fSixPoints; // If true 6/6 points are required (default). 5/6 otherwise
99 AliITSclusterTable* fTable; // table with clusters
100 ClassDef(AliITStrackerSA,1)