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.
73 *@param mode Switch to keep raw data or not
75 Int_t InitializeVector(Int_t mode);
78 * Deinitialize the pad vector for the patch set.
80 Int_t DeInitializeVector();
83 * Loop over all pads setting their data array to -1.
88 * Set the patch number.
90 void SetPatch(Int_t patch);
93 * Get the patch number.
95 Int_t GetPatch(){return fPatch;}
98 * Set the digit reader.
100 void SetDigitReader(AliHLTTPCDigitReader* digitReader);
103 * Reads the data, and set it in the Pad objects.
105 Int_t ReadData(Int_t mode);
108 * Retuns number of pads in this row.
110 Int_t GetNumberOfPads(Int_t row) const {return fNumberOfPadsInRow[row];}
113 * Loop over all pads, checking for clustercandidates.
115 void FindClusterCandidates();
119 * Loop over all pads looking for clusters, if cluster candidates on two neighbouring
120 * pads have a mean time difference of <match it is said to be a cluster.
123 void FindClusters(Int_t match);
126 * Print the values of the cluster, used for debugging purposes.
128 void PrintClusters();
131 * Set the Signal Threshold
133 void SetSignalThreshold(Int_t i){fSignalThreshold=i;}
136 * Set the nSigma threshold
138 void SetNSigmaThreshold(Double_t i){fNSigmaThreshold=i;}
142 * Loop over all pads adding pads with signal to active pads
143 * Returns number of active pads
146 Int_t GetActivePads(AliHLTTPCActivePads* activePads, Int_t maxActivePads);
148 typedef vector<AliHLTTPCPad*> AliHLTTPCPadVector;
150 vector<AliHLTTPCPadVector> fRowPadVector; //! transient
152 vector<AliHLTTPCClusters> fClusters; //! transient
155 /** copy constructor prohibited */
156 AliHLTTPCPadArray(const AliHLTTPCPadArray&);
157 /** assignment operator prohibited */
158 AliHLTTPCPadArray& operator=(const AliHLTTPCPadArray&);
160 /** The patch number */
161 Int_t fPatch; //! transient
163 Int_t fFirstRow; //! transient
165 Int_t fLastRow; //! transient
167 //TODO: I suggest making the following UInt_t if it is never supposed to be negative. Will do!
168 /* total charge of Cluster threshold*/
169 Int_t fThreshold; //! transient
171 //TODO: I suggest making the following UInt_t if it is never supposed to be negative.
172 Int_t fSignalThreshold; //! transient
174 //TODO: I suggest making the following UInt_t if it is never supposed to be negative.
175 Double_t fNSigmaThreshold; //! transient
177 Int_t* fNumberOfPadsInRow; //! transient
179 Int_t fNumberOfRows; //! transient
181 AliHLTTPCDigitReader* fDigitReader; //! transient
183 ClassDef(AliHLTTPCPadArray, 0);
185 #endif // ALIHLTTPCPADARRAY_H