3 void draw_survey(
int opt=0)
5 TFile * infile =
new TFile(
"geotr.root",
"READ");
6 TTree * tr = (TTree*) infile->Get(
"geotr");
8 tr->SetBranchAddress(
"nstb",&nstb);
9 tr->SetBranchAddress(
"row",&row);
10 tr->SetBranchAddress(
"col",&col);
12 const Double_t large_width = 58.0;
13 const Double_t small_width = 38.0;
15 Double_t x,y,z,x1,y1,x2,y2;
18 TLine * cell[4][1264];
20 for(Int_t i=0; i<tr->GetEntries(); i++)
26 x = -25.0 - 58.6 * col;
27 y = 965.5 - 58.5 * row;
29 color = (Int_t) kMagenta;
32 x = 66.6 + 58.4 * col;
33 y = 965.1 - 58.6 * row;
40 x = -17.7 - 38.2 * col;
41 y = 422.7 - 37.9 * row;
43 color = (Int_t) kBlue;
47 x = -17.7 - 38.2 * col;
48 y = 4.75 + 438.9 - 39.0 * row;
50 color = (Int_t) kCyan;
55 y = 444. - 38.7 * row;
57 color = (Int_t) kGreen+2;
63 x1 = x - large_width/2.0;
64 x2 = x + large_width/2.0;
65 y1 = y - large_width/2.0;
66 y2 = y + large_width/2.0;
70 x1 = x - small_width/2.0;
71 x2 = x + small_width/2.0;
72 y1 = y - small_width/2.0;
73 y2 = y + small_width/2.0;
81 cell[0][it] =
new TLine(x1,y1,x2,y1);
82 cell[1][it] =
new TLine(x1,y2,x2,y2);
83 cell[2][it] =
new TLine(x1,y1,x1,y2);
84 cell[3][it] =
new TLine(x2,y1,x2,y2);
85 for(Int_t j=0; j<4; j++) cell[j][it]->SetLineColor(color);
93 TH2D * bg =
new TH2D(
"survey",
"FMS cells survey [mm]",factor*md,-1*md,md,factor*md,-1*md,md);
94 TCanvas * survey =
new TCanvas(
"survey",
"survey",700,700);
95 gStyle->SetOptStat(0);
98 for(Int_t i=0; i<1264; i++)
for(Int_t j=0; j<4; j++) cell[j][i]->Draw();