]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - TPC/AliTPCtrackerParam.cxx
Bug fix (Marian)
[u/mrichter/AliRoot.git] / TPC / AliTPCtrackerParam.cxx
index 413bc5d3967f3aa19c031ff7313ed9bb27da28eb..022fa1eeb326878dc0351c705e857879acbfe85e 100644 (file)
@@ -76,6 +76,7 @@
 #include <TStyle.h>
 #include <TSystem.h>
 #include <TFile.h>
+#include <TRandom.h>
 //------ AliRoot headers ------
 #include "AliGausCorr.h"
 #include "AliTracker.h"
@@ -89,6 +90,7 @@
 #include "AliTPCtrack.h"
 #include "AliTPCtrackerParam.h"
 #include "AliTrackReference.h"
+#include "AliESDtrack.h"
 //-----------------------------
 
 Double_t RegFunc(Double_t *x,Double_t *par) {
@@ -292,7 +294,7 @@ Int_t AliTPCtrackerParam::Init() {
   return 0;
 }
 //-----------------------------------------------------------------------------
-Int_t AliTPCtrackerParam::BuildTPCtracks(AliESD *event) {
+Int_t AliTPCtrackerParam::BuildTPCtracks(AliESDEvent *event) {
 //-----------------------------------------------------------------------------
 // This function creates the TPC parameterized tracks and writes them
 // as AliESDtrack objects in the ESD event
@@ -347,7 +349,7 @@ Int_t AliTPCtrackerParam::BuildTPCtracks(AliESD *event) {
   Int_t        nParticles,nSeeds,arrentr;
   //Int_t nSel=0,nAcc=0;
 
-  Int_t evt=event->GetEventNumber();
+  Int_t evt=event->GetEventNumberInFile(); // This is most likely NOT the event number you'd like to use. It has nothing to do with the 'real' event number.
   
   tracks=0;
 
@@ -1046,7 +1048,7 @@ void AliTPCtrackerParam::BuildTrack(AliTPCseedGeant *s,Int_t ch) {
 //-----------------------------------------------------------------------------
   Double_t xref = s->GetXL();
   Double_t xx[5],cc[15];
-  cc[0]=cc[2]=cc[5]=cc[9]=cc[14]=10.;
+  cc[0]=cc[2]=cc[5]=cc[9]=cc[14]=0.;
   cc[1]=cc[3]=cc[4]=cc[6]=cc[7]=cc[8]=cc[10]=cc[11]=cc[12]=cc[13]=0.;
   
   // Magnetic field
@@ -1257,7 +1259,7 @@ void AliTPCtrackerParam::CompareTPCtracks(
       cmptrk.eta = part->Eta();
       cmptrk.r = TMath::Sqrt(part->Vx()*part->Vx()+part->Vy()*part->Vy());
       
-      cmptrk.pt   = 1/TMath::Abs(geatrack->Get1Pt());
+      cmptrk.pt   = geatrack->Pt();
       cmptrk.cosl = TMath::Cos(TMath::ATan(geatrack->GetTgl()));
       cmptrk.p    = cmptrk.pt/cmptrk.cosl;
     
@@ -1297,7 +1299,7 @@ void AliTPCtrackerParam::CompareTPCtracks(
       cmptrk.dP2 = kaltrack->GetSnp()-geatrack->GetSnp();
       cmptrk.dP3 = kaltrack->GetTgl()-geatrack->GetTgl();
       cmptrk.dP4 = kaltrack->GetC()-geatrack->GetC();
-      cmptrk.dpt = 1/kaltrack->Get1Pt()-1/geatrack->Get1Pt();
+      cmptrk.dpt = 1/kaltrack->GetSigned1Pt()-1/geatrack->GetSigned1Pt();
     
       // get covariance matrix
       // beware: lines 3 and 4 in the matrix are inverted!
@@ -1458,7 +1460,7 @@ void AliTPCtrackerParam::CookTrack(Double_t pt,Double_t eta) {
 
   // get P and Cosl from track
   cosl = TMath::Cos(TMath::ATan(fTrack.GetTgl()));
-  p    = 1./TMath::Abs(fTrack.Get1Pt())/cosl;
+  p    = fTrack.Pt()/cosl;
 
   trkKine[0] = p;