288 char selectionA[500];
289 sprintf(selectionA,
"%s*(det==1)",
variable.c_str());
290 char selectionC[500];
291 sprintf(selectionC,
"%s*(det==-1)",
variable.c_str());
295 cout <<
"In XYMaps infile: " <<
infile <<
" variable " <<
variable << endl;
297 TNtuple *Chiptuple =
nullptr;
298 TNtuple *Boardtuple =
nullptr;
299 TNtuple *Moduletuple =
nullptr;
303 Chiptuple = (TNtuple *)
file->Get(
"Chiptuple");
304 Boardtuple = (TNtuple *)
file->Get(
"Boardtuple");
305 Moduletuple = (TNtuple *)
file->Get(
"Moduletuple");
309 Chiptuple = (TNtuple *)
file->Get(
"Chip_Artuple");
310 Boardtuple = (TNtuple *)
file->Get(
"Board_Artuple");
311 Moduletuple = (TNtuple *)
file->Get(
"Module_Artuple");
316 this->Divide(3, 2, 0.01, 0.01);
317 ((TPad *)this->GetPrimitive(
"c1_1"))->SetFrameFillColor(1);
318 ((TPad *)this->GetPrimitive(
"c1_2"))->SetFrameFillColor(1);
319 ((TPad *)this->GetPrimitive(
"c1_3"))->SetFrameFillColor(1);
320 ((TPad *)this->GetPrimitive(
"c1_4"))->SetFrameFillColor(1);
321 ((TPad *)this->GetPrimitive(
"c1_5"))->SetFrameFillColor(1);
322 ((TPad *)this->GetPrimitive(
"c1_6"))->SetFrameFillColor(1);
324 gStyle->SetPalette(1);
327 Moduletuple->Draw(
"y:x>>reshist10(40,-1200,1200,40,-1200,1200)", selectionA,
"colz");
328 TH2F *reshist10 = (
TH2F *)gPad->GetPrimitive(
"reshist10");
330 throw string(
"Variable not found!");
333 reshist10->GetZaxis()->SetRangeUser(0.12, 0.19);
335 else if (
variable ==
"abs(resMean)")
337 reshist10->GetZaxis()->SetRangeUser(0.0, 0.01);
341 reshist10->GetZaxis()->SetRangeUser(1.0, 7.0);
343 else if (
variable ==
"abs(t0-oldt0)")
345 reshist10->GetZaxis()->SetRangeUser(0, .4);
349 reshist10->GetZaxis()->SetRangeUser(2.0, 4.0);
352 if (reshist10->GetEntries() > 1)
356 sprintf(title1,
"Module %s (barrel side A)",
variable.c_str());
358 sprintf(title1,
"Argon Module %s (barrel side A)",
variable.c_str());
359 reshist10->SetTitle(title1);
360 reshist10->SetStats(0);
361 reshist10->GetXaxis()->SetLabelOffset(1000);
362 reshist10->GetYaxis()->SetLabelOffset(1000);
365 Boardtuple->Draw(
"y:x>>reshist0(100,-1200,1200,100,-1200,1200)", selectionA,
"colz");
366 TH2F *reshist0 = (
TH2F *)gPad->GetPrimitive(
"reshist0");
368 throw string(
"Variable not found!");
372 reshist0->GetZaxis()->SetRangeUser(0.12, 0.19);
374 else if (
variable ==
"abs(resMean)")
376 reshist0->GetZaxis()->SetRangeUser(0.0, 0.01);
380 reshist0->GetZaxis()->SetRangeUser(1.0, 7.0);
382 else if (
variable ==
"abs(t0-oldt0)")
384 reshist0->GetZaxis()->SetRangeUser(0, .4);
388 reshist0->GetZaxis()->SetRangeUser(2.0, 4.0);
391 if (reshist0->GetEntries() > 1)
395 sprintf(title2,
"Board %s (barrel side A)",
variable.c_str());
397 sprintf(title2,
"Argon Board %s (barrel side A)",
variable.c_str());
398 reshist0->SetTitle(title2);
399 reshist0->SetStats(0);
400 reshist0->GetXaxis()->SetLabelOffset(1000);
401 reshist0->GetYaxis()->SetLabelOffset(1000);
404 Chiptuple->Draw(
"y:x>>t0hist0(300,-1200,1200,300,-1200,1200)", selectionA,
"colz");
405 TH2F *t0hist0 = (
TH2F *)gPad->GetPrimitive(
"t0hist0");
407 throw string(
"Variable not found!");
409 sprintf(title3,
"Chip %s (barrel side A)",
variable.c_str());
411 sprintf(title3,
"Argon Chip %s (barrel side A)",
variable.c_str());
412 t0hist0->SetTitle(title3);
416 t0hist0->GetZaxis()->SetRangeUser(0.12, 0.19);
418 else if (
variable ==
"abs(resMean)")
420 t0hist0->GetZaxis()->SetRangeUser(0.0, 0.01);
424 t0hist0->GetZaxis()->SetRangeUser(1.0, 7.0);
426 else if (
variable ==
"abs(t0-oldt0)")
428 t0hist0->GetZaxis()->SetRangeUser(0, .4);
432 t0hist0->GetZaxis()->SetRangeUser(2.0, 4.0);
435 if (t0hist0->GetEntries() > 1)
438 t0hist0->SetStats(0);
439 t0hist0->GetXaxis()->SetLabelOffset(1000);
440 t0hist0->GetYaxis()->SetLabelOffset(1000);
443 Moduletuple->Draw(
"y:x>>reshist11(40,-1200,1200,40,-1200,1200)", selectionC,
"colz");
444 TH2F *reshist11 = (
TH2F *)gPad->GetPrimitive(
"reshist11");
446 throw string(
"Variable not found!");
449 reshist11->GetZaxis()->SetRangeUser(0.12, 0.19);
451 else if (
variable ==
"abs(resMean)")
453 reshist11->GetZaxis()->SetRangeUser(0.0, 0.01);
457 reshist11->GetZaxis()->SetRangeUser(1.0, 7.0);
459 else if (
variable ==
"abs(t0-oldt0)")
461 reshist11->GetZaxis()->SetRangeUser(0, .4);
465 reshist11->GetZaxis()->SetRangeUser(2.0, 4.0);
468 if (reshist11->GetEntries() > 1)
472 sprintf(title4,
"Module %s (barrel side C)",
variable.c_str());
474 sprintf(title4,
"Argon Module %s (barrel side C)",
variable.c_str());
475 reshist11->SetTitle(title4);
476 reshist11->SetStats(0);
477 reshist11->GetXaxis()->SetLabelOffset(1000);
478 reshist11->GetYaxis()->SetLabelOffset(1000);
481 Boardtuple->Draw(
"y:x>>reshist1(100,-1200,1200,100,-1200,1200)", selectionC,
"colz");
482 TH2F *reshist1 = (
TH2F *)gPad->GetPrimitive(
"reshist1");
484 throw string(
"Variable not found!");
487 reshist1->GetZaxis()->SetRangeUser(0.12, 0.19);
489 else if (
variable ==
"abs(resMean)")
491 reshist1->GetZaxis()->SetRangeUser(0.0, 0.01);
495 reshist1->GetZaxis()->SetRangeUser(1.0, 7.0);
497 else if (
variable ==
"abs(t0-oldt0)")
499 reshist1->GetZaxis()->SetRangeUser(0, .4);
503 reshist1->GetZaxis()->SetRangeUser(2.0, 4.0);
506 if (reshist1->GetEntries() > 1)
510 sprintf(title5,
"Board %s (barrel side C)",
variable.c_str());
512 sprintf(title5,
"Argon Board %s (barrel side C)",
variable.c_str());
513 reshist1->SetTitle(title5);
514 reshist1->SetStats(0);
515 reshist1->GetXaxis()->SetLabelOffset(1000);
516 reshist1->GetYaxis()->SetLabelOffset(1000);
519 Chiptuple->Draw(
"y:x>>t0hist1(300,-1200,1200,300,-1200,1200)", selectionC,
"colz");
520 TH2F *t0hist1 = (
TH2F *)gPad->GetPrimitive(
"t0hist1");
522 throw string(
"Variable not found!");
525 t0hist1->GetZaxis()->SetRangeUser(0.12, 0.19);
527 else if (
variable ==
"abs(resMean)")
529 t0hist1->GetZaxis()->SetRangeUser(0.0, 0.01);
533 t0hist1->GetZaxis()->SetRangeUser(1.0, 7.0);
535 else if (
variable ==
"abs(t0-oldt0)")
537 t0hist1->GetZaxis()->SetRangeUser(0, .4);
541 t0hist1->GetZaxis()->SetRangeUser(2.0, 4.0);
544 if (t0hist1->GetEntries() > 1)
548 sprintf(title6,
"Chip %s (barrel side C)",
variable.c_str());
550 sprintf(title6,
"Argon Chip %s (barrel side C)",
variable.c_str());
551 t0hist1->SetTitle(title6);
552 t0hist1->SetStats(0);
553 t0hist1->GetXaxis()->SetLabelOffset(1000);
554 t0hist1->GetYaxis()->SetLabelOffset(1000);