showHists47.cxx 907 Bytes
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38
//#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("adcAllWoBaseline");
	TH2D *hraw1 = (TH2D*)fr1->Get("adcAllWoBaseline");

	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();

}