]> git.uio.no Git - u/mrichter/AliRoot.git/blob - HLT/TPCLib/AliHLTTPCPadArray.h
82aaed9616b6de92b980b709af4944840af3bf86
[u/mrichter/AliRoot.git] / HLT / TPCLib / AliHLTTPCPadArray.h
1 // -*- Mode: C++ -*-
2 // @(#) $Id$
3
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                               */
9
10 /** @file   AliHLTTPCPadArray.h
11     @author Kenneth Aamodt
12     @date   
13     @brief  Class containing arrays of TPC Pads.
14 */
15
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
22 #include "AliHLTLogging.h"
23 #include "AliHLTTPCTransform.h"
24 #include "AliHLTTPCClusters.h"
25 #include <vector>
26
27 typedef Int_t AliHLTTPCSignal_t;
28 class AliHLTTPCDigitReader;
29 class AliHLTTPCPad;
30
31 /**
32  * @class AliHLTTPCPadArray
33  * TODO
34  */
35
36 class AliHLTTPCPadArray : public AliHLTLogging {
37
38 public:
39
40   /** standard constructor */
41   AliHLTTPCPadArray();
42
43   /** 
44    * Constructor
45    * @param patch   Patch number, either use this constructor or 
46    * use the default constructor and the SetPatch method
47    *
48    */
49   AliHLTTPCPadArray(Int_t patch);
50
51   /** standard destructor */
52   virtual ~AliHLTTPCPadArray();
53
54   /**
55    * Initialize the pad vector for the patch set.
56    */
57   Int_t InitializeVector();
58
59   /**
60    * Deinitialize the pad vector for the patch set.
61    */
62   Int_t DeInitializeVector();
63   
64   /**
65    * Loop over all pads setting their data array to -1.
66    */
67   void DataToDefault();
68   
69   /**
70    * Set the patch number.
71    */
72   void SetPatch(Int_t patch);
73
74   /**
75    * Set the digit reader.
76    */
77   void SetDigitReader(AliHLTTPCDigitReader* digitReader);
78
79   /**
80    * Reads the data, and set it in the Pad objects.
81    */
82   Int_t ReadData();
83
84   /**
85    * Retuns number of pads in this row.
86    */
87   Int_t GetNumberOfPads(Int_t row) const {return fNumberOfPadsInRow[row];}
88
89   /**
90    * Loop over all pads, checking for clustercandidates.
91    */
92   void FindClusterCandidates();
93   
94   /**
95    *
96    * Loop over all pads looking for clusters, if cluster candidates on two neighbouring
97    * pads have a mean time difference of <match it is said to be a cluster.
98    *
99    */
100   void FindClusters(Int_t match);
101
102   /**
103    * Print the values of the cluster, used for debugging purposes.
104    */
105   void PrintClusters();
106
107   typedef vector<AliHLTTPCPad*> AliHLTTPCPadVector;
108
109   vector<AliHLTTPCPadVector> fRowPadVector;                        //! transient
110
111   vector<AliHLTTPCClusters> fClusters;                             //! transient
112
113 private:
114   /** copy constructor prohibited */
115   AliHLTTPCPadArray(const AliHLTTPCPadArray&);
116   /** assignment operator prohibited */
117   AliHLTTPCPadArray& operator=(const AliHLTTPCPadArray&);
118
119   /** The patch number */
120   Int_t fPatch;                                                    //! transient
121
122   Int_t fFirstRow;                                                 //! transient
123
124   Int_t fLastRow;                                                  //! transient
125
126   //TODO: I suggest making the following UInt_t if it is never supposed to be negative.
127   Int_t fThreshold;                                                //! transient
128
129   Int_t* fNumberOfPadsInRow;                                       //! transient
130
131   Int_t fNumberOfRows;                                             //! transient
132
133   AliHLTTPCDigitReader* fDigitReader;                              //! transient
134
135   ClassDef(AliHLTTPCPadArray, 0);
136 };
137 #endif // ALIHLTTPCPADARRAY_H