From ee13a1fea2340515a6d126ea80f5c75efe6047ff Mon Sep 17 00:00:00 2001 From: jgrosseo Date: Thu, 17 Dec 2009 14:42:52 +0000 Subject: [PATCH] displaying bg histograms (Michele) --- PWG0/eventStats/show.C | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/PWG0/eventStats/show.C b/PWG0/eventStats/show.C index 2321f0370aa..6aab3de5aed 100644 --- a/PWG0/eventStats/show.C +++ b/PWG0/eventStats/show.C @@ -19,4 +19,28 @@ void show(const char* fileName = "event_stat.root") hist->SetStats(0); hist->Draw("TEXT"); c->SaveAs("bc.png"); + + // BG + gStyle->SetStatX(0.87); + gStyle->SetStatY(0.93); + + TH2F * hBB = (TH2F*) gDirectory->Get("physics_selection/background_identification/h_CINT1B-ABCE-NOPF-ALL"); + TH2F * hBE = (TH2F*) gDirectory->Get("physics_selection/background_identification/h_CINT1C-ABCE-NOPF-ALL"); + TH2F * hBEA = (TH2F*) gDirectory->Get("physics_selection/background_identification/h_CINT1A-ABCE-NOPF-ALL"); + + if(!hBB || !hBE || !hBEA) { + printf("WARNING: no BG histos\n"); + } + else + { + hBE->Add(hBEA); + hBE->SetTitle("CINT1A-ABCE-NOPF-ALL + CINT1C-ABCE-NOPF-ALL"); + c = new TCanvas("cbg","cbg",800,400); + c->Divide(2,1); + c->cd(1); + hBB->Draw("colz"); + c->cd(2); + hBE->Draw("colz"); + c->Print("bg.png"); + } } -- 2.43.0