Titles updated.
[u/mrichter/AliRoot.git] / TOF / macrosQA / EvaluatePIDqaTOF.C
1 void EvaluatePIDqaTOF(const char* gridDir){
2
3         //
4         // macro to evaluate PID QA for TOF
5         //
6
7         TGrid::Connect("alien://");
8         TFile* f = TFile::Open(Form("%s/QAresults.root",gridDir));
9         TDirectoryFile* d = (TDirectoryFile*)f->Get("PIDqa");
10         TList* list = (TList*)d->Get("PIDqa");
11         TList* listTOF = (TList*)list->FindObject("TOF");
12         TH1F* hT0MakerEff = (TH1F*)listTOF->FindObject("hT0MakerEff");
13         TH1F* hnTracksAt_TOF = (TH1F*)listTOF->FindObject("hnTracksAt_TOF");
14
15         new TCanvas();
16         hT0MakerEff->Draw();
17         new TCanvas();
18         hnTracksAt_TOF->Draw();
19
20         TH1F* efficiencyT0Maker = (TH1F*)hT0MakerEff->Clone("efficiencyT0Maker");
21         efficiencyT0Maker->Divide(hT0MakerEff, hnTracksAt_TOF, 1, 1, "b");
22
23         new TCanvas();
24         
25         efficiencyT0Maker->Draw();
26
27 }