]> git.uio.no Git - u/mrichter/AliRoot.git/blob - HLT/global/AliHLTGlobalVertexerComponent.h
dimuons from omega Dalitz decay included.
[u/mrichter/AliRoot.git] / HLT / global / AliHLTGlobalVertexerComponent.h
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                               *
6
7 /** @file   AliHLTGlobalVertexerComponent.h
8     @author Sergey Gorbunov
9     @brief  Component for monitor V0 physics
10 */
11
12 #include "AliHLTProcessor.h"
13 #include "AliKFParticle.h"
14 #include "AliKFVertex.h"
15 #include "AliHLTComponentBenchmark.h"
16
17 class TH1F;
18 class TH2F;
19 class AliESDtrack;
20 class AliESDVertex;
21 class AliTracker;
22 class AliESDtrack;
23 class AliESDEvent;
24
25 /**
26  * @class AliHLTTPCGlobalVertexerComponent
27  * Component for reconstruct primary vertex and V0's
28  */
29 class AliHLTGlobalVertexerComponent : public AliHLTProcessor
30 {
31 public:
32
33   struct AliHLTGlobalVertexerData
34   {
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
43   };
44
45   /** default constructor */
46   AliHLTGlobalVertexerComponent();
47   /** destructor */
48   virtual ~AliHLTGlobalVertexerComponent();
49
50   // Public functions to implement AliHLTComponent's interface.
51   // These functions are required for the registration process
52
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);
61
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();
66
67   static void FillESD( AliESDEvent *event, AliHLTGlobalVertexerData *data ) ;
68
69 protected:
70
71   // Protected functions to implement AliHLTComponent's interface.
72   // These functions provide initialization as well as the actual processing
73   // capabilities of the component. 
74
75   /** interface function, see AliHLTComponent for description */
76   int DoInit( int argc, const char** argv );
77   /** interface function, see AliHLTComponent for description */
78   int DoDeinit();
79   /** interface function, see AliHLTComponent for description */
80   int DoEvent( const AliHLTComponentEventData& evtData, 
81                AliHLTComponentTriggerData& trigData );
82
83   int Reconfigure(const char* cdbEntry, const char* chainId);
84
85   using AliHLTProcessor::DoEvent;
86   
87 private:
88   /** copy constructor prohibited */
89   AliHLTGlobalVertexerComponent(const AliHLTGlobalVertexerComponent&);
90   /** assignment operator prohibited */
91   AliHLTGlobalVertexerComponent& operator=(const AliHLTGlobalVertexerComponent&);
92   /**
93    * Configure the component.
94    * Parse a string for the configuration arguments and set the component
95    * properties.
96    */ 
97   int Configure(const char* arguments);
98   
99   class AliESDTrackInfo
100     {
101     public:
102       AliESDTrackInfo(): fParticle(),fPrimDeviation(0),fPrimUsedFlag(0),fOK(0){}
103       
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
108     };
109
110   void FindPrimaryVertex();
111   void FindV0s(vector<pair<int,int> > v0s);
112
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
122
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
124
125   AliHLTComponentBenchmark fBenchmark;// benchmark
126
127   ClassDef(AliHLTGlobalVertexerComponent, 0);
128
129 };
130 #endif