]> git.uio.no Git - u/mrichter/AliRoot.git/blob - HLT/comp/AliL3Modeller.h
Tracking in non-uniform nmagnetic field (Yu.Belikov)
[u/mrichter/AliRoot.git] / HLT / comp / AliL3Modeller.h
1 // @(#) $Id$
2
3 #ifndef AliL3_Modeller
4 #define AliL3_Modeller
5
6
7 #include "AliL3RootTypes.h"
8
9 class AliL3TrackArray;
10 class AliL3MemHandler;
11 class AliL3DigitRowData;
12 class AliL3ModelTrack;
13
14 struct Cluster {
15   UInt_t fCharge; // Charge
16   UInt_t fPad; // Pad
17   UInt_t fTime; // Time
18   UInt_t fSigmaY2; // SigmaY2
19   UInt_t fSigmaZ2; // SigmaZ2
20 };
21
22 struct Digit {
23   Short_t fCharge; // Charge
24   Bool_t fUsed; // Flag if used
25 };
26
27 struct ClusterRegion {
28   Int_t fMintime; // Min time
29   Int_t fMaxtime; // Max time
30 };
31
32 class AliL3Modeller {
33   
34  public:
35   
36   AliL3Modeller();
37   virtual ~AliL3Modeller();
38   
39   virtual void FindClusters();
40   void Init(Int_t slice,Int_t patch,Char_t *trackdata,Char_t *path,Bool_t houghtracks,Bool_t binary=kTRUE);
41   void CheckForOverlaps(Float_t dangle=-1,Int_t *rowrange=0);
42   void CalculateCrossingPoints();
43   void RemoveBadTracks();
44   void WriteRemaining();
45   
46   void SetInputData(AliL3DigitRowData *digits) {fRowData = digits;}
47   void SetTrackThreshold(Int_t i=0) {fTrackThreshold=i;}
48   void SetOverlap(Int_t p=6,Int_t t=8) {fPadOverlap=p;fTimeOverlap=t;}
49   void SetSearchRange(Int_t p=1,Int_t t=2) {fPadSearch=p;fTimeSearch=t;}
50   void SetInnerSearchRange(Int_t p,Int_t t) {fInnerPadSearch=p; fInnerTimeSearch=t;}
51   void SetOuterSearchRange(Int_t p,Int_t t) {fOuterPadSearch=p; fOuterTimeSearch=t;}
52   void SetMaxClusterRange(Int_t p,Int_t t) {fMaxPads=p; fMaxTimebins=t;}
53   void Debug() {fDebug=kTRUE;}
54   virtual void SetFitRange(Int_t /*p*/,Int_t /*t*/) {return;}
55   virtual void SetNmaxOverlaps(Int_t /*i*/) {return;}
56   virtual void SetChiSqMax(Float_t /*f*/) {return;}
57   
58   AliL3TrackArray *GetTracks() {return fTracks;}
59     
60  protected:
61   
62   AliL3TrackArray *fTracks; //! Array of tracks
63   AliL3DigitRowData *fRowData;//! Row data
64   Digit *fRow; //! Current row
65   Char_t fPath[1024]; // Path to the files
66
67   Bool_t fDebug; // Flag to switch on/off the debugging
68   Int_t fNClusters; // Number of clusters
69   Int_t fMaxClusters; // Max clusters (?)
70   Int_t fCurrentPadRow; // Current pad row
71   Int_t fMaxPads; // Max pads (?)
72   Int_t fMaxTimebins; // Max time bins (?)
73   Int_t fPadSearch; // Pad search (?)
74   Int_t fTimeSearch; // Time search (?)
75   Int_t fInnerPadSearch; // Inner pad search (?)
76   Int_t fInnerTimeSearch; // Inner time search (?)
77   Int_t fOuterPadSearch; // Outer Pad search (?)
78   Int_t fOuterTimeSearch; // Outer time search (?)
79   
80   Int_t fSlice; // Slice
81   Int_t fPatch; // Patch
82   
83   void FillCluster(AliL3ModelTrack *track,Cluster *cluster,Int_t row,Int_t npads);
84   void FillZeros(AliL3DigitRowData *digPt,Bool_t reversesign=kFALSE);
85   void LocateCluster(AliL3ModelTrack *track,ClusterRegion *region,Int_t &padmin,Int_t &padmax);
86   void GetTrackID(Int_t pad,Int_t time,Int_t *trackID);
87   
88  private:
89   Bool_t fHoughTracks; // Flag to switch on/off Hough tracks
90   Bool_t CheckCluster(Int_t hitpad,Int_t hittime);
91   Float_t fPadOverlap; // Pad overlap (?)
92   Float_t fTimeOverlap; // Time overlap (?)
93   Int_t fTrackThreshold; //minimum weigth track need in order to be included.(=Nhits/weight)
94   AliL3MemHandler *fMemHandler; //! Pointer to the memory handler
95
96   void CalcClusterWidth(Cluster *cl,Float_t &sigmaY2,Float_t &sigmaZ2);
97   
98   ClassDef(AliL3Modeller,1) //Modeller class
99     
100 };
101
102 #endif