2 // Original: AliHLTClustFinderNew.h,v 1.13 2004/06/18 10:55:26 loizides
4 #ifndef AliHLTTPC_CLUSTERFINDER
5 #define AliHLTTPC_CLUSTERFINDER
6 /* This file is property of and copyright by the ALICE HLT Project *
7 * ALICE Experiment at CERN, All rights reserved. *
8 * See cxx source for full Copyright notice */
10 /** @file AliHLTTPCClusterFinder.h
11 @author Anders Vestbo, Constantin Loizides, Jochen Thaeder
12 Kenneth Aamodt kenneth.aamodt@student.uib.no
14 @brief Cluster Finder for the TPC
17 // see below for class documentation
19 // refer to README to build package
21 // visit http://web.ift.uib.no/~kjeks/doc/alice-hlt
23 #include "AliHLTLogging.h"
24 #include "AliHLTTPCPadArray.h"
25 class AliHLTTPCSpacePointData;
26 class AliHLTTPCDigitReader;
28 class AliHLTTPCClusterFinder : public AliHLTLogging {
33 UInt_t fTotalCharge; //tot charge of cluster
34 UInt_t fPad; //pad value
35 UInt_t fTime; //time value
36 ULong64_t fPad2; //for error in XY direction
37 ULong64_t fTime2; //for error in Z direction
38 UInt_t fMean; //mean in time
39 UInt_t fFlags; //different flags
40 UInt_t fChargeFalling; //for deconvolution
41 UInt_t fLastCharge; //for deconvolution
42 UInt_t fLastMergedPad; //dont merge twice per pad
44 typedef struct AliClusterData AliClusterData; //!
47 AliHLTTPCSpacePointData *fSpacePointData; //! array of space points
48 AliHLTTPCDigitReader *fDigitReader; //! reader instance
50 UChar_t* fPtr; //! pointer to packed block
51 unsigned long fSize; //packed block size
52 Bool_t fDeconvTime; //deconv in time direction
53 Bool_t fDeconvPad; //deconv in pad direction
54 Bool_t fStdout; //have print out in write clusters
55 Bool_t fCalcerr; //calculate centroid sigmas
56 Bool_t fRawSP; //store centroids in raw system
59 Int_t fFirstRow; //first row
60 Int_t fLastRow; //last row
61 Int_t fCurrentRow; //current active row
62 Int_t fCurrentSlice; //current slice
63 Int_t fCurrentPatch; //current patch
64 Int_t fMatch; //size of match
65 UInt_t fThreshold; //threshold for clusters
66 /** threshold for zero suppression (applied per bin) */
67 Int_t fSignalThreshold;
68 Int_t fNClusters; //number of found clusters
69 Int_t fMaxNClusters; //max. number of clusters
70 Float_t fXYErr; //fixed error in XY
71 Float_t fZErr; //fixed error in Z
73 Float_t fOccupancyLimit; // Occupancy Limit
75 AliHLTTPCPadArray * fPadArray; //! transient
79 void GetTrackID(Int_t pad,Int_t time,Int_t *trackID);
83 /** standard constructor */
84 AliHLTTPCClusterFinder();
85 /** not a valid copy constructor, defined according to effective C++ style */
86 AliHLTTPCClusterFinder(const AliHLTTPCClusterFinder&);
87 /** not a valid assignment op, but defined according to effective C++ style */
88 AliHLTTPCClusterFinder& operator=(const AliHLTTPCClusterFinder&);
90 virtual ~AliHLTTPCClusterFinder();
92 void Read(void* ptr,unsigned long size);
94 void InitSlice(Int_t slice,Int_t patch,Int_t firstrow, Int_t lastrow,Int_t maxpoints);
95 void InitSlice(Int_t slice,Int_t patch,Int_t maxpoints);
98 void SetOutputArray(AliHLTTPCSpacePointData *pt);
99 void WriteClusters(Int_t n_clusters,AliClusterData *list);
101 void SetXYError(Float_t f) {fXYErr=f;}
102 void SetZError(Float_t f) {fZErr=f;}
103 void SetDeconv(Bool_t f) {fDeconvPad=f; fDeconvTime=f;}
104 void SetThreshold(UInt_t i) {fThreshold=i;}
105 void SetOccupancyLimit(Float_t f) {fOccupancyLimit=f;}
106 void SetSignalThreshold(Int_t i) {fSignalThreshold=i;}
107 void SetMatchWidth(UInt_t i) {fMatch=i;}
108 void SetSTDOutput(Bool_t f=kFALSE) {fStdout=f;}
109 void SetCalcErr(Bool_t f=kTRUE) {fCalcerr=f;}
110 void SetRawSP(Bool_t f=kFALSE) {fRawSP=f;}
111 void SetReader(AliHLTTPCDigitReader* f){fDigitReader = f;}
112 Int_t GetNumberOfClusters() const {return fNClusters;}
114 //----------------------------------Methods for the new unsorted way of reading data ----------
115 void SetPadArray(AliHLTTPCPadArray *padArray);
116 void ReadDataUnsorted(void* ptr,unsigned long size);
118 void WriteClusters(Int_t nclusters,AliHLTTPCClusters *list);
120 ClassDef(AliHLTTPCClusterFinder,1) //Fast cluster finder