]>
Commit | Line | Data |
---|---|---|
7f167a74 | 1 | //-*- Mode: C++ -*- |
2 | // $Id$ | |
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 * | |
7 | // * | |
8 | //************************************************************************* | |
9 | ||
10 | /// @file AliHLTITSVertexerSPDComponent.h | |
11 | /// @author Sergey Gorbunov <sergey.gorbunov@kip.uni-heidelberg.de> | |
12 | /// @date Nov 2009 | |
13 | /// @brief An ITS pixel vertexer component for the HLT | |
14 | ||
15 | #ifndef ALIHLTITSVERTEXERSPDCOMPONENT_H | |
16 | #define ALIHLTITSVERTEXERSPDCOMPONENT_H | |
17 | ||
18 | #include "AliHLTProcessor.h" | |
19 | #include "AliHLTDataTypes.h" | |
20 | ||
21 | class TH1F; | |
22 | class TH2F; | |
23 | ||
24 | ||
25 | /** | |
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 | |
32 | * | |
33 | * | |
34 | * <h2>General properties:</h2> | |
35 | * | |
36 | * Component ID: \b ITSVertexerSPD <br> | |
37 | * Library: \b libAliHLTITS.so <br> | |
38 | * Input Data Types: <br> | |
39 | * kAliHLTDataTypeClusters|kAliHLTDataOriginITSSPD <br> | |
40 | * | |
41 | * Output Data Types: <br> | |
42 | * kAliHLTDataTypeESDVertex|kAliHLTDataOriginITS <br> | |
43 | * | |
44 | * <h2>Mandatory arguments:</h2> | |
45 | * <!-- NOTE: ignore the \li. <i> and </i>: it's just doxygen formatting --> | |
46 | * | |
47 | * <h2>Optional arguments:</h2> | |
48 | * <!-- NOTE: ignore the \li. <i> and </i>: it's just doxygen formatting --> | |
49 | * | |
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 | |
54 | * \li -config2 <br> | |
55 | * a configuration argument without parameters | |
56 | * | |
57 | * <h2>Default CDB entries:</h2> | |
58 | * TODO | |
59 | * | |
60 | * <h2>Performance:</h2> | |
61 | * TODO | |
62 | * | |
63 | * <h2>Memory consumption:</h2> | |
64 | * TODO | |
65 | * | |
66 | * <h2>Output size:</h2> | |
67 | * TODO | |
68 | * | |
69 | * @ingroup alihlt_its_components | |
70 | */ | |
71 | class AliHLTITSVertexerSPDComponent : public AliHLTProcessor | |
72 | { | |
73 | public: | |
74 | /** standard constructor */ | |
75 | AliHLTITSVertexerSPDComponent(); | |
76 | ||
77 | /** dummy copy constructor, defined according to effective C++ style */ | |
78 | AliHLTITSVertexerSPDComponent( const AliHLTITSVertexerSPDComponent& ); | |
79 | ||
80 | /** dummy assignment op, but defined according to effective C++ style */ | |
81 | AliHLTITSVertexerSPDComponent& operator=( const AliHLTITSVertexerSPDComponent& ); | |
82 | ||
83 | /** standard destructor */ | |
84 | virtual ~AliHLTITSVertexerSPDComponent(); | |
85 | ||
86 | // Public functions to implement AliHLTComponent's interface. | |
87 | // These functions are required for the registration process | |
88 | ||
89 | /** @see component interface @ref AliHLTComponent::GetComponentID */ | |
90 | const char* GetComponentID() ; | |
91 | ||
92 | /** @see component interface @ref AliHLTComponent::GetInputDataTypes */ | |
93 | void GetInputDataTypes( vector<AliHLTComponentDataType>& list ) ; | |
94 | ||
95 | /** @see component interface @ref AliHLTComponent::GetOutputDataType */ | |
96 | AliHLTComponentDataType GetOutputDataType() ; | |
97 | ||
98 | /** @see component interface @ref AliHLTComponent::GetOutputDataTypes */ | |
99 | int GetOutputDataTypes(AliHLTComponentDataTypeList& tgtList); | |
100 | ||
101 | /** @see component interface @ref AliHLTComponent::GetOutputDataSize */ | |
102 | virtual void GetOutputDataSize( unsigned long& constBase, double& inputMultiplier ) ; | |
103 | ||
104 | /** @see component interface @ref AliHLTComponent::Spawn */ | |
105 | AliHLTComponent* Spawn() ; | |
106 | ||
107 | protected: | |
108 | ||
109 | // Protected functions to implement AliHLTComponent's interface. | |
110 | // These functions provide initialization as well as the actual processing | |
111 | // capabilities of the component. | |
112 | ||
113 | /** @see component interface @ref AliHLTComponent::DoInit */ | |
114 | int DoInit( int argc, const char** argv ); | |
115 | ||
116 | /** @see component interface @ref AliHLTComponent::DoDeinit */ | |
117 | int DoDeinit(); | |
118 | ||
119 | /** reconfigure **/ | |
120 | int Reconfigure( const char* cdbEntry, const char* chainId ); | |
121 | ||
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 ); | |
126 | ||
127 | private: | |
128 | ||
129 | struct AliHLTITSVZCluster{ | |
130 | float fX, fY, fZ; | |
131 | }; | |
132 | ||
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); | |
137 | ||
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]; //! | |
144 | ||
145 | TH2F *fHistoVertexXY;//! | |
146 | TH1F *fHistoVertexX;//! | |
147 | TH1F *fHistoVertexY;//! | |
148 | TH1F *fHistoVertexZ;//! | |
149 | ||
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 ); | |
155 | ||
156 | ClassDef( AliHLTITSVertexerSPDComponent, 0 ); | |
157 | ||
158 | }; | |
159 | #endif |