]> git.uio.no Git - u/mrichter/AliRoot.git/blob - HLT/comp/AliHLTModeller.h
Bogdan: new version of MUON visualization.
[u/mrichter/AliRoot.git] / HLT / comp / AliHLTModeller.h
1 // @(#) $Id$
2
3 #ifndef AliHLT_Modeller
4 #define AliHLT_Modeller
5
6
7 #include "AliHLTRootTypes.h"
8
9 class AliHLTTrackArray;
10 class AliHLTMemHandler;
11 class AliHLTDigitRowData;
12 class AliHLTModelTrack;
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 AliHLTModeller {
33   
34  public:
35   
36   AliHLTModeller();
37   virtual ~AliHLTModeller();
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(AliHLTDigitRowData *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 Bool_t SetFitRange(AliHLTModelTrack */*track*/,Int_t */*p*/,Int_t */*t*/) {return kFALSE;}
55   virtual void SetNmaxOverlaps(Int_t /*i*/) {return;}
56   virtual void SetChiSqMax(Float_t /*f*/,Int_t /*p*/) {return;}
57   
58   AliHLTTrackArray *GetTracks() {return fTracks;}
59     
60  protected:
61   
62   AliHLTTrackArray *fTracks; //! Array of tracks
63   AliHLTDigitRowData *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(AliHLTModelTrack *track,Cluster *cluster,Int_t row,Int_t npads);
84   void FillZeros(AliHLTDigitRowData *digPt,Bool_t reversesign=kFALSE);
85   void LocateCluster(AliHLTModelTrack *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   AliHLTMemHandler *fMemHandler; //! Pointer to the memory handler
95
96   void CalcClusterWidth(Cluster *cl,Float_t &sigmaY2,Float_t &sigmaZ2);
97   
98   ClassDef(AliHLTModeller,1) //Modeller class
99     
100 };
101
102 typedef AliHLTModeller AliL3Modeller; // for backward compatibility
103
104 #endif