]> git.uio.no Git - u/mrichter/AliRoot.git/blob - STEER/AliV0vertexer.h
Changes required by Effective C++
[u/mrichter/AliRoot.git] / STEER / AliV0vertexer.h
1 #ifndef ALIV0VERTEXER_H
2 #define ALIV0VERTEXER_H
3 /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
4  * See cxx source for full Copyright notice                               */
5
6 //------------------------------------------------------------------
7 //                    V0 Vertexer Class
8 //            reads tracks writes out V0 vertices
9 //   Origin: Iouri Belikov, IReS, Strasbourg, Jouri.Belikov@cern.ch 
10 //------------------------------------------------------------------
11
12 #include "TObject.h"
13
14 class TTree;
15 class AliESD;
16
17 //_____________________________________________________________________________
18 class AliV0vertexer : public TObject {
19 public:
20   AliV0vertexer();
21   AliV0vertexer(const Double_t cuts[7]);
22   void SetCuts(const Double_t cuts[7]);
23   void SetVertex(Double_t *vtx) { fX=vtx[0]; fY=vtx[1]; fZ=vtx[2]; }
24
25   Int_t Tracks2V0vertices(AliESD *event);
26
27   void GetCuts(Double_t cuts[7]) const;
28   void GetVertex(Double_t *vtx) const { vtx[0]=fX; vtx[1]=fY; vtx[2]=fZ; }
29
30 private:
31
32   Double_t fChi2max;      // maximal allowed chi2 
33   Double_t fDNmin;        // min. allowed negative daughter's impact parameter
34   Double_t fDPmin;        // min. allowed positive daughter's impact parameter
35   Double_t fDCAmax;       // maximal allowed DCA between the daughter tracks 
36   Double_t fCPAmax;       // maximal allowed cosine of V0's pointing angle
37   Double_t fRmin, fRmax;  // max & min radii of the fiducial volume
38   
39   Double_t fX;            // X-coordinate of the primary vertex
40   Double_t fY;            // Y-coordinate of the primary vertex
41   Double_t fZ;            // Z-coordinate of the primary vertex
42
43   ClassDef(AliV0vertexer,1)  // V0 verterxer 
44 };
45
46 inline AliV0vertexer::AliV0vertexer() :
47   TObject(),
48   fChi2max(33.), 
49   fDNmin(0.015),
50   fDPmin(0.015),
51   fDCAmax(0.01),
52   fCPAmax(0.025), 
53   fRmin(0.5),
54   fRmax(2.5), 
55   fX(0),
56   fY(0),
57   fZ(0)
58 {
59 }
60
61 inline AliV0vertexer::AliV0vertexer(const Double_t cuts[7]) :
62   TObject(),
63   fChi2max(cuts[0]), 
64   fDNmin(cuts[1]),
65   fDPmin(cuts[2]),
66   fDCAmax(cuts[3]),
67   fCPAmax(cuts[4]),
68   fRmin(cuts[5]),
69   fRmax(cuts[6]), 
70   fX(0),
71   fY(0),
72   fZ(0)
73 {
74 }
75
76 inline void AliV0vertexer::SetCuts(const Double_t cuts[7]) {
77   fChi2max=cuts[0]; 
78   fDNmin=cuts[1];   fDPmin=cuts[2];
79   fDCAmax=cuts[3];  fCPAmax=cuts[4];
80   fRmin=cuts[5];    fRmax=cuts[6]; 
81 }
82
83 inline void AliV0vertexer::GetCuts(Double_t cuts[7]) const {
84   cuts[0]=fChi2max; 
85   cuts[1]=fDNmin;   cuts[2]=fDPmin; 
86   cuts[3]=fDCAmax;  cuts[4]=fCPAmax;
87   cuts[5]=fRmin;    cuts[6]=fRmax; 
88 }
89
90 #endif
91
92