]> git.uio.no Git - u/mrichter/AliRoot.git/blob - HLT/comp/AliL3ClusterFitter.h
Merged Cvetans RowHoughTransformer, Anders latest developments in comp
[u/mrichter/AliRoot.git] / HLT / comp / AliL3ClusterFitter.h
1 // @(#) $Id$
2
3 #ifndef AliL3_ClusterFitter
4 #define AliL3_ClusterFitter
5
6 #include "AliL3RootTypes.h"
7 #include "AliL3Modeller.h"
8 #include "AliL3Transform.h"
9
10 class AliL3ModelTrack;
11 class AliL3TrackArray;
12 class AliL3SpacePointData;
13
14 class AliL3ClusterFitter : public AliL3Modeller {
15   
16  private:
17   Int_t fNmaxOverlaps;
18   Int_t fRowMin;
19   Int_t fRowMax;
20   Float_t fChiSqMax[3];
21   Float_t fYInnerWidthFactor;
22   Float_t fZInnerWidthFactor;
23   Float_t fYOuterWidthFactor;
24   Float_t fZOuterWidthFactor;
25   Int_t fFitted;
26   Int_t fFailed;
27   static Int_t fBadFitError;
28   static Int_t fFitError;
29   static Int_t fResultError;
30   static Int_t fFitRangeError;
31   Bool_t fSeeding;
32   Int_t fNMaxClusters;
33   Int_t fNClusters;
34   Int_t fEvent;
35   AliL3TrackArray *fSeeds; //!
36   AliL3TrackArray *fProcessTracks; //!
37   AliL3SpacePointData *fClusters; //!
38   
39   void FitClusters(AliL3ModelTrack *track,Int_t *padrange,Int_t *timerange);
40   Bool_t CheckCluster(Int_t trackindex);
41   Bool_t IsMaximum(Int_t pad,Int_t time);
42   Bool_t SetFitRange(AliL3ModelTrack *track,Int_t *padrange,Int_t *timerange);
43   void SetClusterfitFalse(AliL3ModelTrack *track);
44   void CalculateWeightedMean(AliL3ModelTrack *track,Int_t *padrange,Int_t *timerange);
45   
46  public:
47   AliL3ClusterFitter();
48   AliL3ClusterFitter(Char_t *path);
49   virtual ~AliL3ClusterFitter();
50   
51   void Init(Int_t slice,Int_t patch,Int_t *rowrange,AliL3TrackArray *tracks);
52   void Init(Int_t slice,Int_t patch);
53   void LoadSeeds(Int_t *rowrange,Bool_t offline=kTRUE,Int_t eventnr=0,Float_t zvertex=0.0);
54   void LoadLocalSegments();
55   void FindClusters();
56   void AddClusters();
57   void WriteClusters(Bool_t global=kTRUE);
58   void WriteTracks(Int_t min_hits);
59   void SetNmaxOverlaps(Int_t i) {fNmaxOverlaps=i;}
60   //void SetChiSqMax(Float_t f,Bool_t overlapping) {fChiSqMax[(Int_t)overlapping] = f;}
61   void SetChiSqMax(Float_t f,Int_t lpatch) {fChiSqMax[lpatch] = f;}
62   void SetInnerWidthFactor(Float_t y,Float_t z) {fYInnerWidthFactor=y; fZInnerWidthFactor=z;}
63   void SetOuterWidthFactor(Float_t y,Float_t z) {fYOuterWidthFactor=y; fZOuterWidthFactor=z;}
64   
65   Float_t GetYWidthFactor() {return fCurrentPadRow < AliL3Transform::GetLastRow(1) ? fYInnerWidthFactor : fYOuterWidthFactor;}
66   Float_t GetZWidthFactor() {return fCurrentPadRow < AliL3Transform::GetLastRow(1) ? fZInnerWidthFactor : fZOuterWidthFactor;}
67   AliL3TrackArray *GetSeeds() {return fSeeds;}
68   
69   ClassDef(AliL3ClusterFitter,1) 
70
71 };
72
73 #endif