3 // ************************************************************************
4 // This file is property of and copyright by the ALICE HLT Project *
5 // ALICE Experiment at CERN, All rights reserved. *
6 // See cxx source for full Copyright notice *
8 //*************************************************************************
10 /// @file AliHLTITSVertexerSPDComponent.h
11 /// @author Sergey Gorbunov <sergey.gorbunov@kip.uni-heidelberg.de>
13 /// @brief An ITS pixel vertexer component for the HLT
15 #ifndef ALIHLTITSVERTEXERSPDCOMPONENT_H
16 #define ALIHLTITSVERTEXERSPDCOMPONENT_H
18 #include "AliHLTProcessor.h"
19 #include "AliHLTDataTypes.h"
23 * @class AliHLTITSVertexerSPDComponent
24 * The HLT ITS SPD z-vertexer component.
25 * The vertexer uses approximate XY position of the beam
26 * It can treat initial beam offset up to 1.5 cm in XY
27 * The component does a calibration of the beam position
28 * every n==fAutoCalibration events
31 * <h2>General properties:</h2>
33 * Component ID: \b ITSVertexerSPD <br>
34 * Library: \b libAliHLTITS.so <br>
35 * Input Data Types: <br>
36 * kAliHLTDataTypeClusters|kAliHLTDataOriginITSSPD <br>
38 * Output Data Types: <br>
39 * kAliHLTDataTypeESDVertex|kAliHLTDataOriginITS <br>
41 * <h2>Mandatory arguments:</h2>
42 * <!-- NOTE: ignore the \li. <i> and </i>: it's just doxygen formatting -->
44 * <h2>Optional arguments:</h2>
45 * <!-- NOTE: ignore the \li. <i> and </i>: it's just doxygen formatting -->
47 * <h2>Configuration:</h2>
48 * <!-- NOTE: ignore the \li. <i> and </i>: it's just doxygen formatting -->
49 * \li -config1 <i> teststring </i> <br>
50 * a configuration argument with one parameter
52 * a configuration argument without parameters
54 * <h2>Default CDB entries:</h2>
57 * <h2>Performance:</h2>
60 * <h2>Memory consumption:</h2>
63 * <h2>Output size:</h2>
66 * @ingroup alihlt_its_components
68 class AliHLTITSVertexerSPDComponent : public AliHLTProcessor
71 /** standard constructor */
72 AliHLTITSVertexerSPDComponent();
74 /** dummy copy constructor, defined according to effective C++ style */
75 AliHLTITSVertexerSPDComponent( const AliHLTITSVertexerSPDComponent& );
77 /** dummy assignment op, but defined according to effective C++ style */
78 AliHLTITSVertexerSPDComponent& operator=( const AliHLTITSVertexerSPDComponent& );
80 /** standard destructor */
81 virtual ~AliHLTITSVertexerSPDComponent();
83 // Public functions to implement AliHLTComponent's interface.
84 // These functions are required for the registration process
86 /** @see component interface @ref AliHLTComponent::GetComponentID */
87 const char* GetComponentID() ;
89 /** @see component interface @ref AliHLTComponent::GetInputDataTypes */
90 void GetInputDataTypes( vector<AliHLTComponentDataType>& list ) ;
92 /** @see component interface @ref AliHLTComponent::GetOutputDataType */
93 AliHLTComponentDataType GetOutputDataType() ;
95 /** @see component interface @ref AliHLTComponent::GetOutputDataTypes */
96 int GetOutputDataTypes(AliHLTComponentDataTypeList& tgtList);
98 /** @see component interface @ref AliHLTComponent::GetOutputDataSize */
99 virtual void GetOutputDataSize( unsigned long& constBase, double& inputMultiplier ) ;
101 /** @see component interface @ref AliHLTComponent::Spawn */
102 AliHLTComponent* Spawn() ;
106 // Protected functions to implement AliHLTComponent's interface.
107 // These functions provide initialization as well as the actual processing
108 // capabilities of the component.
110 /** @see component interface @ref AliHLTComponent::DoInit */
111 int DoInit( int argc, const char** argv );
113 /** @see component interface @ref AliHLTComponent::DoDeinit */
117 int Reconfigure( const char* cdbEntry, const char* chainId );
119 /** @see component interface @ref AliHLTProcessor::DoEvent */
120 int DoEvent( const AliHLTComponentEventData& evtData, const AliHLTComponentBlockData* blocks,
121 AliHLTComponentTriggerData& trigData, AliHLTUInt8_t* outputPtr,
122 AliHLTUInt32_t& size, vector<AliHLTComponentBlockData>& outputBlocks );
126 struct AliHLTITSVZCluster{
130 Double_t fZRange;// Z range for the vertex seearch
131 Double_t fZBinSize; // size of the Z bin [cm]
132 double fRunVtx[3];// default vertex position
133 double fFullTime; //* total time for DoEvent() [s]
134 double fRecoTime; //* total reconstruction time [s]
135 Long_t fNEvents; //* number of reconstructed events
136 double *fSum[9]; // coefficients for the LSM method
137 double *fSumW; // sum of weights per Z bin
138 int *fSumN; // N entries per Z bin
139 double fZMin; // Z of the first bin ( == -fZRange)
140 int fNZBins; // N of bins
142 /** set configuration parameters **/
143 void SetDefaultConfiguration();
144 int ReadConfigurationString( const char* arguments );
145 int ReadCDBEntry( const char* cdbEntry, const char* chainId );
146 int Configure( const char* cdbEntry, const char* chainId, const char *commandLine );
148 ClassDef( AliHLTITSVertexerSPDComponent, 0 );