16      TH1F *Bx=
new TH1F(
"Bx(z)",
"Bx(z)",850,-200,650);
 
   17      TH1F *By=
new TH1F(
"By(z)",
"By(z)",850,-200,650);
 
   18      TH1F *Bz=
new TH1F(
"Bz(z)",
"Bz(z)",850,-200,650);
 
   19      TH1F *Btotal=
new TH1F(
"B(z)",
"B(z)",850,-200,650);
 
   21      for (Int_t iz=0; iz<=850; iz++) 
 
   24                po[0]=
x; po[1]=
y; po[2]=
z;
 
   25                BB[0]=0; BB[1]=0; BB[2]=0;
 
   26                fField->GetFieldValue(po,BB); 
 
   28                Bx->SetBinContent(iz+1,BB[0]/ 10.);
 
   29                By->SetBinContent(iz+1,BB[1]/ 10.);
 
   30                Bz->SetBinContent(iz+1,BB[2]/ 10.);
 
   31                Btot=
TMath::Sqrt(BB[0]*BB[0]+BB[1]*BB[1]+BB[2]*BB[2]);
 
   32                Btotal->SetBinContent(iz+1,Btot/ 10.);
 
   36    THStack *
h1= 
new THStack(
"B(z)",
"Panda Field X=Y=0") ;
 
   38    TCanvas *
c1 = 
new TCanvas(
"c1", 
"c1",4,31,900,600);
 
   39    c1->Range(-267,-0.285949,403,2.38354);
 
   41    c1->SetFrameFillColor(0);
 
   55    TPaveText *
pt = 
new TPaveText(0.01,0.945,0.311609,0.995,
"blNDC");
 
   59    TText *text = pt->AddText(
"Panda Field X=Y=0");
 
   62    pt = 
new TPaveText(148.439,1.2000,250.534,1.94786,
"br");
 
   65    TLine *line = 
new TLine(160.,1.84535,193.685,1.84535);
 
   68    tex = 
new TLatex(200.,1.81766,
"Bz");
 
   70    line->SetLineColor(4);
 
   73    line = 
new TLine(160.,1.6868,196.,1.6868);
 
   74    line->SetLineColor(2);
 
   77    tex = 
new TLatex(200.,1.64905,
"Bx");
 
   81    line = 
new TLine(160.,1.51818,196.,1.51818);
 
   82    line->SetLineColor(3);
 
   85    tex = 
new TLatex(200.,1.4900,
"By");
 
   90    line = 
new TLine(160.,1.31818,196.,1.31818);
 
   94    tex = 
new TLatex(200.,1.3100,
"Bmod");
 
  100    tex = 
new TLatex(-224.51,0.970725,
"Tesla");
 
  101    tex->SetTextSize(0.054717);
 
  102    tex->SetTextAngle(90.0);
 
  103    tex->SetLineWidth(2);
 
  106       tex = 
new TLatex(37.0985,-0.200324,
"Z (cm)");
 
  107    tex->SetLineWidth(2);
 
  110    TCanvas *
c2 = 
new TCanvas(
"c2", 
"c2",4,31,1200,700);
 
  120      TH2F *B=
new TH2F(
"B mod",
"B mod y=0 plane ",425,-200,650,250,-250,250);
 
  122         for (Int_t iz=0; iz<425; iz++) 
 
  126               for (Int_t ix=0; ix<250; ix++) {
 
  130                  fField->GetFieldValue(po,BB); 
 
  131                  Btot=
TMath::Sqrt(BB[0]*BB[0]+BB[1]*BB[1]+BB[2]*BB[2]);
 
  132                  B->SetBinContent(iz,ix,Btot/ 10.);
 
  136         TCanvas *
c3 = 
new TCanvas(
"c3", 
"c3",4,31,1200,700);
 
static T Sqrt(const T &x)
TString pt(TString pts, TString exts="px py pz")
DrawField(TString Map, Double_t fBeamMom)