]> git.uio.no Git - u/mrichter/AliRoot.git/blame - HLT/TPCLib/AliHLTTPCClusterFinderComponent.h
First set of modifications to handle in SDD DAs the information about ADC sampling...
[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 *
6b15c309 35 * Component ID: \b TPCClusterFinderDecoder and TPCClusterFinderPacked <br>
36 * Library: \b libAliHLTTPC
37 *
38 * Mandatory arguments: <br>
39 * <!-- NOTE: ignore the \li. <i> and </i>: it's just doxygen formatting -->
40 *
41 * Optional arguments: <br>
42 * <!-- NOTE: ignore the \li. <i> and </i>: it's just doxygen formatting -->
43 * \li -deconvolute-time <br>
44 * Turns on deconvolution in the time direction.
45 * \li -deconvolute-pad <br>
46 * Turns on deconvolution in the pad direction.
47 * \li -timebins <br>
48 * Sets the number of timebins (446 for simulated data, and 1024 for real data) Default:1024
49 * \li -first-timebin <br>
50 * First timebin taken into consideration when reading the data.
51 * \li -last-timebin <br>
52 * Last timebin taken into consideration when reading the data.
53 * \li -sorted <br>
54 * Switch off unsorted reading of data. Equivalent to the old argument unsorted 0.
55 * \li -active-pads <br>
56 * Switch off unsorted reading of data. Equivalent to the old argument unsorted 0.
57 * \li -occupancy-limit <br>
58 * Set the occupancy limit for the sorted clusterfinding.
59 *
60 *
61 * Obsolete arguments: <br>
62 * \li occupancy-limit <br>
63 * \li rawreadermode <br>
64 * \li pp-run <br>
65 * \li adc-threshold <br>
66 * \li oldrcuformat <br>
67 * \li unsorted <br>
68 * \li nsigma-threshold <br>
84645eb0 69 *
2efb85be 70 * @ingroup alihlt_tpc_components
84645eb0 71 */
71d7c760 72class AliHLTTPCClusterFinderComponent : public AliHLTProcessor
73 {
74 public:
2efb85be 75 /**
76 * Defines for the cluster finder type.
77 * The cluster finders can work on different formats of input data,
78 * the AliHLTTPCDigitReader interface provides a transparent way to
79 * read the data.
80 */
81 enum {
82 /** real data, offline AliAltroRawStream used for data decoding */
83 kClusterFinderPacked,
84 /** Unpacked data of format AliHLTTPCUnpackedRawData */
85 kClusterFinderUnpacked,
86 /** real data, fast AliAltroDecoder used for data decoding */
deba5d85 87 kClusterFinderDecoder,
88 /** real data, offline altro decoder 32 bit format*/
89 kClusterFinder32Bit
2efb85be 90 };
91
74c73e5a 92 /**
93 * constructor
2efb85be 94 * @param mode input type see e.g. @ref kClusterFinderUnpacked
74c73e5a 95 */
8252a538 96 AliHLTTPCClusterFinderComponent(int mode);
74c73e5a 97 /** destructor */
71d7c760 98 virtual ~AliHLTTPCClusterFinderComponent();
99
100 // Public functions to implement AliHLTComponent's interface.
101 // These functions are required for the registration process
102
9783a5cf 103 /** interface function, see AliHLTComponent for description */
5df0cbb9 104 const char* GetComponentID();
9783a5cf 105 /** interface function, see AliHLTComponent for description */
5df0cbb9 106 void GetInputDataTypes( vector<AliHLTComponentDataType>& list);
9783a5cf 107 /** interface function, see AliHLTComponent for description */
5df0cbb9 108 AliHLTComponentDataType GetOutputDataType();
9783a5cf 109 /** interface function, see AliHLTComponent for description */
64defa03 110 int GetOutputDataTypes(AliHLTComponentDataTypeList& tgtList);
9783a5cf 111 /** interface function, see AliHLTComponent for description */
5df0cbb9 112 virtual void GetOutputDataSize( unsigned long& constBase, double& inputMultiplier );
9783a5cf 113 /** interface function, see AliHLTComponent for description */
5df0cbb9 114 AliHLTComponent* Spawn();
a655eae3 115
71d7c760 116 protected:
117
118 // Protected functions to implement AliHLTComponent's interface.
119 // These functions provide initialization as well as the actual processing
120 // capabilities of the component.
121
122 int DoInit( int argc, const char** argv );
123 int DoDeinit();
8ede8717 124 int DoEvent( const AliHLTComponentEventData& evtData, const AliHLTComponentBlockData* blocks,
125 AliHLTComponentTriggerData& trigData, AliHLTUInt8_t* outputPtr,
126 AliHLTUInt32_t& size, vector<AliHLTComponentBlockData>& outputBlocks );
3f0fd8f1 127 int Configure(const char* arguments);
c3cda394 128 int Reconfigure(const char* cdbEntry, const char* chainId);
71d7c760 129
5d2abf3b 130 using AliHLTProcessor::DoEvent;
131
71d7c760 132 private:
2efb85be 133 /** standard constructor prohibited */
134 AliHLTTPCClusterFinderComponent();
a1dbf058 135 /** copy constructor prohibited */
136 AliHLTTPCClusterFinderComponent(const AliHLTTPCClusterFinderComponent&);
137 /** assignment operator prohibited */
138 AliHLTTPCClusterFinderComponent& operator=(const AliHLTTPCClusterFinderComponent&);
db16520a 139 /** the cluster finder object */
2a083ac4 140 AliHLTTPCClusterFinder* fClusterFinder; //!transient
db16520a 141 /** the reader object for data decoding */
2a083ac4 142 AliHLTTPCDigitReader* fReader; //!transient
71d7c760 143
6b15c309 144 /** flag to deconvolute in time direction */
145 Bool_t fDeconvTime; //!transient
146
147 /** flag to deconvolute in pad direction */
148 Bool_t fDeconvPad; //!transient
149 /** flag to switch on/off deconvolution in pad and time directions (used by sorted clusterfinding method) */
150 bool fClusterDeconv; //!transient
151 /** Error in xy of cluster */
152 float fXYClusterError; //!transient
153 /** Error in Z direction of cluster */
a74855c2 154 float fZClusterError; //!transient
155 /**
156 * switch to indicated the reader
157 * use fModeSwitch = 0 for packed inputtype "gkDDLPackedRawDataType"
158 * use fModeSwitch = 1 for unpacked inputtype "gkUnpackedRawDataType"
159 * use fModeSwitch = 2 for packed inputtype "gkDDLPackedRawDataType" with new digit reader
deba5d85 160 * use fModeSwitch = 3 for packed inputtype "gkDDLPackedRawDataType" with 32bit digit reader
a74855c2 161 */
6b15c309 162 Int_t fModeSwitch; // see above
a38a7850 163
a74855c2 164 /*
165 * Reads the data the new unsorted way if true
166 *
167 */
168 Int_t fUnsorted; //!transient
169
170 /*
171 * Patch number to be read, currently given as component argument,
172 * will be changed later.
173 */
174 Int_t fPatch; //!transient
175
176 /*
6b15c309 177 * Switch to specify if one ship out a list of active pads (pads conected to a cluster).
a74855c2 178 */
179 Int_t fGetActivePads; //!transient
180
6b15c309 181 /** First timebin taken into account when reading the data */
182 Int_t fFirstTimeBin; //!transient
183
184 /** Last timebin taken in to account when reading the data */
185 Int_t fLastTimeBin; //!transient
186
deba5d85 187 Bool_t fDoMC;
188
189 ClassDef(AliHLTTPCClusterFinderComponent, 6)
a74855c2 190
191};
71d7c760 192#endif