]> git.uio.no Git - u/mrichter/AliRoot.git/blame - HLT/TPCLib/AliHLTTPCClusterFinder.h
New component for writing calibration data to fxs (Oystein)
[u/mrichter/AliRoot.git] / HLT / TPCLib / AliHLTTPCClusterFinder.h
CommitLineData
a38a7850 1// @(#) $Id$
4aa41877 2// Original: AliHLTClustFinderNew.h,v 1.13 2004/06/18 10:55:26 loizides
a38a7850 3
01f43166 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 */
a38a7850 9
01f43166 10/** @file AliHLTTPCClusterFinder.h
11 @author Anders Vestbo, Constantin Loizides, Jochen Thaeder
12 Kenneth Aamodt kenneth.aamodt@student.uib.no
13 @date
14 @brief Cluster Finder for the TPC
15*/
16
17// see below for class documentation
18// or
19// refer to README to build package
20// or
21// visit http://web.ift.uib.no/~kjeks/doc/alice-hlt
46b33a24 22
d8b2f74a 23#define UNSORTED 0
24
01f43166 25#include "AliHLTLogging.h"
26#include "AliHLTTPCPadArray.h"
a38a7850 27class AliHLTTPCSpacePointData;
28class AliHLTTPCDigitReader;
29
46b33a24 30class AliHLTTPCClusterFinder : public AliHLTLogging {
a38a7850 31
32 public:
33 struct AliClusterData
34 {
35 UInt_t fTotalCharge; //tot charge of cluster
36 UInt_t fPad; //pad value
37 UInt_t fTime; //time value
38 ULong64_t fPad2; //for error in XY direction
39 ULong64_t fTime2; //for error in Z direction
40 UInt_t fMean; //mean in time
41 UInt_t fFlags; //different flags
42 UInt_t fChargeFalling; //for deconvolution
43 UInt_t fLastCharge; //for deconvolution
44 UInt_t fLastMergedPad; //dont merge twice per pad
d8b2f74a 45 Int_t fRow; //row value
a38a7850 46 };
47 typedef struct AliClusterData AliClusterData; //!
48
8f8bf0af 49 /** standard constructor */
50 AliHLTTPCClusterFinder();
51 /** destructor */
52 virtual ~AliHLTTPCClusterFinder();
53
54 void Read(void* ptr,unsigned long size);
55
56 void InitSlice(Int_t slice,Int_t patch,Int_t firstrow, Int_t lastrow,Int_t maxpoints);
57 void InitSlice(Int_t slice,Int_t patch,Int_t maxpoints);
58 void ProcessDigits();
59
60 void SetOutputArray(AliHLTTPCSpacePointData *pt);
61 void WriteClusters(Int_t n_clusters,AliClusterData *list);
62
63 void SetXYError(Float_t f) {fXYErr=f;}
64 void SetZError(Float_t f) {fZErr=f;}
65 void SetDeconv(Bool_t f) {fDeconvPad=f; fDeconvTime=f;}
66 void SetThreshold(UInt_t i) {fThreshold=i;}
67 void SetOccupancyLimit(Float_t f) {fOccupancyLimit=f;}
68 void SetSignalThreshold(Int_t i) {fSignalThreshold=i;}
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;}
75
76 //----------------------------------Methods for the new unsorted way of reading data ----------
77 void SetPadArray(AliHLTTPCPadArray *padArray);
78 void ReadDataUnsorted(void* ptr,unsigned long size);
79 void FindClusters();
80 void WriteClusters(Int_t nclusters,AliHLTTPCClusters *list);
81
a38a7850 82 private:
8f8bf0af 83 /** copy constructor prohibited */
84 AliHLTTPCClusterFinder(const AliHLTTPCClusterFinder&);
85 /** assignment operator prohibited */
86 AliHLTTPCClusterFinder& operator=(const AliHLTTPCClusterFinder&);
87
2a083ac4 88 AliHLTTPCSpacePointData *fSpacePointData; //! array of space points
89 AliHLTTPCDigitReader *fDigitReader; //! reader instance
a38a7850 90
2a083ac4 91 UChar_t* fPtr; //! pointer to packed block
a38a7850 92 unsigned long fSize; //packed block size
93 Bool_t fDeconvTime; //deconv in time direction
94 Bool_t fDeconvPad; //deconv in pad direction
95 Bool_t fStdout; //have print out in write clusters
96 Bool_t fCalcerr; //calculate centroid sigmas
97 Bool_t fRawSP; //store centroids in raw system
98
99
100 Int_t fFirstRow; //first row
101 Int_t fLastRow; //last row
102 Int_t fCurrentRow; //current active row
103 Int_t fCurrentSlice; //current slice
104 Int_t fCurrentPatch; //current patch
105 Int_t fMatch; //size of match
106 UInt_t fThreshold; //threshold for clusters
84645eb0 107 /** threshold for zero suppression (applied per bin) */
108 Int_t fSignalThreshold;
a38a7850 109 Int_t fNClusters; //number of found clusters
110 Int_t fMaxNClusters; //max. number of clusters
111 Float_t fXYErr; //fixed error in XY
112 Float_t fZErr; //fixed error in Z
5235c3e9 113
114 Float_t fOccupancyLimit; // Occupancy Limit
115
01f43166 116 AliHLTTPCPadArray * fPadArray; //! transient
117
a38a7850 118
119#ifdef do_mc
120 void GetTrackID(Int_t pad,Int_t time,Int_t *trackID);
121#endif
122
01f43166 123 ClassDef(AliHLTTPCClusterFinder,1) //Fast cluster finder
a38a7850 124};
125#endif