]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - STEER/AliV0vertexer.h
Using AliMpDDLStore::GetBusPatchId instead of static arrays (Christian)
[u/mrichter/AliRoot.git] / STEER / AliV0vertexer.h
index c33420ef33a3a879fef9dc67b4d0feac84e45864..280e2a5bb61e098405ed3793bfda587a8e87930f 100644 (file)
@@ -18,52 +18,62 @@ class AliESD;
 class AliV0vertexer : public TObject {
 public:
   AliV0vertexer();
-  AliV0vertexer(const Double_t cuts[7]);
   void SetCuts(const Double_t cuts[7]);
-  void SetVertex(Double_t *vtx) { fX=vtx[0]; fY=vtx[1]; fZ=vtx[2]; }
+  static void SetDefaultCuts(const Double_t cuts[7]);
 
   Int_t Tracks2V0vertices(AliESD *event);
 
   void GetCuts(Double_t cuts[7]) const;
-  void GetVertex(Double_t *vtx) const { vtx[0]=fX; vtx[1]=fY; vtx[2]=fZ; }
+  static void GetDefaultCuts(Double_t cuts[7]);
 
 private:
-
+  static
+  Double_t fgChi2max;      // maximal allowed chi2 
+  static
+  Double_t fgDNmin;        // min allowed impact parameter for the 1st daughter
+  static
+  Double_t fgDPmin;        // min allowed impact parameter for the 2nd daughter
+  static
+  Double_t fgDCAmax;       // maximal allowed DCA between the daughter tracks 
+  static
+  Double_t fgCPAmax;       // maximal allowed cosine of V0's pointing angle
+  static
+  Double_t fgRmin, fgRmax; // max & min radii of the fiducial volume
+  
   Double_t fChi2max;      // maximal allowed chi2 
-  Double_t fDNmin;        // min. allowed negative daughter's impact parameter
-  Double_t fDPmin;        // min. allowed positive daughter's impact parameter
+  Double_t fDNmin;        // min allowed impact parameter for the 1st daughter
+  Double_t fDPmin;        // min allowed impact parameter for the 2nd daughter
   Double_t fDCAmax;       // maximal allowed DCA between the daughter tracks 
   Double_t fCPAmax;       // maximal allowed cosine of V0's pointing angle
   Double_t fRmin, fRmax;  // max & min radii of the fiducial volume
   
-  Double_t fX;            // X-coordinate of the primary vertex
-  Double_t fY;            // Y-coordinate of the primary vertex
-  Double_t fZ;            // Z-coordinate of the primary vertex
-
-  ClassDef(AliV0vertexer,1)  // V0 verterxer 
+  ClassDef(AliV0vertexer,2)  // V0 verterxer 
 };
 
-inline AliV0vertexer::AliV0vertexer() {
-  fChi2max=33.; 
-  fDNmin=0.015; fDPmin=0.015;
-  fDCAmax=0.01; fCPAmax=0.025; 
-  fRmin=0.5;    fRmax=2.5; 
-  fX=fY=fZ=0.;
+inline AliV0vertexer::AliV0vertexer() :
+  TObject(),
+  fChi2max(fgChi2max), 
+  fDNmin(fgDNmin),
+  fDPmin(fgDPmin),
+  fDCAmax(fgDCAmax),
+  fCPAmax(fgCPAmax), 
+  fRmin(fgRmin),
+  fRmax(fgRmax) 
+{
 }
 
-inline AliV0vertexer::AliV0vertexer(const Double_t cuts[7]) {
+inline void AliV0vertexer::SetCuts(const Double_t cuts[7]) {
   fChi2max=cuts[0]; 
   fDNmin=cuts[1];   fDPmin=cuts[2];
   fDCAmax=cuts[3];  fCPAmax=cuts[4];
   fRmin=cuts[5];    fRmax=cuts[6]; 
-  fX=fY=fZ=0.;
 }
 
-inline void AliV0vertexer::SetCuts(const Double_t cuts[7]) {
-  fChi2max=cuts[0]; 
-  fDNmin=cuts[1];   fDPmin=cuts[2];
-  fDCAmax=cuts[3];  fCPAmax=cuts[4];
-  fRmin=cuts[5];    fRmax=cuts[6]; 
+inline void AliV0vertexer::SetDefaultCuts(const Double_t cuts[7]) {
+  fgChi2max=cuts[0]; 
+  fgDNmin=cuts[1];   fgDPmin=cuts[2];
+  fgDCAmax=cuts[3];  fgCPAmax=cuts[4];
+  fgRmin=cuts[5];    fgRmax=cuts[6]; 
 }
 
 inline void AliV0vertexer::GetCuts(Double_t cuts[7]) const {
@@ -73,6 +83,13 @@ inline void AliV0vertexer::GetCuts(Double_t cuts[7]) const {
   cuts[5]=fRmin;    cuts[6]=fRmax; 
 }
 
+inline void AliV0vertexer::GetDefaultCuts(Double_t cuts[7]) {
+  cuts[0]=fgChi2max; 
+  cuts[1]=fgDNmin;   cuts[2]=fgDPmin; 
+  cuts[3]=fgDCAmax;  cuts[4]=fgCPAmax;
+  cuts[5]=fgRmin;    cuts[6]=fgRmax; 
+}
+
 #endif