showHists.cxx 4.31 KB
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 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143
//#include "TString.h"

void showHists()
{

	TString location = "../data/WPT_tests";

	TString f0, f1, f2, f3, f4,
		f10, f11, f12, f13,
		f20, f21, f22;

	f0.Form("%s/680pF_10okt_chargeCalib/pedestals_10okt_withGenerator_woPMT_scan_0000.root", location.Data());
	f1.Form("%s/680pF_10okt_chargeCalib/pedestals_10okt_withGenerator_woPMT_scan_0001.root", location.Data());
	f2.Form("%s/680pF_10okt_chargeCalib/pedestals_10okt_withGenerator_woPMT_scan_0002.root", location.Data());
	f3.Form("%s/680pF_10okt_chargeCalib/pedestals_10okt_withGenerator_woPMT_scan_0003.root", location.Data());
	f4.Form("%s/680pF_10okt_chargeCalib/pedestals_10okt_withGenerator_woPMT_scan_0004.root", location.Data());

	f10.Form("%s/680pF_11okt_chargeCalib/pedestals_11okt_withGenerator_woPMT_scan_0000.root", location.Data());
	f11.Form("%s/680pF_11okt_chargeCalib/pedestals_11okt_withGenerator_woPMT_scan_0001.root", location.Data());
	f12.Form("%s/680pF_11okt_chargeCalib/pedestals_11okt_withGenerator_woPMT_scan_0002.root", location.Data());
	f13.Form("%s/680pF_11okt_chargeCalib/pedestals_11okt_withGenerator_woPMT_scan_0003.root", location.Data());

	f20.Form("%s/680pF_14okt_measure_chargeCalib/pedestals_14oct_Generator_thr35_woPMT_680pF_0000.root", location.Data());
	f21.Form("%s/680pF_14okt_measure_chargeCalib/pedestals_14oct_Generator_thr35_woPMT_680pF_0001.root", location.Data());
	f22.Form("%s/680pF_14okt_measure_chargeCalib/pedestals_14oct_Generator_thr35_woPMT_680pF-a_0000.root", location.Data());

	TFile *fr0 = new TFile(f0.Data());
	TFile *fr1 = new TFile(f1.Data());
	TFile *fr2 = new TFile(f2.Data());
	TFile *fr3 = new TFile(f3.Data());
	TFile *fr4 = new TFile(f4.Data());

	TFile *fr10 = new TFile(f10.Data());
	TFile *fr11 = new TFile(f11.Data());
	TFile *fr12 = new TFile(f12.Data());
	TFile *fr13 = new TFile(f13.Data());

	TFile *fr20 = new TFile(f20.Data());
	TFile *fr21 = new TFile(f21.Data());
	TFile *fr22 = new TFile(f22.Data());

//	TH2D *hraw0 = (TH2D*)fr0->Get("cal1eAdcAllWoBaseline");
//	TH2D *hraw1 = (TH2D*)fr1->Get("cal1eAdcAllWoBaseline");
//	TH2D *hraw2 = (TH2D*)fr2->Get("cal1eAdcAllWoBaseline");
//	TH2D *hraw3 = (TH2D*)fr3->Get("cal1eAdcAllWoBaseline");
//	TH2D *hraw4 = (TH2D*)fr4->Get("cal1eAdcAllWoBaseline");

//	TH2D *hraw10 = (TH2D*)fr10->Get("cal1eAdcAllWoBaseline");
//	TH2D *hraw11 = (TH2D*)fr11->Get("cal1eAdcAllWoBaseline");
//	TH2D *hraw12 = (TH2D*)fr12->Get("cal1eAdcAllWoBaseline");
//	TH2D *hraw13 = (TH2D*)fr13->Get("cal1eAdcAllWoBaseline");

	TH2D *hraw0 = (TH2D*)fr0->Get("adcAllWoBaseline");
	TH2D *hraw1 = (TH2D*)fr1->Get("adcAllWoBaseline");
	TH2D *hraw2 = (TH2D*)fr2->Get("adcAllWoBaseline");
	TH2D *hraw3 = (TH2D*)fr3->Get("adcAllWoBaseline");
	TH2D *hraw4 = (TH2D*)fr4->Get("adcAllWoBaseline");

	TH2D *hraw10 = (TH2D*)fr10->Get("adcAllWoBaseline");
	TH2D *hraw11 = (TH2D*)fr11->Get("adcAllWoBaseline");
	TH2D *hraw12 = (TH2D*)fr12->Get("adcAllWoBaseline");
	TH2D *hraw13 = (TH2D*)fr13->Get("adcAllWoBaseline");

	TH2D *hraw20 = (TH2D*)fr20->Get("adcAllWoBaseline");
	TH2D *hraw21 = (TH2D*)fr21->Get("adcAllWoBaseline");
	TH2D *hraw22 = (TH2D*)fr22->Get("adcAllWoBaseline");

	TCanvas *c1 = new TCanvas();
	c1->Divide(3,2);

	c1->cd(1);
	hraw0->GetXaxis()->SetRangeUser(0, 64);
	hraw0->Draw();

	c1->cd(2);
	hraw1->GetXaxis()->SetRangeUser(0, 64);
	hraw1->Draw();

	c1->cd(3);
	hraw2->GetXaxis()->SetRangeUser(0, 64);
	hraw2->Draw();

	c1->cd(4);
	hraw3->GetXaxis()->SetRangeUser(0, 64);
	hraw3->Draw();

	c1->cd(5);
	hraw4->GetXaxis()->SetRangeUser(0, 64);
	hraw4->Draw();

	c1->cd(6);
	TH2D *hSum = new TH2D(*hraw1);
	hSum->Add(hraw3);
	hSum->Add(hraw4);
	hSum->Add(hraw11);
	hSum->Add(hraw2);
	hSum->Add(hraw1);
	hSum->Add(hraw12);
	hSum->Draw();


	TCanvas *c2 = new TCanvas();
	c2->Divide(2,2);

	c2->cd(1);
	hraw10->GetXaxis()->SetRangeUser(0, 64);
	hraw10->Draw();

	c2->cd(2);
	hraw11->GetXaxis()->SetRangeUser(0, 64);
	hraw11->Draw();

	c2->cd(3);
	hraw12->GetXaxis()->SetRangeUser(0, 64);
	hraw12->Draw();

	c2->cd(4);
	hraw13->GetXaxis()->SetRangeUser(0, 64);
	hraw13->Draw();


	TCanvas *c3 = new TCanvas();
	c3->Divide(2,2);

	c3->cd(1);
	hraw20->GetXaxis()->SetRangeUser(0, 64);
	hraw20->Draw();

	c3->cd(2);
	hraw21->GetXaxis()->SetRangeUser(0, 64);
	hraw21->Draw();

	c3->cd(3);
	hraw22->GetXaxis()->SetRangeUser(0, 64);
	hraw22->Draw();

	c3->cd(4);
	TH2D *hSum2 = new TH2D(*hraw20);
	hSum2->Add(hraw21);
	hSum2->Add(hraw22);
	hSum2->Draw();

}