#include "StandardLabels.C" #include "GlueX_boundaries.C" void inner_outer_volumes(void) { gROOT->Reset(); TColor::CreateColorWheel(); //gStyle->SetPadRightMargin(0.15); TCanvas *c1 = new TCanvas("c1"); c1->SetTicks(); c1->SetGrid(); TH2D *axes = new TH2D("axes", "Inner and outer volume definitions", 100, -40, 640.0, 100, 0.0, 140.0); axes->SetStats(0); axes->SetYTitle("R (cm)"); axes->SetXTitle("Z (cm)"); axes->Draw(); // Draw inner volume TBox *inner = new TBox(17.0, 0.0, 360.0, 65.0); inner->SetFillStyle(3001); inner->SetFillColor(kMagenta-9); inner->Draw(); int Ninner = 5; double r_inner[] = {0.0, 65.0, 65.0, 0.0, 0.0}; double z_inner[] = {17.0, 17.0, 360.0, 360.0, 17.0}; TPolyLine *inner_border = new TPolyLine(Ninner, z_inner, r_inner); inner_border->SetLineColor(kMagenta+2); inner_border->SetLineStyle(2); inner_border->SetLineWidth(3); inner_border->Draw(); // Draw outer volume int Nouter = 6; double r_outer[] = { 0.0, 65.0, 65.0, 126.0, 0.0, 0.0}; double z_outer[] = {361.0, 361.0, 407.0, 617.0, 617.0, 361.0}; TPolyLine *outer = new TPolyLine(Nouter, z_outer, r_outer); TPolyLine *outer_border = new TPolyLine(Nouter, z_outer, r_outer); outer->SetFillStyle(3001); outer->SetFillColor(kGreen); outer->Draw("f"); outer_border->SetLineColor(kGreen+3); outer_border->SetLineStyle(2); outer_border->SetLineWidth(3); outer_border->Draw(); // Draw labels TLatex *lab = new TLatex(30.0, 60.5, "INNER TRACKING VOLUME"); lab->SetTextColor(kBlue); lab->SetTextSize(0.025); lab->SetTextAlign(11); lab->Draw(); TLatex *lab = new TLatex(390.0, 60.5, "OUTER TRACKING VOLUME"); lab->SetTextColor(kBlue); lab->SetTextSize(0.025); lab->SetTextAlign(11); lab->Draw(); DrawGlueXBoundaries(); StandardLabels2D(axes,""); // Save c1->SaveAs("inner_outer_volumes.pdf"); c1->SaveAs("inner_outer_volumes.gif"); }