]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - STEER/AliAODVertex.h
Some of the coding violations corrected
[u/mrichter/AliRoot.git] / STEER / AliAODVertex.h
index f4682e81a894aebe4dfea4b58738d2fdb7e3db26..dc267d82b12533e38d3b557fca872e863214cb3b 100644 (file)
@@ -1,5 +1,5 @@
-#ifndef AliAODVertex_H
-#define AliAODVertex_H
+#ifndef ALIAODVERTEX_H
+#define ALIAODVERTEX_H
 /* Copyright(c) 1998-2007, ALICE Experiment at CERN, All rights reserved. *
  * See cxx source for full Copyright notice                               */
 
@@ -23,7 +23,7 @@ class AliAODVertex : public AliVVertex {
 
  public :
 
-  enum AODVtx_t {kUndef=-1, kPrimary, kKink, kV0, kCascade, kMulti};
+  enum AODVtx_t {kUndef=-1, kPrimary, kKink, kV0, kCascade, kMulti, kMainSPD, kPileupSPD, kPileupTracks,kMainTPC};
 
   AliAODVertex();
   AliAODVertex(const Double_t *position, 
@@ -53,6 +53,8 @@ class AliAODVertex : public AliVVertex {
   AliAODVertex(const AliAODVertex& vtx); 
   AliAODVertex& operator=(const AliAODVertex& vtx);
 
+  virtual AliAODVertex* CloneWithoutRefs() const;
+  
   void     SetX(Double_t x) { fPosition[0] = x; }
   void     SetY(Double_t y) { fPosition[1] = y; }
   void     SetZ(Double_t z) { fPosition[2] = z; }
@@ -106,10 +108,7 @@ class AliAODVertex : public AliVVertex {
   Bool_t   HasDaughter(TObject *daughter) const;
   Int_t    GetNDaughters() const;
   Int_t    GetNContributors() const;
-  void     SetNProngs(Int_t nprong) {
-      fNprong = nprong;
-      MakeProngs();
-  }
+  void     SetNContributors(Int_t nc) {fNContributors = nc;}
   // covariance matrix elements after rotation by phi around z-axis 
   // and, then, by theta around new y-axis
   Double_t  RotatedCovMatrixXX(Double_t phi = 0., Double_t theta = 0.) const;
@@ -120,30 +119,44 @@ class AliAODVertex : public AliVVertex {
   Double_t  RotatedCovMatrixZZ(Double_t phi = 0., Double_t theta = 0.) const;
 
   template <class T, class P> void     PhiAndThetaToVertex(AliAODVertex *vtx, P &phi, T &theta) const;
-  Double_t  DistanceToVertex(AliAODVertex *vtx) const;
-  Double_t  ErrorDistanceToVertex(AliAODVertex *vtx) const;
-  Double_t  DistanceXYToVertex(AliAODVertex *vtx) const;
-  Double_t  ErrorDistanceXYToVertex(AliAODVertex *vtx) const;
+  Double_t  Distance2ToVertex(const AliAODVertex *vtx) const;
+  Double_t  DistanceToVertex(AliAODVertex *vtx) const 
+     {return TMath::Sqrt(Distance2ToVertex(vtx));}
+  Double_t  DistanceXY2ToVertex(const AliAODVertex *vtx) const;
+  Double_t  DistanceXYToVertex(AliAODVertex *vtx) const 
+     {return TMath::Sqrt(DistanceXY2ToVertex(vtx));}
+  Double_t  Error2DistanceToVertex(AliAODVertex *vtx) const;
+  Double_t  ErrorDistanceToVertex(AliAODVertex *vtx) const
+     {return TMath::Sqrt(Error2DistanceToVertex(vtx));}
+  Double_t  Error2DistanceXYToVertex(AliAODVertex *vtx) const;
+  Double_t  ErrorDistanceXYToVertex(AliAODVertex *vtx) const
+     {return TMath::Sqrt(Error2DistanceXYToVertex(vtx));}
   
   void     PrintIndices() const;
   void     Print(Option_t* option = "") const;
-  private:
+
+  const char* AsString() const;
+  
+  static const char* GetTypeName(AODVtx_t type);
+  
+private:
   void     MakeProngs() {if (fNprong > 0) {fProngs = new TRef[fNprong]; fIprong=0;}}
          
  private:
 
-  Double32_t      fPosition[3]; // vertex position
-  Double32_t      fChi2perNDF;  // chi2/NDF of vertex fit
-  Short_t         fID;          // vertex ID; corresponds to the array index of the appropriate ESD container
-  Char_t          fType;        // vertex type
-  Int_t           fNprong;      // number of prongs
-  Int_t           fIprong;      //!index  of prong
-  AliAODRedCov<3> *fCovMatrix;  // vertex covariance matrix; values of and below the diagonal
-  TRef            fParent;      // reference to the parent particle
-  TRefArray       fDaughters;   // references to the daughter particles
-  TRef            *fProngs;     //[fNprong] alternative daughters for n-prong vertex
+  Double32_t      fPosition[3];   // vertex position
+  Double32_t      fChi2perNDF;    // chi2/NDF of vertex fit
+  Short_t         fID;            // vertex ID; corresponds to the array index of the appropriate ESD container
+  Char_t          fType;          // vertex type
+  Int_t           fNprong;        // number of prongs
+  Int_t           fIprong;        //!index  of prong
+  Int_t           fNContributors; // Number of contributors for SPD vertex
+  AliAODRedCov<3> *fCovMatrix;    // vertex covariance matrix; values of and below the diagonal
+  TRef            fParent;        // reference to the parent particle
+  TRefArray       fDaughters;     // references to the daughter particles
+  TRef            *fProngs;       //[fNprong] alternative daughters for n-prong vertex
   
-  ClassDef(AliAODVertex, 5);
+  ClassDef(AliAODVertex, 7);
 };
 
 inline  Int_t AliAODVertex::GetNDaughters() const