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