2405 char selectionA[500];
2406 sprintf(selectionA,
"%s*(det==2)",
variable.c_str());
2407 char selectionC[500];
2408 sprintf(selectionC,
"%s*(det==-2)",
variable.c_str());
2414 TNtuple *Chiptuple =
nullptr;
2415 TNtuple *Moduletuple =
nullptr;
2419 Chiptuple = (TNtuple *)
file->Get(
"Chiptuple");
2420 Moduletuple = (TNtuple *)
file->Get(
"Moduletuple");
2424 Chiptuple = (TNtuple *)
file->Get(
"Chip_Artuple");
2425 Moduletuple = (TNtuple *)
file->Get(
"Module_Artuple");
2428 this->SetName(
"c1");
2430 this->Divide(2, 2, 0.01, 0.01);
2431 ((TPad *)this->GetPrimitive(
"c1_1"))->SetFrameFillColor(1);
2432 ((TPad *)this->GetPrimitive(
"c1_2"))->SetFrameFillColor(1);
2433 ((TPad *)this->GetPrimitive(
"c1_3"))->SetFrameFillColor(1);
2434 ((TPad *)this->GetPrimitive(
"c1_4"))->SetFrameFillColor(1);
2436 gStyle->SetPalette(1);
2440 Moduletuple->Draw(
"mod:lay>>reshist10(14,0,14,32,0,32)", selectionA,
"colz");
2441 TH2F *reshist10 = (
TH2F *)gPad->GetPrimitive(
"reshist10");
2443 if (reshist10->GetEntries() > 1)
2447 sprintf(title1,
"Phi Sector VS Wheel %s (EC side A)",
variable.c_str());
2449 sprintf(title1,
"Argon Phi Sector VS Wheel %s (EC side A)",
variable.c_str());
2450 reshist10->SetTitle(title1);
2451 reshist10->SetStats(0);
2452 reshist10->GetXaxis()->SetLabelOffset(1000);
2453 reshist10->GetYaxis()->SetLabelOffset(1000);
2454 reshist10->GetXaxis()->SetTitle(
"Wheel (Z)");
2455 reshist10->GetYaxis()->SetTitle(
"Phi sector");
2458 reshist10->GetZaxis()->SetRangeUser(1, 6);
2459 reshist10->GetZaxis()->SetNdivisions(6);
2463 reshist10->GetZaxis()->SetRangeUser(0.10, 0.20);
2465 else if (
variable ==
"abs(resMean)")
2467 reshist10->GetZaxis()->SetRangeUser(0.0, 0.05);
2471 reshist10->GetZaxis()->SetRangeUser(2, 14);
2473 else if (
variable ==
"abs(t0-oldt0)")
2475 reshist10->GetZaxis()->SetRangeUser(0.0, 0.6);
2479 reshist10->GetZaxis()->SetRangeUser(2.0, 4.5);
2484 Chiptuple->Draw(
"mod:chp>>histC(248,84,332,32,0,32)", selectionA,
"colz");
2485 TH2F *histC = (
TH2F *)gPad->GetPrimitive(
"histC");
2487 sprintf(title3,
"Chip %s (EC side A)",
variable.c_str());
2489 sprintf(title3,
"Argon Chip %s (EC side A)",
variable.c_str());
2490 histC->SetTitle(title3);
2492 if (histC->GetEntries() > 1)
2496 histC->GetXaxis()->SetLabelOffset(1000);
2497 histC->GetYaxis()->SetLabelOffset(1000);
2498 histC->GetXaxis()->SetTitle(
"Chip number");
2499 histC->GetYaxis()->SetTitle(
"Phi sector");
2502 histC->GetZaxis()->SetRangeUser(1, 6);
2503 histC->GetZaxis()->SetNdivisions(6);
2507 histC->GetZaxis()->SetRangeUser(0.10, 0.20);
2509 else if (
variable ==
"abs(resMean)")
2511 histC->GetZaxis()->SetRangeUser(0.0, 0.05);
2515 histC->GetZaxis()->SetRangeUser(2, 14);
2517 else if (
variable ==
"abs(t0-oldt0)")
2519 histC->GetZaxis()->SetRangeUser(0.0, 0.6);
2523 histC->GetZaxis()->SetRangeUser(2.0, 4.5);
2529 TLine *lin11 =
new TLine(84, lowe, 84, upe);
2530 lin11->SetLineStyle(2);
2532 TLine *lin12 =
new TLine(107, lowe, 107, upe);
2533 lin12->SetLineStyle(2);
2535 TLine *lin13 =
new TLine(131, lowe, 131, upe);
2536 lin13->SetLineStyle(2);
2538 TLine *lin14 =
new TLine(155, lowe, 155, upe);
2539 lin14->SetLineStyle(2);
2541 TLine *lin15 =
new TLine(179, lowe, 179, upe);
2542 lin15->SetLineStyle(2);
2544 TLine *lin16 =
new TLine(203, lowe, 203, upe);
2545 lin16->SetLineStyle(2);
2547 TLine *lin17 =
new TLine(227, lowe, 227, upe);
2548 lin17->SetLineStyle(2);
2550 TLine *lin18 =
new TLine(239, lowe, 239, upe);
2551 lin18->SetLineStyle(2);
2556 Moduletuple->Draw(
"mod:lay>>reshist11(14,0,14,32,0,32)", selectionC,
"colz");
2557 TH2F *reshist11 = (
TH2F *)gPad->GetPrimitive(
"reshist11");
2559 if (reshist11->GetEntries() > 1)
2563 sprintf(title4,
"Phi Sector VS Wheel %s (EC side C)",
variable.c_str());
2565 sprintf(title4,
"Argon Phi Sector VS Wheel %s (EC side C)",
variable.c_str());
2566 reshist11->SetTitle(title4);
2567 reshist11->SetMarkerStyle(21);
2568 reshist11->SetStats(0);
2569 reshist11->GetXaxis()->SetLabelOffset(1000);
2570 reshist11->GetYaxis()->SetLabelOffset(1000);
2571 reshist11->GetXaxis()->SetTitle(
"Layer (Z)");
2572 reshist11->GetYaxis()->SetTitle(
"Phi sector");
2575 reshist11->GetZaxis()->SetRangeUser(1, 6);
2576 reshist11->GetZaxis()->SetNdivisions(6);
2578 TLegend *
leg =
new TLegend(0.99, 0.35, 0.55, 0.01,
"T0 fit type");
2580 TH2F *
h1 =
new TH2F(
"h1",
"h1 title", 40, 0, 4, 30, -3, 3);
2581 h1->SetMarkerColor(54);
2582 h1->SetMarkerStyle(21);
2584 TH2F *h2 =
new TH2F(
"h2",
"h2 title", 40, 0, 4, 30, -3, 3);
2585 h2->SetMarkerColor(4);
2586 h2->SetMarkerStyle(21);
2588 TH2F *h3 =
new TH2F(
"h3",
"h3 title", 40, 0, 4, 30, -3, 3);
2589 h3->SetMarkerColor(7);
2590 h3->SetMarkerStyle(21);
2592 TH2F *h4 =
new TH2F(
"h4",
"h4 title", 40, 0, 4, 30, -3, 3);
2593 h4->SetMarkerColor(81);
2594 h4->SetMarkerStyle(21);
2596 TH2F *h5 =
new TH2F(
"h5",
"h5 title", 40, 0, 4, 30, -3, 3);
2597 h5->SetMarkerColor(kYellow);
2598 h5->SetMarkerStyle(21);
2600 TH2F *h6 =
new TH2F(
"h6",
"h6 title", 40, 0, 4, 30, -3, 3);
2601 h6->SetMarkerColor(kRed);
2602 h6->SetMarkerStyle(21);
2604 leg->AddEntry(
h1,
"1: |mean|>5",
"P");
2605 leg->AddEntry(h2,
"2: normal fit",
"P");
2606 leg->AddEntry(h3,
"3: used chip ref",
"P");
2607 leg->AddEntry(h4,
"4: Low stat",
"P");
2608 leg->AddEntry(h5,
"5: No T0 Cal",
"P");
2609 leg->AddEntry(h6,
"6: Wrong fit. Mean used",
"P");
2610 leg->SetTextSize(0.04);
2615 reshist11->GetZaxis()->SetRangeUser(0.1, 0.20);
2617 else if (
variable ==
"abs(resMean)")
2619 reshist11->GetZaxis()->SetRangeUser(0.0, 0.05);
2623 reshist11->GetZaxis()->SetRangeUser(2, 14);
2625 else if (
variable ==
"abs(t0-oldt0)")
2627 reshist11->GetZaxis()->SetRangeUser(0.0, 0.6);
2631 reshist11->GetZaxis()->SetRangeUser(2.0, 4.5);
2635 Chiptuple->Draw(
"mod:chp>>histC1(248,84,332,32,0,32)", selectionC,
"colz");
2636 TH2F *histC1 = (
TH2F *)gPad->GetPrimitive(
"histC1");
2638 sprintf(title5,
"Chip %s (EC side C)",
variable.c_str());
2640 sprintf(title5,
"Argon Chip %s (EC side C)",
variable.c_str());
2641 histC1->SetTitle(title5);
2643 if (histC1->GetEntries() > 1)
2646 histC1->SetStats(0);
2647 histC1->GetXaxis()->SetLabelOffset(1000);
2648 histC1->GetYaxis()->SetLabelOffset(1000);
2649 histC1->GetXaxis()->SetTitle(
"Chip number");
2650 histC1->GetYaxis()->SetTitle(
"Phi sector");
2653 histC1->GetZaxis()->SetRangeUser(1, 6);
2654 histC1->GetZaxis()->SetNdivisions(6);
2658 histC1->GetZaxis()->SetRangeUser(0.10, 0.20);
2660 else if (
variable ==
"abs(resMean)")
2662 histC1->GetZaxis()->SetRangeUser(0.0, 0.05);
2666 histC1->GetZaxis()->SetRangeUser(2, 14);
2668 else if (
variable ==
"abs(t0-oldt0)")
2670 histC1->GetZaxis()->SetRangeUser(0.0, 0.6);
2674 histC1->GetZaxis()->SetRangeUser(2.0, 4.5);
2677 TLine *lin1 =
new TLine(84, lowe, 84, upe);
2678 lin1->SetLineStyle(2);
2680 TLine *lin2 =
new TLine(108, lowe, 108, upe);
2681 lin2->SetLineStyle(2);
2683 TLine *lin3 =
new TLine(132, lowe, 132, upe);
2684 lin3->SetLineStyle(2);
2686 TLine *lin4 =
new TLine(156, lowe, 156, upe);
2687 lin4->SetLineStyle(2);
2689 TLine *lin5 =
new TLine(180, lowe, 180, upe);
2690 lin5->SetLineStyle(2);
2692 TLine *lin6 =
new TLine(204, lowe, 204, upe);
2693 lin6->SetLineStyle(2);
2695 TLine *lin7 =
new TLine(228, lowe, 228, upe);
2696 lin7->SetLineStyle(2);
2698 TLine *lin8 =
new TLine(240, lowe, 239, upe);
2699 lin8->SetLineStyle(2);