3 #ifndef ALIHLTITSCLUSTERFINDERCOMPONENT_H
4 #define ALIHLTITSCLUSTERFINDERCOMPONENT_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 AliHLTITSClusterFinderComponent.cxx
11 @author Gaute Øvrebekk <st05886@alf.uib.no>
13 @brief Component to run the offline clusterfinder.
16 #include "AliHLTProcessor.h"
17 #include "AliRawReaderMemory.h"
18 #include "AliITSDetTypeRec.h"
19 #include "AliITSgeom.h"
20 #include "AliITSInitGeometry.h"
21 #include "TClonesArray.h"
22 #include "AliHLTDataTypes.h"
24 #include "AliHLTComponentBenchmark.h"
25 #include "AliITSRecPoint.h"
27 class AliHLTITSClusterFinderSPD;
28 class AliHLTITSClusterFinderSSD;
29 class AliHLTITSClusterData;
32 * @class AliHLTITSClusterFinderComponent
33 * HLT Component to run the ITS offline clusterfinders.
35 * <h2>General properties:</h2>
37 * Component ID: \b ITSClusterFinderSPD or ITSClusterFinderSDD or ITSClusterFinderSSD <br>
38 * Library: \b libAliHLTITS.so <br>
39 * Input Data Types: <br>
40 * kAliHLTDataTypeDDLRaw|kAliHLTDataOriginITSSPD or kAliHLTDataTypeDDLRaw|kAliHLTDataOriginITSSDD or kAliHLTDataTypeDDLRaw|kAliHLTDataOriginITSSD <br>
42 * Output Data Types: <br>
43 * kAliHLTDataTypeClusters|kAliHLTDataOriginITSSPD or kAliHLTDataTypeClusters|kAliHLTDataOriginITSSDD or kAliHLTDataTypeClusters|kAliHLTDataOriginITSSSD <br>
45 * <h2>Mandatory arguments:</h2>
46 * <!-- NOTE: ignore the \li. <i> and </i>: it's just doxygen formatting -->
48 * <h2>Optional arguments:</h2>
49 * <!-- NOTE: ignore the \li. <i> and </i>: it's just doxygen formatting -->
51 * <h2>Configuration:</h2>
52 * <!-- NOTE: ignore the \li. <i> and </i>: it's just doxygen formatting -->
53 * \li -config1 <i> teststring </i> <br>
54 * a configuration argument with one parameter
56 * a configuration argument without parameters
58 * <h2>Default CDB entries:</h2>
61 * TRIGGER/SPD/PITConditions
64 * ITS/Calib/DriftSpeedSDD
66 * ITS/Calib/MapsTimeSDD
69 * ITS/Calib/BadChannelsSSD
72 * <h2>Performance:</h2>
75 * <h2>Memory consumption:</h2>
78 * <h2>Output size:</h2>
81 * @ingroup alihlt_its_components
83 class AliHLTITSClusterFinderComponent : public AliHLTProcessor
87 * Defines for selecting clusterfinder for SPD, SDD or SSD.
96 * ---------------------------------------------------------------------------------
97 * Constructor / Destructor
98 * ---------------------------------------------------------------------------------
102 * @param mode input type see e.g. @ref kClusterFinderSPD
104 AliHLTITSClusterFinderComponent(int mode);
107 virtual ~AliHLTITSClusterFinderComponent();
110 * ---------------------------------------------------------------------------------
111 * Public functions to implement AliHLTComponent's interface.
112 * These functions are required for the registration process
113 * ---------------------------------------------------------------------------------
116 /** interface function, see @ref AliHLTComponent for description */
117 const char* GetComponentID();
119 /** interface function, see @ref AliHLTComponent for description */
120 void GetInputDataTypes( vector<AliHLTComponentDataType>& list);
122 /** interface function, see @ref AliHLTComponent for description */
123 AliHLTComponentDataType GetOutputDataType();
125 /** interface function, see @ref AliHLTComponent for description */
126 virtual void GetOutputDataSize( unsigned long& constBase, double& inputMultiplier );
128 /** interface function, see @ref AliHLTComponent for description */
129 void GetOCDBObjectDescription( TMap* const targetMap);
131 /** interface function, see @ref AliHLTComponent for description */
132 AliHLTComponent* Spawn();
137 * ---------------------------------------------------------------------------------
138 * Protected functions to implement AliHLTComponent's interface.
139 * These functions provide initialization as well as the actual processing
140 * capabilities of the component.
141 * ---------------------------------------------------------------------------------
144 /** Initialization */
145 Int_t DoInit( int argc, const char** argv );
147 /** DeInitialization */
153 const AliHLTComponentEventData& evtData,
154 const AliHLTComponentBlockData* blocks,
155 AliHLTComponentTriggerData& /*trigData*/,
156 AliHLTUInt8_t* outputPtr,
157 AliHLTUInt32_t& size,
158 vector<AliHLTComponentBlockData>& outputBlocks );
160 //Int_t DoEvent( const AliHLTComponentEventData& /*evtData*/, AliHLTComponentTriggerData& /*trigData*/);
162 int Reconfigure(const char* cdbEntry, const char* chainId);
164 using AliHLTProcessor::DoEvent;
166 ///////////////////////////////////////////////////////////////////////////////////
169 /** standard constructor prohibited */
170 AliHLTITSClusterFinderComponent();
171 /** copy constructor prohibited */
172 AliHLTITSClusterFinderComponent(const AliHLTITSClusterFinderComponent&);
173 /** assignment operator prohibited */
174 AliHLTITSClusterFinderComponent& operator=(const AliHLTITSClusterFinderComponent&);
176 * Configure the component.
177 * Parse a string for the configuration arguments and set the component
180 int Configure(const char* arguments);
182 void RecPointToSpacePoint(AliHLTUInt8_t* outputPtr,AliHLTUInt32_t& size);
183 void RecpointToOutput(AliHLTITSClusterData *outputClusters, AliITSRecPoint *recpoint, int &clustIdx);
185 * ---------------------------------------------------------------------------------
187 * ---------------------------------------------------------------------------------
191 * switch to indicated the ClusterFinder
192 * use fModeSwitch = 0 for SPD
193 * use fModeSwitch = 1 for SDD
194 * use fModeSwitch = 2 for SSD
195 * use fModeSwitch = 3 for ClusterFinding on Digits (Full ITS)
197 Int_t fModeSwitch; // !
198 AliHLTComponentDataType fInputDataType; // !
199 AliHLTComponentDataType fOutputDataType; // !
201 Bool_t fUseOfflineFinder; // flag to use the offline clusterfinder
202 Int_t fNModules; // total number of modules
203 Int_t fId; // ddl offset
204 Int_t fNddl; // number of ddl's
206 /** the reader object for data decoding */
208 AliRawReaderMemory* fRawReader; //!transient
209 AliITSDetTypeRec* fDettype; //!transient
210 AliITSgeom* fgeom; //!transient
211 AliITSInitGeometry* fgeomInit; //!transient
213 AliHLTITSClusterFinderSPD *fSPD; //!transient
214 AliHLTITSClusterFinderSSD *fSSD; //!transient
216 TTree *tD; //!transient
217 TTree *tR; //!transient
219 Int_t fSPDNModules; //!transient
220 Int_t fSDDNModules; //!transient
221 Int_t fSSDNModules; //!transient
223 Int_t fFirstModule; //!transient
224 Int_t fLastModule; //!transient
225 Int_t fnClusters; //!transient
227 std::vector<AliITSRecPoint> fclusters; //!transient
229 AliHLTComponentBenchmark fBenchmark;// benchmark
231 ClassDef(AliHLTITSClusterFinderComponent, 0)