2403 char selectionA[500];
2404 sprintf(selectionA,
"%s*(det==2)",
variable.c_str());
2405 char selectionC[500];
2406 sprintf(selectionC,
"%s*(det==-2)",
variable.c_str());
2412 TNtuple *Chiptuple =
nullptr;
2413 TNtuple *Moduletuple =
nullptr;
2417 Chiptuple = (TNtuple *)
file->Get(
"Chiptuple");
2418 Moduletuple = (TNtuple *)
file->Get(
"Moduletuple");
2422 Chiptuple = (TNtuple *)
file->Get(
"Chip_Artuple");
2423 Moduletuple = (TNtuple *)
file->Get(
"Module_Artuple");
2426 this->SetName(
"c1");
2428 this->Divide(2, 2, 0.01, 0.01);
2429 ((TPad *)this->GetPrimitive(
"c1_1"))->SetFrameFillColor(1);
2430 ((TPad *)this->GetPrimitive(
"c1_2"))->SetFrameFillColor(1);
2431 ((TPad *)this->GetPrimitive(
"c1_3"))->SetFrameFillColor(1);
2432 ((TPad *)this->GetPrimitive(
"c1_4"))->SetFrameFillColor(1);
2434 gStyle->SetPalette(1);
2438 Moduletuple->Draw(
"mod:lay>>reshist10(14,0,14,32,0,32)", selectionA,
"colz");
2439 TH2F *reshist10 = (
TH2F *)gPad->GetPrimitive(
"reshist10");
2441 if (reshist10->GetEntries() > 1)
2445 sprintf(title1,
"Phi Sector VS Wheel %s (EC side A)",
variable.c_str());
2447 sprintf(title1,
"Argon Phi Sector VS Wheel %s (EC side A)",
variable.c_str());
2448 reshist10->SetTitle(title1);
2449 reshist10->SetStats(0);
2450 reshist10->GetXaxis()->SetLabelOffset(1000);
2451 reshist10->GetYaxis()->SetLabelOffset(1000);
2452 reshist10->GetXaxis()->SetTitle(
"Wheel (Z)");
2453 reshist10->GetYaxis()->SetTitle(
"Phi sector");
2456 reshist10->GetZaxis()->SetRangeUser(1, 6);
2457 reshist10->GetZaxis()->SetNdivisions(6);
2461 reshist10->GetZaxis()->SetRangeUser(0.10, 0.20);
2463 else if (
variable ==
"abs(resMean)")
2465 reshist10->GetZaxis()->SetRangeUser(0.0, 0.05);
2469 reshist10->GetZaxis()->SetRangeUser(2, 14);
2471 else if (
variable ==
"abs(t0-oldt0)")
2473 reshist10->GetZaxis()->SetRangeUser(0.0, 0.6);
2477 reshist10->GetZaxis()->SetRangeUser(2.0, 4.5);
2482 Chiptuple->Draw(
"mod:chp>>histC(248,84,332,32,0,32)", selectionA,
"colz");
2483 TH2F *histC = (
TH2F *)gPad->GetPrimitive(
"histC");
2485 sprintf(title3,
"Chip %s (EC side A)",
variable.c_str());
2487 sprintf(title3,
"Argon Chip %s (EC side A)",
variable.c_str());
2488 histC->SetTitle(title3);
2490 if (histC->GetEntries() > 1)
2494 histC->GetXaxis()->SetLabelOffset(1000);
2495 histC->GetYaxis()->SetLabelOffset(1000);
2496 histC->GetXaxis()->SetTitle(
"Chip number");
2497 histC->GetYaxis()->SetTitle(
"Phi sector");
2500 histC->GetZaxis()->SetRangeUser(1, 6);
2501 histC->GetZaxis()->SetNdivisions(6);
2505 histC->GetZaxis()->SetRangeUser(0.10, 0.20);
2507 else if (
variable ==
"abs(resMean)")
2509 histC->GetZaxis()->SetRangeUser(0.0, 0.05);
2513 histC->GetZaxis()->SetRangeUser(2, 14);
2515 else if (
variable ==
"abs(t0-oldt0)")
2517 histC->GetZaxis()->SetRangeUser(0.0, 0.6);
2521 histC->GetZaxis()->SetRangeUser(2.0, 4.5);
2527 TLine *lin11 =
new TLine(84, lowe, 84, upe);
2528 lin11->SetLineStyle(2);
2530 TLine *lin12 =
new TLine(107, lowe, 107, upe);
2531 lin12->SetLineStyle(2);
2533 TLine *lin13 =
new TLine(131, lowe, 131, upe);
2534 lin13->SetLineStyle(2);
2536 TLine *lin14 =
new TLine(155, lowe, 155, upe);
2537 lin14->SetLineStyle(2);
2539 TLine *lin15 =
new TLine(179, lowe, 179, upe);
2540 lin15->SetLineStyle(2);
2542 TLine *lin16 =
new TLine(203, lowe, 203, upe);
2543 lin16->SetLineStyle(2);
2545 TLine *lin17 =
new TLine(227, lowe, 227, upe);
2546 lin17->SetLineStyle(2);
2548 TLine *lin18 =
new TLine(239, lowe, 239, upe);
2549 lin18->SetLineStyle(2);
2554 Moduletuple->Draw(
"mod:lay>>reshist11(14,0,14,32,0,32)", selectionC,
"colz");
2555 TH2F *reshist11 = (
TH2F *)gPad->GetPrimitive(
"reshist11");
2557 if (reshist11->GetEntries() > 1)
2561 sprintf(title4,
"Phi Sector VS Wheel %s (EC side C)",
variable.c_str());
2563 sprintf(title4,
"Argon Phi Sector VS Wheel %s (EC side C)",
variable.c_str());
2564 reshist11->SetTitle(title4);
2565 reshist11->SetMarkerStyle(21);
2566 reshist11->SetStats(0);
2567 reshist11->GetXaxis()->SetLabelOffset(1000);
2568 reshist11->GetYaxis()->SetLabelOffset(1000);
2569 reshist11->GetXaxis()->SetTitle(
"Layer (Z)");
2570 reshist11->GetYaxis()->SetTitle(
"Phi sector");
2573 reshist11->GetZaxis()->SetRangeUser(1, 6);
2574 reshist11->GetZaxis()->SetNdivisions(6);
2576 TLegend *
leg =
new TLegend(0.99, 0.35, 0.55, 0.01,
"T0 fit type");
2578 TH2F *
h1 =
new TH2F(
"h1",
"h1 title", 40, 0, 4, 30, -3, 3);
2579 h1->SetMarkerColor(54);
2580 h1->SetMarkerStyle(21);
2582 TH2F *h2 =
new TH2F(
"h2",
"h2 title", 40, 0, 4, 30, -3, 3);
2583 h2->SetMarkerColor(4);
2584 h2->SetMarkerStyle(21);
2586 TH2F *h3 =
new TH2F(
"h3",
"h3 title", 40, 0, 4, 30, -3, 3);
2587 h3->SetMarkerColor(7);
2588 h3->SetMarkerStyle(21);
2590 TH2F *h4 =
new TH2F(
"h4",
"h4 title", 40, 0, 4, 30, -3, 3);
2591 h4->SetMarkerColor(81);
2592 h4->SetMarkerStyle(21);
2594 TH2F *h5 =
new TH2F(
"h5",
"h5 title", 40, 0, 4, 30, -3, 3);
2595 h5->SetMarkerColor(kYellow);
2596 h5->SetMarkerStyle(21);
2598 TH2F *h6 =
new TH2F(
"h6",
"h6 title", 40, 0, 4, 30, -3, 3);
2599 h6->SetMarkerColor(kRed);
2600 h6->SetMarkerStyle(21);
2602 leg->AddEntry(
h1,
"1: |mean|>5",
"P");
2603 leg->AddEntry(h2,
"2: normal fit",
"P");
2604 leg->AddEntry(h3,
"3: used chip ref",
"P");
2605 leg->AddEntry(h4,
"4: Low stat",
"P");
2606 leg->AddEntry(h5,
"5: No T0 Cal",
"P");
2607 leg->AddEntry(h6,
"6: Wrong fit. Mean used",
"P");
2608 leg->SetTextSize(0.04);
2613 reshist11->GetZaxis()->SetRangeUser(0.1, 0.20);
2615 else if (
variable ==
"abs(resMean)")
2617 reshist11->GetZaxis()->SetRangeUser(0.0, 0.05);
2621 reshist11->GetZaxis()->SetRangeUser(2, 14);
2623 else if (
variable ==
"abs(t0-oldt0)")
2625 reshist11->GetZaxis()->SetRangeUser(0.0, 0.6);
2629 reshist11->GetZaxis()->SetRangeUser(2.0, 4.5);
2633 Chiptuple->Draw(
"mod:chp>>histC1(248,84,332,32,0,32)", selectionC,
"colz");
2634 TH2F *histC1 = (
TH2F *)gPad->GetPrimitive(
"histC1");
2636 sprintf(title5,
"Chip %s (EC side C)",
variable.c_str());
2638 sprintf(title5,
"Argon Chip %s (EC side C)",
variable.c_str());
2639 histC1->SetTitle(title5);
2641 if (histC1->GetEntries() > 1)
2644 histC1->SetStats(0);
2645 histC1->GetXaxis()->SetLabelOffset(1000);
2646 histC1->GetYaxis()->SetLabelOffset(1000);
2647 histC1->GetXaxis()->SetTitle(
"Chip number");
2648 histC1->GetYaxis()->SetTitle(
"Phi sector");
2651 histC1->GetZaxis()->SetRangeUser(1, 6);
2652 histC1->GetZaxis()->SetNdivisions(6);
2656 histC1->GetZaxis()->SetRangeUser(0.10, 0.20);
2658 else if (
variable ==
"abs(resMean)")
2660 histC1->GetZaxis()->SetRangeUser(0.0, 0.05);
2664 histC1->GetZaxis()->SetRangeUser(2, 14);
2666 else if (
variable ==
"abs(t0-oldt0)")
2668 histC1->GetZaxis()->SetRangeUser(0.0, 0.6);
2672 histC1->GetZaxis()->SetRangeUser(2.0, 4.5);
2675 TLine *lin1 =
new TLine(84, lowe, 84, upe);
2676 lin1->SetLineStyle(2);
2678 TLine *lin2 =
new TLine(108, lowe, 108, upe);
2679 lin2->SetLineStyle(2);
2681 TLine *lin3 =
new TLine(132, lowe, 132, upe);
2682 lin3->SetLineStyle(2);
2684 TLine *lin4 =
new TLine(156, lowe, 156, upe);
2685 lin4->SetLineStyle(2);
2687 TLine *lin5 =
new TLine(180, lowe, 180, upe);
2688 lin5->SetLineStyle(2);
2690 TLine *lin6 =
new TLine(204, lowe, 204, upe);
2691 lin6->SetLineStyle(2);
2693 TLine *lin7 =
new TLine(228, lowe, 228, upe);
2694 lin7->SetLineStyle(2);
2696 TLine *lin8 =
new TLine(240, lowe, 239, upe);
2697 lin8->SetLineStyle(2);