* about the suitability of this software for any purpose. It is *
* provided "as is" without express or implied warranty. *
**************************************************************************/
-////////////////////////////////////////////////////////////////////////
-//
-// AliTOFtrack class
-//
-// Authors: Bologna-CERN-ITEP-Salerno Group
-//
-// Description: class for handling ESD extracted tracks for TOF matching.
+
/* $Id$ */
-#include <Riostream.h>
-#include <TObject.h>
-#include "AliTOFtrack.h"
+/////////////////////////////////////////////////////////////////////////////
+// //
+// AliTOFtrack class //
+// //
+// Authors: Bologna-CERN-ITEP-Salerno Group //
+// //
+// Description: class for handling ESD extracted tracks for TOF matching. //
+// //
+/////////////////////////////////////////////////////////////////////////////
+
#include "AliESDtrack.h"
+#include "AliLog.h"
+
+#include "AliTOFGeometryV4.h"
+#include "AliTOFGeometry.h"
+#include "AliTOFtrack.h"
ClassImp(AliTOFtrack)
fCty=t.fCty; fCtz=t.fCtz; fCte=t.fCte; fCtt=t.fCtt;
fCcy=t.fCcy; fCcz=t.fCcz; fCce=t.fCce; fCct=t.fCct; fCcc=t.fCcc;
+ fTOFgeometry = new AliTOFGeometryV4();
}
// Constructor from AliESDtrack
//
+ fTOFgeometry = new AliTOFGeometryV4();
+
SetSeedIndex(-1);
SetLabel(t.GetLabel());
SetChi2(0.);
fX=x;
- x = GetConvConst();
-
fY=p[0];
- fZ=p[1];
- fT=p[3];
+ fZ=p[1]; SaveLocalConvConst();
+ fT=p[3]; x=GetLocalConvConst();
fC=p[4]/x;
fE=fC*fX - p[2];
}
+
+//____________________________________________________________________________
+AliTOFtrack& AliTOFtrack::operator=(const AliTOFtrack &source)
+{
+ // ass. op.
+
+ this->fTOFgeometry=source.fTOFgeometry;
+ return *this;
+
+}
+
//____________________________________________________________________________
void AliTOFtrack::GetExternalParameters(Double_t& xr, Double_t x[5]) const {
//
//
// This function returns external representation of the covriance matrix.
//
- Double_t a=GetConvConst();
+ Double_t a=GetLocalConvConst();
Double_t c22=fX*fX*fCcc-2*fX*fCce+fCee;
Double_t c32=fX*fCct-fCte;
Double_t c20=fX*fCcy-fCey, c21=fX*fCcz-fCez, c42=fX*fCcc-fCce;
if (TMath::Abs(fC*xk - fE) >= 0.90000) {
return 0;
}
+ Double_t lcc=GetLocalConvConst();
// track Length measurement [SR, GSI, 17.02.2003]
fX=x2;
+ //Change of the magnetic field *************
+ SaveLocalConvConst();
+ cc=fC;
+ fC*=lcc/GetLocalConvConst();
+ fE+=fX*(fC-cc);
+
//Multiple scattering ******************
Double_t d=sqrt((x1-fX)*(x1-fX)+(y1-fY)*(y1-fY)+(z1-fZ)*(z1-fZ));
Double_t p2=(1.+ GetTgl()*GetTgl())/(Get1Pt()*Get1Pt());
if((5940*beta2/(1-beta2+1e-10) - beta2) < 0){return 0;}
Double_t dE=0.153e-3/beta2*(log(5940*beta2/(1-beta2+1e-10)) - beta2)*d*rho;
+ //
+ // suspicious part - think about it ?
+ Double_t kinE = TMath::Sqrt(p2);
+ if (dE>0.8*kinE) dE = 0.8*kinE; //
+ if (dE<0) dE = 0.0; // not valid region for Bethe bloch
+ //
+ //
if (x1 < x2) dE=-dE;
cc=fC;
fC*=(1.- sqrt(p2+GetMass()*GetMass())/p2*dE);
// defined by x=xk through media of density=rho and radiationLength=x0
- Double_t ymax=AliTOFGeometry::RinTOF()*TMath::Tan(0.5*AliTOFGeometry::GetAlpha());
+ Double_t ymax=fTOFgeometry->RinTOF()*TMath::Tan(0.5*AliTOFGeometry::GetAlpha());
Bool_t skip = kFALSE;
- Double_t y=GetYat(AliTOFGeometry::RinTOF(),skip);
+ Double_t y=GetYat(fTOFgeometry->RinTOF(),skip);
if(skip){
return 0;
}
}
- if(!PropagateTo(AliTOFGeometry::RinTOF()))return 0;
+ if(!PropagateTo(fTOFgeometry->RinTOF()))return 0;
return 1;
Double_t r2=fC*fX - fE;
if (TMath::Abs(r2) >= 0.90000) {
- cerr<<" AliTOFtrack warning: Rotation failed !\n";
+ AliWarning("Rotation failed !");
return 0;
}
if((r2*r2) > 1) return 0;
Double_t y0=fY + sqrt(1.- r2*r2)/fC;
if ((fY-y0)*fC >= 0.) {
- cerr<<" AliTOFtrack warning: Rotation failed !!!\n";
+ AliWarning("Rotation failed !!!");
return 0;
}
}
//_________________________________________________________________________
-Double_t AliTOFtrack::GetYat(Double_t xk, Bool_t skip) const {
+Double_t AliTOFtrack::GetYat(Double_t xk, Bool_t & skip) const {
//-----------------------------------------------------------------
// This function calculates the Y-coordinate of a track at the plane x=xk.
// Needed for matching with the TOF (I.Belikov)