//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)
}
-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
//--------------------------------------------------------------------
// 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;