]> git.uio.no Git - u/mrichter/AliRoot.git/blame - HLT/TPCLib/AliHLTTPCClusterFinder.h
Typo corrected.
[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
01f43166 24#include "AliHLTLogging.h"
a74855c2 25#include "AliHLTTPCPad.h"
a38a7850 26class AliHLTTPCSpacePointData;
27class AliHLTTPCDigitReader;
28
46b33a24 29class AliHLTTPCClusterFinder : public AliHLTLogging {
a38a7850 30
31 public:
32 struct AliClusterData
33 {
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
d8b2f74a 44 Int_t fRow; //row value
a38a7850 45 };
46 typedef struct AliClusterData AliClusterData; //!
47
8f8bf0af 48 /** standard constructor */
49 AliHLTTPCClusterFinder();
50 /** destructor */
51 virtual ~AliHLTTPCClusterFinder();
52
53 void Read(void* ptr,unsigned long size);
54
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);
57 void ProcessDigits();
58
59 void SetOutputArray(AliHLTTPCSpacePointData *pt);
60 void WriteClusters(Int_t n_clusters,AliClusterData *list);
8252a538 61 void PrintClusters();
8f8bf0af 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;}
b1c46961 68 void SetNSigmaThreshold(Double_t d) {fNSigmaThreshold=d;}
8f8bf0af 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 ----------
a74855c2 77 void ReadDataUnsorted(void* ptr,unsigned long size);
8f8bf0af 78 void FindClusters();
79 void WriteClusters(Int_t nclusters,AliHLTTPCClusters *list);
aff6e981 80 void SetUnsorted(Int_t unsorted){fUnsorted=unsorted;}
8252a538 81 void SetPatch(Int_t patch){fCurrentPatch=patch;}
82 void InitializePadArray();
83 Int_t DeInitializePadArray();
84 Bool_t ComparePads(AliHLTTPCPad *nextPad,AliHLTTPCClusters* candidate,Int_t nextPadToRead);
98034d0d 85 protected:
8f8bf0af 86 /** copy constructor prohibited */
87 AliHLTTPCClusterFinder(const AliHLTTPCClusterFinder&);
88 /** assignment operator prohibited */
89 AliHLTTPCClusterFinder& operator=(const AliHLTTPCClusterFinder&);
90
2a083ac4 91 AliHLTTPCSpacePointData *fSpacePointData; //! array of space points
92 AliHLTTPCDigitReader *fDigitReader; //! reader instance
a38a7850 93
2a083ac4 94 UChar_t* fPtr; //! pointer to packed block
a38a7850 95 unsigned long fSize; //packed block size
96 Bool_t fDeconvTime; //deconv in time direction
97 Bool_t fDeconvPad; //deconv in pad direction
98 Bool_t fStdout; //have print out in write clusters
99 Bool_t fCalcerr; //calculate centroid sigmas
100 Bool_t fRawSP; //store centroids in raw system
101
102
103 Int_t fFirstRow; //first row
104 Int_t fLastRow; //last row
105 Int_t fCurrentRow; //current active row
106 Int_t fCurrentSlice; //current slice
107 Int_t fCurrentPatch; //current patch
108 Int_t fMatch; //size of match
109 UInt_t fThreshold; //threshold for clusters
84645eb0 110 /** threshold for zero suppression (applied per bin) */
b1c46961 111 Int_t fSignalThreshold;// see above
112 /** threshold for zero suppression 2007 December run */
113 Double_t fNSigmaThreshold; // see above
a38a7850 114 Int_t fNClusters; //number of found clusters
115 Int_t fMaxNClusters; //max. number of clusters
116 Float_t fXYErr; //fixed error in XY
117 Float_t fZErr; //fixed error in Z
5235c3e9 118
119 Float_t fOccupancyLimit; // Occupancy Limit
120
aff6e981 121 Int_t fUnsorted; // enable for processing of unsorted digit data
8252a538 122 Bool_t fVectorInitialized;
123
124 typedef vector<AliHLTTPCPad*> AliHLTTPCPadVector;
125
126 vector<AliHLTTPCPadVector> fRowPadVector; //! transient
127
128 vector<AliHLTTPCClusters> fClusters; //! transient
129
130 UInt_t* fNumberOfPadsInRow; //! transient
131
132 UInt_t fNumberOfRows; //! transient
133
134 UInt_t fRowOfFirstCandidate;
a38a7850 135
64defa03 136
a38a7850 137#ifdef do_mc
138 void GetTrackID(Int_t pad,Int_t time,Int_t *trackID);
139#endif
140
8252a538 141 ClassDef(AliHLTTPCClusterFinder,4) //Fast cluster finder
a38a7850 142};
143#endif