EIC Software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
scan-viewer.C
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file scan-viewer.C
1 
2 void scan_viewer(const char *fname)
3 {
4  TFile *ff = new TFile(fname);
5  auto RL = (TH2D*)ff->Get("RL");
6  auto ZL = (TH2D*)ff->Get("ZL");
7  auto Bdl = (TH2D*)ff->Get("Bdl");
8 
9  gROOT->Reset();
10 
11  gStyle->SetOptStat(0);
12  gStyle->SetLabelFont( 52, "xy");
13  gStyle->SetLabelSize(0.04, "xy");
14 
15  double hmargin = 0.12, vmargin = 0.12;
16  gStyle->SetPadBottomMargin(vmargin);
17  gStyle->SetPadTopMargin (vmargin);
18  gStyle->SetPadRightMargin (hmargin);
19  gStyle->SetPadLeftMargin (hmargin);
20 
21  auto c1 = new TCanvas("ETM", "ETM", 0, 0, 1500, 500);
22  c1->Divide(3, 1);
23  c1->UseCurrentStyle();
24  c1->SetBorderMode(0);
25  c1->SetFrameBorderMode(0);
26  c1->SetFrameLineColor(kWhite);
27  c1->SetFillColor(kWhite);
28 
29  double eta = 4.0, theta = 2*atan(exp(-eta))*1000;
30 
31  // NB: this does not work as a stack variable;
32  auto ellipse = new TEllipse(0.0, 0.0, theta, theta);
33  ellipse->SetLineColor(kWhite);//Green);
34  ellipse->SetLineWidth(3);
35  ellipse->SetLineStyle(9);
36  ellipse->SetFillStyle(0);
37  {
38  gStyle->SetPalette(105);
39  c1->cd(1);
40  Double_t max = RL->GetYaxis()->GetXmax();
41  gPad->DrawFrame(-max, -max, max, max, "Material budget in the acceptance, [%]");
42  RL->SetMinimum( 1.0);
43  RL->SetMaximum(100.0);
44  RL->Draw("same colz pol");
45  gPad->SetLogz();
46  ellipse->Draw();
47  }
48  {
49  c1->cd(2);
50  Double_t max = ZL->GetYaxis()->GetXmax();
51  gPad->DrawFrame(-max, -max, max, max, "Maximum lever arm for a silicon tracker, [cm]");
52  TColor::InvertPalette();
53  ZL->SetMinimum( -0.01);
54  ZL->SetMaximum(200.0);
55  ZL->Draw("same colz pol");
56  ellipse->Draw();
57  }
58  {
59  c1->cd(3);
60  Double_t max = Bdl->GetYaxis()->GetXmax();
61  gPad->DrawFrame(-max, -max, max, max, "Effective |Bt|*dl integral for a silicon tracker, [T*m]");
62  Bdl->SetMinimum( -0.01);
63  Bdl->SetMaximum( 0.50);
64  Bdl->Draw("same colz pol");
65  ellipse->Draw();
66  }
67 } // scan_viewer()