1040{
1041
1042 cout <<
"In BoardVariationsDiff infile_data: " << string(infile_data) <<
" infile_ref: " << string(infile_ref) <<
" detector " <<
det << endl;
1043
1044
1045
1046 float t0,
dt0, oldt0, bindex;
1047
1052 if (abs(det) == 2)
1054
1055 this->SetName(Form("BoardT0VarDiff_%i", det));
1056
1057 unique_ptr<TFile> filedata(new TFile(infile_data));
1058 unique_ptr<TFile> fileref(new TFile(infile_ref));
1059
1060 filedata->cd();
1061 TNtuple *Boardtuple_data = (TNtuple *)filedata->Get("Board_Artuple");
1062 fileref->cd();
1063 TNtuple *Boardtuple_ref = (TNtuple *)fileref->Get("Board_Artuple");
1064
1065 Boardtuple_data->SetBranchAddress(
"t0", &
t0);
1066 Boardtuple_data->SetBranchAddress("dt0", &dt0);
1067 Boardtuple_ref->SetBranchAddress("oldt0", &oldt0);
1068
1069 int ipnt = 0;
1070 for (int imod = 0; imod < 32; imod++)
1071 {
1072 for (int ibrd = 0; ibrd < 9; ibrd++)
1073 {
1074
1075 bindex = 9 * imod + ibrd;
1076
1077 Boardtuple_data->Draw(">>tmplist", Form("brd==%i && det==%i && mod==%i", ibrd, det, imod));
1078 TEventList *elist = (TEventList *)
gDirectory->Get(
"tmplist");
1079 for (
int ib = 0;
ib < elist->GetN();
ib++)
1080 {
1081 ipnt++;
1082 Boardtuple_data->GetEntry(elist->GetEntry(ib));
1083 Boardtuple_ref->GetEntry(elist->GetEntry(ib));
1088 this->SetPoint(ipnt, bindex + 1,
t0 - oldt0);
1089 this->SetPointError(ipnt, 0, dt0);
1090
1091 }
1092 }
1093 }
1094
1095
1096 this->fMaximum =
maxy + 0.2;
1097 this->fMinimum =
miny - 0.2;
1098 if ((det + 1)>=3){
1099 throw std::runtime_error("detlet[det + 1] is out of bounds");
1100 }
1101 this->SetTitle(Form(
"Board T0 - ref (%c-side)",
detlet[det + 1]));
1102 this->SetLineColor(4);
1103 this->RemovePoint(0);
1104
1105 filedata->Close();
1106
1107 cout << " found " << ipnt << " board t0s " << endl;
1108
1109}