#include "StandardLabels.C" #include "GlueX_boundaries.C" void dBmag(void) { gROOT->Reset(); gStyle->SetPadRightMargin(0.15); TCanvas *c1 = new TCanvas("c1"); c1->SetTicks(); c1->SetGrid(); TFile *f = new TFile("bfield.root"); TH2D *dBtot_vs_r_vs_z = (TH2D*)gROOT->FindObject("dBtot_vs_r_vs_z"); // Convert from Tesla/cm to Gauss/cm dBtot_vs_r_vs_z->Scale(10000.0); dBtot_vs_r_vs_z->GetZaxis()->SetRangeUser(0.0, 300.0); dBtot_vs_r_vs_z->SetTitle("Magnetic Field Gradient"); dBtot_vs_r_vs_z->SetZTitle("Gradient of B-field magnitude (Gauss/cm)"); dBtot_vs_r_vs_z->Draw("colz"); DrawGlueXBoundaries(kBlack, dBtot_vs_r_vs_z->GetYaxis()->GetXmax()); StandardLabels2D(dBtot_vs_r_vs_z,"solenoid_1500_poisson_20100920_01"); // Save c1->SaveAs("dBmag.pdf"); c1->SaveAs("dBmag.png"); }