commit from Kenneth:
[u/mrichter/AliRoot.git] / HLT / TPCLib / AliHLTTPCPadArray.h
CommitLineData
01f43166 1// -*- Mode: C++ -*-
2// @(#) $Id$
3
a1dbf058 4#ifndef ALIHLTTPCPADARRAY_H
5#define ALIHLTTPCPADARRAY_H
01f43166 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 */
9
10/** @file AliHLTTPCPadArray.h
11 @author Kenneth Aamodt
12 @date
13 @brief Class containing arrays of TPC Pads.
14*/
15
a1dbf058 16// see below for class documentation
17// or
18// refer to README to build package
19// or
20// visit http://web.ift.uib.no/~kjeks/doc/alice-hlt
21
01f43166 22#include "AliHLTLogging.h"
23#include "AliHLTTPCTransform.h"
01f43166 24#include "AliHLTTPCClusters.h"
25#include <vector>
26
27typedef Int_t AliHLTTPCSignal_t;
28class AliHLTTPCDigitReader;
a1dbf058 29class AliHLTTPCPad;
01f43166 30
31/**
32 * @class AliHLTTPCPadArray
33 * TODO
34 */
35
36class AliHLTTPCPadArray : public AliHLTLogging {
37
38public:
39
1d337632 40 /**
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.
45 *
46 * Data type: @ref AliHLTTPCDefinitions::fgkActivePadsDataType
47 * {ACTIVPAD,TPC }
48 */
b1c46961 49 struct AliHLTTPCActivePads
50 {
b1c46961 51 UInt_t fRow; //row value
1d337632 52 UInt_t fPad; //pad value
b1c46961 53 };
54 typedef struct AliHLTTPCActivePads AliHLTTPCActivePads; //!
55
56
01f43166 57 /** standard constructor */
58 AliHLTTPCPadArray();
59
60 /**
61 * Constructor
3ab89155 62 * @param patch Patch number, either use this constructor or
63 * use the default constructor and the SetPatch method
64 *
01f43166 65 */
66 AliHLTTPCPadArray(Int_t patch);
67
01f43166 68 /** standard destructor */
69 virtual ~AliHLTTPCPadArray();
70
71 /**
72 * Initialize the pad vector for the patch set.
73 */
74 Int_t InitializeVector();
75
76 /**
77 * Deinitialize the pad vector for the patch set.
78 */
79 Int_t DeInitializeVector();
80
81 /**
82 * Loop over all pads setting their data array to -1.
83 */
a1dbf058 84 void DataToDefault();
01f43166 85
86 /**
87 * Set the patch number.
88 */
89 void SetPatch(Int_t patch);
90
91 /**
aff6e981 92 * Get the patch number.
93 */
94 Int_t GetPatch(){return fPatch;}
95
96 /**
01f43166 97 * Set the digit reader.
98 */
99 void SetDigitReader(AliHLTTPCDigitReader* digitReader);
100
101 /**
102 * Reads the data, and set it in the Pad objects.
103 */
104 Int_t ReadData();
105
106 /**
107 * Retuns number of pads in this row.
108 */
a1dbf058 109 Int_t GetNumberOfPads(Int_t row) const {return fNumberOfPadsInRow[row];}
01f43166 110
111 /**
112 * Loop over all pads, checking for clustercandidates.
113 */
a1dbf058 114 void FindClusterCandidates();
01f43166 115
116 /**
117 *
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.
120 *
121 */
122 void FindClusters(Int_t match);
123
124 /**
125 * Print the values of the cluster, used for debugging purposes.
126 */
127 void PrintClusters();
128
b1c46961 129 /**
130 * Set the Signal Threshold
131 */
132 void SetSignalThreshold(Int_t i){fSignalThreshold=i;}
133
134 /**
135 * Set the nSigma threshold
136 */
137 void SetNSigmaThreshold(Double_t i){fNSigmaThreshold=i;}
138
139
140 /**
141 * Loop over all pads adding pads with signal to active pads
142 * Returns number of active pads
143 *
144 */
145 Int_t GetActivePads(AliHLTTPCActivePads* activePads, Int_t maxActivePads);
146
a1dbf058 147 typedef vector<AliHLTTPCPad*> AliHLTTPCPadVector;
01f43166 148
a1dbf058 149 vector<AliHLTTPCPadVector> fRowPadVector; //! transient
01f43166 150
151 vector<AliHLTTPCClusters> fClusters; //! transient
152
153private:
a1dbf058 154 /** copy constructor prohibited */
155 AliHLTTPCPadArray(const AliHLTTPCPadArray&);
156 /** assignment operator prohibited */
157 AliHLTTPCPadArray& operator=(const AliHLTTPCPadArray&);
01f43166 158
159 /** The patch number */
a1dbf058 160 Int_t fPatch; //! transient
01f43166 161
162 Int_t fFirstRow; //! transient
163
164 Int_t fLastRow; //! transient
165
b1c46961 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*/
01f43166 168 Int_t fThreshold; //! transient
169
b1c46961 170 //TODO: I suggest making the following UInt_t if it is never supposed to be negative.
171 Int_t fSignalThreshold; //! transient
172
173 //TODO: I suggest making the following UInt_t if it is never supposed to be negative.
174 Double_t fNSigmaThreshold; //! transient
175
01f43166 176 Int_t* fNumberOfPadsInRow; //! transient
177
178 Int_t fNumberOfRows; //! transient
179
180 AliHLTTPCDigitReader* fDigitReader; //! transient
181
182 ClassDef(AliHLTTPCPadArray, 0);
183};
a1dbf058 184#endif // ALIHLTTPCPADARRAY_H