Hall-D Software  alpha
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
dBtot_vs_r_vs_z.C
Go to the documentation of this file.
1 //
2 //
3 // This needs to be compiled rather than run via cint.
4 //
5 // root [0] .x dBtot_vs_r_vs_z.C+
6 //
7 
8 //#include "StandardLabels.C"
9 #include "GlueX_boundaries.C"
10 
11 
12 void dBtot_vs_r_vs_z(void)
13 {
14  gROOT->Reset();
15  //gStyle->SetPadRightMargin(0.15);
16 
17  TCanvas *c1 = new TCanvas("c1");
18  c1->SetTicks();
19  c1->SetGrid();
20  c1->SetRightMargin(0.125);
21 
22  new TFile("bfield.root");
23  TH2D *dBtot_vs_r_vs_z = (TH2D*)gROOT->FindObject("dBtot_vs_r_vs_z");
24 
25  // Convert from Tesla/cm to Gauss/cm
26  dBtot_vs_r_vs_z->Scale(10000.0);
27 
28  TH2D *axes = new TH2D("axes", "B-field Gradient magnitude", 100, -100.0, 450.0, 100, 0.0, 200.0);
29  axes->SetXTitle("z (cm)");
30  axes->SetYTitle("r (cm)");
31  axes->SetStats(0);
32  axes->GetZaxis()->SetRangeUser(0.0, 1000.0);
33  axes->Draw();
34 
35  dBtot_vs_r_vs_z->GetZaxis()->SetRangeUser(0.0, 1000.0);
36  dBtot_vs_r_vs_z->GetZaxis()->SetTitle("Gauss/cm");
37  dBtot_vs_r_vs_z->Draw("same zcol");
38 
40  //StandardLabels1D(grad,"solenoid_1500_poisson_20090814_01");
41 
42  // Save
43  c1->SaveAs("dBtot_vs_r_vs_z.pdf");
44  c1->SaveAs("dBtot_vs_r_vs_z.gif");
45 }
46 
47 
48 
void dBtot_vs_r_vs_z(void)
TH2D * axes
Double_t c1[2][NMODULES]
Definition: tw_corr.C:68
void DrawGlueXBoundaries(Int_t full_detector=false, Int_t fill_in=false, Double_t clip_tof=1000.0, Int_t color=-1)