1 #ifndef AliL3_VHDLClusterFinder
2 #define AliL3_VHDLClusterFinder
4 #include "AliL3RootTypes.h"
5 #include "AliL3Logging.h"
6 #include "AliL3AltroMemHandler.h"
10 struct VHDLClusterData
13 UInt_t fPad; //mean in pad
14 UInt_t fTime; //mean in time
15 UInt_t fPad2; //for error in XY direction
16 UInt_t fTime2; //for error in Z direction
17 UInt_t fMean; //mean for comparism
18 UInt_t fMerge; //number of merges
19 UShort_t fRow; //row of cluster
20 UShort_t fLastPad; //last pad on merge
21 //UInt_t fChargeFalling; //for deconvolution
22 //UInt_t fLastCharge; //for deconvolution
24 typedef struct VHDLClusterData VCData;
28 //size of cluster list
32 class AliL3VHDLClusterFinder {
35 AliL3AltroMemHandler fAltromem; //!
37 VCData fSeqs[N_clmem]; //!
38 UShort_t fPList[N_mem];
41 UShort_t fRP,fWP,fOP,fEP,fFP; //pointer in ringbuffer
42 UShort_t fLast,fFirst; //free area in memory
44 Bool_t fDeconvTime; //not used for now
51 Int_t fMatch; //match distance
52 UInt_t fThreshold; //threshold for cluster
53 UInt_t fMinMerge; //minimum number of merges for cluster
54 Int_t fNClusters; //number of found clusters
61 void ClearSeq(UShort_t i);
62 void FreeSeq(UShort_t i);
63 void IncPointer(UShort_t &p,Short_t add=1,UShort_t N=N_mem);
73 void ProcessSequence();
74 //void WriteClusters(Int_t n_clusters,ClusterData *list);
77 AliL3VHDLClusterFinder();
78 virtual ~AliL3VHDLClusterFinder();
82 void SetXYError(Float_t f) {fXYErr=f;}
83 void SetZError(Float_t f) {fZErr=f;}
84 void SetDeconv(Bool_t f) {fDeconvPad=f; fDeconvTime=f;}
85 void SetThreshold(UInt_t i=10) {fThreshold=i;}
86 void SetMatchWidth(UInt_t i=4) {fMatch=i;}
87 void SetMergeMinimum(UInt_t i=1) {fMinMerge=i;}
88 void SetSTDOutput(Bool_t f=kFALSE) {fstdout=f;}
89 void SetCalcErr(Bool_t f=kTRUE) {fcalcerr=f;}
90 void SetASCIIInput(FILE *f){fAltromem.SetASCIIInput(f);}
92 Int_t GetNumberOfClusters() {return fNClusters;}
94 ClassDef(AliL3VHDLClusterFinder,1)