//----------------------------------------------------------------- // Reference detector concept // //----------------------------------------------------------------- void Draw_Detector() { char string[132]; Double_t xmin = -120; Double_t xmax=120; Double_t ymin= -60; Double_t ymax=140; Double_t fudge=0.95; Double_t scale = fudge*(xmax-xmin)/(ymax-ymin); printf ("Scale factor =%d\n",scale); Double_t dc=91; Double_t dspace=2.5; Double_t fe_density = 7.8; // take Fe as cr shield Double_t Pb_density = 11.35; // cr passive Pb shield Double_t dirt_density = 2; // take dirt for overburden Double_t concrete_density = 4; // concrete bunker Double_t CsI_density = 4.5; // concrete bunker Double_t Ldetec = 15*15; // 15 blocks deep Double_t ydetec = 45./2; Double_t yblock = ydetec*2./3; // assume three blocks heigh Double_t xblock = 30.; // 30 cm long Double_t Llg = 15. ; // length of light guide Double_t Lpmt = 15 + 10;// length of pmt + base Double_t ypmt = 7.6/2; // diameter of 3" pmt Double_t ypb = ydetec + dspace; Double_t xpb = xblock + Llg + Lpmt + dspace; Double_t tpb = 5. ; // thickness of Pb Double_t Lpb = Ldetec + 2*dspace; Double_t yveto = ypb + tpb; Double_t xveto = xpb + tpb; Double_t tveto = 5. ; // thickness of veto scintillator Double_t Lveto = Lpb + 2*tpb; TCanvas *c1 = new TCanvas("c1","Draw_Detector",200,10,500*scale,500); TH2D *boundaries = new TH2D("boundaries", "Reference Detector / Babar crystals",xmax-xmin, xmin, xmax, ymax-ymin, ymin, ymax); boundaries->SetStats(0); boundaries->SetXTitle("X (cm)"); boundaries->SetYTitle("Y (cm)"); boundaries->Draw(); sprintf (string,"Calorimeter size: %.1f x %.1f x %.1f cm^{3}\n",2*xblock,2*ydetec,Ldetec); printf("string=%s",string); t1 = new TLatex(0.12,0.85,string); t1->SetNDC(); t1->SetTextSize(0.03); t1->Draw(); sprintf (string,"Calorimeter density = %.1f g/cm^{3}\n",CsI_density); printf("string=%s",string); t1 = new TLatex(0.12,0.81,string); t1->SetNDC(); t1->SetTextSize(0.03); t1->Draw(); Double_t CsI_weight = 2*xblock*2*ydetec*Ldetec*CsI_density/1e6; // metric t sprintf (string,"Calorimeter weight = %.2f metric t\n",CsI_weight); printf("string=%s",string); t1 = new TLatex(0.12,0.77,string); t1->SetNDC(); t1->SetTextSize(0.03); t1->Draw(); sprintf (string,"Active veto thickness=%.1f cm\n",tveto); printf("string=%s",string); t1 = new TLatex(0.12,0.73,string); t1->SetNDC(); t1->SetTextSize(0.03); t1->Draw(); sprintf (string,"Passive veto thickness=%.1f cm Pb\n",tveto); printf("string=%s",string); t1 = new TLatex(0.12,0.69,string); t1->SetNDC(); t1->SetTextSize(0.03); t1->Draw(); Double_t Pb_weight = (2*(xpb+tpb)*2*(ypb+tpb)*(Lpb+2*tpb) - 2*xpb*2*ypb*Lpb) * Pb_density/1e6; // weight in metric tons sprintf (string,"Passive veto weight = %.1f metric t\n",Pb_weight); printf("string=%s",string); t1 = new TLatex(0.12,0.65,string); t1->SetNDC(); t1->SetTextSize(0.03); t1->Draw(); sprintf (string,"Detector size: %.1f x %.1f x %.1f cm^{3}\n",2*(xveto+tveto),2*(yveto+tveto),(Lveto+2*tveto)); printf("string=%s",string); t1 = new TLatex(0.12,0.61,string); t1->SetNDC(); t1->SetTextSize(0.03); t1->Draw(); /*TLine *beamline = new TLine (zmin,0,zmax,0); beamline->SetLineStyle(4); beamline->Draw(); sprintf (string,"beam line\n"); printf("string=%s",string); t1 = new TLatex(-500,30,string); t1->SetTextSize(0.03); t1->Draw();*/ // Lead in active veto const int Npoints=9; float xc[]={0,0,xpb+tpb,xpb+tpb,0,0,xpb,xpb,0}; float yc[]={-ypb,-ypb-tpb,-ypb-tpb,ypb+tpb,ypb+tpb,ypb,ypb,-ypb,-ypb}; TPolyLine *crpb1 = new TPolyLine(Npoints, xc, yc); crpb1->SetLineWidth(2.0); crpb1->SetLineColor(kBlack); crpb1->Draw("l"); crpb1->SetFillStyle(3002); crpb1->SetFillColor(kBlack); crpb1->Draw("f"); for (int j=0; j < Npoints; j++) { xc[j] = -xc[j]; } TPolyLine *crpb2 = new TPolyLine(Npoints, xc, yc); crpb2->SetLineWidth(2.0); crpb2->SetLineColor(kBlack); crpb2->Draw("l"); crpb2->SetFillStyle(3002); crpb2->SetFillColor(kBlack); crpb2->Draw("f"); // Scintillator in active veto const int Npoints=9; float xc[]={0,0,xveto+tveto,xveto+tveto,0,0,xveto,xveto,0}; float yc[]={-yveto,-yveto-tveto,-yveto-tveto,yveto+tveto,yveto+tveto,yveto,yveto,-yveto,-yveto}; TPolyLine *crveto1 = new TPolyLine(Npoints, xc, yc); crveto1->SetLineWidth(2.0); crveto1->SetLineColor(kBlack); crveto1->Draw("l"); crveto1->SetFillColor(390); crveto1->Draw("f"); for (int j=0; j < Npoints; j++) { xc[j] = -xc[j]; } TPolyLine *crveto2 = new TPolyLine(Npoints, xc, yc); crveto2->SetLineWidth(2.0); crveto2->SetLineColor(kBlack); crveto2->Draw("l"); crveto2->SetFillColor(390); crveto2->Draw("f"); // Detector crystals for (int jj=0; jj<3; jj++) { Double_t yoffset=-yblock + jj*yblock; const int Npoints=5; float xc[]={-xblock,xblock,xblock,-xblock,-xblock}; float yc[]={-yblock/2+yoffset,-yblock/2+yoffset,yblock/2+yoffset,yblock/2+yoffset,-yblock/2+yoffset}; TPolyLine *block = new TPolyLine(Npoints, xc, yc); block->SetLineWidth(2.0); block->SetLineColor(kBlack); block->Draw("l"); block->SetFillColor(391); block->Draw("f"); // Light guides + pmt const int Npoints=5; float xc[]={-xblock,-xblock,-xblock-Llg,-xblock-Llg,-xblock}; float yc[]={-yblock/2+yoffset,yblock/2+yoffset,ypmt+yoffset,-ypmt+yoffset,-yblock/2+yoffset}; TPolyLine *guide = new TPolyLine(Npoints, xc, yc); guide->SetLineWidth(1.0); guide->SetLineColor(kBlack); guide->Draw("l"); /*guide->SetFillColor(390); guide->Draw("f");*/ for (int j=0; jSetLineWidth(1.0); guide->SetLineColor(kBlack); guide->Draw("l"); /*guide->SetFillColor(390); guide->Draw("f");*/ const int Npoints=5; float xc[]={-xblock-Llg,-xblock-Llg,-xblock-Llg-Lpmt,-xblock-Llg-Lpmt,-xblock-Llg}; float yc[]={-ypmt+yoffset,ypmt+yoffset,ypmt+yoffset,-ypmt+yoffset,-ypmt+yoffset}; TPolyLine *pmt = new TPolyLine(Npoints, xc, yc); pmt->SetLineWidth(1.0); pmt->SetLineColor(kBlack); pmt->Draw("l"); /*pmt->SetFillColor(390); pmt->Draw("f");*/ for (int j=0; jSetLineWidth(1.0); pmt->SetLineColor(kBlack); pmt->Draw("l"); /*pmt->SetFillColor(390); pmt->Draw("f");*/ } // beam marker TMarker *MarkBeam = new TMarker(0,0,4); MarkBeam->SetMarkerColor(1); MarkBeam->SetMarkerSize(1); MarkBeam->Draw(); TMarker *MarkBeam = new TMarker(0,0,5); MarkBeam->SetMarkerColor(1); MarkBeam->SetMarkerSize(1); MarkBeam->Draw(); sprintf (string,"Draw_Detector.pdf"); c1->SaveAs(string); sprintf (string,"Draw_Detector.png"); c1->SaveAs(string); }