Definition at line 559 of file TRTCalib_makeplots.cxx.
◆ T0CalTypeXY()
T0CalTypeXY::T0CalTypeXY |
( |
TNtuple * |
Levtuple, |
|
|
int |
detector, |
|
|
float |
markersize |
|
) |
| |
Definition at line 568 of file TRTCalib_makeplots.cxx.
571 float x{},
y{}, nt0{}, chp{}, brd{}, lay{},
mod{},
det{};
572 int color[7] = {0, 46, 38, 8, 16, 1, 2};
574 Levtuple->SetBranchAddress(
"x", &
x);
575 Levtuple->SetBranchAddress(
"y", &
y);
576 Levtuple->SetBranchAddress(
"nt0", &nt0);
577 Levtuple->SetBranchAddress(
"chp", &chp);
578 Levtuple->SetBranchAddress(
"brd", &brd);
579 Levtuple->SetBranchAddress(
"lay", &lay);
580 Levtuple->SetBranchAddress(
"mod", &
mod);
581 Levtuple->SetBranchAddress(
"det", &
det);
583 Levtuple->Draw(
">>tmplist0", Form(
"nt0*(det==%i)",
detector));
584 Levtuple->Draw(
">>tmplist1", Form(
"nt0*(ftype==1 && det==%i)",
detector));
585 Levtuple->Draw(
">>tmplist2", Form(
"nt0*(ftype==2 && det==%i)",
detector));
586 Levtuple->Draw(
">>tmplist3", Form(
"nt0*(ftype==3 && det==%i)",
detector));
587 Levtuple->Draw(
">>tmplist4", Form(
"nt0*(ftype==4 && det==%i)",
detector));
588 Levtuple->Draw(
">>tmplist5", Form(
"nt0*(ftype==5 && det==%i)",
detector));
589 Levtuple->Draw(
">>tmplist6", Form(
"nt0*(ftype==6 && det==%i)",
detector));
598 for (
int igr = 0; igr <= 6; igr++)
600 graph[igr] =
new TGraph();
601 graph[igr]->SetMarkerStyle(20);
608 Levtuple->GetEntry(
elist[igr]->GetEntry(
ib));
610 graph[igr]->SetPoint(ipnt,
x,
y);
612 graph[igr]->RemovePoint(0);
614 graph[0]->SetMarkerSize(0.1);
◆ Draw()
void T0CalTypeXY::Draw |
( |
const string & |
title, |
|
|
bool |
plotleg |
|
) |
| |
Definition at line 617 of file TRTCalib_makeplots.cxx.
619 graph[0]->GetHistogram()->GetXaxis()->SetLabelOffset(1000);
620 graph[0]->GetHistogram()->GetYaxis()->SetLabelOffset(1000);
621 if (
graph[0]->GetN() > 0)
622 graph[0]->Draw(
"ap");
623 if (
graph[1]->GetN() > 0)
625 if (
graph[2]->GetN() > 0)
627 if (
graph[3]->GetN() > 0)
629 if (
graph[4]->GetN() > 0)
631 if (
graph[5]->GetN() > 0)
633 if (
graph[6]->GetN() > 0)
635 cout <<
"In Draw title: " <<
title << endl;
636 cout <<
" Events in graph[0]: " <<
graph[0]->GetN() << endl;
637 cout <<
" Events in graph[1]: " <<
graph[1]->GetN() << endl;
638 cout <<
" Events in graph[2]: " <<
graph[2]->GetN() << endl;
639 cout <<
" Events in graph[3]: " <<
graph[3]->GetN() << endl;
640 cout <<
" Events in graph[4]: " <<
graph[4]->GetN() << endl;
646 TLegend *
leg =
new TLegend(0.99, 0.35, 0.55, 0.01);
647 leg->AddEntry(
graph[2],
"normal fit");
648 leg->AddEntry(
graph[3],
"used chip ref");
649 leg->AddEntry(
graph[4],
"Low stat,T0");
650 leg->AddEntry(
graph[1],
"|mean|>5");
651 leg->AddEntry(
graph[5],
"No T0 Cal");
652 leg->AddEntry(
graph[6],
"Wrong fit, RMS and Mean used");
653 leg->SetTextSize(0.04);
◆ elist
TEventList* T0CalTypeXY::elist[7] {} |
◆ graph
TGraph* T0CalTypeXY::graph[7] {} |
The documentation for this class was generated from the following file: