//----------------------------------------------------------------- // Simplified version of plan view of Hall A beam dump. // Script based on David's DrawGlueXBoundaries script // //----------------------------------------------------------------- void Draw_HallA_BeamDump_transverse() { char string[132]; Double_t zmin = -600; Double_t zmax=3200; Double_t xmin= -500; Double_t xmax=1500; Double_t fudge=0.95; Double_t scale = fudge*(zmax-zmin)/(xmax-xmin); printf ("Scale factor =%d\n",scale); Double_t xgrade=762; // 25' grade above beamline Double_t dz=914; // Double_t dz1=457; // Double_t dz2=488; 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 "z" labels refer to x-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 ybdx=110./2; // Double_t xbdx=205./2; Double_t xbdx=165./2; // note that convension here between x and y is reversed relative to other scripts... Double_t ybdx=70./2; Double_t xorigin = zbdx + xbdx; zbdx = zbdx - xorigin; // compute offsets to set tunnel at 45 deg Double_t xoff1 = xgrade + ybdx + dspace + dwall; Double_t xoff4 = xgrade + ybdx + dspace; Double_t xoff2 = xgrade - xbdx - dspace - dwall; Double_t xoff3 = xgrade - xbdx - dspace; // Double_t overburden_mwe=20*100; // mwe converted to cm Double_t overburden_mwe=10*100; // mwe converted to cm Double_t tshield= overburden_mwe/fe_density; // scale thickness to vertical configuration with tunnel at 45 deg angle Double_t f45 = cos(45*3.14159/180)*cos(45*3.14159/180); // assume costhe^2 distribution of cosmic rays Double_t Lcrshield = tshield * f45 * sin(45*3.14159/180); Double_t zcrshield = zbdx+2*xbdx+dspace-xoff3 - Lcrshield; Double_t xcrshield1=xgrade; Double_t x1 = xgrade; Double_t x2 = -ybdx - dspace; Double_t z1 = zbdx - dspace - xoff4; Double_t z2 = zbdx - dspace; Double_t a = (x1-x2)/(z1-z2); Double_t b = (z1*x2 - x1*z2)/(z1-z2); Double_t xcrshield2 = a*zcrshield + b; Double_t xcrshield3 = a*(zcrshield + Lcrshield) + b; Double_t xcrheight = 0.5*((xgrade-xcrshield2)+(xgrade-xcrshield3)); Double_t weight_crshield = (Lbdx+2*dspace)*xcrheight*Lcrshield*fe_density/1.e6; // weight in metric ton printf ("Fe CR height=%.1f, L=%.1f, width=%.1f\n",xcrheight,Lcrshield,2*xbdx); Double_t xover2 = overburden_mwe/dirt_density + xbdx; Double_t xover2 = overburden_mwe/dirt_density + xbdx; Double_t arg = (xgrade-xbdx-dspace)/xover2 < 1 ? (xgrade-xbdx-dspace)/xover2 : 1; Double_t angle_over = acos(arg); Double_t zover = arg < 1 ? (zbdx+Lbdx/2) - sin(angle_over)*xover2 : 0; printf ("Assume: dirt density=%f, overburden=%f cm, angle=%f, zover = %f\n",dirt_density,xover2,angle_over*180/3.14159,zover); zmin = zmin - xorigin; zmax = zmax - xorigin; TCanvas *c1 = new TCanvas("c1","Draw_HallA_BeamDump_transverse",200,10,500*scale,500); TH2D *boundaries = new TH2D("boundaries", "Hall A Beam Dump / 45 deg Shaft",zmax-zmin, zmin, zmax, xmax-xmin, xmin, xmax); boundaries->SetStats(0); boundaries->SetXTitle("X (cm)"); boundaries->SetYTitle("Y (cm)"); boundaries->Draw(); sprintf (string,"Vertical overburden = %.1f mwe\n",overburden_mwe/100); printf("string=%s",string); t1 = new TLatex(0.12,0.85,string); t1->SetNDC(); t1->SetTextSize(0.03); t1->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,"Iron = %.0f cm, total = %.0f cm Fe equiv, Weight=%.0f t\n",Lmuon_fe,dmuon,Lmuon_weight); printf("string=%s",string); t1 = new TLatex(0.12,0.69,string); t1->SetNDC(); t1->SetTextSize(0.03); t1->Draw(); sprintf (string,"Thickness of CR Fe = %.1f cm = %.0f cm x %.2f x %.2f\n",Lcrshield,tshield,f45,sin(45*3.14159/180)); printf("string=%s",string); t1 = new TLatex(0.12,0.65,string); t1->SetNDC(); t1->SetTextSize(0.03); t1->Draw(); sprintf (string,"Size of CR Fe= %.0f x %.0f x %.0f cm^{3}\n",xcrheight,Lcrshield,Lbdx+2*dspace); printf("string=%s",string); t1 = new TLatex(0.12,0.61,string); t1->SetNDC(); t1->SetTextSize(0.03); t1->Draw(); sprintf (string,"Weight of CR Fe= %.0f metric tons\n",weight_crshield); printf("string=%s",string); t1 = new TLatex(0.12,0.57,string); t1->SetNDC(); t1->SetTextSize(0.03); t1->Draw(); sprintf (string,"Grade level = %.0f cm above beamline\n",xgrade); printf("string=%s",string); t1 = new TLatex(0.12,0.53,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();*/ TLine *grade = new TLine (zmin,xgrade,zmax,xgrade); grade->SetLineStyle(1); grade->Draw(); sprintf (string,"grade level\n"); printf("string=%s",string); t1 = new TLatex(-1400,xgrade+30.,string); t1->SetTextSize(0.03); t1->Draw(); // BDX walls const int Npoints=11; float xc[]={xgrade,-ybdx-dspace-dwall,-ybdx-dspace-dwall,ybdx+dspace+dwall,xgrade,xgrade,ybdx+dspace,-ybdx-dspace,-ybdx-dspace,xgrade,xgrade}; float zc[]={zbdx-dspace-dwall-xoff1,zbdx-dspace-dwall,zbdx+2*xbdx+dspace+dwall,zbdx+2*xbdx+dspace+dwall,zbdx+2*xbdx+dspace+dwall-xoff2,zbdx+2*xbdx+dspace-xoff3,zbdx+2*xbdx+dspace,zbdx+2*xbdx+dspace,zbdx-dspace,zbdx-dspace-xoff4,zbdx-dspace-dwall-xoff1}; TPolyLine *bdxwall = new TPolyLine(Npoints, zc, xc); 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[]={0,ybdx,ybdx,-ybdx,-ybdx,0}; float zc[]={zbdx,zbdx,zbdx+2*xbdx,zbdx+2*xbdx,zbdx,zbdx}; TPolyLine *bdx = new TPolyLine(Npoints, zc, xc); bdx->SetLineWidth(2.0); bdx->SetLineColor(kBlack); bdx->Draw("l"); bdx->SetFillColor(390); bdx->Draw("f"); // Fe shield const int Npoints=5; float xc[]={xcrshield1,xcrshield2,xcrshield3,xcrshield1,xcrshield1}; float zc[]={zcrshield,zcrshield,zcrshield+Lcrshield,zcrshield+Lcrshield,zcrshield}; TPolyLine *crshield = new TPolyLine(Npoints, zc, xc); crshield->SetLineWidth(2.0); crshield->SetLineColor(kBlack); crshield->Draw("l"); crshield->SetFillStyle(3545); crshield->SetFillColor(kBlack); crshield->Draw("f"); // dirt overburden: if more than grade if (zover > 0) { const int Npoints=4; float xc[]={xgrade,xover2,xover2,xgrade,xgrade}; float zc[]={zover,zbdx-dspace,zbdx+2*xbdx+dspace,zbdx+2*xbdx/2 + (zbdx+2*xbdx/2-zover),zover}; TPolyLine *crover = new TPolyLine(Npoints, zc, xc); crover->SetLineWidth(2.0); crover->SetLineColor(kBlack); crover->Draw("l"); crover->SetFillColor(kBlack); crover->SetFillStyle(3003); crover->Draw("f"); } 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_HallA_BeamDump_transverse.pdf"); c1->SaveAs(string); sprintf (string,"Draw_HallA_BeamDump_transverse.png"); c1->SaveAs(string); }