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