Transition PWG0 -> PWGUD
[u/mrichter/AliRoot.git] / PWGUD / selectors / eventStats / show.C
CommitLineData
d7168ce9 1void show(const char* fileName = "event_stat.root")
2{
3 if (TString(fileName).BeginsWith("alien://"))
4 TGrid::Connect("alien://");
5
6 TFile::Open(fileName);
7
5c860273 8 c = new TCanvas("c", "c", 1200, 600);
d7168ce9 9 hist = (TH1*) gFile->Get("physics_selection/fHistStatistics");
10 hist->SetStats(0);
11 hist->Draw("TEXT");
5c860273 12 hist->SetTitle("");
13 hist->SetMarkerSize(1.5);
14 c->SetLeftMargin(0.20);
d7168ce9 15 c->SetBottomMargin(0.2);
16 c->SaveAs("stat.png");
17
5c860273 18 c = new TCanvas("c2", "c2", 800, 600);
d7168ce9 19 c->SetLeftMargin(0.25);
20 hist = (TH1*) gFile->Get("physics_selection/fHistBunchCrossing");
21 hist->SetStats(0);
5c860273 22 hist->SetTitle("");
23 hist->Draw("COL");
d7168ce9 24 c->SaveAs("bc.png");
ee13a1fe 25
26 // BG
27 gStyle->SetStatX(0.87);
28 gStyle->SetStatY(0.93);
29
d83b28d2 30 TH2F * hBB = (TH2F*) gDirectory->Get("physics_selection/background_identification/hCvsTCuts_CINT1B-ABCE-NOPF-ALL");
31 TH2F * hBE = (TH2F*) gDirectory->Get("physics_selection/background_identification/hCvsTCuts_CINT1C-ABCE-NOPF-ALL");
32 TH2F * hBEA = (TH2F*) gDirectory->Get("physics_selection/background_identification/hCvsTCuts_CINT1A-ABCE-NOPF-ALL");
ee13a1fe 33
34 if(!hBB || !hBE || !hBEA) {
35 printf("WARNING: no BG histos\n");
36 }
37 else
38 {
39 hBE->Add(hBEA);
40 hBE->SetTitle("CINT1A-ABCE-NOPF-ALL + CINT1C-ABCE-NOPF-ALL");
41 c = new TCanvas("cbg","cbg",800,400);
42 c->Divide(2,1);
43 c->cd(1);
44 hBB->Draw("colz");
45 c->cd(2);
46 hBE->Draw("colz");
47 c->Print("bg.png");
48 }
d7168ce9 49}