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