3 #ifndef ALIHLTTPCCLUSTERFINDERCOMPONENT_H
4 #define ALIHLTTPCCLUSTERFINDERCOMPONENT_H
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 *
10 /** @file AliHLTTPCClusterFinderComponent.h
11 @author Timm Steinbeck, Matthias Richter, Kenneth Aamodt
13 @brief The TPC cluster finder component.
16 #include "AliHLTProcessor.h"
18 class AliHLTTPCClusterFinder;
19 class AliHLTTPCDigitReader;
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.
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.
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.
35 * Component ID: \b TPCClusterFinderDecoder and TPCClusterFinderPacked <br>
36 * Library: \b libAliHLTTPC
38 * Mandatory arguments: <br>
39 * <!-- NOTE: ignore the \li. <i> and </i>: it's just doxygen formatting -->
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.
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.
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.
61 * Obsolete arguments: <br>
62 * \li occupancy-limit <br>
63 * \li rawreadermode <br>
65 * \li adc-threshold <br>
66 * \li oldrcuformat <br>
68 * \li nsigma-threshold <br>
70 * @ingroup alihlt_tpc_components
72 class AliHLTTPCClusterFinderComponent : public AliHLTProcessor
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
82 /** real data, offline AliAltroRawStream used for data decoding */
84 /** Unpacked data of format AliHLTTPCUnpackedRawData */
85 kClusterFinderUnpacked,
86 /** real data, fast AliAltroDecoder used for data decoding */
92 * @param mode input type see e.g. @ref kClusterFinderUnpacked
94 AliHLTTPCClusterFinderComponent(int mode);
96 virtual ~AliHLTTPCClusterFinderComponent();
98 // Public functions to implement AliHLTComponent's interface.
99 // These functions are required for the registration process
101 /** interface function, see AliHLTComponent for description */
102 const char* GetComponentID();
103 /** interface function, see AliHLTComponent for description */
104 void GetInputDataTypes( vector<AliHLTComponentDataType>& list);
105 /** interface function, see AliHLTComponent for description */
106 AliHLTComponentDataType GetOutputDataType();
107 /** interface function, see AliHLTComponent for description */
108 int GetOutputDataTypes(AliHLTComponentDataTypeList& tgtList);
109 /** interface function, see AliHLTComponent for description */
110 virtual void GetOutputDataSize( unsigned long& constBase, double& inputMultiplier );
111 /** interface function, see AliHLTComponent for description */
112 AliHLTComponent* Spawn();
116 // Protected functions to implement AliHLTComponent's interface.
117 // These functions provide initialization as well as the actual processing
118 // capabilities of the component.
120 int DoInit( int argc, const char** argv );
122 int DoEvent( const AliHLTComponentEventData& evtData, const AliHLTComponentBlockData* blocks,
123 AliHLTComponentTriggerData& trigData, AliHLTUInt8_t* outputPtr,
124 AliHLTUInt32_t& size, vector<AliHLTComponentBlockData>& outputBlocks );
125 int Reconfigure(const char* cdbEntry, const char* chainId);
127 using AliHLTProcessor::DoEvent;
130 /** standard constructor prohibited */
131 AliHLTTPCClusterFinderComponent();
132 /** copy constructor prohibited */
133 AliHLTTPCClusterFinderComponent(const AliHLTTPCClusterFinderComponent&);
134 /** assignment operator prohibited */
135 AliHLTTPCClusterFinderComponent& operator=(const AliHLTTPCClusterFinderComponent&);
136 /** the cluster finder object */
137 AliHLTTPCClusterFinder* fClusterFinder; //!transient
138 /** the reader object for data decoding */
139 AliHLTTPCDigitReader* fReader; //!transient
141 /** flag to deconvolute in time direction */
142 Bool_t fDeconvTime; //!transient
144 /** flag to deconvolute in pad direction */
145 Bool_t fDeconvPad; //!transient
146 /** flag to switch on/off deconvolution in pad and time directions (used by sorted clusterfinding method) */
147 bool fClusterDeconv; //!transient
148 /** Error in xy of cluster */
149 float fXYClusterError; //!transient
150 /** Error in Z direction of cluster */
151 float fZClusterError; //!transient
153 * switch to indicated the reader
154 * use fModeSwitch = 0 for packed inputtype "gkDDLPackedRawDataType"
155 * use fModeSwitch = 1 for unpacked inputtype "gkUnpackedRawDataType"
156 * use fModeSwitch = 2 for packed inputtype "gkDDLPackedRawDataType" with new digit reader
158 Int_t fModeSwitch; // see above
161 * Reads the data the new unsorted way if true
164 Int_t fUnsorted; //!transient
167 * Patch number to be read, currently given as component argument,
168 * will be changed later.
170 Int_t fPatch; //!transient
173 * Switch to specify if one ship out a list of active pads (pads conected to a cluster).
175 Int_t fGetActivePads; //!transient
177 /** First timebin taken into account when reading the data */
178 Int_t fFirstTimeBin; //!transient
180 /** Last timebin taken in to account when reading the data */
181 Int_t fLastTimeBin; //!transient
183 ClassDef(AliHLTTPCClusterFinderComponent, 5)