production each trigger histogram per hardware trigger class
[u/mrichter/AliRoot.git] / PWG0 / 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
8 c = new TCanvas;
9 hist = (TH1*) gFile->Get("physics_selection/fHistStatistics");
10 hist->SetStats(0);
11 hist->Draw("TEXT");
12 c->SetLeftMargin(0.25);
13 c->SetBottomMargin(0.2);
14 c->SaveAs("stat.png");
15
16 c = new TCanvas;
17 c->SetLeftMargin(0.25);
18 hist = (TH1*) gFile->Get("physics_selection/fHistBunchCrossing");
19 hist->SetStats(0);
20 hist->Draw("TEXT");
21 c->SaveAs("bc.png");
ee13a1fe 22
23 // BG
24 gStyle->SetStatX(0.87);
25 gStyle->SetStatY(0.93);
26
27 TH2F * hBB = (TH2F*) gDirectory->Get("physics_selection/background_identification/h_CINT1B-ABCE-NOPF-ALL");
28 TH2F * hBE = (TH2F*) gDirectory->Get("physics_selection/background_identification/h_CINT1C-ABCE-NOPF-ALL");
29 TH2F * hBEA = (TH2F*) gDirectory->Get("physics_selection/background_identification/h_CINT1A-ABCE-NOPF-ALL");
30
31 if(!hBB || !hBE || !hBEA) {
32 printf("WARNING: no BG histos\n");
33 }
34 else
35 {
36 hBE->Add(hBEA);
37 hBE->SetTitle("CINT1A-ABCE-NOPF-ALL + CINT1C-ABCE-NOPF-ALL");
38 c = new TCanvas("cbg","cbg",800,400);
39 c->Divide(2,1);
40 c->cd(1);
41 hBB->Draw("colz");
42 c->cd(2);
43 hBE->Draw("colz");
44 c->Print("bg.png");
45 }
d7168ce9 46}