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(
"ex1g.root");
27 TH1F *
h1=
new TH1F(
"h1",
"Phi ",100,-10.,10.);
28 TH1F *
h2=
new TH1F(
"h2",
"Lambda",100,-10,10);
29 TH1F *
h3=
new TH1F(
"h3",
"Qp",100,-10.,10.);
30 TH1F *
h4=
new TH1F(
"h4",
"Y",100,-10,10);
31 TH1F *
h5=
new TH1F(
"h5",
"Z",100,-10,10);
32 TH1F *
h6=
new TH1F(
"h6",
"Px",100, -10,10);
33 TH1F *
h7=
new TH1F(
"h7",
"Py",100,-10,10);
34 TH1F *
h8=
new TH1F(
"h8",
"Pz",100,-10,10);
35 TH1F *
h9=
new TH1F(
"h9",
"Ysc",100,-10,10);
36 TH1F *
h10=
new TH1F(
"h10",
"Zsc",100,-10,10);
52 if(fTrkG->GetDPhi())h1->Fill((fTrkF->GetPhi()-fTrkG->GetPhi())/fTrkG->GetDPhi());
53 if(fTrkG->GetDLambda())h2->Fill((fTrkF->GetLambda()-fTrkG->GetLambda())/fTrkG->GetDLambda());
54 if(fTrkG->GetDQp())h3->Fill((fTrkF->GetQp()-fTrkG->GetQp())/fTrkG->GetDQp());
55 if(fTrkG->GetDY())h4->Fill((fTrkF->GetY() -fTrkG->GetY()) /fTrkG->GetDY());
56 if(fTrkG->GetDZ())h5->Fill((fTrkF->GetZ() -fTrkG->GetZ()) /fTrkG->GetDZ());
57 if(fTrkG->GetDPx())h6->Fill((fTrkF->GetPx()-fTrkG->GetPx())/fTrkG->GetDPx());
58 if(fTrkG->GetDPy())h7->Fill((fTrkF->GetPy()-fTrkG->GetPy())/fTrkG->GetDPy());
59 if(fTrkG->GetDPz())h8->Fill((fTrkF->GetPz()-fTrkG->GetPz())/fTrkG->GetDPz());
60 if(fTrkG->GetDY_sc())h9->Fill((fTrkF->GetY_sc()-fTrkG->GetY_sc())/fTrkG->GetDY_sc());
61 if(fTrkG->GetDZ_sc())h10->Fill((fTrkF->GetZ_sc()-fTrkG->GetZ_sc())/fTrkG->GetDZ_sc());
65 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")