1 #ifndef ALIHLTGLOBALVERTEXERCOMPONENT_H
2 #define ALIHLTGLOBALVERTEXEROMPONENT_H
3 //* This file is property of and copyright by the ALICE HLT Project *
4 //* ALICE Experiment at CERN, All rights reserved. *
5 //* See cxx source for full Copyright notice *
7 /** @file AliHLTGlobalVertexerComponent.h
8 @author Sergey Gorbunov
9 @brief Component for monitor V0 physics
12 #include "AliHLTProcessor.h"
13 #include "AliKFParticle.h"
14 #include "AliKFVertex.h"
24 * @class AliHLTTPCGlobalVertexerComponent
25 * Component for reconstruct primary vertex and V0's
27 class AliHLTGlobalVertexerComponent : public AliHLTProcessor
31 struct AliHLTGlobalVertexerData
33 int fFitTracksToVertex; // flag
34 double fPrimP[3]; // prim. vertex parameters
35 double fPrimC[6]; // prim. vertex covariance
36 double fPrimChi2; // prim. vertex chi2
37 int fPrimNContributors; // prim. vertex N contributors
38 int fNPrimTracks; // N of primary tracks
39 int fNV0s; // N of v0s
40 int fTrackIndices[0]; // list of primary tracks and v0 tracks
43 /** default constructor */
44 AliHLTGlobalVertexerComponent();
46 virtual ~AliHLTGlobalVertexerComponent();
48 // Public functions to implement AliHLTComponent's interface.
49 // These functions are required for the registration process
51 /** interface function, see AliHLTComponent for description */
52 const char* GetComponentID();
53 /** interface function, see AliHLTComponent for description */
54 void GetInputDataTypes(AliHLTComponentDataTypeList& list);
55 /** interface function, see AliHLTComponent for description */
56 AliHLTComponentDataType GetOutputDataType();
57 /** interface function, see AliHLTComponent for description */
58 int GetOutputDataTypes(AliHLTComponentDataTypeList& tgtList);
60 /** interface function, see AliHLTComponent for description */
61 virtual void GetOutputDataSize( unsigned long& constBase, double& inputMultiplier );
62 /** interface function, see AliHLTComponent for description */
63 AliHLTComponent* Spawn();
65 static void FillESD( AliESDEvent *event, AliHLTGlobalVertexerData *data ) ;
69 // Protected functions to implement AliHLTComponent's interface.
70 // These functions provide initialization as well as the actual processing
71 // capabilities of the component.
73 /** interface function, see AliHLTComponent for description */
74 int DoInit( int argc, const char** argv );
75 /** interface function, see AliHLTComponent for description */
77 /** interface function, see AliHLTComponent for description */
78 int DoEvent( const AliHLTComponentEventData& evtData,
79 AliHLTComponentTriggerData& trigData );
81 int Reconfigure(const char* cdbEntry, const char* chainId);
83 using AliHLTProcessor::DoEvent;
86 /** copy constructor prohibited */
87 AliHLTGlobalVertexerComponent(const AliHLTGlobalVertexerComponent&);
88 /** assignment operator prohibited */
89 AliHLTGlobalVertexerComponent& operator=(const AliHLTGlobalVertexerComponent&);
91 * Configure the component.
92 * Parse a string for the configuration arguments and set the component
95 int Configure(const char* arguments);
100 AliESDTrackInfo(): fParticle(),fPrimDeviation(0),fPrimUsedFlag(0),fOK(0){}
102 AliKFParticle fParticle; //* assigned KFParticle
103 Double_t fPrimDeviation; //* deviation from the primary vertex
104 Bool_t fPrimUsedFlag; //* flag shows that the particle was used for primary vertex fit
105 Bool_t fOK; //* is the track good enough
108 void FindPrimaryVertex();
109 void FindV0s(vector<pair<int,int> > v0s);
111 int fNTracks; // n of input tracks
112 AliESDTrackInfo *fTrackInfos; // information about esd tracks
113 AliKFVertex fPrimaryVtx; // reconstructed KF primary vertex
115 Int_t fNEvents; // n of processed events
117 Bool_t fFitTracksToVertex; // flag to store vertex constrained track parameters
118 Double_t fConstrainedTrackDeviation; // deviation of a track from prim.vtx <=cut
119 Double_t fV0DaughterPrimDeviation; // v0: daughters deviation from prim vertex >= cut
120 Double_t fV0PrimDeviation; // v0: v0 deviation from prim vertex <= cut
121 Double_t fV0Chi; // v0: v0 sqrt(chi^2/NDF) <= cut
122 Double_t fV0DecayLengthInSigmas; // v0: v0 decay length/sigma_length >= cut
124 Double_t fV0TimeLimit; // time limit in seconds for V0 finder (it has N^2 combinatorics, therefore it can [potentially] block the data flow on some very hot events ) default limit is 10 ms
126 Double_t fStatTimeR; // benchmark
127 Double_t fStatTimeC; // benchmark
128 Double_t fStatTimeR1; // benchmark
129 Double_t fStatTimeC1; // benchmark
130 Double_t fStatTimeR2; // benchmark
131 Double_t fStatTimeC2; // benchmark
132 Double_t fStatTimeR3; // benchmark
133 Double_t fStatTimeC3; // benchmark
134 Double_t fStatNEvents;// benchmark
136 ClassDef(AliHLTGlobalVertexerComponent, 0);