6 gSystem->Load(
"StEpdUtil");
11 TCanvas* cBoth =
new TCanvas(
"BothCan",
"BothCan",1400,700);
14 TPad* EastPad=cBoth->cd(1);
15 TPad* WestPad=cBoth->cd(2);
18 TH2D* hEastFrame =
new TH2D(
"East",
"East",500,-100,100,500,-100,100);
20 EastPad->SetGrid(0,0);
27 for (Short_t PP=1; PP<=12; PP++){
28 for (Short_t
TT=1;
TT<=31;
TT++){
30 geo->GetCorners(PP,
TT,EW,&nCorners,x,y);
32 x[nCorners]=x[0]; y[nCorners]=y[0];
33 TPolyLine* pline =
new TPolyLine(nCorners+1,x,y);
36 Double_t xcent = geo->TileCenter(PP,
TT,EW).X();
37 Double_t ycent = geo->TileCenter(PP,
TT,EW).Y();
38 TText* lab =
new TText(xcent,ycent,Form(
"%d.%d",PP,
TT));
39 lab->SetTextAlign(22); lab->SetTextSize(0.01); lab->SetTextColor(1);
45 for (
short tileId=-18; tileId<0; tileId++){
48 TText* txt =
new TText(cent.X(),cent.Y(),Form(
"%d",tileId));
49 txt->SetTextSize(.02);
50 txt->SetTextAlign(22);
56 xc[6]=xc[0]; yc[6]=yc[0];
57 TPolyLine* pline =
new TPolyLine(7,xc,yc);
58 pline->SetLineColor(4);
59 pline->SetLineWidth(2);
63 unsigned short pmtNumber = Bgeo->
PmtOfTile(abs(tileId));
64 TText* Ptxt =
new TText(cent.X(),cent.Y()-5.0,Form(
"%d",pmtNumber));
65 Ptxt->SetTextSize(0.01);
66 Ptxt->SetTextColor(2);
74 TH2D* hWestFrame =
new TH2D(
"West",
"West",500,-100,100,500,-100,100);
76 WestPad->SetGrid(0,0);
83 for (Short_t PP=1; PP<=12; PP++){
84 for (Short_t
TT=1;
TT<=31;
TT++){
86 geo->GetCorners(PP,
TT,EW,&nCorners,x,y);
88 x[nCorners]=x[0]; y[nCorners]=y[0];
89 TPolyLine* pline =
new TPolyLine(nCorners+1,x,y);
92 Double_t xcent = geo->TileCenter(PP,
TT,EW).X();
93 Double_t ycent = geo->TileCenter(PP,
TT,EW).Y();
94 TText* lab =
new TText(xcent,ycent,Form(
"%d.%d",PP,
TT));
95 lab->SetTextAlign(22); lab->SetTextSize(0.01); lab->SetTextColor(1);
101 for (
short tileId=1; tileId<19; tileId++){
104 TText* txt =
new TText(cent.X(),cent.Y(),Form(
"%d",tileId));
105 txt->SetTextSize(.02);
106 txt->SetTextAlign(22);
112 xc[6]=xc[0]; yc[6]=yc[0];
113 TPolyLine* pline =
new TPolyLine(7,xc,yc);
114 pline->SetLineColor(4);
115 pline->SetLineWidth(2);
119 unsigned short pmtNumber = Bgeo->
PmtOfTile(abs(tileId));
120 TText* Ptxt =
new TText(cent.X(),cent.Y()-5.0,Form(
"%d",pmtNumber));
121 Ptxt->SetTextSize(0.01);
122 Ptxt->SetTextColor(2);
128 cBoth->SaveAs(
"Both.pdf");
unsigned short PmtOfTile(unsigned short tileNumber)
TVector3 TileCenter(short tileId)
void GetCorners(short tileId, double *x, double *y)