]> git.uio.no Git - u/mrichter/AliRoot.git/blame - ITS/AliITStrackerSA.h
A few fixes in the OB materials and volumes in accordance with the latest specificati...
[u/mrichter/AliRoot.git] / ITS / AliITStrackerSA.h
CommitLineData
13918578 1#ifndef ALIITSTRACKERSA_H
2#define ALIITSTRACKERSA_H
3
4
5
36e140f1 6#include "AliITSgeomTGeo.h"
e43c066c 7#include "AliITStrackerMI.h"
13918578 8
9/* Copyright(c) 1998-2003, ALICE Experiment at CERN, All rights reserved. *
10 * See cxx source for full Copyright notice */
11
deae0246 12/* $Id$ */
13
14
13918578 15////////////////////////////////////////////////////
16// Stand alone tracker class //
17// Origin: Elisabetta Crescio //
18// e-mail: crescio@to.infn.it //
36e140f1 19// adapted for cosmics by A.Dainese //
13918578 20////////////////////////////////////////////////////
21
22class AliITSclusterTable;
23class AliITStrackSA;
d681bb2d 24class AliESDVertex;
b8ed1a92 25class AliESDEvent;
13918578 26class AliITSVertexer;
2257f27e 27class TTree;
7e5bf5af 28class TArrayD;
13918578 29
e43c066c 30class AliITStrackerSA : public AliITStrackerMI {
13918578 31
32
33 public:
34
35 AliITStrackerSA();
cc088660 36 AliITStrackerSA(const Char_t *geom);
13918578 37 virtual ~AliITStrackerSA();
af885e0f 38 virtual Int_t Clusters2Tracks(AliESDEvent *event);
3bfb5cac 39 Int_t FindTracks(AliESDEvent* event, Bool_t useAllClusters=kFALSE);
13918578 40
5a03f353 41 AliITStrackV2* FitTrack(AliITStrackSA* tr,Double_t* primaryVertex,Bool_t onePoint=kFALSE);
3bfb5cac 42 void StoreTrack(AliITStrackV2 *t,AliESDEvent *event, Bool_t pureSA) const;
deae0246 43 Int_t FindTrackLowChiSquare() const;
12b1afb7 44 Int_t LoadClusters(TTree *cf) {Int_t rc=AliITStrackerMI::LoadClusters(cf); SetClusterTree(cf); return rc;}
50a4457d 45
2257f27e 46 void SetClusterTree(TTree * itscl){fITSclusters = itscl;}
12b1afb7 47
48 void SetOutwardFinding() {fInwardFlag=kFALSE;}
49 void SetInwardFinding() {fInwardFlag=kTRUE;}
50 void SetOuterStartLayer(Int_t osl = 0) {
51 if(osl>(AliITSgeomTGeo::GetNLayers()-2)) AliWarning("Minimum Number of layers is 2. OuterStartLayer set to Nlayers-2");
52 fOuterStartLayer = TMath::Min(AliITSgeomTGeo::GetNLayers()-2,osl);
53 }
b8ed1a92 54 Int_t GetOuterStartLayer() const {return fOuterStartLayer;}
12b1afb7 55 void SetInnerStartLayer(Int_t isl = 5) {
56 if(isl<1) AliWarning("Minimum Number of layers is 2. InnerStartLayer set to 1");
57 fInnerStartLayer = TMath::Max(1,isl);
58 }
59 Int_t GetInnerStartLayer() const {return fInnerStartLayer;}
60
1966f03c 61 void SetSAFlag(Bool_t fl){fITSStandAlone=fl;} // StandAlone flag setter
62 Bool_t GetSAFlag() const {return fITSStandAlone;} // StandAlone flag getter
c7d6d7b7 63 void SetFixedWindowSizes(Int_t n=46, Double_t *phi=0, Double_t *lam=0);
07e222ae 64 void SetCalculatedWindowSizes(Int_t n=10, Double_t phimin=0.002, Double_t phimax=0.0145, Double_t lambdamin=0.003, Double_t lambdamax=0.008);
13918578 65
12b1afb7 66 void SetMinNPoints(Int_t np){fMinNPoints=np;}
67 Int_t GetMinNPoints() const {return fMinNPoints;}
07e222ae 68 void SetMinimumChargeSDDSSD(Double_t minq=0.){fMinQ=minq;}
627b6db6 69 enum {kSAflag=0x8000}; //flag to mark clusters used in the SA tracker
13918578 70 protected:
71
13918578 72 //Initialization
73 void Init();
4e05ab9a 74 void ResetForFinding();
75 void UpdatePoints();
12b1afb7 76 Bool_t SetFirstPoint(Int_t lay, Int_t clu, Double_t* primaryVertex);
13918578 77 static Double_t Curvature(Double_t x1,Double_t y1,Double_t x2,Double_t y2,
bef31448 78 Double_t x3,Double_t y3);
13918578 79
80 Double_t ChoosePoint(Double_t p1, Double_t p2, Double_t pp);
81
07e222ae 82 static Int_t FindIntersection(Double_t a1, Double_t b1, Double_t c1, Double_t c2,
83 Double_t& x1,Double_t& y1, Double_t& x2, Double_t& y2);
84 static Int_t FindEquation(Double_t x1, Double_t y1, Double_t x2, Double_t y2,
85 Double_t x3, Double_t y3,Double_t& a, Double_t& b,
86 Double_t& c);
13918578 87
ee16fb28 88 Int_t FindLabel(AliITStrackV2* track);
13918578 89 Int_t SearchClusters(Int_t layer,Double_t phiwindow,Double_t lambdawindow,
cfe729e0 90 AliITStrackSA* trs,Double_t zvertex,Int_t flagp);
7e5bf5af 91
50a4457d 92 void GetCoorAngles(AliITSRecPoint* cl,Double_t &phi,Double_t &lambda,Double_t &x,Double_t &y,Double_t &z,const Double_t* vertex);
07e222ae 93 void GetCoorErrors(AliITSRecPoint* cl,Double_t &sx,Double_t &sy, Double_t &sz);
7e5bf5af 94
95 AliITSclusterTable* GetClusterCoord(Int_t layer,Int_t n) const {return (AliITSclusterTable*)fCluCoord[layer]->UncheckedAt(n);}
96 void RemoveClusterCoord(Int_t layer, Int_t n) {fCluCoord[layer]->RemoveAt(n);fCluCoord[layer]->Compress();}
97
489c98fd 98 Int_t FindIndex(Int_t lay, Double_t lamMin) const;
7e5bf5af 99
13918578 100 Double_t fPhiEstimate; //Estimation of phi angle on next layer
1966f03c 101 Bool_t fITSStandAlone; //Tracking is performed in the ITS alone if kTRUE
07e222ae 102 Double_t fPoint1[2]; //! coord. of 1-st point to evaluate the curvature
103 Double_t fPoint2[2]; //! coord. of 2-nd point to evaluate the curvature
104 Double_t fPoint3[2]; //! coord. of 3-rd point to evaluate the curvature
105 Double_t fPointc[2]; //! current point coord (for curvature eval.)
13918578 106 Double_t fLambdac; //! current value of the Lambda angle in the window
107 Double_t fPhic; //! current value of the Phi angle in the window
07e222ae 108 Double_t fCoef1; //! param. of the equation of the circ. approx a layer
109 Double_t fCoef2; //! param. of the equation of the circ. approx a layer
110 Double_t fCoef3; //! param. of the equation of the circ. approx a layer
13918578 111 Int_t fNloop; // Number of iterqations on phi and lambda windows
112 Double_t *fPhiWin; // phi window sizes
113 Double_t *fLambdaWin; // lambda window sizes
f2150e42 114 TClonesArray *fListOfTracks; //! container for found tracks
115 TClonesArray *fListOfSATracks; //! container for found SA tracks
2257f27e 116 TTree *fITSclusters; //! pointer to ITS tree of clusters
12b1afb7 117 Bool_t fInwardFlag; // set to kTRUE for inward track finding
118 Int_t fOuterStartLayer; // Outward search for tracks with <6 points: outer layer to start from
119 Int_t fInnerStartLayer; // Inward search for tracks with <6 points: inner layer to start from
120 Int_t fMinNPoints; // minimum number of clusters for a track
07e222ae 121 Double_t fMinQ; // lower cut on cluster charge (SDD and SSD)
7e5bf5af 122
7e5bf5af 123 TClonesArray** fCluCoord; //! array with cluster info
124
225cff59 125 private:
126 AliITStrackerSA(const AliITStrackerSA& tracker);
127 AliITStrackerSA& operator=(const AliITStrackerSA& source);
128
50a4457d 129 ClassDef(AliITStrackerSA,12)
13918578 130};
131
132#endif
f2150e42 133
134