4 #ifndef ALIHLTTPCPADARRAY_H
5 #define ALIHLTTPCPADARRAY_H
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 AliHLTTPCPadArray.h
11 @author Kenneth Aamodt
13 @brief Class containing arrays of TPC Pads.
16 // see below for class documentation
18 // refer to README to build package
20 // visit http://web.ift.uib.no/~kjeks/doc/alice-hlt
22 #include "AliHLTLogging.h"
23 #include "AliHLTTPCTransform.h"
24 #include "AliHLTTPCClusters.h"
27 typedef Int_t AliHLTTPCSignal_t;
28 class AliHLTTPCDigitReader;
32 * @class AliHLTTPCPadArray
36 class AliHLTTPCPadArray : public AliHLTLogging {
41 * Data exchange structure to propagate the information about
42 * active pads from the component carrying out the selection.
43 * Currently it's the AliHLTTPCClusterFinderComponent, but the code
44 * is encapsulated into AliHLTTPCPad/AliHLTTPCPadArray.
46 * Data type: @ref AliHLTTPCDefinitions::fgkActivePadsDataType
49 struct AliHLTTPCActivePads
51 UInt_t fRow; //row value
52 UInt_t fPad; //pad value
54 typedef struct AliHLTTPCActivePads AliHLTTPCActivePads; //!
57 /** standard constructor */
62 * @param patch Patch number, either use this constructor or
63 * use the default constructor and the SetPatch method
66 AliHLTTPCPadArray(Int_t patch);
68 /** standard destructor */
69 virtual ~AliHLTTPCPadArray();
72 * Initialize the pad vector for the patch set.
74 Int_t InitializeVector();
77 * Deinitialize the pad vector for the patch set.
79 Int_t DeInitializeVector();
82 * Loop over all pads setting their data array to -1.
87 * Set the patch number.
89 void SetPatch(Int_t patch);
92 * Get the patch number.
94 Int_t GetPatch(){return fPatch;}
97 * Set the digit reader.
99 void SetDigitReader(AliHLTTPCDigitReader* digitReader);
102 * Reads the data, and set it in the Pad objects.
107 * Retuns number of pads in this row.
109 Int_t GetNumberOfPads(Int_t row) const {return fNumberOfPadsInRow[row];}
112 * Loop over all pads, checking for clustercandidates.
114 void FindClusterCandidates();
118 * Loop over all pads looking for clusters, if cluster candidates on two neighbouring
119 * pads have a mean time difference of <match it is said to be a cluster.
122 void FindClusters(Int_t match);
125 * Print the values of the cluster, used for debugging purposes.
127 void PrintClusters();
130 * Set the Signal Threshold
132 void SetSignalThreshold(Int_t i){fSignalThreshold=i;}
135 * Set the nSigma threshold
137 void SetNSigmaThreshold(Double_t i){fNSigmaThreshold=i;}
141 * Loop over all pads adding pads with signal to active pads
142 * Returns number of active pads
145 Int_t GetActivePads(AliHLTTPCActivePads* activePads, Int_t maxActivePads);
147 typedef vector<AliHLTTPCPad*> AliHLTTPCPadVector;
149 vector<AliHLTTPCPadVector> fRowPadVector; //! transient
151 vector<AliHLTTPCClusters> fClusters; //! transient
154 /** copy constructor prohibited */
155 AliHLTTPCPadArray(const AliHLTTPCPadArray&);
156 /** assignment operator prohibited */
157 AliHLTTPCPadArray& operator=(const AliHLTTPCPadArray&);
159 /** The patch number */
160 Int_t fPatch; //! transient
162 Int_t fFirstRow; //! transient
164 Int_t fLastRow; //! transient
166 //TODO: I suggest making the following UInt_t if it is never supposed to be negative. Will do!
167 /* total charge of Cluster threshold*/
168 Int_t fThreshold; //! transient
170 //TODO: I suggest making the following UInt_t if it is never supposed to be negative.
171 Int_t fSignalThreshold; //! transient
173 //TODO: I suggest making the following UInt_t if it is never supposed to be negative.
174 Double_t fNSigmaThreshold; //! transient
176 Int_t* fNumberOfPadsInRow; //! transient
178 Int_t fNumberOfRows; //! transient
180 AliHLTTPCDigitReader* fDigitReader; //! transient
182 ClassDef(AliHLTTPCPadArray, 0);
184 #endif // ALIHLTTPCPADARRAY_H