]>
Commit | Line | Data |
---|---|---|
a54728f2 | 1 | // $Id$ |
71d7c760 | 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 | |
a54728f2 | 10 | /// @file AliHLTTPCClusterFinderComponent.h |
11 | /// @author Timm Steinbeck, Matthias Richter, Kenneth Aamodt | |
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. | |
a54728f2 | 28 | * Two components are registered, TPCClusterFinderUnpacked is for reading the HLT |
29 | * internal digit data format used in the simulation. TPCClusterFinder32Bit uses | |
30 | * the AliHLTTPCDigitReader for raw data. After a phase of different decoder/raw stream | |
31 | * implementations the CF for raw data is using the default offline raw stream for | |
32 | * the 32bit RCU format AliAltroRawStreamV3, which also has a fall back to the 40bit | |
33 | * AliAltroRawStream if the old RCU format is detected. | |
d9e5f6f3 | 34 | * |
35 | * The clusterfinder is now using the AliTPCTransform instead of the AliHLTTPCTransform for | |
36 | * transformations from row, pad time -> x,y,z. | |
37 | * | |
38 | * <h2>General properties:</h2> | |
39 | * | |
a54728f2 | 40 | * Component ID: \b TPCClusterFinderUnpacked and TPCClusterFinder32Bit <br> |
6b15c309 | 41 | * Library: \b libAliHLTTPC |
d9e5f6f3 | 42 | * Input Data Types: @ref kAliHLTDataTypeDDLRaw <br> |
43 | * Output Data Types: @ref AliHLTTPCDefinitions::fgkClustersDataType and/or kAliHLTDataTypeHwAddr16 <br> | |
44 | * | |
6b15c309 | 45 | * |
46 | * Mandatory arguments: <br> | |
47 | * <!-- NOTE: ignore the \li. <i> and </i>: it's just doxygen formatting --> | |
48 | * | |
49 | * Optional arguments: <br> | |
50 | * <!-- NOTE: ignore the \li. <i> and </i>: it's just doxygen formatting --> | |
51 | * \li -deconvolute-time <br> | |
52 | * Turns on deconvolution in the time direction. | |
53 | * \li -deconvolute-pad <br> | |
54 | * Turns on deconvolution in the pad direction. | |
55 | * \li -timebins <br> | |
56 | * Sets the number of timebins (446 for simulated data, and 1024 for real data) Default:1024 | |
57 | * \li -first-timebin <br> | |
58 | * First timebin taken into consideration when reading the data. | |
59 | * \li -last-timebin <br> | |
60 | * Last timebin taken into consideration when reading the data. | |
61 | * \li -sorted <br> | |
62 | * Switch off unsorted reading of data. Equivalent to the old argument unsorted 0. | |
63 | * \li -active-pads <br> | |
64 | * Switch off unsorted reading of data. Equivalent to the old argument unsorted 0. | |
65 | * \li -occupancy-limit <br> | |
66 | * Set the occupancy limit for the sorted clusterfinding. | |
67 | * | |
68 | * | |
69 | * Obsolete arguments: <br> | |
70 | * \li occupancy-limit <br> | |
71 | * \li rawreadermode <br> | |
72 | * \li pp-run <br> | |
73 | * \li adc-threshold <br> | |
74 | * \li oldrcuformat <br> | |
75 | * \li unsorted <br> | |
76 | * \li nsigma-threshold <br> | |
84645eb0 | 77 | * |
d9e5f6f3 | 78 | * <h2>Default CDB entries:</h2> |
5e102bf0 | 79 | * The component has these default CDB entries |
80 | * \li <tt>GRP/GRP/Data</tt>. | |
81 | * \li <tt>TPC/Calib/PadTime0</tt>. | |
82 | * \li <tt>TPC/Calib/Parameters</tt>. | |
83 | * \li <tt>TPC/Calib/TimeDrift</tt>. | |
84 | * \li <tt>TPC/Calib/Temperature</tt>. | |
d9e5f6f3 | 85 | * |
5e102bf0 | 86 | * TODO: pad by pad gain calibration also has to be added to the clusterfinder |
87 | * | |
88 | * And it also needs these below to avoid warnings during initialization and update of calibDB | |
89 | * \li <tt>TPC/Calib/PadGainFactor</tt>. | |
90 | * \li <tt>TPC/Calib/TimeGain</tt>. | |
91 | * \li <tt>TPC/Calib/GainFactorDedx</tt>. | |
92 | * \li <tt>TPC/Calib/PadNoise</tt>. | |
93 | * \li <tt>TPC/Calib/Pedestals</tt>. | |
94 | * \li <tt>TPC/Calib/ClusterParam</tt>. | |
95 | * \li <tt>TPC/Calib/AltroConfig</tt>. | |
96 | * \li <tt>TPC/Calib/Pulser</tt>. | |
97 | * \li <tt>TPC/Calib/CE</tt>. | |
98 | * \li <tt>TPC/Calib/Raw</tt>. | |
99 | * \li <tt>TPC/Calib/QA</tt>. | |
100 | * \li <tt>TPC/Calib/Mapping</tt>. | |
101 | * \li <tt>TPC/Calib/Goofie</tt>. | |
102 | * \li <tt>TPC/Calib/HighVoltage</tt>. | |
9cb474cd | 103 | * \li <tt>TPC/Calib/Ref</tt>. |
5e102bf0 | 104 | * |
105 | * These entries are used by the AliTPCTransform class to correct for T0, drift and ExB. | |
2efb85be | 106 | * @ingroup alihlt_tpc_components |
84645eb0 | 107 | */ |
71d7c760 | 108 | class AliHLTTPCClusterFinderComponent : public AliHLTProcessor |
109 | { | |
110 | public: | |
2efb85be | 111 | /** |
112 | * Defines for the cluster finder type. | |
113 | * The cluster finders can work on different formats of input data, | |
114 | * the AliHLTTPCDigitReader interface provides a transparent way to | |
115 | * read the data. | |
116 | */ | |
117 | enum { | |
a54728f2 | 118 | // deprecated option for offline AliAltroRawStream |
2efb85be | 119 | kClusterFinderPacked, |
a54728f2 | 120 | // Unpacked data of format AliHLTTPCUnpackedRawData */ |
2efb85be | 121 | kClusterFinderUnpacked, |
a54728f2 | 122 | // deprecated option for AliAltroDecoder |
deba5d85 | 123 | kClusterFinderDecoder, |
a54728f2 | 124 | // real data, offline altro decoder 32 bit format*/ |
deba5d85 | 125 | kClusterFinder32Bit |
2efb85be | 126 | }; |
127 | ||
74c73e5a | 128 | /** |
129 | * constructor | |
2efb85be | 130 | * @param mode input type see e.g. @ref kClusterFinderUnpacked |
74c73e5a | 131 | */ |
8252a538 | 132 | AliHLTTPCClusterFinderComponent(int mode); |
74c73e5a | 133 | /** destructor */ |
71d7c760 | 134 | virtual ~AliHLTTPCClusterFinderComponent(); |
135 | ||
136 | // Public functions to implement AliHLTComponent's interface. | |
137 | // These functions are required for the registration process | |
138 | ||
9783a5cf | 139 | /** interface function, see AliHLTComponent for description */ |
5df0cbb9 | 140 | const char* GetComponentID(); |
9783a5cf | 141 | /** interface function, see AliHLTComponent for description */ |
5df0cbb9 | 142 | void GetInputDataTypes( vector<AliHLTComponentDataType>& list); |
9783a5cf | 143 | /** interface function, see AliHLTComponent for description */ |
5df0cbb9 | 144 | AliHLTComponentDataType GetOutputDataType(); |
9783a5cf | 145 | /** interface function, see AliHLTComponent for description */ |
64defa03 | 146 | int GetOutputDataTypes(AliHLTComponentDataTypeList& tgtList); |
9783a5cf | 147 | /** interface function, see AliHLTComponent for description */ |
5df0cbb9 | 148 | virtual void GetOutputDataSize( unsigned long& constBase, double& inputMultiplier ); |
9783a5cf | 149 | /** interface function, see AliHLTComponent for description */ |
5df0cbb9 | 150 | AliHLTComponent* Spawn(); |
aee693eb | 151 | /** interface function, see @ref AliHLTComponent for description */ |
152 | void GetOCDBObjectDescription( TMap* const targetMap); | |
a655eae3 | 153 | |
71d7c760 | 154 | protected: |
155 | ||
156 | // Protected functions to implement AliHLTComponent's interface. | |
157 | // These functions provide initialization as well as the actual processing | |
158 | // capabilities of the component. | |
159 | ||
160 | int DoInit( int argc, const char** argv ); | |
161 | int DoDeinit(); | |
8ede8717 | 162 | int DoEvent( const AliHLTComponentEventData& evtData, const AliHLTComponentBlockData* blocks, |
163 | AliHLTComponentTriggerData& trigData, AliHLTUInt8_t* outputPtr, | |
164 | AliHLTUInt32_t& size, vector<AliHLTComponentBlockData>& outputBlocks ); | |
3f0fd8f1 | 165 | int Configure(const char* arguments); |
4f43db26 | 166 | int ScanConfigurationArgument(int argc, const char** argv); |
c3cda394 | 167 | int Reconfigure(const char* cdbEntry, const char* chainId); |
71d7c760 | 168 | |
5d2abf3b | 169 | using AliHLTProcessor::DoEvent; |
170 | ||
71d7c760 | 171 | private: |
2efb85be | 172 | /** standard constructor prohibited */ |
173 | AliHLTTPCClusterFinderComponent(); | |
a1dbf058 | 174 | /** copy constructor prohibited */ |
175 | AliHLTTPCClusterFinderComponent(const AliHLTTPCClusterFinderComponent&); | |
176 | /** assignment operator prohibited */ | |
177 | AliHLTTPCClusterFinderComponent& operator=(const AliHLTTPCClusterFinderComponent&); | |
db16520a | 178 | /** the cluster finder object */ |
2a083ac4 | 179 | AliHLTTPCClusterFinder* fClusterFinder; //!transient |
db16520a | 180 | /** the reader object for data decoding */ |
2a083ac4 | 181 | AliHLTTPCDigitReader* fReader; //!transient |
71d7c760 | 182 | |
6b15c309 | 183 | /** flag to deconvolute in time direction */ |
184 | Bool_t fDeconvTime; //!transient | |
85f1fb2b | 185 | /** the object to set the time stamp */ |
cac26580 | 186 | AliTPCTransform *fTS; //!transient |
187 | ||
6b15c309 | 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 | ||
85f1fb2b | 232 | ClassDef(AliHLTTPCClusterFinderComponent, 0) |
a74855c2 | 233 | |
234 | }; | |
71d7c760 | 235 | #endif |