//#include "TString.h" void showHists47() { TString location = "../data/WPT_tests"; TString f0, f1; f0.Form("%s/4.7nF_11okt_chargeCalib/TestTriggerMode_chargeCalib_3V_100ns_4.7nF_11oct_0000.root", location.Data()); f1.Form("%s/4.7nF_11okt_chargeCalib/TestTriggerMode_chargeCalib_3V_100ns_4.7nF_11oct_0001.root", location.Data()); TFile *fr0 = new TFile(f0.Data()); TFile *fr1 = new TFile(f1.Data()); // TH2D *hraw0 = (TH2D*)fr0->Get("cal1eAdcAllWoBaseline"); // TH2D *hraw1 = (TH2D*)fr1->Get("cal1eAdcAllWoBaseline"); TH2D *hraw0 = (TH2D*)fr0->Get("fhAdcAllWoBaselineNLcorr"); TH2D *hraw1 = (TH2D*)fr1->Get("fhAdcAllWoBaselineNLcorr"); if (!hraw0 || !hraw1) { Error("showHists47.cxx", "At least one of histograms was not found."); return; } TCanvas *c1 = new TCanvas(); c1->Divide(2,2); c1->cd(1); hraw0->GetXaxis()->SetRangeUser(0, 64); hraw0->Draw(); c1->cd(2); hraw1->GetXaxis()->SetRangeUser(0, 64); hraw1->Draw(); c1->cd(3); TH2D *hSum = new TH2D(*hraw1); hSum->Add(hraw0);; hSum->Draw(); }