]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - ITS/AliITStrackerSA.h
Just something left from v2...now clean
[u/mrichter/AliRoot.git] / ITS / AliITStrackerSA.h
index 08d54556bac5ddf4b5c47cca8274b77276f8b004..b4bf4c506da441aa23e33c116812ec402408f5ce 100644 (file)
@@ -3,60 +3,67 @@
 
 
 
-#include "AliITStrackerV2.h"
+#include "AliITSgeomTGeo.h"
+#include "AliITStrackerMI.h"
 
 /* Copyright(c) 1998-2003, ALICE Experiment at CERN, All rights reserved. *
  * See cxx source for full Copyright notice                               */
 
+/* $Id$ */
+
+
 ////////////////////////////////////////////////////
 //  Stand alone tracker class                     //
 //  Origin:  Elisabetta Crescio                   //
 //  e-mail:  crescio@to.infn.it                   //
+//  adapted for cosmics by A.Dainese              //
 ////////////////////////////////////////////////////
 
 class AliITSclusterTable;
 class AliITStrackSA;
-class AliITSVertex;
+class AliESDVertex;
+class AliESDEvent;
 class AliITSVertexer;
+class TTree;
+class TArrayD;
 
-class AliITStrackerSA : public AliITStrackerV2 {
+class AliITStrackerSA : public AliITStrackerMI {
 
 
  public:
 
   AliITStrackerSA();
-  AliITStrackerSA(AliITSgeom *geom,AliITSVertex *vert);
-  AliITStrackerSA(AliITSgeom *geom,AliITSVertexer *vertexer);
-  AliITStrackerSA(AliITStrackerSA& tracker);
+  AliITStrackerSA(const Char_t *geom);
+  AliITStrackerSA(const Char_t *geom,AliESDVertex *vert);
+  AliITStrackerSA(const Char_t *geom,AliITSVertexer *vertexer);
+  AliITStrackerSA(const AliITStrackerSA& tracker);
+  AliITStrackerSA& operator=(const AliITStrackerSA& source);
   virtual ~AliITStrackerSA();  
-  void     FindTracks(TTree *clusterTree, TTree *out,Int_t evnumber=0,
-                      char *opt="6/6");
-  void     FindTracks(TTree *clusterTree, AliESD* event, Int_t evnumber=0,
-                     char *opt="6/6");
-  AliITStrackV2* FitTrack(AliITStrackSA* tr,Double_t* primaryVertex,
-                          Double_t *errorprimvert,char *opt="6/6");
-
-  AliITStrackV2* FindTrackLowChiSquare(TObjArray* tracklist, Int_t dim) const;
-  void SetVertex(AliITSVertex *vtx){fVert = vtx;}
-  void SetWindowSizes(Int_t n=46, Double_t *phi=0, Double_t *lam=0);
-  void UseFoundTracksV2(Int_t evnum,TTree* treev2, TTree* clustertree);
-  void UseFoundTracksV2(Int_t evnum,AliESD *event, TTree* clustertree);
+  virtual Int_t Clusters2Tracks(AliESDEvent *event);
+  Int_t FindTracks(AliESDEvent* event);
+
+  AliITStrackV2* FitTrack(AliITStrackSA* tr,Double_t* primaryVertex,Bool_t onePoint=kFALSE);
+  Int_t FindTrackLowChiSquare() const;
+  Int_t LoadClusters(TTree *cf) {Int_t rc=AliITStrackerMI::LoadClusters(cf); SetClusterTree(cf); SetSixPoints(kTRUE); return rc;}
+  void SetVertex(AliESDVertex *vtx){fVert = vtx;}
+  void SetClusterTree(TTree * itscl){fITSclusters = itscl;}
+  void SetSixPoints(Bool_t sp = kFALSE){fSixPoints = sp;}
+  Bool_t GetSixPoints() const {return fSixPoints;}
+  void SetOuterStartLayer(Int_t osl = 0) {if(osl>(AliITSgeomTGeo::GetNLayers()-2)) osl=AliITSgeomTGeo::GetNLayers()-2; fOuterStartLayer = osl;}
+  Int_t GetOuterStartLayer() const {return fOuterStartLayer;}
+  void SetSAFlag(Bool_t fl){fITSStandAlone=fl;}  // StandAlone flag setter
+  Bool_t GetSAFlag() const {return fITSStandAlone;} // StandAlone flag getter
+  void SetFixedWindowSizes(Int_t n=46, Double_t *phi=0, Double_t *lam=0);
+  void SetCalculatedWindowSizes(Int_t n=10, Float_t phimin=0.002, Float_t phimax=0.0145, Float_t lambdamin=0.003, Float_t lambdamax=0.008);
+
+  enum {kSAflag=0x8000}; //flag to mark clusters used in the SA tracker
 
  protected:
 
-  // copy constructor (NO copy allowed: the constructor is protected
-  // to avoid misuse)
-  AliITStrackerSA(const AliITStrackerSA& trkr);
-  // assignment operator (NO assignment allowed)
-  AliITStrackerSA& operator=(const AliITStrackerSA& /* trkr */);
   //Initialization
   void Init();
-  Int_t     GetFlagLoadedClusters() const {return fFlagLoad;}
-   
-  void     ResetForFinding();
-  void     SetFlagLoadedClusters(Int_t d) {fFlagLoad=d;}
-
-  void     UpdatePoints();
+  void ResetForFinding();
+  void UpdatePoints();
 
   static Double_t Curvature(Double_t x1,Double_t y1,Double_t x2,Double_t y2,
                      Double_t x3,Double_t y3);
@@ -76,14 +83,21 @@ class AliITStrackerSA : public AliITStrackerV2 {
               Int_t gl17, Int_t gl18, Int_t numberofpoints=6);
  
   Int_t SearchClusters(Int_t layer,Double_t phiwindow,Double_t lambdawindow, 
-                       AliITStrackSA* trs,Double_t zvertex,Int_t flagp, AliITSclusterTable* table); 
+                       AliITStrackSA* trs,Double_t zvertex,Int_t flagp); 
+
+  void GetCoorAngles(AliITSRecPoint* cl,Double_t &phi,Double_t &lambda,Float_t &x,Float_t &y,Float_t &z,Double_t* vertex);
+  void GetCoorErrors(AliITSRecPoint* cl,Float_t &sx,Float_t &sy, Float_t &sz);
+
+  AliITSclusterTable* GetClusterCoord(Int_t layer,Int_t n) const {return (AliITSclusterTable*)fCluCoord[layer]->UncheckedAt(n);}
+  void RemoveClusterCoord(Int_t layer, Int_t n) {fCluCoord[layer]->RemoveAt(n);fCluCoord[layer]->Compress();}
+
 
   Double_t fPhiEstimate; //Estimation of phi angle on next layer
-  Double_t fPoint1[2];   //! coord. of 1-st point to evaluate the curvature
-  Double_t fPoint2[2];   //! coord. of 2-nd point to evaluate the curvature
-  Double_t fPoint3[2];   //! coord. of 3-rd point to evaluate the curvature
-  Double_t fPointc[2];   //! current point coord (for curvature eval.)
+  Bool_t fITSStandAlone; //Tracking is performed in the ITS alone if kTRUE
+  Float_t fPoint1[2];   //! coord. of 1-st point to evaluate the curvature
+  Float_t fPoint2[2];   //! coord. of 2-nd point to evaluate the curvature
+  Float_t fPoint3[2];   //! coord. of 3-rd point to evaluate the curvature
+  Float_t fPointc[2];   //! current point coord (for curvature eval.)
   Double_t fLambdac;    //! current value of the Lambda angle in the window
   Double_t fPhic;       //! current value of the Phi angle in the window
   Float_t fCoef1;       //! param. of the equation of the circ. approx a layer
@@ -92,12 +106,18 @@ class AliITStrackerSA : public AliITStrackerV2 {
   Int_t fNloop;         //  Number of iterqations on phi and lambda windows
   Double_t *fPhiWin;    // phi window sizes
   Double_t *fLambdaWin; // lambda window sizes
-  AliITSVertex *fVert;        //! primary vertex
+  AliESDVertex *fVert;        //! primary vertex
   AliITSVertexer *fVertexer;  //! vertexer 
-  AliITSgeom *fGeom;          //! ITS geometry
-  Int_t fFlagLoad;            //  flag for loaded clusters (1==already loaded)
-  AliITSclusterTable* fTable; //  table with clusters
-  ClassDef(AliITStrackerSA,1)
+  TObjArray *fListOfTracks;   //! container for found tracks 
+  TObjArray *fListOfSATracks; //! container for found SA tracks 
+  TTree *fITSclusters;        //! pointer to ITS tree of clusters
+  Bool_t fSixPoints;          // If true 6/6 points are required (default). 5/6 otherwise
+  Int_t fOuterStartLayer;     // Search for tracks with <6 points: outer layer to start from
+
+  TClonesArray** fCluLayer; //! array with clusters 
+  TClonesArray** fCluCoord; //! array with cluster info
+
+  ClassDef(AliITStrackerSA,7)
 };
 
 #endif