]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - STEER/AliCascadeVertexer.cxx
Reduced QA output (Yves)
[u/mrichter/AliRoot.git] / STEER / AliCascadeVertexer.cxx
index 60a2802d73b1dd04359a21509cf38f7c227ed114..10484cb91646bc52fd6c50ede61211e726cec87f 100644 (file)
 //modified by R. Vernet  3/7/2006 : causality
 //modified by I. Belikov 24/11/2006 : static setter for the default cuts
 
-
-#include <TObjArray.h>
-#include <TTree.h>
-
 #include "AliESDEvent.h"
-#include "AliESDv0.h"
 #include "AliESDcascade.h"
 #include "AliCascadeVertexer.h"
-#include "AliESDtrack.h"
-#include "AliESDVertex.h"
 
 ClassImp(AliCascadeVertexer)
 
@@ -193,24 +186,26 @@ Info("V0sTracks2CascadeVertices","Number of reconstructed cascades: %d",ncasc);
 }
 
 
-Double_t det(Double_t a00, Double_t a01, Double_t a10, Double_t a11){
-  // determinant 2x2
+Double_t AliCascadeVertexer::Det(Double_t a00, Double_t a01, Double_t a10, Double_t a11) const {
+  //--------------------------------------------------------------------
+  // This function calculates locally a 2x2 determinant
+  //--------------------------------------------------------------------
   return a00*a11 - a01*a10;
 }
 
-Double_t det (Double_t a00,Double_t a01,Double_t a02,
-                     Double_t a10,Double_t a11,Double_t a12,
-                     Double_t a20,Double_t a21,Double_t a22) {
-  // determinant 3x3
-  return 
-  a00*det(a11,a12,a21,a22)-a01*det(a10,a12,a20,a22)+a02*det(a10,a11,a20,a21);
+Double_t AliCascadeVertexer::Det(Double_t a00,Double_t a01,Double_t a02,
+                                Double_t a10,Double_t a11,Double_t a12,
+                                Double_t a20,Double_t a21,Double_t a22) const {
+  //--------------------------------------------------------------------
+  // This function calculates locally a 3x3 determinant
+  //--------------------------------------------------------------------
+  return  a00*Det(a11,a12,a21,a22)-a01*Det(a10,a12,a20,a22)+a02*Det(a10,a11,a20,a21);
 }
 
 
 
 
-Double_t AliCascadeVertexer::
-PropagateToDCA(AliESDv0 *v, AliExternalTrackParam *t, Double_t b) {
+Double_t AliCascadeVertexer::PropagateToDCA(AliESDv0 *v, AliExternalTrackParam *t, Double_t b) {
   //--------------------------------------------------------------------
   // This function returns the DCA between the V0 and the track
   //--------------------------------------------------------------------
@@ -228,16 +223,16 @@ PropagateToDCA(AliESDv0 *v, AliExternalTrackParam *t, Double_t b) {
  
 // calculation dca
    
-  Double_t dd= det(x2-x1,y2-y1,z2-z1,px1,py1,pz1,px2,py2,pz2);
-  Double_t ax= det(py1,pz1,py2,pz2);
-  Double_t ay=-det(px1,pz1,px2,pz2);
-  Double_t az= det(px1,py1,px2,py2);
+  Double_t dd= Det(x2-x1,y2-y1,z2-z1,px1,py1,pz1,px2,py2,pz2);
+  Double_t ax= Det(py1,pz1,py2,pz2);
+  Double_t ay=-Det(px1,pz1,px2,pz2);
+  Double_t az= Det(px1,py1,px2,py2);
 
   Double_t dca=TMath::Abs(dd)/TMath::Sqrt(ax*ax + ay*ay + az*az);
 
 //points of the DCA
-  Double_t t1 = det(x2-x1,y2-y1,z2-z1,px2,py2,pz2,ax,ay,az)/
-                det(px1,py1,pz1,px2,py2,pz2,ax,ay,az);
+  Double_t t1 = Det(x2-x1,y2-y1,z2-z1,px2,py2,pz2,ax,ay,az)/
+                Det(px1,py1,pz1,px2,py2,pz2,ax,ay,az);
   
   x1 += px1*t1; y1 += py1*t1; //z1 += pz1*t1;