//----------------------------------------------------------------- // Simplified version of elevation view of Concept 1 for BDX // y vs x // Script based on David's DrawGlueXBoundaries script // //----------------------------------------------------------------- void Draw_C1_elevation() { char string[132]; Double_t xmin = -2500; Double_t xmax = 1300; Double_t ymin= -500; Double_t ymax=1500; Double_t fudge=0.95; Double_t scale = fudge*(xmax-xmin)/(ymax-ymin); printf ("Scale factor =%d\n",scale); Double_t xgrade=762; // 25' grade above beamline Double_t dz=914; Double_t dz1=548; Double_t dz2=564; Double_t dr=213/2; Double_t dc=91; Double_t dmuon=1000; /// 10 m of Fe to range out muons from dump Double_t xmuon=136; // half width of Fe dump Double_t fe_density = 7.8; // take Fe as cr shield Double_t dirt_density = 1.7; // take dirt for overburden Double_t concrete_density = 2.7; // concrete bunker // set X=0 cm at center of bdx. (In this case "x" labels refer to horizontal axis); Double_t dwall=30; Double_t dspace=30; Double_t zdump=600; Double_t Ldump=150; Double_t xdump=30; Double_t Lmuon_fe = dmuon - dz1*concrete_density/fe_density; // Double_t Lmuon_weight = Lmuon_fe*(2*xmuon)*(2*xmuon)*fe_density/1e6; printf ("Assume: Muon dump = %.1f cm Fe, Need = %.1f cm additional\n",dmuon,Lmuon_fe); Double_t zmuon = dz + dz1; Double_t zbdx=zmuon + Lmuon_fe + dc; Double_t Lbdx=250; Double_t xbdx=165./2; // assume width is greater than height Double_t ybdx=70./2; // Double_t zbldg = zbdx - Lbdx/3 -dc-dwall; Double_t zbldg = zbdx - Lbdx/2 -dwall; Double_t Lbldg = 900; Double_t Dx1bldg = -xbdx - dc - dwall; Double_t Dx2bldg = 900 + Dx1bldg; Double_t DxLbldg = Dx2bldg - Dx1bldg; Double_t Dy1bldg = xgrade; Double_t Dy2bldg = xgrade + 427; Double_t Dx1bldgU = -xbdx - dc - dwall; Double_t Dx2bldgU = 900 + Dx1bldgU; Double_t DxLbldgU = Dx2bldgU - Dx1bldgU; Double_t Dy2bldgU = xgrade; Double_t Dy1bldgU = -ybdx - dc - dwall; Double_t zshaft = zbldg+dwall; Double_t Lshaft = 450; Double_t Dx2shaft = Dx2bldgU - dwall; Double_t Dx1shaft = Dx2bldgU - 300; Double_t DxLshaft = Dx2bldgU - Dx1bldgU; Double_t Dy2shaft = xgrade; Double_t Dy1shaft = Dy1bldgU + dwall; Double_t Dy3shaft = Dy1shaft + 305; Double_t zstairs= zbldg+ Lbldg - dwall; Double_t Lstairs= 380; Double_t Dx2stairs= Dx2bldg - dwall; Double_t Dx1stairs = Dx2bldg - dwall - 688; Double_t Dy2stairs= xgrade; Double_t Dy1stairs = Dy1bldgU; Double_t zstairs1 = zstairs - Lstairs; Double_t Lstairs1 = Lstairs/2 - dwall/2; Double_t Dx1stairs1 = Dx1stairs + 130; Double_t Dx2stairs1 = Dx1stairs1 + 417; Double_t Dy1stairs1 = Dy1bldgU; Double_t Dy2stairs1 = Dy2bldgU; Int_t nstairs = 12; Double_t Dstep = (Dx2stairs1 - Dx1stairs1)/nstairs; TCanvas *c1 = new TCanvas("c1","Draw_C1_elevation",200,10,500*scale,500); TH2D *boundaries = new TH2D("boundaries", "C1 elevation for BDX",xmax-xmin, xmin, xmax, ymax-ymin, ymin, ymax); boundaries->SetStats(0); boundaries->SetXTitle("X (cm)"); boundaries->SetYTitle("Y (cm)"); boundaries->Draw(); sprintf (string,"Dirt density = %.1f g/cm2\n",dirt_density); printf("string=%s",string); t1 = new TLatex(0.12,0.81,string); t1->SetNDC(); t1->SetTextSize(0.03); t1->Draw(); sprintf (string,"Concrete density = %.1f g/cm2\n",concrete_density); printf("string=%s",string); t1 = new TLatex(0.12,0.77,string); t1->SetNDC(); t1->SetTextSize(0.03); t1->Draw(); sprintf (string,"BDX dimensions = %.1f x %.1f x %.1f cm^{3}\n",2*xbdx,2*ybdx,Lbdx); printf("string=%s",string); t1 = new TLatex(0.12,0.73,string); t1->SetNDC(); t1->SetTextSize(0.03); t1->Draw(); sprintf (string,"Shaft = %.1f x %.1f x %.1f cm^{3}\n",Dx2shaft-Dx1shaft,Dy2shaft-Dy1shaft,Lshaft); printf("string=%s",string); t1 = new TLatex(0.12,0.69,string); t1->SetNDC(); t1->SetTextSize(0.03); t1->Draw(); sprintf (string,"Building = %.1f x %.1f x %.1f cm^{3}\n",Dx2bldg-Dx1bldg,Dy2bldg-Dy1bldg,Lbldg); printf("string=%s",string); t1 = new TLatex(0.12,0.65,string); t1->SetNDC(); t1->SetTextSize(0.03); t1->Draw(); // BDX walls const int Npoints=13; float xc[]={Dx1bldgU+DxLbldgU/2,Dx1bldgU+DxLbldgU/2,Dx1bldgU+DxLbldgU-dwall,Dx1bldgU+DxLbldgU-dwall,Dx1bldgU+dwall,Dx1bldgU+dwall,Dx1bldgU+DxLbldgU/2,Dx1bldgU+DxLbldgU/2,Dx1bldgU,Dx1bldgU,Dx2bldgU,Dx2bldgU,Dx1bldgU+DxLbldgU/2}; float yc[]={Dy1bldgU,Dy1bldgU+dwall,Dy1bldgU+dwall,Dy2bldgU-dwall,Dy2bldgU-dwall,Dy1bldgU+dwall,Dy1bldgU+dwall,Dy1bldgU,Dy1bldgU,Dy2bldgU,Dy2bldgU,Dy1bldgU,Dy1bldgU}; TPolyLine *bdxwall = new TPolyLine(Npoints, xc, yc); bdxwall->SetLineWidth(2.0); bdxwall->SetLineColor(kBlack); // bdxwall->Draw("l"); bdxwall->SetFillStyle(3012); bdxwall->SetFillColor(kBlack); // bdxwall->Draw("f"); // BDX shaft const int Npoints=13; float xc[]={Dx1shaft,Dx1shaft,Dx1bldgU,Dx1bldgU,Dx2bldgU,Dx2bldgU,Dx2bldgU-dwall,Dx2bldgU-dwall,Dx1bldgU+dwall,Dx1bldgU+dwall,Dx1shaft+dwall,Dx1shaft+dwall,Dx1shaft}; float yc[]={Dy2bldgU,Dy3shaft,Dy3shaft,Dy1bldgU,Dy1bldgU,Dy2bldgU,Dy2bldgU,Dy1bldgU+dwall,Dy1bldgU+dwall,Dy3shaft-dwall,Dy3shaft-dwall,Dy2bldgU,Dy2bldgU}; TPolyLine *bdxwall = new TPolyLine(Npoints, xc, yc); bdxwall->SetLineWidth(2.0); bdxwall->SetLineColor(kBlack); bdxwall->Draw("l"); bdxwall->SetFillStyle(3012); bdxwall->SetFillColor(kBlack); bdxwall->Draw("f"); // BDX experiment const int Npoints=6; float xc[]={-xbdx,-xbdx,xbdx,xbdx,-xbdx,-xbdx}; float yc[]={0,ybdx,ybdx,-ybdx,-ybdx,0}; TPolyLine *bdx = new TPolyLine(Npoints, xc, yc); bdx->SetLineWidth(2.0); bdx->SetLineColor(kBlack); bdx->Draw("l"); bdx->SetFillColor(390); bdx->Draw("f"); // BDX building const int Npoints=5; float xc[]={Dx1bldg,Dx1bldg,Dx2bldg,Dx2bldg,Dx1bldg}; float yc[]={Dy1bldg,Dy2bldg,Dy2bldg,Dy1bldg,Dy1bldg}; TPolyLine *bdx = new TPolyLine(Npoints, xc, yc); bdx->SetLineWidth(2.0); bdx->SetLineColor(kBlack); bdx->Draw("l"); // bdx->SetFillColor(390); // bdx->Draw("f"); // Stair area const int Npoints=5; float xc[]={Dx1stairs,Dx1stairs,Dx2stairs,Dx2stairs,Dx1stairs}; float yc[]={Dy2stairs,Dy1stairs,Dy1stairs,Dy2stairs,Dy2stairs}; TPolyLine *stairs = new TPolyLine(Npoints, xc, yc); stairs->SetLineWidth(2.0); stairs->SetLineColor(kBlack); stairs->SetLineStyle(4); stairs->Draw("l"); // stairs->SetFillColor(422); // stairs->Draw("f"); // draw steps Int_t nsteps = (Dy2stairs1 - Dy1stairs1)/Dstep; printf ("Dx1stairs1=%f, Dx2stairs1=%f \n",Dx1stairs1,Dx2stairs1); for (int jj=0; jjSetLineStyle(4); step->Draw(); } TLine *step = new TLine(x,y,x+Dstep,y); step->SetLineStyle(4); step-> Draw(); TLine *step = new TLine(x+Dstep,y,x+Dstep,y-Dstep); step->SetLineStyle(4); step-> Draw(); if (fmod(x1,x2) >= 382.25) { TLine *step = new TLine(x+Dstep,y-Dstep,Dx2stairs,y-Dstep); step->SetLineStyle(4); step->Draw(); } } TLine *grade = new TLine (xmin,xgrade,xmax,xgrade); grade->SetLineStyle(1); grade->Draw(); sprintf (string,"grade level\n"); printf("string=%s",string); t1 = new TLatex(-900,xgrade+30.,string); t1->SetTextSize(0.03); t1->Draw(); TMarker *MarkBeam = new TMarker(0,0,4); MarkBeam->SetMarkerColor(1); MarkBeam->SetMarkerSize(1); MarkBeam->Draw(); TMarker *MarkBeam = new TMarker(0,0,6); MarkBeam->SetMarkerColor(1); MarkBeam->SetMarkerSize(1); MarkBeam->Draw(); /*TLine *beamline = new TLine (xmin,0,xmax,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();*/ sprintf (string,"Draw_C1_elevation.pdf"); c1->SaveAs(string); sprintf (string,"Draw_C1_elevation.png"); c1->SaveAs(string); }