]> git.uio.no Git - u/mrichter/AliRoot.git/blob - STEER/AliVertexer.h
Updates in GRP Preprocessor (Ernesto)
[u/mrichter/AliRoot.git] / STEER / AliVertexer.h
1 #ifndef ALIVERTEXER_H
2 #define ALIVERTEXER_H
3
4 #include<TObject.h>
5 #include<AliMultiplicity.h>
6
7 ///////////////////////////////////////////////////////////////////
8 //                                                               //
9 // Base class for primary vertex reconstruction                  //
10 //                                                               //
11 ///////////////////////////////////////////////////////////////////
12
13 class TFile;
14 class TString;
15 class TTRee;
16 class AliESDVertex;
17
18
19 class AliVertexer : public TObject {
20
21  public:
22     // default constructor
23     AliVertexer();  
24  
25     // destructor
26     virtual ~AliVertexer(); 
27     // computes the vertex for the current event
28     virtual AliESDVertex* FindVertexForCurrentEvent(Int_t evnumb)=0; 
29     // computes the vertex for each event and stores it on file
30     virtual void FindVertices()= 0;
31     virtual AliMultiplicity* GetMultiplicity() const {return fMult;}
32     virtual void PrintStatus() const = 0;
33     virtual void SetFirstEvent(Int_t ev){fFirstEvent = ev;}
34     virtual void SetLastEvent(Int_t ev){fLastEvent = ev;}
35     virtual void SetVtxStart(Double_t x,Double_t y,Double_t z) 
36            { fNominalPos[0]=x; fNominalPos[1]=y; fNominalPos[2]=z; }
37     virtual void SetVtxStartSigma(Double_t sx,Double_t sy,Double_t sz) 
38            { fNominalCov[0]=sx*sx; fNominalCov[2]=sy*sy; fNominalCov[5]=sz*sz;
39              fNominalCov[1]=0.; fNominalCov[3]=0.; fNominalCov[4]=0.; }
40     virtual void SetVtxStart(AliESDVertex *vtx);
41     virtual void WriteCurrentVertex() = 0;
42
43  
44  protected:
45     // copy constructor (NO copy allowed: the constructor is protected
46     // to avoid misuse)
47     AliVertexer(const AliVertexer& vtxr);
48     // assignment operator (NO assignment allowed)
49     AliVertexer& operator=(const AliVertexer& /* vtxr */);
50
51     AliESDVertex *fCurrentVertex;  //! pointer to the vertex of the current
52                                    //  event
53     Int_t fFirstEvent;          // First event to be processed by FindVertices
54     Int_t fLastEvent;           // Last event to be processed by FindVertices 
55     Double_t  fNominalPos[3];   // initial knowledge on vertex position
56     Double_t  fNominalCov[6];   // initial knowledge on vertex position
57     AliMultiplicity *fMult;     //! Multiplicity object
58
59   ClassDef(AliVertexer,3);
60 };
61
62 #endif