#include "AliTRDgeometry.h"
#include "AliTRDcluster.h"
#include "AliTRDtrack.h"
-#include "../TPC/AliTPCtrack.h"
-#include "AliESDtrack.h"
#include "AliTRDclusterCorrection.h"
ClassImp(AliTRDtrack)
SetNumberOfClusters(1);
fdEdx=0.;
+ for (Int_t i=0;i<kNPlane;i++){
+ fdEdxPlane[i] = 0.;
+ fTimBinPlane[i] = -1;
+ }
fLhElectron = 0.0;
fNWrong = 0;
fIndex[i] = 0;
fIndexBackup[i] = 0; //bacup indexes MI
}
+ fNCross =0;
+ fBackupTrack =0;
}
//_____________________________________________________________________________
SetChi2(t.GetChi2());
fdEdx=t.fdEdx;
+ for (Int_t i=0;i<kNPlane;i++){
+ fdEdxPlane[i] = t.fdEdxPlane[i];
+ fTimBinPlane[i] = t.fTimBinPlane[i];
+ }
fLhElectron = 0.0;
fNWrong = t.fNWrong;
fIndex[i] = 0;
fIndexBackup[i] = 0; //MI backup indexes
}
+ fNCross =0;
+ fBackupTrack =0;
}
//_____________________________________________________________________________
SetMass(t.GetMass());
SetNumberOfClusters(0);
- fdEdx=0;
+ fdEdx=t.GetdEdx();
+ for (Int_t i=0;i<kNPlane;i++){
+ fdEdxPlane[i] = 0.0;
+ fTimBinPlane[i] = -1;
+ }
fLhElectron = 0.0;
fNWrong = 0;
fIndex[i] = 0;
fIndexBackup[i] = 0; // MI backup indexes
}
+ fNCross =0;
+ fBackupTrack =0;
}
//_____________________________________________________________________________
AliTRDtrack::AliTRDtrack(const AliESDtrack& t)
fIndexBackup[i]=0;
fIndex[i] = 0; //MI store indexes
}
- fdEdx=0;
+ fdEdx=t.GetTRDsignal();
+ for (Int_t i=0;i<kNPlane;i++){
+ fdEdxPlane[i] = t.GetTRDsignals(i);
+ fTimBinPlane[i] = t.GetTRDTimBin(i);
+ }
fLhElectron = 0.0;
fNWrong = 0;
else if (fAlpha >= TMath::Pi()) fAlpha -= 2*TMath::Pi();
Double_t x, p[5]; t.GetExternalParameters(x,p);
+ //Conversion of the covariance matrix
+ Double_t c[15]; t.GetExternalCovariance(c);
+ if (t.GetStatus()&AliESDtrack::kTRDbackup){
+ t.GetTRDExternalParameters(x,fAlpha,p,c);
+ if (fAlpha < -TMath::Pi()) fAlpha += 2*TMath::Pi();
+ else if (fAlpha >= TMath::Pi()) fAlpha -= 2*TMath::Pi();
+ }
fX=x;
fC=p[4]/x;
fE=fC*fX - p[2];
- //Conversion of the covariance matrix
- Double_t c[15]; t.GetExternalCovariance(c);
c[10]/=x; c[11]/=x; c[12]/=x; c[13]/=x; c[14]/=x*x;
fdQdl[i] = 0;
// fIndex[i] = 0; //MI store indexes
}
+ fNCross =0;
+ fBackupTrack =0;
if ((t.GetStatus()&AliESDtrack::kTIME) == 0) return;
StartTimeIntegral();
Double_t times[10]; t.GetIntegratedTimes(times); SetIntegratedTimes(times);
SetIntegratedLength(t.GetIntegratedLength());
-}
+}
+
+AliTRDtrack::~AliTRDtrack()
+{
+ //
+ //
+
+ if (fBackupTrack) delete fBackupTrack;
+ fBackupTrack=0;
+
+}
+
//_____________________________________________________________________________
void AliTRDtrack::GetBarrelTrack(AliBarrelTrack *track) {
for (i=0; i < nc; i++) {
sorted[i]=fdQdl[i];
}
-
+ /*
Int_t swap;
do {
swap++;
}
} while (swap);
-
+ */
Int_t nl=Int_t(low*nc), nu=Int_t(up*nc);
Float_t dedx=0;
- for (i=nl; i<=nu; i++) dedx += sorted[i];
- dedx /= (nu-nl+1);
+ //for (i=nl; i<=nu; i++) dedx += sorted[i];
+ //dedx /= (nu-nl+1);
+ for (i=0; i<nc; i++) dedx += sorted[i]; // ADDED by PS
+ if((nu-nl)) dedx /= (nu-nl); // ADDED by PS
SetdEdx(dedx);
}
Bool_t fNoTilt = kTRUE;
if(TMath::Abs(h01) > 0.003) fNoTilt = kFALSE;
// add angular effect to the error contribution and make correction - MI
- AliTRDclusterCorrection *corrector = AliTRDclusterCorrection::GetCorrection();
+ //AliTRDclusterCorrection *corrector = AliTRDclusterCorrection::GetCorrection();
//
Double_t tangent2 = (fC*fX-fE)*(fC*fX-fE);
if (tangent2 < 0.90000){
}
Double_t tangent = TMath::Sqrt(tangent2);
if ((fC*fX-fE)<0) tangent*=-1;
- Double_t correction = 0;
+ Double_t correction = 0*plane;
Double_t errang = tangent2*0.04; //
+ /*
if (corrector!=0){
//if (0){
correction = corrector->GetCorrection(plane,c->GetLocalTimeBin(),tangent);
errang += tangent2*0.04;
}
}
-
+ */
//
Double_t padlength = TMath::Sqrt(c->GetSigmaZ2()*12.);
fCty*=0.; fCtz*=0.; fCte*=0.; fCtt*=mult;
fCcy*=0.; fCcz*=0.; fCce*=0.; fCct*=0.; fCcc*=mult;
}
+
+
+void AliTRDtrack::MakeBackupTrack()
+{
+ //
+ //
+ if (fBackupTrack) delete fBackupTrack;
+ fBackupTrack = new AliTRDtrack(*this);
+}