481 gStyle->SetNumberContours(256);
482 gStyle->SetPalette(1);
483 gStyle->SetOptStat(
"");
484 gStyle->SetPadRightMargin(0.12);
487 P.X0 =
cenv.GetValue(
"quality.prof.X0", 100000);
488 P.Y0 =
cenv.GetValue(
"quality.prof.Y0", 100000);
489 P.width =
cenv.GetValue(
"quality.prof.width", 1000);
491 TTree *Views = (TTree *)gFile->Get(
"Views");
492 TH1D *hz4 =
get_h_var(Views,
"headers.eZ4",
"hz4", 1,
"eNframesBot>0");
493 float z4mean = hz4->GetMean();
494 float glassmin = z4mean - 100;
495 float glassmax = z4mean + 500;
497 cout <<
"Check scanned data surface and profiles" << endl;
499 TCut cTop =
"eNframesTop!=0";
500 TCut cBot =
"eNframesBot!=0";
501 TCut cutXline = Form(
"abs(eYview-%.1f)<%.1f",
P.Y0,
P.width);
502 TCut cutYline = Form(
"abs(eXview-%.1f)<%.1f",
P.X0,
P.width);
504 TCanvas *cc =
new TCanvas(
"check_snd", gFile->GetName(), 1920, 1080);
505 TPad *header =
new TPad(
"header",
"Header", 0.005, 0.94, 1, 1);
508 TPaveText *tp =
new TPaveText(0.01, 0.01, 0.99, 0.99,
"NDC");
509 tp->AddText(Form(
"%s of %s",
RES.filename.c_str(),
RES.file_creation_date.AsString()));
510 tp->AddText(Form(
"profiles at %.1f %.1f +- %.1f ",
P.X0,
P.Y0,
P.width));
514 TPad *pad =
new TPad(
"pad",
"", 0., 0., 1., 0.94);
517 pad->Divide(3, 2, 0.01, 0.01);
519 TLine *lineX1 =
new TLine(
B.xmin,
P.Y0 -
P.width,
B.xmax,
P.Y0 -
P.width);
520 lineX1->SetLineStyle(3);
521 TLine *lineX2 =
new TLine(
B.xmin,
P.Y0 +
P.width,
B.xmax,
P.Y0 +
P.width);
522 lineX2->SetLineStyle(3);
523 TLine *lineY1 =
new TLine(
P.X0 -
P.width,
B.ymin,
P.X0 -
P.width,
B.ymax);
524 lineY1->SetLineStyle(3);
525 TLine *lineY2 =
new TLine(
P.X0 +
P.width,
B.ymin,
P.X0 +
P.width,
B.ymax);
526 lineY2->SetLineStyle(3);
528 Views->Draw(Form(
"eNsegments:eYview:eXview>>hxy1(%d,%f,%f,%d,%f,%f)",
B.nx,
B.xmin,
B.xmax,
B.ny,
B.ymin,
B.ymax), cTop,
"prof colz");
534 Views->Draw(Form(
"eNsegments:eYview:eXview>>hxy2(%d,%f,%f,%d,%f,%f)",
B.nx,
B.xmin,
B.xmax,
B.ny,
B.ymin,
B.ymax), cBot,
"prof colz");
540 gStyle->SetOptStat(
"n");
541 pad->cd(2)->SetGrid();
542 Views->Draw(Form(
"eNcl:eZframe:eXview>>hpx(%d,%f,%f,%d,%f,%f)",
B.nx,
B.xmin,
B.xmax, 1200, glassmin, glassmax), cutXline,
"prof colz");
543 Views->SetMarkerColor(6);
544 Views->SetMarkerStyle(7);
545 Views->Draw(
"eZ1:eXview", cTop && cutXline,
"same");
546 Views->Draw(
"eZ2:eXview", cTop && cutXline,
"same");
547 Views->Draw(
"eZ3:eXview", cBot && cutXline,
"same");
548 Views->Draw(
"eZ4:eXview", cBot && cutXline,
"same");
549 Views->SetMarkerColor(kBlack);
550 pad->cd(3)->SetGrid();
551 Views->Draw(Form(
"eNcl:eZframe:eYview>>hpy(%d,%f,%f,%d,%f,%f)",
B.ny,
B.ymin,
B.ymax, 1200, glassmin, glassmax), cutYline,
"prof colz");
552 Views->SetMarkerColor(6);
553 Views->SetMarkerStyle(7);
554 Views->Draw(
"eZ1:eYview", cTop && cutYline,
"same");
555 Views->Draw(
"eZ2:eYview", cTop && cutYline,
"same");
556 Views->Draw(
"eZ3:eYview", cBot && cutYline,
"same");
557 Views->Draw(
"eZ4:eYview", cBot && cutYline,
"same");
562 TVirtualPad *px = pad->cd(5);
565 Views->Draw(Form(
"segments.eDz:eXview>>hdz51(%d,%f,%f,90,0,90)",
B.nx,
B.xmin,
B.xmax), cTop && cutXline,
"colz");
566 Views->Draw(Form(
"eZ1-eZ2:eXview>>hdz510(%d,%f,%f,90,0,90)",
B.nx,
B.xmin,
B.xmax), cTop && cutXline,
"same");
567 Views->Draw(
"eZ1-eZ2>>hdz511(90,0,90)", cTop && cutYline,
"goff");
568 TH2F *hdz51 = (TH2F *)gDirectory->Get(
"hdz51");
569 Z.dzx1 = hdz51->GetMean(2);
570 TH1F *hdz511 = (TH1F *)gDirectory->Get(
"hdz511");
571 Z.szx1 = hdz511->GetMean();
572 TText *t51 =
new TText(0.15, 0.2, Form(
"surf_dZ - seg_dZ = %.1f - %.1f = %.1f um",
Z.szx1,
Z.dzx1,
Z.szx1 -
Z.dzx1));
574 t51->SetTextSize(0.07);
578 Views->Draw(Form(
"segments.eDz:eXview>>hdz52(%d,%f,%f,90,0,90)",
B.nx,
B.xmin,
B.xmax), cBot && cutXline,
"colz");
579 Views->Draw(Form(
"eZ3-eZ4:eXview>>hdz520(%d,%f,%f,90,0,90)",
B.nx,
B.xmin,
B.xmax), cBot && cutXline,
"same");
580 Views->Draw(
"eZ1-eZ2>>hdz521(90,0,90)", cTop && cutYline,
"goff");
581 TH2F *hdz52 = (TH2F *)gDirectory->Get(
"hdz52");
582 Z.dzx2 = hdz52->GetMean(2);
583 TH1F *hdz521 = (TH1F *)gDirectory->Get(
"hdz521");
584 Z.szx2 = hdz521->GetMean();
585 TText *t52 =
new TText(0.15, 0.2, Form(
"surf_dZ - seg_dZ = %.1f - %.1f = %.1f um",
Z.szx2,
Z.dzx2,
Z.szx2 -
Z.dzx2));
587 t52->SetTextSize(0.07);
590 TVirtualPad *py = pad->cd(6);
593 Views->Draw(Form(
"segments.eDz:eYview>>hdz61(%d,%f,%f,90,0,90)",
B.ny,
B.ymin,
B.ymax), cTop && cutYline,
"colz");
594 Views->Draw(Form(
"eZ1-eZ2:eYview>>hdz610(%d,%f,%f,90,0,90)",
B.ny,
B.ymin,
B.ymax), cTop && cutYline,
"same");
595 Views->Draw(
"eZ1-eZ2>>hdz611(90,0,90)", cTop && cutYline,
"goff");
596 TH2F *hdz61 = (TH2F *)gDirectory->Get(
"hdz61");
597 Z.dzy1 = hdz61->GetMean(2);
598 TH1F *hdz611 = (TH1F *)gDirectory->Get(
"hdz611");
599 Z.szy1 = hdz611->GetMean();
600 TText *t61 =
new TText(0.15, 0.2, Form(
"surf_dZ - seg_dZ = %.1f - %.1f = %.1f um",
Z.szy1,
Z.dzy1,
Z.szy1 -
Z.dzy1));
602 t61->SetTextSize(0.07);
606 Views->Draw(Form(
"segments.eDz:eYview>>hdz62(%d,%f,%f,90,0,90)",
B.ny,
B.ymin,
B.ymax), cBot && cutYline,
"colz");
607 Views->Draw(Form(
"eZ3-eZ4:eYview>>hdz620(%d,%f,%f,90,0,90)",
B.ny,
B.ymin,
B.ymax), cBot && cutYline,
"same");
608 Views->Draw(
"eZ3-eZ4>>hdz621(90,0,90)", cBot && cutYline,
"goff");
609 TH2F *hdz62 = (TH2F *)gDirectory->Get(
"hdz62");
610 Z.dzy2 = hdz62->GetMean(2);
611 TH1F *hdz621 = (TH1F *)gDirectory->Get(
"hdz621");
612 Z.szy2 = hdz621->GetMean();
613 TText *t62 =
new TText(0.15, 0.2, Form(
"surf_dZ - seg_dZ = %.1f - %.1f = %.1f um",
Z.szy2,
Z.dzy2,
Z.szy2 -
Z.dzy2));
615 t62->SetTextSize(0.07);
620 TText *
t =
new TText();
621 t->SetTextSize(0.015);
622 t->DrawText(0.25, 0.0001, Form(
"%s/%s %s", gSystem->WorkingDirectory(),
RES.filename.c_str(), time.AsString()));
624 if (gROOT->IsBatch())
625 cc->SaveAs(Form(
"%s.prof.png", nameo));
void SetLargeLabelsStyle()
Definition: emthickness.cpp:463