]> git.uio.no Git - u/mrichter/AliRoot.git/blame - HLT/TPCLib/AliHLTTPCClusterFinderComponent.h
Updates in D-meson PID class:
[u/mrichter/AliRoot.git] / HLT / TPCLib / AliHLTTPCClusterFinderComponent.h
CommitLineData
5e75f4e0 1//-*- Mode: C++ -*-
a54728f2 2// $Id$
71d7c760 3
4#ifndef ALIHLTTPCCLUSTERFINDERCOMPONENT_H
5#define ALIHLTTPCCLUSTERFINDERCOMPONENT_H
a38a7850 6
297174de 7//* This file is property of and copyright by the ALICE HLT Project *
8//* ALICE Experiment at CERN, All rights reserved. *
9//* See cxx source for full Copyright notice *
71d7c760 10
a54728f2 11/// @file AliHLTTPCClusterFinderComponent.h
12/// @author Timm Steinbeck, Matthias Richter, Kenneth Aamodt
13/// @date
14/// @brief The TPC cluster finder component.
15///
71d7c760 16
17#include "AliHLTProcessor.h"
57a4102f 18#include "AliHLTComponentBenchmark.h"
71d7c760 19
a38a7850 20class AliHLTTPCClusterFinder;
e67b0680 21class AliHLTTPCDigitReader;
cac26580 22class AliTPCTransform;
71d7c760 23
84645eb0 24/**
25 * @class AliHLTTPCClusterFinderComponent
26 * Implementation of the cluster finder component.
27 * The component implements the interface methods of the @ref AliHLTProcessor.
28 * The actual cluster finding algorithm is implemented in @ref AliHLTTPCClusterFinder.
a54728f2 29 * Two components are registered, TPCClusterFinderUnpacked is for reading the HLT
30 * internal digit data format used in the simulation. TPCClusterFinder32Bit uses
31 * the AliHLTTPCDigitReader for raw data. After a phase of different decoder/raw stream
32 * implementations the CF for raw data is using the default offline raw stream for
33 * the 32bit RCU format AliAltroRawStreamV3, which also has a fall back to the 40bit
34 * AliAltroRawStream if the old RCU format is detected.
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 *
a54728f2 41 * Component ID: \b TPCClusterFinderUnpacked and TPCClusterFinder32Bit <br>
6b15c309 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 {
a54728f2 119 // deprecated option for offline AliAltroRawStream
2efb85be 120 kClusterFinderPacked,
a54728f2 121 // Unpacked data of format AliHLTTPCUnpackedRawData */
2efb85be 122 kClusterFinderUnpacked,
a54728f2 123 // deprecated option for AliAltroDecoder
deba5d85 124 kClusterFinderDecoder,
a54728f2 125 // real data, offline altro decoder 32 bit format*/
deba5d85 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();
aee693eb 152 /** interface function, see @ref AliHLTComponent for description */
153 void GetOCDBObjectDescription( TMap* const targetMap);
a655eae3 154
71d7c760 155 protected:
156
157 // Protected functions to implement AliHLTComponent's interface.
158 // These functions provide initialization as well as the actual processing
159 // capabilities of the component.
160
161 int DoInit( int argc, const char** argv );
162 int DoDeinit();
8ede8717 163 int DoEvent( const AliHLTComponentEventData& evtData, const AliHLTComponentBlockData* blocks,
164 AliHLTComponentTriggerData& trigData, AliHLTUInt8_t* outputPtr,
165 AliHLTUInt32_t& size, vector<AliHLTComponentBlockData>& outputBlocks );
3f0fd8f1 166 int Configure(const char* arguments);
4f43db26 167 int ScanConfigurationArgument(int argc, const char** argv);
c3cda394 168 int Reconfigure(const char* cdbEntry, const char* chainId);
71d7c760 169
5d2abf3b 170 using AliHLTProcessor::DoEvent;
171
71d7c760 172 private:
2efb85be 173 /** standard constructor prohibited */
174 AliHLTTPCClusterFinderComponent();
a1dbf058 175 /** copy constructor prohibited */
176 AliHLTTPCClusterFinderComponent(const AliHLTTPCClusterFinderComponent&);
177 /** assignment operator prohibited */
178 AliHLTTPCClusterFinderComponent& operator=(const AliHLTTPCClusterFinderComponent&);
db16520a 179 /** the cluster finder object */
2a083ac4 180 AliHLTTPCClusterFinder* fClusterFinder; //!transient
db16520a 181 /** the reader object for data decoding */
2a083ac4 182 AliHLTTPCDigitReader* fReader; //!transient
71d7c760 183
6b15c309 184 /** flag to deconvolute in time direction */
185 Bool_t fDeconvTime; //!transient
85f1fb2b 186 /** the object to set the time stamp */
cac26580 187 AliTPCTransform *fTS; //!transient
188
6b15c309 189 /** flag to deconvolute in pad direction */
190 Bool_t fDeconvPad; //!transient
191 /** flag to switch on/off deconvolution in pad and time directions (used by sorted clusterfinding method) */
192 bool fClusterDeconv; //!transient
193 /** Error in xy of cluster */
194 float fXYClusterError; //!transient
195 /** Error in Z direction of cluster */
a74855c2 196 float fZClusterError; //!transient
197 /**
198 * switch to indicated the reader
199 * use fModeSwitch = 0 for packed inputtype "gkDDLPackedRawDataType"
200 * use fModeSwitch = 1 for unpacked inputtype "gkUnpackedRawDataType"
201 * use fModeSwitch = 2 for packed inputtype "gkDDLPackedRawDataType" with new digit reader
deba5d85 202 * use fModeSwitch = 3 for packed inputtype "gkDDLPackedRawDataType" with 32bit digit reader
a74855c2 203 */
6b15c309 204 Int_t fModeSwitch; // see above
a38a7850 205
a74855c2 206 /*
207 * Reads the data the new unsorted way if true
208 *
209 */
210 Int_t fUnsorted; //!transient
211
212 /*
213 * Patch number to be read, currently given as component argument,
214 * will be changed later.
215 */
216 Int_t fPatch; //!transient
217
218 /*
6b15c309 219 * Switch to specify if one ship out a list of active pads (pads conected to a cluster).
a74855c2 220 */
221 Int_t fGetActivePads; //!transient
222
6b15c309 223 /** First timebin taken into account when reading the data */
224 Int_t fFirstTimeBin; //!transient
225
226 /** Last timebin taken in to account when reading the data */
227 Int_t fLastTimeBin; //!transient
228
db76ab35 229 Bool_t fDoMC; // flag to provide MC labels
230 Bool_t fReleaseMemory; // flag to release the memory after each event
5e75f4e0 231 Bool_t fPublishRawClusters; // publish raw clusters in addition
57a4102f 232 AliHLTComponentBenchmark fBenchmark; // benchmark
233
85f1fb2b 234 ClassDef(AliHLTTPCClusterFinderComponent, 0)
a74855c2 235
236};
71d7c760 237#endif