]> git.uio.no Git - u/mrichter/AliRoot.git/blob - HLT/TPCLib/AliHLTTPCClusterFinder.h
Acceptance data (Gines)
[u/mrichter/AliRoot.git] / HLT / TPCLib / AliHLTTPCClusterFinder.h
1 // @(#) $Id$
2
3 #ifndef AliHLTTPC_ClusterFinder
4 #define AliHLTTPC_ClusterFinder
5
6 class AliHLTTPCSpacePointData;
7 class AliHLTTPCDigitReader;
8
9 class AliHLTTPCClusterFinder {
10
11  public:
12   struct AliClusterData
13   {
14     UInt_t fTotalCharge;   //tot charge of cluster
15     UInt_t fPad;           //pad value
16     UInt_t fTime;          //time value
17     ULong64_t fPad2;       //for error in XY direction
18     ULong64_t fTime2;      //for error in Z  direction
19     UInt_t fMean;          //mean in time
20     UInt_t fFlags;         //different flags
21     UInt_t fChargeFalling; //for deconvolution
22     UInt_t fLastCharge;    //for deconvolution
23     UInt_t fLastMergedPad; //dont merge twice per pad
24   };
25   typedef struct AliClusterData AliClusterData; //!
26
27  private: 
28   AliHLTTPCSpacePointData *fSpacePointData; //!
29   AliHLTTPCDigitReader *fDigitReader;
30
31   UChar_t* fPtr;   //pointer to packed block
32   unsigned long fSize; //packed block size
33   Bool_t fDeconvTime; //deconv in time direction
34   Bool_t fDeconvPad;  //deconv in pad direction
35   Bool_t fStdout;     //have print out in write clusters
36   Bool_t fCalcerr;    //calculate centroid sigmas
37   Bool_t fRawSP;      //store centroids in raw system
38
39
40   Int_t fFirstRow;       //first row
41   Int_t fLastRow;        //last row
42   Int_t fCurrentRow;     //current active row
43   Int_t fCurrentSlice;   //current slice
44   Int_t fCurrentPatch;   //current patch
45   Int_t fMatch;          //size of match
46   UInt_t fThreshold;     //threshold for clusters
47   Int_t fNClusters;      //number of found clusters
48   Int_t fMaxNClusters;   //max. number of clusters
49   Float_t fXYErr;        //fixed error in XY
50   Float_t fZErr;         //fixed error in Z
51
52 #ifdef do_mc
53   void GetTrackID(Int_t pad,Int_t time,Int_t *trackID);
54 #endif
55   
56  public:
57   AliHLTTPCClusterFinder();
58   virtual ~AliHLTTPCClusterFinder();
59
60   void Read(void* ptr,unsigned long size);
61
62   void InitSlice(Int_t slice,Int_t patch,Int_t firstrow, Int_t lastrow,Int_t maxpoints);
63   void InitSlice(Int_t slice,Int_t patch,Int_t maxpoints);
64   void ProcessDigits();
65
66   void SetOutputArray(AliHLTTPCSpacePointData *pt);
67   void WriteClusters(Int_t n_clusters,AliClusterData *list);
68
69   void SetXYError(Float_t f) {fXYErr=f;}
70   void SetZError(Float_t f) {fZErr=f;}
71   void SetDeconv(Bool_t f) {fDeconvPad=f; fDeconvTime=f;}
72   void SetThreshold(UInt_t i) {fThreshold=i;}
73   void SetMatchWidth(UInt_t i) {fMatch=i;}
74   void SetSTDOutput(Bool_t f=kFALSE) {fStdout=f;}  
75   void SetCalcErr(Bool_t f=kTRUE) {fCalcerr=f;}
76   void SetRawSP(Bool_t f=kFALSE) {fRawSP=f;}
77   void SetReader(AliHLTTPCDigitReader* f){fDigitReader = f;}
78   Int_t GetNumberOfClusters() const {return fNClusters;}
79   
80   ClassDef(AliHLTTPCClusterFinder,1) //Fast cluster finder
81 };
82 #endif