2718 map<string, string> titlemap;
2719 titlemap[
"WholeBarrel_1"] =
"whole barrel";
2720 titlemap[
"Detector_-1"] =
"barrel C";
2721 titlemap[
"Detector_1"] =
"barrel A";
2722 titlemap[
"Detector_-2"] =
"end-cap C";
2723 titlemap[
"Detector_2"] =
"end-cap A";
2725 titlemap[
"WholeBarrel_Ar_1"] =
"whole barrel";
2726 titlemap[
"Detector_Ar_-1"] =
"barrel C";
2727 titlemap[
"Detector_Ar_1"] =
"barrel A";
2728 titlemap[
"Detector_Ar_-2"] =
"end-cap C";
2729 titlemap[
"Detector_Ar-2"] =
"end-cap A";
2734 TPad *c1_3 =
new TPad(
"c1_3",
"newpad", 0.01, 0.33, 0.99, 0.99);
2737 c1_3->SetTopMargin(0.1);
2738 c1_3->SetBottomMargin(0.01);
2739 c1_3->SetRightMargin(0.1);
2740 c1_3->SetFillStyle(0);
2745 TDirectory *trt =
nullptr;
2747 trt = (TDirectory *)
file->FindKey(
"TRT_all")->ReadObj();
2749 trt = (TDirectory *)
file->FindKey(
"TRT_Ar_all")->ReadObj();
2753 TDirectory *
det = (TDirectory *)trt->FindKey(
folder.c_str())->ReadObj();
2754 cout <<
" RtColor plot for folder" <<
folder << endl;
2755 if (
det->FindKey(
"rt-relation"))
2757 hist = (
TH2F *)
det->FindKey(
"rt-relation")->ReadObj();
2761 cout <<
" found rt-relation " << endl;
2762 hist->GetXaxis()->SetRangeUser(0, 40);
2763 hist->GetYaxis()->SetRangeUser(0, 2.4);
2765 sprintf(
name,
"r(t) for %s",
folder.c_str());
2767 sprintf(
name,
"Argon r(t) for %s",
folder.c_str());
2769 hist->GetXaxis()->SetRangeUser(0, 50);
2772 if (
det->FindKey(
"rtgraph"))
2774 cout <<
" found rtgraph " << endl;
2775 rtgraph = (TGraphErrors *)
det->FindKey(
"rtgraph")->ReadObj();
2779 rtgraph->GetYaxis()->SetRangeUser(0, 2.4);
2781 if (
rtgraph->GetFunction(
"rtfunc"))
2786 if (
det->FindKey(
"oldrtfunc"))
2788 cout <<
" found oldrtfunc " << endl;
2789 oldrtfunc = (TF1 *)
det->FindKey(
"oldrtfunc")->ReadObj();
2797 throw string(
" NO RT OBJECTS FOUND");
2800 else if (trt->FindKey(
"rt-relation"))
2802 cout <<
" RtColor Plot entire TRT" << endl;
2803 hist = (
TH2F *)trt->FindKey(
"rt-relation")->ReadObj();
2805 hist->GetXaxis()->SetRangeUser(0, 40);
2806 hist->SetTitle(
"r(t) for whole TRT");
2808 hist->SetTitle(
"Argon r(t) for whole TRT");
2809 hist->GetYaxis()->SetRangeUser(0, 2.4);
2810 hist->GetXaxis()->SetRangeUser(0, 50);
2812 if (trt->FindKey(
"rtgraph"))
2814 rtgraph = (TGraphErrors *)trt->FindKey(
"rtgraph")->ReadObj();
2818 rtgraph->GetYaxis()->SetRangeUser(0, 2.4);
2819 if (
rtgraph->GetFunction(
"rtfunc"))
2825 if (trt->FindKey(
"oldrtfunc"))
2827 oldrtfunc = (TF1 *)trt->FindKey(
"oldrtfunc")->ReadObj();
2842 TPad *c1_4 =
new TPad(
"c1_4",
"newpad", 0.01, 0, 0.99, 0.32);
2845 c1_4->SetTopMargin(0.01);
2846 c1_4->SetBottomMargin(0.3);
2847 c1_4->SetRightMargin(0.1);
2848 c1_4->SetFillStyle(0);
2851 Double_t Xmax =
rtgraph->GetXaxis()->GetXmax();
2854 const Int_t
n = 300;
2858 Double_t Ymax = -10;
2861 newRT->SetRange(-10., 60.);
2864 for (Int_t
i = 0;
i <
n;
i++)
2874 TGraph *
gr1 =
new TGraph(
n,
x,
y);
2878 gr1->GetXaxis()->SetTitle(
"t-T0/ns");
2879 gr1->GetXaxis()->SetRangeUser(
Xmin, Xmax);
2880 gr1->GetYaxis()->SetTitle(
"Old r(t) - New r(t) /mm");
2881 gr1->GetYaxis()->SetRangeUser(-0.1, 0.1);
2883 gr1->GetYaxis()->SetNdivisions(5);
2884 gr1->GetXaxis()->SetTitleSize(0.06);
2885 gr1->GetXaxis()->SetLabelSize(0.06);
2886 gr1->GetYaxis()->SetLabelSize(0.08);
2887 gr1->GetYaxis()->SetTitleOffset(0.8);
2888 gr1->GetYaxis()->SetTitleSize(0.06);
2889 gr1->SetLineStyle(2);
2897 for (Int_t
i = 0;
i <
n1;
i++)
2906 if (
y1.at(
i) > Ymax)
2908 if (
y1.at(
i) < Ymin)
2913 TGraphErrors *
gr2 =
new TGraphErrors(
n1, &
x1.at(0), &
y1.at(0), &
ex1.at(0), &ey1.at(0));
2914 gr2->SetMarkerColor(kBlack);
2915 gr2->SetMarkerStyle(20);
2917 gr2->GetYaxis()->SetTitle(
"Old r(t) - New r(t) /mm");
2920 gr2->GetYaxis()->SetRangeUser(-0.1, 0.1);
2921 gr2->GetXaxis()->SetRangeUser(0, 50);
2926 TLine *line0 =
new TLine(0, 0, 50, 0);
2927 line0->SetLineColor(4);