#include "StandardLabels.C" #include "GlueX_boundaries.C" void Bmag_vs_z(void) { gROOT->Reset(); gStyle->SetPadRightMargin(0.15); TCanvas *c1 = new TCanvas("c1"); c1->SetTicks(); c1->SetGrid(); TFile *f = new TFile("bfield.root"); TTree *Bfield = (TTree*)gROOT->FindObject("Bfield"); TH2D *axes = new TH2D("axes", "B-field Magnitude vs. z", 100, -200.0, 650.0, 100, 0.0, 2.75); axes->SetStats(0); axes->SetXTitle("Z (cm)"); axes->SetYTitle("Magnitude (Tesla)"); axes->Draw(); Bfield->Draw("sqrt(Bx*Bx+By*By+Bz*Bz):z", "r<55", "same"); StandardLabels2D(axes,"solenoid_1500_poisson_20100706_XX"); // Save c1->SaveAs("Bmag_vs_z.pdf"); c1->SaveAs("Bmag_vs_z.gif"); }