Hall-D Software  alpha
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Btot_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 Btot_vs_r_vs_z.C+
6 //
7 
8 //#include "StandardLabels.C"
9 #include "GlueX_boundaries.C"
10 
11 
12 void Btot_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 *Btot_vs_r_vs_z = (TH2D*)gROOT->FindObject("Btot_vs_r_vs_z");
24 
25  TH2D *axes = new TH2D("axes", "B-field magnitude", 100, -100.0, 450.0, 100, 0.0, 200.0);
26  axes->SetXTitle("z (cm)");
27  axes->SetYTitle("r (cm)");
28  axes->SetStats(0);
29  axes->GetZaxis()->SetRangeUser(-0.1, 3.0);
30  axes->Draw();
31 
32  Btot_vs_r_vs_z->GetZaxis()->SetRangeUser(-0.1, 3.0);
33  Btot_vs_r_vs_z->GetZaxis()->SetTitle("Tesla");
34  Btot_vs_r_vs_z->Draw("same zcol");
35 
37  //StandardLabels1D(grad,"solenoid_1500_poisson_20090814_01");
38 
39  // Save
40  c1->SaveAs("Btot_vs_r_vs_z.pdf");
41  c1->SaveAs("Btot_vs_r_vs_z.gif");
42 
43 }
44 
45 
46 
TH2D * axes
void Btot_vs_r_vs_z(void)
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)