]> git.uio.no Git - u/mrichter/AliRoot.git/blob - ITS/AliCascadeVertexer.h
Static data member fgTop replaced with the static function GetTop();
[u/mrichter/AliRoot.git] / ITS / AliCascadeVertexer.h
1 #ifndef ALICASCADEVERTEXER_H
2 #define ALICASCADEVERTEXER_H
3 /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
4  * See cxx source for full Copyright notice                               */
5
6 //------------------------------------------------------------------
7 //                    Cascade Vertexer Class
8 //          Reads V0s and tracks, writes out cascade vertices
9 //    Origin: Christian Kuhn, IReS, Strasbourg, christian.kuhn@ires.in2p3.fr
10 //------------------------------------------------------------------
11
12 #include "TObject.h"
13
14 class AliESD;
15 class TTree;
16 class AliITStrackV2;
17 class AliV0vertex;
18
19 //_____________________________________________________________________________
20 class AliCascadeVertexer : public TObject {
21 public:
22   AliCascadeVertexer();
23   AliCascadeVertexer(const Double_t cuts[8]);
24   void SetCuts(const Double_t cuts[8]);
25   void SetVertex(Double_t *vtx) { fX=vtx[0]; fY=vtx[1]; fZ=vtx[2]; }
26
27   Int_t V0sTracks2CascadeVertices(AliESD *event);
28   Int_t V0sTracks2CascadeVertices(TTree *v, TTree *t, TTree *x);
29   Double_t PropagateToDCA(AliV0vertex *vtx, AliITStrackV2 *trk);
30
31   void GetCuts(Double_t cuts[8]) const;
32   void GetVertex(Double_t *vtx) const { vtx[0]=fX; vtx[1]=fY; vtx[2]=fZ; }
33
34 private:
35   Double_t fChi2max;    // maximal allowed chi2 
36   Double_t fDV0min;     // min. allowed V0 impact parameter
37   Double_t fMassWin;    // window around the Lambda mass
38   Double_t fDBachMin;   // min. allowed bachelor impact parameter
39   Double_t fDCAmax;     // maximal allowed DCA between the V0 and the track 
40   Double_t fCPAmax;     // maximal allowed cosine of the cascade pointing angle
41   Double_t fRmin, fRmax;// max & min radii of the fiducial volume
42   
43   Double_t fX;            // X-coordinate of the primary vertex
44   Double_t fY;            // Y-coordinate of the primary vertex
45   Double_t fZ;            // Z-coordinate of the primary vertex
46
47   ClassDef(AliCascadeVertexer,1)  // cascade verterxer 
48 };
49
50 inline AliCascadeVertexer::AliCascadeVertexer() {
51  fChi2max=33.; 
52  fDV0min=0.015; fMassWin=0.05; fDBachMin=0.015;
53  fDCAmax=0.01;  fCPAmax=0.025; 
54  fRmin=0.5;     fRmax=2.5; 
55 }
56
57 inline AliCascadeVertexer::AliCascadeVertexer(const Double_t cuts[8]) {
58   fChi2max=cuts[0]; 
59   fDV0min=cuts[1];   fMassWin=cuts[2]; fDBachMin=cuts[3];
60   fDCAmax=cuts[4];   fCPAmax=cuts[5];
61   fRmin=cuts[6];     fRmax=cuts[7]; 
62   fX=fY=fZ=0.;
63 }
64
65 inline void AliCascadeVertexer::SetCuts(const Double_t cuts[8]) {
66   fChi2max=cuts[0]; 
67   fDV0min=cuts[1];   fMassWin=cuts[2]; fDBachMin=cuts[3];
68   fDCAmax=cuts[4];   fCPAmax=cuts[5];
69   fRmin=cuts[6];     fRmax=cuts[7]; 
70 }
71
72 inline void AliCascadeVertexer::GetCuts(Double_t cuts[8]) const {
73   cuts[0]=fChi2max; 
74   cuts[1]=fDV0min;   cuts[2]=fMassWin;  cuts[3]=fDBachMin;
75   cuts[4]=fDCAmax;   cuts[5]=fCPAmax;
76   cuts[6]=fRmin;     cuts[7]=fRmax; 
77 }
78
79 #endif
80