]> git.uio.no Git - u/mrichter/AliRoot.git/blob - HLT/TPCLib/HWCFemulation/AliHLTTPCHWClusterFinderEmulatorComponent.h
314eeb5ad462ba58c17fb4525498ddd22b3408f3
[u/mrichter/AliRoot.git] / HLT / TPCLib / HWCFemulation / AliHLTTPCHWClusterFinderEmulatorComponent.h
1 // $Id: AliHLTTPCHWClusterFinderEmulatorComponent.h 47875 2011-02-28 09:41:02Z richterm $
2
3 #ifndef ALIHLTTPCHWCLUSTERFINDEREMULATORCOMPONENT_H
4 #define ALIHLTTPCHWCLUSTERFINDEREMULATORCOMPONENT_H
5
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                               *
9
10 /// @file   AliHLTTPCHWClusterFinderEmulatorComponent.h
11 /// @author Timm Steinbeck, Matthias Richter, Kenneth Aamodt
12 /// @date   
13 /// @brief  The TPC cluster finder component.
14 ///
15
16 #include "AliHLTProcessor.h"
17 #include "AliHLTComponentBenchmark.h"
18
19 class AliHLTTPCHWClusterFinderEmulator;
20 class AliHLTTPCDigitReader;
21 class AliTPCTransform;
22
23 /**
24  * @class AliHLTTPCHWClusterFinderEmulatorComponent
25  * Implementation of the cluster finder component.
26  * The component implements the interface methods of the @ref AliHLTProcessor.
27  * The actual cluster finding algorithm is implemented in @ref AliHLTTPCHWClusterFinderEmulator.
28  * Two components are registered, TPCHWClusterFinderEmulatorUnpacked is for reading the HLT
29  * internal digit data format used in the simulation. TPCHWClusterFinderEmulator32Bit uses
30  * the AliHLTTPCDigitReader for raw data. After a phase of different decoder/raw stream
31  * implementations the CF for raw data is using the default offline raw stream for
32  * the 32bit RCU format AliAltroRawStreamV3, which also has a fall back to the 40bit
33  * AliAltroRawStream if the old RCU format is detected.
34  *
35  * The clusterfinder is now using the AliTPCTransform instead of the AliHLTTPCTransform for  
36  * transformations from row, pad time -> x,y,z.
37  *
38  * <h2>General properties:</h2>
39  *
40  * Component ID: \b TPCHWClusterFinderEmulatorUnpacked and TPCHWClusterFinderEmulator32Bit <br>
41  * Library: \b libAliHLTTPC
42  * Input Data Types: @ref kAliHLTDataTypeDDLRaw <br>
43  * Output Data Types: @ref AliHLTTPCDefinitions::fgkClustersDataType and/or kAliHLTDataTypeHwAddr16 <br> 
44  *
45  *
46  * Mandatory arguments: <br>
47  * <!-- NOTE: ignore the \li. <i> and </i>: it's just doxygen formatting -->
48  *
49  * Optional arguments: <br>
50  * <!-- NOTE: ignore the \li. <i> and </i>: it's just doxygen formatting -->
51  * \li -deconvolute-time <br>  
52  *      Turns on deconvolution in the time direction.
53  * \li -deconvolute-pad <br>  
54  *      Turns on deconvolution in the pad direction.
55  * \li -timebins <br>  
56  *      Sets the number of timebins (446 for simulated data, and 1024 for real data) Default:1024
57  * \li -first-timebin <br>  
58  *      First timebin taken into consideration when reading the data. 
59  * \li -last-timebin <br>  
60  *      Last timebin taken into consideration when reading the data. 
61  *
62  * <h2>Default CDB entries:</h2>
63  * The component has these default CDB entries
64  * \li <tt>GRP/GRP/Data</tt>.               
65  * \li <tt>TPC/Calib/PadTime0</tt>.         
66  * \li <tt>TPC/Calib/Parameters</tt>.       
67  * \li <tt>TPC/Calib/TimeDrift</tt>.        
68  * \li <tt>TPC/Calib/Temperature</tt>.      
69  *
70  * TODO: pad by pad gain calibration also has to be added to the clusterfinder
71  *
72  * And it also needs these below to avoid warnings during initialization and update of calibDB
73  * \li <tt>TPC/Calib/PadGainFactor</tt>.    
74  * \li <tt>TPC/Calib/TimeGain</tt>.
75  * \li <tt>TPC/Calib/GainFactorDedx</tt>.
76  * \li <tt>TPC/Calib/PadNoise</tt>.
77  * \li <tt>TPC/Calib/Pedestals</tt>.
78  * \li <tt>TPC/Calib/ClusterParam</tt>.
79  * \li <tt>TPC/Calib/AltroConfig</tt>.
80  * \li <tt>TPC/Calib/Pulser</tt>.
81  * \li <tt>TPC/Calib/CE</tt>.
82  * \li <tt>TPC/Calib/Raw</tt>.
83  * \li <tt>TPC/Calib/QA</tt>.
84  * \li <tt>TPC/Calib/Mapping</tt>.
85  * \li <tt>TPC/Calib/Goofie</tt>.
86  * \li <tt>TPC/Calib/HighVoltage</tt>.
87  * \li <tt>TPC/Calib/Ref</tt>.
88  *
89  * These entries are used by the AliTPCTransform class to correct for T0, drift and ExB.
90  * @ingroup alihlt_tpc_components
91  */
92 class AliHLTTPCHWClusterFinderEmulatorComponent : public AliHLTProcessor
93     {
94     public:      
95         /**
96          * constructor 
97          */
98         AliHLTTPCHWClusterFinderEmulatorComponent();
99         /** destructor */
100         virtual ~AliHLTTPCHWClusterFinderEmulatorComponent();
101
102         // Public functions to implement AliHLTComponent's interface.
103         // These functions are required for the registration process
104
105   /** interface function, see AliHLTComponent for description */
106   const char* GetComponentID();
107   /** interface function, see AliHLTComponent for description */
108   void GetInputDataTypes( vector<AliHLTComponentDataType>& list);
109   /** interface function, see AliHLTComponent for description */
110   AliHLTComponentDataType GetOutputDataType();
111   /** interface function, see AliHLTComponent for description */
112   int GetOutputDataTypes(AliHLTComponentDataTypeList& tgtList);
113   /** interface function, see AliHLTComponent for description */
114   virtual void GetOutputDataSize( unsigned long& constBase, double& inputMultiplier );
115   /** interface function, see AliHLTComponent for description */
116   AliHLTComponent* Spawn();
117   /** interface function, see @ref AliHLTComponent for description */
118   void GetOCDBObjectDescription( TMap* const targetMap);
119
120     protected:
121         
122         // Protected functions to implement AliHLTComponent's interface.
123         // These functions provide initialization as well as the actual processing
124         // capabilities of the component. 
125
126         int DoInit( int argc, const char** argv );
127         int DoDeinit();
128         int DoEvent( const AliHLTComponentEventData& evtData, const AliHLTComponentBlockData* blocks, 
129                      AliHLTComponentTriggerData& trigData, AliHLTUInt8_t* outputPtr, 
130                      AliHLTUInt32_t& size, vector<AliHLTComponentBlockData>& outputBlocks );
131         int Configure(const char* arguments);
132         int ScanConfigurationArgument(int argc, const char** argv);
133         int Reconfigure(const char* cdbEntry, const char* chainId);
134         
135         using AliHLTProcessor::DoEvent;
136
137     private:
138         /** copy constructor prohibited */
139         AliHLTTPCHWClusterFinderEmulatorComponent(const AliHLTTPCHWClusterFinderEmulatorComponent&);
140         /** assignment operator prohibited */
141         AliHLTTPCHWClusterFinderEmulatorComponent& operator=(const AliHLTTPCHWClusterFinderEmulatorComponent&);
142         /** the cluster finder object */
143         AliHLTTPCHWClusterFinderEmulator* fClusterFinder;                                      //!transient
144
145         /** flag to deconvolute in time direction */
146         Bool_t fDeconvTime;                                                          //!transient
147
148         /** flag to deconvolute in pad direction */
149         Bool_t fDeconvPad;                                                           //!transient
150         /** flag to switch on/off deconvolution in pad and time directions  */
151         bool fClusterDeconv;                                                         //!transient
152
153         /*
154          * Patch number to be read, currently given as component argument,
155          * will be changed later.
156          */
157         Int_t fPatch;                                                                  //!transient
158
159         /*
160          * Switch to specify if one ship out a list of active pads (pads conected to a cluster).
161          */
162         Int_t fGetActivePads;                                                          //!transient
163
164         /** First timebin taken into account when reading the data */
165         Int_t fFirstTimeBin;                                                           //!transient
166
167         /** Last timebin taken in to account when reading the data */
168         Int_t fLastTimeBin;                                                            //!transient
169
170         Bool_t fDoMC; // flag to provide MC labels
171         Bool_t fReleaseMemory; // flag to release the memory after each event
172         AliHLTComponentBenchmark fBenchmark; // benchmark
173
174 };
175 #endif