- Int_t ng;
- for (ng=0; ng<ngood; ng++) {
- Int_t lab=gt[ng].lab, tlab=-1;
- Double_t pxg=gt[ng].px, pyg=gt[ng].py, pzg=gt[ng].pz;
- Double_t ptg=TMath::Sqrt(pxg*pxg+pyg*pyg);
+ TFile *refFile=TFile::Open(fname,"old");
+ if (!refFile || !refFile->IsOpen()) {
+ ::Info("AliITSComparisonV2.C","Marking good tracks (will take a while)...");
+ if (GoodTracksITS(dir)) {
+ ::Error("AliITSComparisonV2.C","Can't generate the reference file !");
+ return 1;
+ }
+ }
+ refFile=TFile::Open(fname,"old");
+ if (!refFile || !refFile->IsOpen()) {
+ ::Error("AliITSComparisonV2.C","Can't open the reference file !");
+ return 1;
+ }
+
+ TTree *itsTree=(TTree*)refFile->Get("itsTree");
+ if (!itsTree) {
+ ::Error("AliITSComparisonV2.C","Can't get the reference tree !");
+ return 2;
+ }
+ TBranch *branch=itsTree->GetBranch("ITS");
+ if (!branch) {
+ ::Error("AliITSComparisonV2.C","Can't get the ITS branch !");
+ return 3;
+ }
+ TClonesArray dummy("AliTrackReference",1000), *refs=&dummy;
+ branch->SetAddress(&refs);
+
+
+ sprintf(fname,"%s/AliESDs.root",dir);
+ TFile *ef=TFile::Open(fname);
+ if ((!ef)||(!ef->IsOpen())) {
+ sprintf(fname,"%s/AliESDits.root",dir);
+ ef=TFile::Open(fname);
+ if ((!ef)||(!ef->IsOpen())) {
+ ::Error("AliITSComparisonV2.C","Can't open AliESDits.root !");
+ return 4;
+ }
+ }
+ AliESDEvent* event = new AliESDEvent();
+ TTree* esdTree = (TTree*) ef->Get("esdTree");
+ if (!esdTree) {
+ ::Error("AliITSComparison.C", "no ESD tree found");
+ return 6;
+ }
+ event->ReadFromTree(esdTree);