]> git.uio.no Git - u/mrichter/AliRoot.git/blame - HLT/TPCLib/AliHLTTPCClusterFinderComponent.h
minor correction: making file path and subversion consistent
[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>
80 * The component has two default CDB entries
81 * \li <tt>TPC/Calib/PadTime0</tt>.
82 * \li <tt>TPC/Calib/Parameters</tt>.
83 *
84 * These entries are used by the AliTPCTransform class to correct for T0 and drift.
2efb85be 85 * @ingroup alihlt_tpc_components
84645eb0 86 */
71d7c760 87class AliHLTTPCClusterFinderComponent : public AliHLTProcessor
88 {
89 public:
2efb85be 90 /**
91 * Defines for the cluster finder type.
92 * The cluster finders can work on different formats of input data,
93 * the AliHLTTPCDigitReader interface provides a transparent way to
94 * read the data.
95 */
96 enum {
97 /** real data, offline AliAltroRawStream used for data decoding */
98 kClusterFinderPacked,
99 /** Unpacked data of format AliHLTTPCUnpackedRawData */
100 kClusterFinderUnpacked,
101 /** real data, fast AliAltroDecoder used for data decoding */
deba5d85 102 kClusterFinderDecoder,
103 /** real data, offline altro decoder 32 bit format*/
104 kClusterFinder32Bit
2efb85be 105 };
106
74c73e5a 107 /**
108 * constructor
2efb85be 109 * @param mode input type see e.g. @ref kClusterFinderUnpacked
74c73e5a 110 */
8252a538 111 AliHLTTPCClusterFinderComponent(int mode);
74c73e5a 112 /** destructor */
71d7c760 113 virtual ~AliHLTTPCClusterFinderComponent();
114
115 // Public functions to implement AliHLTComponent's interface.
116 // These functions are required for the registration process
117
9783a5cf 118 /** interface function, see AliHLTComponent for description */
5df0cbb9 119 const char* GetComponentID();
9783a5cf 120 /** interface function, see AliHLTComponent for description */
5df0cbb9 121 void GetInputDataTypes( vector<AliHLTComponentDataType>& list);
9783a5cf 122 /** interface function, see AliHLTComponent for description */
5df0cbb9 123 AliHLTComponentDataType GetOutputDataType();
9783a5cf 124 /** interface function, see AliHLTComponent for description */
64defa03 125 int GetOutputDataTypes(AliHLTComponentDataTypeList& tgtList);
9783a5cf 126 /** interface function, see AliHLTComponent for description */
5df0cbb9 127 virtual void GetOutputDataSize( unsigned long& constBase, double& inputMultiplier );
9783a5cf 128 /** interface function, see AliHLTComponent for description */
5df0cbb9 129 AliHLTComponent* Spawn();
a655eae3 130
71d7c760 131 protected:
132
133 // Protected functions to implement AliHLTComponent's interface.
134 // These functions provide initialization as well as the actual processing
135 // capabilities of the component.
136
137 int DoInit( int argc, const char** argv );
138 int DoDeinit();
8ede8717 139 int DoEvent( const AliHLTComponentEventData& evtData, const AliHLTComponentBlockData* blocks,
140 AliHLTComponentTriggerData& trigData, AliHLTUInt8_t* outputPtr,
141 AliHLTUInt32_t& size, vector<AliHLTComponentBlockData>& outputBlocks );
3f0fd8f1 142 int Configure(const char* arguments);
c3cda394 143 int Reconfigure(const char* cdbEntry, const char* chainId);
71d7c760 144
5d2abf3b 145 using AliHLTProcessor::DoEvent;
146
71d7c760 147 private:
2efb85be 148 /** standard constructor prohibited */
149 AliHLTTPCClusterFinderComponent();
a1dbf058 150 /** copy constructor prohibited */
151 AliHLTTPCClusterFinderComponent(const AliHLTTPCClusterFinderComponent&);
152 /** assignment operator prohibited */
153 AliHLTTPCClusterFinderComponent& operator=(const AliHLTTPCClusterFinderComponent&);
db16520a 154 /** the cluster finder object */
2a083ac4 155 AliHLTTPCClusterFinder* fClusterFinder; //!transient
db16520a 156 /** the reader object for data decoding */
2a083ac4 157 AliHLTTPCDigitReader* fReader; //!transient
71d7c760 158
6b15c309 159 /** flag to deconvolute in time direction */
160 Bool_t fDeconvTime; //!transient
161
162 /** flag to deconvolute in pad direction */
163 Bool_t fDeconvPad; //!transient
164 /** flag to switch on/off deconvolution in pad and time directions (used by sorted clusterfinding method) */
165 bool fClusterDeconv; //!transient
166 /** Error in xy of cluster */
167 float fXYClusterError; //!transient
168 /** Error in Z direction of cluster */
a74855c2 169 float fZClusterError; //!transient
170 /**
171 * switch to indicated the reader
172 * use fModeSwitch = 0 for packed inputtype "gkDDLPackedRawDataType"
173 * use fModeSwitch = 1 for unpacked inputtype "gkUnpackedRawDataType"
174 * use fModeSwitch = 2 for packed inputtype "gkDDLPackedRawDataType" with new digit reader
deba5d85 175 * use fModeSwitch = 3 for packed inputtype "gkDDLPackedRawDataType" with 32bit digit reader
a74855c2 176 */
6b15c309 177 Int_t fModeSwitch; // see above
a38a7850 178
a74855c2 179 /*
180 * Reads the data the new unsorted way if true
181 *
182 */
183 Int_t fUnsorted; //!transient
184
185 /*
186 * Patch number to be read, currently given as component argument,
187 * will be changed later.
188 */
189 Int_t fPatch; //!transient
190
191 /*
6b15c309 192 * Switch to specify if one ship out a list of active pads (pads conected to a cluster).
a74855c2 193 */
194 Int_t fGetActivePads; //!transient
195
6b15c309 196 /** First timebin taken into account when reading the data */
197 Int_t fFirstTimeBin; //!transient
198
199 /** Last timebin taken in to account when reading the data */
200 Int_t fLastTimeBin; //!transient
201
deba5d85 202 Bool_t fDoMC;
203
204 ClassDef(AliHLTTPCClusterFinderComponent, 6)
a74855c2 205
206};
71d7c760 207#endif