6 gROOT->LoadMacro(
"$VMCWORKDIR/gconfig/basiclibs.C");
10 gSystem->Load(
"libGeoBase");
11 gSystem->Load(
"libParBase");
12 gSystem->Load(
"libBase");
13 gSystem->Load(
"libField");
14 gSystem->Load(
"libPndData");
15 gSystem->Load(
"libGeane");
16 gSystem->Load(
"libPlane");
17 gSystem->Load(
"libGeaneEx");
18 gSystem->Load(
"libTrkBase");
20 TFile *
f=
new TFile(
"ex2g.root");
27 TH1F *
h1=
new TH1F(
"h1",
"V ",100,-10.,10.);
28 TH1F *
h2=
new TH1F(
"h2",
"W",100,-10,10);
29 TH1F *
h3=
new TH1F(
"h3",
"TV",100,-10,10);
30 TH1F *
h4=
new TH1F(
"h4",
"TW",100,-10,10);
31 TH1F *
h5=
new TH1F(
"h5",
"Qp",100,-10,10);
32 TH1F *
h6=
new TH1F(
"h6",
"Y",100, -10,10);
33 TH1F *
h7=
new TH1F(
"h7",
"Z",100,-10,10);
34 TH1F *
h8=
new TH1F(
"h8",
"Px",100,-10,10);
35 TH1F *
h9=
new TH1F(
"h9",
"Py",100,-10,10);
36 TH1F *
h10=
new TH1F(
"h10",
"Pz",100,-10,10);
51 if(!fTrkF || !fTrkG)
continue;
53 if(fTrkG->GetDV()) h1->Fill((fTrkF->GetV() - fTrkG->GetV())/fTrkG->GetDV());
54 if(fTrkG->GetDW()) h2->Fill((fTrkF->GetW() - fTrkG->GetW())/fTrkG->GetDW());
55 if(fTrkG->GetDTV()) h3->Fill((fTrkF->GetTV() - fTrkG->GetTV())/fTrkG->GetDTV());
56 if(fTrkG->GetDTW()) h4->Fill((fTrkF->GetTW() - fTrkG->GetTW())/fTrkG->GetDTW());
57 if(fTrkG->GetDQp())h5->Fill((fTrkF->GetQp() - fTrkG->GetQp()) /fTrkG->GetDQp());
58 if(fTrkG->GetDY()) h6->Fill((fTrkF->GetY() - fTrkG->GetY()) /fTrkG->GetDY());
59 if(fTrkG->GetDZ()) h7->Fill((fTrkF->GetZ() - fTrkG->GetZ()) /fTrkG->GetDZ());
60 if(fTrkG->GetDPx()) h8->Fill((fTrkF->GetPx() - fTrkG->GetPx())/fTrkG->GetDPx());
61 if(fTrkG->GetDPy()) h9->Fill((fTrkF->GetPy() - fTrkG->GetPy())/fTrkG->GetDPy());
62 if(fTrkG->GetDPz()) h10->Fill((fTrkF->GetPz()- fTrkG->GetPz())/fTrkG->GetDPz());
66 TCanvas *
c=
new TCanvas(
"c",
"c",900,600);
cout<<"the track theta is "<< trackthe<< endl;mc_x[j]=vecmc.X();mc_y[j]=vecmc.Y();mc_z[j]=vecmc.Z()-1110;r_mc[j]=TMath::Sqrt(mc_x[j]*mc_x[j]+mc_y[j]*mc_y[j]);std::cout<<"the r_mc[j] is "<< r_mc[j]<< std::endl;std::cout<<"the mc_z[j] is "<< mc_z[j]<< std::endl;r_mc_err[j]=0;z_mc_err[j]=0;rc_x[j]=vecrc.X();rc_y[j]=vecrc.Y();rc_z[j]=vecrc.Z()-1110;r_rc[j]=TMath::Sqrt(rc_x[j]*rc_x[j]+rc_y[j]*rc_y[j]);std::cout<<"the r_rc[j] is "<< r_rc[j]<< std::endl;std::cout<<"the rc_z[j] is "<< rc_z[j]<< std::endl;r_rc_err[j]=0;z_rc_err[j]=0;double tempmc=TMath::Sqrt(mc_x[0]*mc_x[0]+mc_y[0]*mc_y[0]);mcfirstthe=TMath::ATan(tempmc/(mc_z[0]+1110));cout<<"the first hit theta is "<< mcfirstthe<< endl;}TGraphErrors *mctrack=new TGraphErrors(4, mc_z, r_mc, z_mc_err, r_mc_err);mctrack-> Fit("trackFit","ONF")