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"
26 * @class AliHLTITSVertexerSPDComponent
27 * The HLT ITS SPD z-vertexer component.
28 * The vertexer uses approximate XY position of the beam
29 * It can treat initial beam offset up to 1.5 cm in XY
30 * The component does a calibration of the beam position
31 * every n==fAutoCalibration events
34 * <h2>General properties:</h2>
36 * Component ID: \b ITSVertexerSPD <br>
37 * Library: \b libAliHLTITS.so <br>
38 * Input Data Types: <br>
39 * kAliHLTDataTypeClusters|kAliHLTDataOriginITSSPD <br>
41 * Output Data Types: <br>
42 * kAliHLTDataTypeESDVertex|kAliHLTDataOriginITS <br>
44 * <h2>Mandatory arguments:</h2>
45 * <!-- NOTE: ignore the \li. <i> and </i>: it's just doxygen formatting -->
47 * <h2>Optional arguments:</h2>
48 * <!-- NOTE: ignore the \li. <i> and </i>: it's just doxygen formatting -->
50 * <h2>Configuration:</h2>
51 * <!-- NOTE: ignore the \li. <i> and </i>: it's just doxygen formatting -->
52 * \li -config1 <i> teststring </i> <br>
53 * a configuration argument with one parameter
55 * a configuration argument without parameters
57 * <h2>Default CDB entries:</h2>
60 * <h2>Performance:</h2>
63 * <h2>Memory consumption:</h2>
66 * <h2>Output size:</h2>
69 * @ingroup alihlt_its_components
71 class AliHLTITSVertexerSPDComponent : public AliHLTProcessor
74 /** standard constructor */
75 AliHLTITSVertexerSPDComponent();
77 /** dummy copy constructor, defined according to effective C++ style */
78 AliHLTITSVertexerSPDComponent( const AliHLTITSVertexerSPDComponent& );
80 /** dummy assignment op, but defined according to effective C++ style */
81 AliHLTITSVertexerSPDComponent& operator=( const AliHLTITSVertexerSPDComponent& );
83 /** standard destructor */
84 virtual ~AliHLTITSVertexerSPDComponent();
86 // Public functions to implement AliHLTComponent's interface.
87 // These functions are required for the registration process
89 /** @see component interface @ref AliHLTComponent::GetComponentID */
90 const char* GetComponentID() ;
92 /** @see component interface @ref AliHLTComponent::GetInputDataTypes */
93 void GetInputDataTypes( vector<AliHLTComponentDataType>& list ) ;
95 /** @see component interface @ref AliHLTComponent::GetOutputDataType */
96 AliHLTComponentDataType GetOutputDataType() ;
98 /** @see component interface @ref AliHLTComponent::GetOutputDataTypes */
99 int GetOutputDataTypes(AliHLTComponentDataTypeList& tgtList);
101 /** @see component interface @ref AliHLTComponent::GetOutputDataSize */
102 virtual void GetOutputDataSize( unsigned long& constBase, double& inputMultiplier ) ;
104 /** @see component interface @ref AliHLTComponent::Spawn */
105 AliHLTComponent* Spawn() ;
109 // Protected functions to implement AliHLTComponent's interface.
110 // These functions provide initialization as well as the actual processing
111 // capabilities of the component.
113 /** @see component interface @ref AliHLTComponent::DoInit */
114 int DoInit( int argc, const char** argv );
116 /** @see component interface @ref AliHLTComponent::DoDeinit */
120 int Reconfigure( const char* cdbEntry, const char* chainId );
122 /** @see component interface @ref AliHLTProcessor::DoEvent */
123 int DoEvent( const AliHLTComponentEventData& evtData, const AliHLTComponentBlockData* blocks,
124 AliHLTComponentTriggerData& trigData, AliHLTUInt8_t* outputPtr,
125 AliHLTUInt32_t& size, vector<AliHLTComponentBlockData>& outputBlocks );
129 struct AliHLTITSVZCluster{
133 /** magnetic field */
134 double fSolenoidBz; // see above
135 Bool_t fProduceHistos;// flag to produce histogramms(def = 1)
136 Int_t fAutoCalibration;// n of events for recalibration of run vertex(-1=no, def = 1000);
138 double fDefRunVtx[3];// default vertex position
139 double fFullTime; //* total time for DoEvent() [s]
140 double fRecoTime; //* total reconstruction time [s]
141 Long_t fNEvents; //* number of reconstructed events
142 double fRunVtx[4]; //!
143 double fRunVtxNew[4]; //!
145 TH2F *fHistoVertexXY;//!
146 TH1F *fHistoVertexX;//!
147 TH1F *fHistoVertexY;//!
148 TH1F *fHistoVertexZ;//!
150 /** set configuration parameters **/
151 void SetDefaultConfiguration();
152 int ReadConfigurationString( const char* arguments );
153 int ReadCDBEntry( const char* cdbEntry, const char* chainId );
154 int Configure( const char* cdbEntry, const char* chainId, const char *commandLine );
156 ClassDef( AliHLTITSVertexerSPDComponent, 0 );