2 // @(#) $Id: AliHLTTPCClusterFinderComponent.h 23318 2008-01-14 12:43:28Z hristov $
4 #ifndef ALIHLTTPCZEROSUPPRESSIONCOMPONENT_H
5 #define ALIHLTTPCZEROSUPPRESSIONCOMPONENT_H
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 *
11 /** @file AliHLTTPCZeroSuppressionComponent.h
12 @author Kenneth Aamodt
14 @brief Component for ZeroSuppression
17 #include "AliHLTProcessor.h"
18 #include "AliHLTTPCPad.h"
19 #include "AliHLTDataTypes.h"
21 class AliHLTTPCDigitReader;
24 * @class AliHLTTPCZeroSuppressionComponent
25 * Implementation of the zero suppression component.
26 * The component implements the interface methods of the @ref AliHLTProcessor.
27 * It reads the data pad by pad and zerosuppress the data. The output is unpacked which is
28 * sent to the clulsterfinder.
30 * The component has the following component arguments:
31 * - adc-threshold ADC count threshold for zero suppression.
33 * - rms-threshold RMS threshold for zero suppression.
35 * - first-timebin The first timebin for zero suppression
37 * - last-timebin The last timebin for zero suppression
39 * - occupancy-limit Minimum number of timebins with signal
41 * - sort-pads Flag to switch on pad sorting(needed by the SORTED clusterfinder)
43 * @ingroup alihlt_tpc_components
45 class AliHLTTPCZeroSuppressionComponent : public AliHLTProcessor
49 AliHLTTPCZeroSuppressionComponent();
51 virtual ~AliHLTTPCZeroSuppressionComponent();
53 // Public functions to implement AliHLTComponent's interface.
54 // These functions are required for the registration process
56 /** interface function, see @ref AliHLTComponent for description */
57 const char* GetComponentID();
58 /** interface function, see @ref AliHLTComponent for description */
59 void GetInputDataTypes( vector<AliHLTComponentDataType>& list);
60 /** interface function, see @ref AliHLTComponent for description */
61 AliHLTComponentDataType GetOutputDataType();
62 /** interface function, see @ref AliHLTComponent for description */
63 int GetOutputDataTypes(AliHLTComponentDataTypeList& tgtList);
64 /** interface function, see @ref AliHLTComponent for description */
65 virtual void GetOutputDataSize( unsigned long& constBase, double& inputMultiplier );
66 /** interface function, see @ref AliHLTComponent for description */
67 AliHLTComponent* Spawn();
69 Int_t DeInitializePadArray();
70 void InitializePadArray();
73 // Protected functions to implement AliHLTComponent's interface.
74 // These functions provide initialization as well as the actual processing
75 // capabilities of the component.
77 int DoInit( int argc, const char** argv );
79 int DoEvent( const AliHLTComponentEventData& evtData, const AliHLTComponentBlockData* blocks,
80 AliHLTComponentTriggerData& trigData, AliHLTUInt8_t* outputPtr,
81 AliHLTUInt32_t& size, vector<AliHLTComponentBlockData>& outputBlocks );
82 using AliHLTProcessor::DoEvent;
86 /** copy constructor prohibited */
87 AliHLTTPCZeroSuppressionComponent(const AliHLTTPCZeroSuppressionComponent&);
89 /** assignment operator prohibited */
90 AliHLTTPCZeroSuppressionComponent& operator=(const AliHLTTPCZeroSuppressionComponent&);
92 /** the reader object for data decoding */
93 AliHLTTPCDigitReader* fDigitReader; //!transient
95 /** Vector of pointers to pad objects */
96 typedef vector<AliHLTTPCPad*> AliHLTTPCPadVector;
98 /** 2D vector of pointers to pad objects (vector of vectors)*/
99 vector<AliHLTTPCPadVector> fRowPadVector; //! transient
101 /** Array containing number of pads in the different rows */
102 Int_t* fNumberOfPadsInRow; //! transient
104 /** Number of rows the patch has */
105 Int_t fNumberOfRows; //! transient
107 /** Current patch number */
108 UInt_t fCurrentPatch; //! transient
110 /** First row in patch */
111 UInt_t fFirstRow; //! transient
113 /** Last row in patch */
114 UInt_t fLastRow; //! transient
116 /** First timebin to include in zerosuppression */
117 Int_t fStartTimeBin; //! transient
119 /** Lasr timebin to include in zerosuppression */
120 Int_t fEndTimeBin; //! transient
122 /** Number of timebins */
123 Int_t fNTimeBins; //! transient
125 /** Number of RMS the signal has to be larger than */
126 Double_t fNRMSThreshold; //! transient
128 /** Signal threshold (signal has to be greater than average + this number) */
129 Int_t fSignalThreshold; //! transient
131 /** Minimum number of signals to do zerosuppression */
132 Int_t fMinimumNumberOfSignals; //! transient
134 /** OldRCUFormat flag */
135 UInt_t fOldRCUFormat; //! transient
137 /** Sort pads flag */
138 Bool_t fSortPads; //! transient
140 /** Flag to check if the 2d vector is initialized */
141 Bool_t fVectorInitialized; //! transient
143 /** Value below average (useful for noisy pads to get the tails of a signal) */
144 Int_t fValueBelowAverage; //! transient
146 /** Number of timebins to look left(decreasing time direction) for tails */
147 Int_t fLeftTimeBin; //! transient
149 /** Number of timebins to look right(increasing time direction) for tails */
150 Int_t fRightTimeBin; //! transient
152 /** Flag to switch on active pads selection */
153 Bool_t fGetActivePads; //! transient
155 /** Flag to switch off data being sent to output */
156 Bool_t fSkipSendingZSData;
158 /** Flag to switch off hw list being sent to output */
161 /** Vector of active pad hardware addresses */
162 vector<AliHLTUInt16_t> fHwAddressList; //! transient
164 ClassDef(AliHLTTPCZeroSuppressionComponent, 0)