#include "AliRunLoader.h"
#include "AliTRDgeometry.h"
#include "AliRun.h"
-#include "AliESD.h"
+#include "AliESDEvent.h"
#include "AliESDtrack.h"
#include "AliTrackReference.h"
+#include "AliTracker.h"
#include "AliTRDcluster.h"
#include "AliTRDpadPlane.h"
#include "AliTRDcalibDB.h"
-#include "AliTracker.h"
#include "AliTRDtracker.h"
//#include "AliTRDtracklet.h"
if (!(status & AliESDtrack::kTRDout)) continue;
if (!(status & AliESDtrack::kTRDrefit)) continue;
- if (TMath::Abs(esdTrack->GetOuterParam()->GetPt()) < 1.0) continue;
+ if (esdTrack->GetOuterParam()->Pt() < 1.0) continue;
int ch=0;
while(param->GetX() > fGeo->GetTime0(ch)+2) ch++;
AliExternalTrackParam out(*param);
out.PropagateTo(aRef->LocalX(),bz);
- double dp = aRef->Pt() + out.GetPt();
+ double dp = aRef->Pt() + out.GetSignedPt();
double dy = 10. * (aRef->LocalY() - out.GetY()); // in mm
fDeltaPt->Fill(100. * dp / aRef->Pt());
AliTRDcluster *cls = (AliTRDcluster*)module->At(j);
if (cls->GetQ() < 10) continue;
- fTracker->Transform(cls);
+ //fTracker->Transform(cls);
fClPos->Fill(cls->GetZ(), cls->GetY());
- int plane = fGeo->GetPlane(cls->GetDetector());
+ int layer = fGeo->GetLayer(cls->GetDetector());
int nl = 0;
for(int k=0; k<3; k++) if (cls->GetLabel(k) > -1) nl++;
fClZXcl->Fill(cls->GetZ(), cls->GetX());
fClZXref->Fill(zref, cls->GetX());
- AliTRDpadPlane *padPlane = fGeo->GetPadPlane(plane,0);
+ AliTRDpadPlane *padPlane = fGeo->GetPadPlane(layer,0);
Double_t h01 = TMath::Tan(-TMath::Pi() / 180.0 * padPlane->GetTiltingAngle());
//double dz = zref - padPlane->GetRow0();
fClZZ->Fill(zref, cls->GetZ());
fClZ->Fill(dz);
fTgPhi->Fill(tgphi);
- fClYX->Fill(cls->GetY(), cls->GetX() - fGeo->GetTime0(plane));
+ fClYX->Fill(cls->GetY(), cls->GetX() - fGeo->GetTime0(layer));
}
}
}
}
fEsdTree = (TTree*)esdFile->Get("esdTree");
- fESD = new AliESD();
+ fESD = new AliESDEvent();
fESD->ReadFromTree(fEsdTree);
//fEsdTree->SetBranchAddress("ESD", &fESD);
}
//AliStack* stack = gAlice->Stack();
TTree *refTree = fLoader->TreeTR();
- const int kNBranch = 2;
- const char *brName[] = {"TPC", "TRD"};
TClonesArray *clRefs = new TClonesArray("AliTrackReference");
-
- for(int b=0; b<kNBranch; b++) {
- TBranch *branch = refTree->GetBranch(brName[b]);
- refTree->SetBranchAddress(brName[b],&clRefs);
+ TBranch *branch = refTree->GetBranch("TrackReferences");
+ refTree->SetBranchAddress("TrackReferences",&clRefs);
- int nEntries = branch->GetEntries();
- for(int iTrack = 0; iTrack < nEntries; iTrack++) {
+ int nEntries = branch->GetEntries();
+ for(int iTrack = 0; iTrack < nEntries; iTrack++) {
- refTree->GetEvent(iTrack);
- int nPoints = clRefs->GetEntries();
- for(int iPoint=0; iPoint<nPoints; iPoint++) {
- AliTrackReference *ref = (AliTrackReference*)clRefs->At(iPoint);
- if (b == 0) fRefTPC->Add(new AliTrackReference(*ref));
- if (b == 1) fRefTRD->Add(new AliTrackReference(*ref));
- }
- }
+ refTree->GetEvent(iTrack);
+ int nPoints = clRefs->GetEntries();
+ for(int iPoint=0; iPoint<nPoints; iPoint++) {
+ AliTrackReference *ref = (AliTrackReference*)clRefs->At(iPoint);
+ if (ref->DetectorId() == AliTrackReference::kTPC) fRefTPC->Add(new AliTrackReference(*ref));
+ if (ref->DetectorId() == AliTrackReference::kTRD) fRefTRD->Add(new AliTrackReference(*ref));
+ }
}
fRefTPC->Sort();