#include "DrawModule.C" //------------------ // DrawModule_2006BeamTest //------------------ void DrawModule_2006BeamTest(void) { TColor::CreateColorWheel(); TCanvas *c1 = new TCanvas("c1", "", 600, 900); c1->Range( -10.0, 58.0, 10.0, 88.0); // Draw all cells int colors[] = {kRed, kBlue, kGreen, kYellow, kCyan, kMagenta, kSpring, kAzure}; int Ncolors = 8; for(int isector=1; isector<=3; isector++){ int cidx = ((isector-1)%2)*2; int start_sector, end_sector; switch(isector){ case 1: start_sector = 1; end_sector = 1; break; case 2: start_sector = 2; end_sector = 3; break; case 3: start_sector = 4; end_sector = 4; break; } DrawCell(1, 2, start_sector, end_sector, colors[cidx+0], true); DrawCell(3, 4, start_sector, end_sector, colors[cidx+1], true); DrawCell(5, 6, start_sector, end_sector, colors[cidx+0], true); if(start_sector==end_sector){ DrawCell(7, 8, start_sector, end_sector, colors[cidx+1], true); DrawCell(9, 10, start_sector, end_sector, colors[cidx+0], true); }else{ DrawCell(7, 7, start_sector, end_sector, colors[cidx+1], true); DrawCell(8, 8, start_sector, end_sector, colors[cidx+0], true); DrawCell(9, 9, start_sector, end_sector, colors[cidx+1], true); DrawCell(10, 10, start_sector, end_sector, colors[cidx+0], true); } } // Draw SiPM outline for all cells for(int ilayer=1; ilayer<=10; ilayer++){ for(int isector=1; isector<=4; isector++){ DrawCell(ilayer, ilayer, isector, isector); } } // Draw outline around summed cells for(int isector=1; isector<=4; isector++){ int cidx = ((isector-1)%2)*2; int start_sector, end_sector; switch(isector){ case 1: start_sector = 1; end_sector = 1; break; case 2: start_sector = 2; end_sector = 3; break; case 3: start_sector = 4; end_sector = 4; break; } DrawCell(1, 2, start_sector, end_sector, kBlack); DrawCell(3, 4, start_sector, end_sector, kBlack); DrawCell(5, 6, start_sector, end_sector, kBlack); if(start_sector==end_sector){ DrawCell(7, 8, start_sector, end_sector, kBlack); DrawCell(9, 10, start_sector, end_sector, kBlack); }else{ DrawCell(7, 7, start_sector, end_sector, kBlack); DrawCell(8, 8, start_sector, end_sector, kBlack); DrawCell(9, 9, start_sector, end_sector, kBlack); DrawCell(10, 10, start_sector, end_sector, kBlack); } } // Overlay 2006 beam test layout double height = 23.5; double width = 12.0; double xmin = -width/2.0; double xmax = +width/2.0; double dx = width/3.0; double ymin = 64.3; double ymax = ymin + height; double dy = height/6.0; for(double y = ymin; y<=ymax+1.0E-3; y+=dy){ TLine *lin = new TLine(xmin, y, xmax, y); lin->SetLineStyle(2); lin->SetLineWidth(3); lin->SetLineColor(kBlack); lin->Draw(); } for(double x = xmin; x<=xmax+1.0E-3; x+=dx){ TLine *lin = new TLine(x, ymin, x, ymax); lin->SetLineStyle(2); lin->SetLineWidth(3); lin->SetLineColor(kBlack); lin->Draw(); } // Draw Label TLatex *lab = new TLatex(0.0, 62.5, "Segmentation to match 2006 Beam Test"); lab->SetTextAlign(22); lab->SetTextSize(0.05); lab->Draw(); c1->SaveAs("2006BeamTest.pdf"); c1->SaveAs("2006BeamTest.png"); }