]>
Commit | Line | Data |
---|---|---|
71d7c760 | 1 | // @(#) $Id$ |
2 | ||
3 | #ifndef ALIHLTTPCCLUSTERFINDERCOMPONENT_H | |
4 | #define ALIHLTTPCCLUSTERFINDERCOMPONENT_H | |
a38a7850 | 5 | |
297174de | 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 * | |
71d7c760 | 9 | |
de554e07 | 10 | /** @file AliHLTTPCClusterFinderComponent.h |
297174de | 11 | @author Timm Steinbeck, Matthias Richter, Kenneth Aamodt |
de554e07 | 12 | @date |
13 | @brief The TPC cluster finder component. | |
14 | */ | |
71d7c760 | 15 | |
16 | #include "AliHLTProcessor.h" | |
57a4102f | 17 | #include "AliHLTComponentBenchmark.h" |
71d7c760 | 18 | |
a38a7850 | 19 | class AliHLTTPCClusterFinder; |
e67b0680 | 20 | class AliHLTTPCDigitReader; |
71d7c760 | 21 | |
84645eb0 | 22 | /** |
23 | * @class AliHLTTPCClusterFinderComponent | |
24 | * Implementation of the cluster finder component. | |
25 | * The component implements the interface methods of the @ref AliHLTProcessor. | |
26 | * The actual cluster finding algorithm is implemented in @ref AliHLTTPCClusterFinder. | |
6b15c309 | 27 | * Two components are registered, TPCClusterFinderPacked and TPCClusterFinderDecoder. |
28 | * TPCClusterFinderDecoder use the AliTPCRawStream class for decoding of the data, while TPCClusterFinderDecoder | |
29 | * use the AliAltroDecoder for decoding the data. | |
30 | * | |
31 | * TPCClusterFinderDecoder is the fastest of the two, this is due to that the AliAltroDecoder | |
32 | * returns data in a bunch format. A bunch consist of consecutive signals. | |
33 | * TPCClusterFinderPacked first have to read the data one by one, which means that row, pad and | |
34 | * time signals have to be compared between each new digit, which leads to a slower alorithm. | |
84645eb0 | 35 | * |
d9e5f6f3 | 36 | * |
37 | * The clusterfinder is now using the AliTPCTransform instead of the AliHLTTPCTransform for | |
38 | * transformations from row, pad time -> x,y,z. | |
39 | * | |
40 | * <h2>General properties:</h2> | |
41 | * | |
6b15c309 | 42 | * Component ID: \b TPCClusterFinderDecoder and TPCClusterFinderPacked <br> |
43 | * Library: \b libAliHLTTPC | |
d9e5f6f3 | 44 | * Input Data Types: @ref kAliHLTDataTypeDDLRaw <br> |
45 | * Output Data Types: @ref AliHLTTPCDefinitions::fgkClustersDataType and/or kAliHLTDataTypeHwAddr16 <br> | |
46 | * | |
6b15c309 | 47 | * |
48 | * Mandatory arguments: <br> | |
49 | * <!-- NOTE: ignore the \li. <i> and </i>: it's just doxygen formatting --> | |
50 | * | |
51 | * Optional arguments: <br> | |
52 | * <!-- NOTE: ignore the \li. <i> and </i>: it's just doxygen formatting --> | |
53 | * \li -deconvolute-time <br> | |
54 | * Turns on deconvolution in the time direction. | |
55 | * \li -deconvolute-pad <br> | |
56 | * Turns on deconvolution in the pad direction. | |
57 | * \li -timebins <br> | |
58 | * Sets the number of timebins (446 for simulated data, and 1024 for real data) Default:1024 | |
59 | * \li -first-timebin <br> | |
60 | * First timebin taken into consideration when reading the data. | |
61 | * \li -last-timebin <br> | |
62 | * Last timebin taken into consideration when reading the data. | |
63 | * \li -sorted <br> | |
64 | * Switch off unsorted reading of data. Equivalent to the old argument unsorted 0. | |
65 | * \li -active-pads <br> | |
66 | * Switch off unsorted reading of data. Equivalent to the old argument unsorted 0. | |
67 | * \li -occupancy-limit <br> | |
68 | * Set the occupancy limit for the sorted clusterfinding. | |
69 | * | |
70 | * | |
71 | * Obsolete arguments: <br> | |
72 | * \li occupancy-limit <br> | |
73 | * \li rawreadermode <br> | |
74 | * \li pp-run <br> | |
75 | * \li adc-threshold <br> | |
76 | * \li oldrcuformat <br> | |
77 | * \li unsorted <br> | |
78 | * \li nsigma-threshold <br> | |
84645eb0 | 79 | * |
d9e5f6f3 | 80 | * <h2>Default CDB entries:</h2> |
5e102bf0 | 81 | * The component has these default CDB entries |
82 | * \li <tt>GRP/GRP/Data</tt>. | |
83 | * \li <tt>TPC/Calib/PadTime0</tt>. | |
84 | * \li <tt>TPC/Calib/Parameters</tt>. | |
85 | * \li <tt>TPC/Calib/TimeDrift</tt>. | |
86 | * \li <tt>TPC/Calib/Temperature</tt>. | |
d9e5f6f3 | 87 | * |
5e102bf0 | 88 | * TODO: pad by pad gain calibration also has to be added to the clusterfinder |
89 | * | |
90 | * And it also needs these below to avoid warnings during initialization and update of calibDB | |
91 | * \li <tt>TPC/Calib/PadGainFactor</tt>. | |
92 | * \li <tt>TPC/Calib/TimeGain</tt>. | |
93 | * \li <tt>TPC/Calib/GainFactorDedx</tt>. | |
94 | * \li <tt>TPC/Calib/PadNoise</tt>. | |
95 | * \li <tt>TPC/Calib/Pedestals</tt>. | |
96 | * \li <tt>TPC/Calib/ClusterParam</tt>. | |
97 | * \li <tt>TPC/Calib/AltroConfig</tt>. | |
98 | * \li <tt>TPC/Calib/Pulser</tt>. | |
99 | * \li <tt>TPC/Calib/CE</tt>. | |
100 | * \li <tt>TPC/Calib/Raw</tt>. | |
101 | * \li <tt>TPC/Calib/QA</tt>. | |
102 | * \li <tt>TPC/Calib/Mapping</tt>. | |
103 | * \li <tt>TPC/Calib/Goofie</tt>. | |
104 | * \li <tt>TPC/Calib/HighVoltage</tt>. | |
9cb474cd | 105 | * \li <tt>TPC/Calib/Ref</tt>. |
5e102bf0 | 106 | * |
107 | * These entries are used by the AliTPCTransform class to correct for T0, drift and ExB. | |
2efb85be | 108 | * @ingroup alihlt_tpc_components |
84645eb0 | 109 | */ |
71d7c760 | 110 | class AliHLTTPCClusterFinderComponent : public AliHLTProcessor |
111 | { | |
112 | public: | |
2efb85be | 113 | /** |
114 | * Defines for the cluster finder type. | |
115 | * The cluster finders can work on different formats of input data, | |
116 | * the AliHLTTPCDigitReader interface provides a transparent way to | |
117 | * read the data. | |
118 | */ | |
119 | enum { | |
120 | /** real data, offline AliAltroRawStream used for data decoding */ | |
121 | kClusterFinderPacked, | |
122 | /** Unpacked data of format AliHLTTPCUnpackedRawData */ | |
123 | kClusterFinderUnpacked, | |
124 | /** real data, fast AliAltroDecoder used for data decoding */ | |
deba5d85 | 125 | kClusterFinderDecoder, |
126 | /** real data, offline altro decoder 32 bit format*/ | |
127 | kClusterFinder32Bit | |
2efb85be | 128 | }; |
129 | ||
74c73e5a | 130 | /** |
131 | * constructor | |
2efb85be | 132 | * @param mode input type see e.g. @ref kClusterFinderUnpacked |
74c73e5a | 133 | */ |
8252a538 | 134 | AliHLTTPCClusterFinderComponent(int mode); |
74c73e5a | 135 | /** destructor */ |
71d7c760 | 136 | virtual ~AliHLTTPCClusterFinderComponent(); |
137 | ||
138 | // Public functions to implement AliHLTComponent's interface. | |
139 | // These functions are required for the registration process | |
140 | ||
9783a5cf | 141 | /** interface function, see AliHLTComponent for description */ |
5df0cbb9 | 142 | const char* GetComponentID(); |
9783a5cf | 143 | /** interface function, see AliHLTComponent for description */ |
5df0cbb9 | 144 | void GetInputDataTypes( vector<AliHLTComponentDataType>& list); |
9783a5cf | 145 | /** interface function, see AliHLTComponent for description */ |
5df0cbb9 | 146 | AliHLTComponentDataType GetOutputDataType(); |
9783a5cf | 147 | /** interface function, see AliHLTComponent for description */ |
64defa03 | 148 | int GetOutputDataTypes(AliHLTComponentDataTypeList& tgtList); |
9783a5cf | 149 | /** interface function, see AliHLTComponent for description */ |
5df0cbb9 | 150 | virtual void GetOutputDataSize( unsigned long& constBase, double& inputMultiplier ); |
9783a5cf | 151 | /** interface function, see AliHLTComponent for description */ |
5df0cbb9 | 152 | AliHLTComponent* Spawn(); |
aee693eb | 153 | /** interface function, see @ref AliHLTComponent for description */ |
154 | void GetOCDBObjectDescription( TMap* const targetMap); | |
a655eae3 | 155 | |
71d7c760 | 156 | protected: |
157 | ||
158 | // Protected functions to implement AliHLTComponent's interface. | |
159 | // These functions provide initialization as well as the actual processing | |
160 | // capabilities of the component. | |
161 | ||
162 | int DoInit( int argc, const char** argv ); | |
163 | int DoDeinit(); | |
8ede8717 | 164 | int DoEvent( const AliHLTComponentEventData& evtData, const AliHLTComponentBlockData* blocks, |
165 | AliHLTComponentTriggerData& trigData, AliHLTUInt8_t* outputPtr, | |
166 | AliHLTUInt32_t& size, vector<AliHLTComponentBlockData>& outputBlocks ); | |
3f0fd8f1 | 167 | int Configure(const char* arguments); |
4f43db26 | 168 | int ScanConfigurationArgument(int argc, const char** argv); |
c3cda394 | 169 | int Reconfigure(const char* cdbEntry, const char* chainId); |
71d7c760 | 170 | |
5d2abf3b | 171 | using AliHLTProcessor::DoEvent; |
172 | ||
71d7c760 | 173 | private: |
2efb85be | 174 | /** standard constructor prohibited */ |
175 | AliHLTTPCClusterFinderComponent(); | |
a1dbf058 | 176 | /** copy constructor prohibited */ |
177 | AliHLTTPCClusterFinderComponent(const AliHLTTPCClusterFinderComponent&); | |
178 | /** assignment operator prohibited */ | |
179 | AliHLTTPCClusterFinderComponent& operator=(const AliHLTTPCClusterFinderComponent&); | |
db16520a | 180 | /** the cluster finder object */ |
2a083ac4 | 181 | AliHLTTPCClusterFinder* fClusterFinder; //!transient |
db16520a | 182 | /** the reader object for data decoding */ |
2a083ac4 | 183 | AliHLTTPCDigitReader* fReader; //!transient |
71d7c760 | 184 | |
6b15c309 | 185 | /** flag to deconvolute in time direction */ |
186 | Bool_t fDeconvTime; //!transient | |
187 | ||
188 | /** flag to deconvolute in pad direction */ | |
189 | Bool_t fDeconvPad; //!transient | |
190 | /** flag to switch on/off deconvolution in pad and time directions (used by sorted clusterfinding method) */ | |
191 | bool fClusterDeconv; //!transient | |
192 | /** Error in xy of cluster */ | |
193 | float fXYClusterError; //!transient | |
194 | /** Error in Z direction of cluster */ | |
a74855c2 | 195 | float fZClusterError; //!transient |
196 | /** | |
197 | * switch to indicated the reader | |
198 | * use fModeSwitch = 0 for packed inputtype "gkDDLPackedRawDataType" | |
199 | * use fModeSwitch = 1 for unpacked inputtype "gkUnpackedRawDataType" | |
200 | * use fModeSwitch = 2 for packed inputtype "gkDDLPackedRawDataType" with new digit reader | |
deba5d85 | 201 | * use fModeSwitch = 3 for packed inputtype "gkDDLPackedRawDataType" with 32bit digit reader |
a74855c2 | 202 | */ |
6b15c309 | 203 | Int_t fModeSwitch; // see above |
a38a7850 | 204 | |
a74855c2 | 205 | /* |
206 | * Reads the data the new unsorted way if true | |
207 | * | |
208 | */ | |
209 | Int_t fUnsorted; //!transient | |
210 | ||
211 | /* | |
212 | * Patch number to be read, currently given as component argument, | |
213 | * will be changed later. | |
214 | */ | |
215 | Int_t fPatch; //!transient | |
216 | ||
217 | /* | |
6b15c309 | 218 | * Switch to specify if one ship out a list of active pads (pads conected to a cluster). |
a74855c2 | 219 | */ |
220 | Int_t fGetActivePads; //!transient | |
221 | ||
6b15c309 | 222 | /** First timebin taken into account when reading the data */ |
223 | Int_t fFirstTimeBin; //!transient | |
224 | ||
225 | /** Last timebin taken in to account when reading the data */ | |
226 | Int_t fLastTimeBin; //!transient | |
227 | ||
db76ab35 | 228 | Bool_t fDoMC; // flag to provide MC labels |
229 | Bool_t fReleaseMemory; // flag to release the memory after each event | |
57a4102f | 230 | AliHLTComponentBenchmark fBenchmark; // benchmark |
231 | ||
22240104 | 232 | ClassDef(AliHLTTPCClusterFinderComponent, 0) |
a74855c2 | 233 | |
234 | }; | |
71d7c760 | 235 | #endif |