1148{
1149
1150 cout <<
"In BoardVariationsOldT0 infile: " << string(infile) <<
" detector " <<
det << endl;
1151
1152
1153
1154 float oldt0, bindex;
1155
1160 if (abs(det) == 2)
1162
1163 this->SetName(Form("BoardOldT0Var_%i", det));
1164
1165 unique_ptr<TFile>
file(
new TFile(infile));
1166
1168 TNtuple *Boardtuple = (TNtuple *)
file->Get(
"Board_Artuple");
1169 TNtuple *BoardtupleXe = (TNtuple *)
file->Get(
"Boardtuple");
1170
1171 Boardtuple->SetBranchAddress("oldt0", &oldt0);
1172 if (abs(det) == 2)
1173 BoardtupleXe->SetBranchAddress("oldt0", &oldt0);
1174
1175 int ipnt = 0;
1176 if (abs(det) == 1)
1177 {
1178
1179 for (int imod = 0; imod < 32; imod++)
1180 {
1181 for (int ibrd = 0; ibrd < 9; ibrd++)
1182 {
1183
1184 bindex = 9 * imod + ibrd;
1185
1186 Boardtuple->Draw(">>tmplist", Form("brd==%i && det==%i && mod==%i", ibrd, det, imod));
1187 TEventList *elist = (TEventList *)
gDirectory->Get(
"tmplist");
1188 for (
int ib = 0;
ib < elist->GetN();
ib++)
1189 {
1190 ipnt++;
1191 Boardtuple->GetEntry(elist->GetEntry(ib));
1196 this->SetPoint(ipnt, bindex + 1, oldt0);
1197
1198 }
1199 }
1200 }
1201 }
1202 else if (abs(det) == 2)
1203 {
1204 for (int imod = 0; imod < 32; imod++)
1205 {
1206 for (int ilay = 0; ilay < 14; ilay++)
1207 {
1208
1209 bindex = 14 * imod + ilay;
1210
1211 Boardtuple->Draw(">>tmplist1", Form("lay==%i && det==%i && mod==%i", ilay, det, imod));
1212 TEventList *elist = (TEventList *)
gDirectory->Get(
"tmplist1");
1213 for (
int ib = 0;
ib < elist->GetN();
ib++)
1214 {
1215 ipnt++;
1216 Boardtuple->GetEntry(elist->GetEntry(ib));
1217 this->SetPoint(ipnt, bindex + 1, oldt0);
1222
1223 }
1224
1225 BoardtupleXe->Draw(">>tmplistXe", Form("lay==%i && det==%i && mod==%i", ilay, det, imod));
1226 elist = (TEventList *)
gDirectory->Get(
"tmplistXe");
1227 for (
int ib = 0;
ib < elist->GetN();
ib++)
1228 {
1229 ipnt++;
1230 BoardtupleXe->GetEntry(elist->GetEntry(ib));
1231 this->SetPoint(ipnt, bindex + 1, oldt0);
1236
1237 }
1238 }
1239 }
1240 }
1241
1242 this->fMaximum =
maxy;
1243 this->fMinimum =
miny;
1244
1245 if (abs(det) == 1)
1246 {
1247 this->SetTitle(Form(
"Barrel Board T0s (%c-side)",
detlet[det + 1]));
1248 }
1249 else
1250 {
1251 if ((det + 1)>=3){
1252 throw std::runtime_error("detlet[det + 1] is out of bounds");
1253 }
1254 this->SetTitle(Form(
"Endcap Board T0s (%c-side)",
detlet[det + 1]));
1255 }
1256 this->SetLineColor(4);
1257 this->RemovePoint(0);
1258
1259 this->GetYaxis()->SetRangeUser(9, 10.7);
1260
1262
1263 cout << " found " << ipnt << " board t0s " << endl;
1264
1265}