]> git.uio.no Git - u/mrichter/AliRoot.git/blob - HLT/comp/AliL3Modeller.h
Merged HLT tag v1-2 with ALIROOT tag v3-09-Release.
[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;
16   UInt_t fPad;
17   UInt_t fTime;
18   UInt_t fSigmaY2;
19   UInt_t fSigmaZ2;
20 };
21
22 struct Digit {
23   Short_t fCharge;
24   Bool_t fUsed;
25 };
26
27 struct ClusterRegion {
28   Int_t mintime;
29   Int_t maxtime;
30 };
31
32 class AliL3Modeller {
33   
34  private:
35   Bool_t fHoughTracks;
36   Bool_t CheckCluster(Int_t hitpad,Int_t hittime);
37   Float_t fPadOverlap;
38   Float_t fTimeOverlap;
39   Int_t fTrackThreshold; //minimum weigth track need in order to be included.(=Nhits/weight)
40   AliL3MemHandler *fMemHandler; //!
41
42   void CalcClusterWidth(Cluster *cl,Float_t &sigmaY2,Float_t &sigmaZ2);
43   
44  protected:
45   
46   AliL3TrackArray *fTracks; //!
47   AliL3DigitRowData *fRowData;//!
48   Digit *fRow; //!
49   Char_t fPath[1024];
50
51   Bool_t fDebug;
52   Int_t fNClusters;
53   Int_t fMaxClusters;
54   Int_t fCurrentPadRow;
55   Int_t fMaxPads;
56   Int_t fMaxTimebins;
57   Int_t fPadSearch;
58   Int_t fTimeSearch;
59   Int_t fInnerPadSearch;
60   Int_t fInnerTimeSearch;
61   Int_t fOuterPadSearch;
62   Int_t fOuterTimeSearch;
63   
64   Int_t fSlice;
65   Int_t fPatch;
66   
67   void FillCluster(AliL3ModelTrack *track,Cluster *cluster,Int_t row,Int_t npads);
68   void FillZeros(AliL3DigitRowData *digPt,Bool_t reversesign=kFALSE);
69   void LocateCluster(AliL3ModelTrack *track,ClusterRegion *region,Int_t &padmin,Int_t &padmax);
70   void GetTrackID(Int_t pad,Int_t time,Int_t *trackID);
71   
72  public:
73   
74   AliL3Modeller();
75   virtual ~AliL3Modeller();
76   
77   virtual void FindClusters();
78   void Init(Int_t slice,Int_t patch,Char_t *trackdata,Char_t *path,Bool_t houghtracks,Bool_t binary=kTRUE);
79   void CheckForOverlaps(Float_t dangle=-1,Int_t *rowrange=0);
80   void CalculateCrossingPoints();
81   void RemoveBadTracks();
82   void WriteRemaining();
83   
84   void SetInputData(AliL3DigitRowData *digits) {fRowData = digits;}
85   void SetTrackThreshold(Int_t i=0) {fTrackThreshold=i;}
86   void SetOverlap(Int_t p=6,Int_t t=8) {fPadOverlap=p;fTimeOverlap=t;}
87   void SetSearchRange(Int_t p=1,Int_t t=2) {fPadSearch=p;fTimeSearch=t;}
88   void SetInnerSearchRange(Int_t p,Int_t t) {fInnerPadSearch=p; fInnerTimeSearch=t;}
89   void SetOuterSearchRange(Int_t p,Int_t t) {fOuterPadSearch=p; fOuterTimeSearch=t;}
90   void SetMaxClusterRange(Int_t p,Int_t t) {fMaxPads=p; fMaxTimebins=t;}
91   void Debug() {fDebug=kTRUE;}
92   virtual void SetFitRange(Int_t p,Int_t t) {return;}
93   virtual void SetNmaxOverlaps(Int_t i) {return;}
94   virtual void SetChiSqMax(Float_t f) {return;}
95   
96   AliL3TrackArray *GetTracks() {return fTracks;}
97     
98   ClassDef(AliL3Modeller,1) //Modeller class
99     
100 };
101
102 #endif