]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - ITS/AliV0vertex.cxx
Removing useless const to avoid warnings on alphacxx6
[u/mrichter/AliRoot.git] / ITS / AliV0vertex.cxx
index ca305e32c692878a60a92be6d17d1100a900ffd2..e81b5805bbdaa655020791da524780240953dce6 100644 (file)
@@ -18,7 +18,6 @@
 //
 //     Origin: Iouri Belikov, IReS, Strasbourg, Jouri.Belikov@cern.ch
 //-------------------------------------------------------------------------
-#include <iostream.h>
 #include <TMath.h>
 
 #include "AliV0vertex.h"
 
 ClassImp(AliV0vertex)
 
-AliV0vertex::AliV0vertex() : TObject() {
-  //--------------------------------------------------------------------
-  // Default constructor  (K0s)
-  //--------------------------------------------------------------------
-  fPdgCode=kK0Short;
-  fEffMass=0.497672;
-  fChi2=1.e+33;
-  fPos[0]=fPos[1]=fPos[2]=0.;
-  fPosCov[0]=fPosCov[1]=fPosCov[2]=fPosCov[3]=fPosCov[4]=fPosCov[5]=0.;
-}
-
 AliV0vertex::AliV0vertex(const AliITStrackV2 &n, const AliITStrackV2 &p) {
   //--------------------------------------------------------------------
   // Main constructor
   //--------------------------------------------------------------------
+  for (Int_t i=0; i<6; i++) {
+    fPosCov[i]= 0.;
+    fNmomCov[i] = 0.;
+    fPmomCov[i] = 0.;
+  }
   fPdgCode=kK0Short;
-  fNlab=n.GetLabel(); fPlab=p.GetLabel();
+  fNidx=n.GetLabel(); fPidx=p.GetLabel(); //indices in the array of ESD tracks
 
   //Trivial estimation of the vertex parameters
   Double_t pt, phi, x, par[5];
@@ -86,66 +79,3 @@ AliV0vertex::AliV0vertex(const AliITStrackV2 &n, const AliITStrackV2 &p) {
   fChi2=7.;   
 }
 
-void AliV0vertex::ChangeMassHypothesis(Int_t code) {
-  //--------------------------------------------------------------------
-  // This function changes the mass hypothesis for this V0
-  //--------------------------------------------------------------------
-  Double_t nmass, pmass;
-
-  switch (code) {
-  case kLambda0:
-    nmass=0.13957; pmass=0.93827; break;
-  case kLambda0Bar:
-    pmass=0.13957; nmass=0.93827; break;
-  case kK0Short: 
-    nmass=0.13957; pmass=0.13957; break;
-  default:
-    cerr<<"AliV0vertex::ChangeMassHypothesis: ";
-    cerr<<"invalide PDG code ! Assuming K0s...\n";
-    nmass=0.13957; pmass=0.13957; break;
-  }
-
-  Double_t px1=fNmom[0], py1=fNmom[1], pz1=fNmom[2]; 
-  Double_t px2=fPmom[0], py2=fPmom[1], pz2=fPmom[2];
-
-  Double_t e1=TMath::Sqrt(nmass*nmass + px1*px1 + py1*py1 + pz1*pz1);
-  Double_t e2=TMath::Sqrt(pmass*pmass + px2*px2 + py2*py2 + pz2*pz2);
-  fEffMass=TMath::Sqrt((e1+e2)*(e1+e2)-
-    (px1+px2)*(px1+px2)-(py1+py2)*(py1+py2)-(pz1+pz2)*(pz1+pz2));
-  
-  fPdgCode=code;
-}
-
-void AliV0vertex::GetPxPyPz(Double_t &px, Double_t &py, Double_t &pz) const {
-  //--------------------------------------------------------------------
-  // This function returns V0's momentum (global)
-  //--------------------------------------------------------------------
-  px=fNmom[0]+fPmom[0]; 
-  py=fNmom[1]+fPmom[1]; 
-  pz=fNmom[2]+fPmom[2]; 
-}
-
-void AliV0vertex::GetXYZ(Double_t &x, Double_t &y, Double_t &z) const {
-  //--------------------------------------------------------------------
-  // This function returns V0's position (global)
-  //--------------------------------------------------------------------
-  x=fPos[0]; 
-  y=fPos[1]; 
-  z=fPos[2]; 
-}
-
-Double_t AliV0vertex::GetD(Double_t x0, Double_t y0, Double_t z0) const {
-  //--------------------------------------------------------------------
-  // This function returns V0's impact parameter
-  //--------------------------------------------------------------------
-  Double_t x=fPos[0],y=fPos[1],z=fPos[2];
-  Double_t px=fNmom[0]+fPmom[0];
-  Double_t py=fNmom[1]+fPmom[1];
-  Double_t pz=fNmom[2]+fPmom[2];
-
-  Double_t dx=(y0-y)*pz - (z0-z)*py; 
-  Double_t dy=(x0-x)*pz - (z0-z)*px;
-  Double_t dz=(x0-x)*py - (y0-y)*px;
-  Double_t d=TMath::Sqrt((dx*dx+dy*dy+dz*dz)/(px*px+py*py+pz*pz));
-  return d;
-}