1 #ifndef ALIHLTGLOBALVERTEXERCOMPONENT_H
2 #define ALIHLTGLOBALVERTEXERCOMPONENT_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"
15 #include "AliHLTComponentBenchmark.h"
26 * @class AliHLTTPCGlobalVertexerComponent
27 * Component for reconstruct primary vertex and V0's
29 class AliHLTGlobalVertexerComponent : public AliHLTProcessor
33 struct AliHLTGlobalVertexerData
35 int fFitTracksToVertex; // flag
36 double fPrimP[3]; // prim. vertex parameters
37 double fPrimC[6]; // prim. vertex covariance
38 double fPrimChi2; // prim. vertex chi2
39 int fPrimNContributors; // prim. vertex N contributors
40 int fNPrimTracks; // N of primary tracks
41 int fNV0s; // N of v0s
42 int fTrackIndices[0]; // list of primary tracks and v0 tracks
45 /** default constructor */
46 AliHLTGlobalVertexerComponent();
48 virtual ~AliHLTGlobalVertexerComponent();
50 // Public functions to implement AliHLTComponent's interface.
51 // These functions are required for the registration process
53 /** interface function, see AliHLTComponent for description */
54 const char* GetComponentID();
55 /** interface function, see AliHLTComponent for description */
56 void GetInputDataTypes(AliHLTComponentDataTypeList& list);
57 /** interface function, see AliHLTComponent for description */
58 AliHLTComponentDataType GetOutputDataType();
59 /** interface function, see AliHLTComponent for description */
60 int GetOutputDataTypes(AliHLTComponentDataTypeList& tgtList);
62 /** interface function, see AliHLTComponent for description */
63 virtual void GetOutputDataSize( unsigned long& constBase, double& inputMultiplier );
64 /** interface function, see AliHLTComponent for description */
65 AliHLTComponent* Spawn();
67 static void FillESD( AliESDEvent *event, AliHLTGlobalVertexerData *data ) ;
71 // Protected functions to implement AliHLTComponent's interface.
72 // These functions provide initialization as well as the actual processing
73 // capabilities of the component.
75 /** interface function, see AliHLTComponent for description */
76 int DoInit( int argc, const char** argv );
77 /** interface function, see AliHLTComponent for description */
79 /** interface function, see AliHLTComponent for description */
80 int DoEvent( const AliHLTComponentEventData& evtData,
81 AliHLTComponentTriggerData& trigData );
83 int Reconfigure(const char* cdbEntry, const char* chainId);
85 using AliHLTProcessor::DoEvent;
88 /** copy constructor prohibited */
89 AliHLTGlobalVertexerComponent(const AliHLTGlobalVertexerComponent&);
90 /** assignment operator prohibited */
91 AliHLTGlobalVertexerComponent& operator=(const AliHLTGlobalVertexerComponent&);
93 * Configure the component.
94 * Parse a string for the configuration arguments and set the component
97 int Configure(const char* arguments);
102 AliESDTrackInfo(): fParticle(),fPrimDeviation(0),fPrimUsedFlag(0),fOK(0){}
104 AliKFParticle fParticle; //* assigned KFParticle
105 Double_t fPrimDeviation; //* deviation from the primary vertex
106 Bool_t fPrimUsedFlag; //* flag shows that the particle was used for primary vertex fit
107 Bool_t fOK; //* is the track good enough
110 void FindPrimaryVertex();
111 void FindV0s(vector<pair<int,int> > &v0s);
113 int fNTracks; // n of input tracks
114 AliESDTrackInfo *fTrackInfos; // information about esd tracks
115 AliKFVertex fPrimaryVtx; // reconstructed KF primary vertex
116 Bool_t fFitTracksToVertex; // flag to store vertex constrained track parameters
117 Double_t fConstrainedTrackDeviation; // deviation of a track from prim.vtx <=cut
118 Double_t fV0DaughterPrimDeviation; // v0: daughters deviation from prim vertex >= cut
119 Double_t fV0PrimDeviation; // v0: v0 deviation from prim vertex <= cut
120 Double_t fV0Chi; // v0: v0 sqrt(chi^2/NDF) <= cut
121 Double_t fV0DecayLengthInSigmas; // v0: v0 decay length/sigma_length >= cut
123 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
125 AliHLTComponentBenchmark fBenchmark;// benchmark
127 ClassDef(AliHLTGlobalVertexerComponent, 0);