#include "StandardLabels.C" void B_dot_dl(void) { gROOT->Reset(); TColor::CreateColorWheel(); TFile *f = new TFile("hd_root.root"); f->cd("RADLEN"); TTree *radstep = gROOT->FindObject("radstep"); TCanvas *c1 = new TCanvas("c1"); c1->SetGrid(); c1->SetTicks(); TH2D *axes = new TH2D("axes", "Integrated B-field vs. z along beamline", 100, -100.0, 550.0, 100, 0.0, 9.75); axes->SetStats(0); axes->SetXTitle("Z (cm)"); axes->SetYTitle("#int|#vec{B}|dl (Telsa#upoint meters)"); axes->Draw(); radstep->SetMarkerStyle(8); radstep->SetMarkerColor(kRed); radstep->Draw("iB_dl/100.0:R.pos.Z()","","same"); // Lines indicating active tracking area TLine *lin = new TLine(17.0, 0.0, 17.0, 9.75); lin->SetLineColor(kMagenta); lin->SetLineStyle(2); lin->SetLineWidth(3); lin->Draw(); TLine *lin = new TLine(*lin); lin->SetX1(360.0); lin->SetX2(360.0); lin->Draw(); TArrow *arrow = new TArrow(17.0, 8.0, 360.0, 8.0, 0.03, "|<->|"); arrow->SetLineColor(kMagenta); arrow->Draw(); TLatex *lab = new TLatex((360.0+17.0)/2.0, 8.05, "active tracking region"); lab->SetTextAlign(21); lab->SetTextSize(0.03); lab->Draw(); // Lines indicating B-field strength in active region TLine *lin = new TLine(360.0, 8.54, 550.0, 8.54); lin->SetLineColor(kGreen+3); lin->SetLineStyle(2); lin->SetLineWidth(2); lin->Draw(); TLine *lin = new TLine(*lin); lin->SetX1(17.0); lin->SetY1(0.88); lin->SetY2(0.88); lin->Draw(); TArrow *arrow = new TArrow(400.0, 0.88, 400.0, 8.54, 0.03, "|<->|"); arrow->SetLineColor(kGreen+3); arrow->Draw(); TLatex *lab = new TLatex(405.0, (8.54+0.88)/2.0, "field strength = 7.7 T#upoint m"); lab->SetTextAlign(21); lab->SetTextSize(0.035); lab->SetTextAngle(270.0); lab->Draw(); StandardLabels(axes, "", "", "solenoid_1500_poisson_20100920_01"); c1->SaveAs("B_dot_dl.png"); c1->SaveAs("B_dot_dl.pdf"); }