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
24 #include "AliHLTLogging.h"
25 #include "AliHLTTPCPadArray.h"
26 class AliHLTTPCSpacePointData;
27 class AliHLTTPCDigitReader;
29 class AliHLTTPCClusterFinder : public AliHLTLogging {
34 UInt_t fTotalCharge; //tot charge of cluster
35 UInt_t fPad; //pad value
36 UInt_t fTime; //time value
37 ULong64_t fPad2; //for error in XY direction
38 ULong64_t fTime2; //for error in Z direction
39 UInt_t fMean; //mean in time
40 UInt_t fFlags; //different flags
41 UInt_t fChargeFalling; //for deconvolution
42 UInt_t fLastCharge; //for deconvolution
43 UInt_t fLastMergedPad; //dont merge twice per pad
44 Int_t fRow; //row value
46 typedef struct AliClusterData AliClusterData; //!
48 /** standard constructor */
49 AliHLTTPCClusterFinder();
51 virtual ~AliHLTTPCClusterFinder();
53 void Read(void* ptr,unsigned long size);
55 void InitSlice(Int_t slice,Int_t patch,Int_t firstrow, Int_t lastrow,Int_t maxpoints);
56 void InitSlice(Int_t slice,Int_t patch,Int_t maxpoints);
59 void SetOutputArray(AliHLTTPCSpacePointData *pt);
60 void WriteClusters(Int_t n_clusters,AliClusterData *list);
62 void SetXYError(Float_t f) {fXYErr=f;}
63 void SetZError(Float_t f) {fZErr=f;}
64 void SetDeconv(Bool_t f) {fDeconvPad=f; fDeconvTime=f;}
65 void SetThreshold(UInt_t i) {fThreshold=i;}
66 void SetOccupancyLimit(Float_t f) {fOccupancyLimit=f;}
67 void SetSignalThreshold(Int_t i) {fSignalThreshold=i;}
68 void SetNSigmaThreshold(Double_t d) {fNSigmaThreshold=d;}
69 void SetMatchWidth(UInt_t i) {fMatch=i;}
70 void SetSTDOutput(Bool_t f=kFALSE) {fStdout=f;}
71 void SetCalcErr(Bool_t f=kTRUE) {fCalcerr=f;}
72 void SetRawSP(Bool_t f=kFALSE) {fRawSP=f;}
73 void SetReader(AliHLTTPCDigitReader* f){fDigitReader = f;}
74 Int_t GetNumberOfClusters() const {return fNClusters;}
76 //----------------------------------Methods for the new unsorted way of reading data ----------
77 void SetPadArray(AliHLTTPCPadArray *padArray);
78 void ReadDataUnsorted(void* ptr,unsigned long size);
80 Int_t GetActivePads(AliHLTTPCPadArray::AliHLTTPCActivePads* activePads,Int_t maxActivePads);
81 void WriteClusters(Int_t nclusters,AliHLTTPCClusters *list);
82 void SetUnsorted(Int_t unsorted){fUnsorted=unsorted;}
85 /** copy constructor prohibited */
86 AliHLTTPCClusterFinder(const AliHLTTPCClusterFinder&);
87 /** assignment operator prohibited */
88 AliHLTTPCClusterFinder& operator=(const AliHLTTPCClusterFinder&);
90 AliHLTTPCSpacePointData *fSpacePointData; //! array of space points
91 AliHLTTPCDigitReader *fDigitReader; //! reader instance
93 UChar_t* fPtr; //! pointer to packed block
94 unsigned long fSize; //packed block size
95 Bool_t fDeconvTime; //deconv in time direction
96 Bool_t fDeconvPad; //deconv in pad direction
97 Bool_t fStdout; //have print out in write clusters
98 Bool_t fCalcerr; //calculate centroid sigmas
99 Bool_t fRawSP; //store centroids in raw system
102 Int_t fFirstRow; //first row
103 Int_t fLastRow; //last row
104 Int_t fCurrentRow; //current active row
105 Int_t fCurrentSlice; //current slice
106 Int_t fCurrentPatch; //current patch
107 Int_t fMatch; //size of match
108 UInt_t fThreshold; //threshold for clusters
109 /** threshold for zero suppression (applied per bin) */
110 Int_t fSignalThreshold;// see above
111 /** threshold for zero suppression 2007 December run */
112 Double_t fNSigmaThreshold; // see above
113 Int_t fNClusters; //number of found clusters
114 Int_t fMaxNClusters; //max. number of clusters
115 Float_t fXYErr; //fixed error in XY
116 Float_t fZErr; //fixed error in Z
118 Float_t fOccupancyLimit; // Occupancy Limit
120 AliHLTTPCPadArray * fPadArray; //! transient
122 Int_t fUnsorted; // enable for processing of unsorted digit data
124 /** list of active pads if PadArray is not used */
125 vector<AliHLTTPCPadArray::AliHLTTPCActivePads> fActivePads; //!transient
128 void GetTrackID(Int_t pad,Int_t time,Int_t *trackID);
131 ClassDef(AliHLTTPCClusterFinder,3) //Fast cluster finder