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(
"libGeaneExEmc");
18 gSystem->Load(
"libTrkBase");
20 TFile *
f=
new TFile(
"geane.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",
"Ysc",100,-10,10);
37 TH1F *
h11=
new TH1F(
"h11",
"Zsc",100,-10,10);
39 TH2F *
h101=
new TH2F(
"h101",
"X_MC vs X_GE",100,-100,100,100,-100,100);
40 TH2F *
h102=
new TH2F(
"h102",
"Y_MC vs Y_GE",100,-100,100,100,-100,100);
41 TH2F *
h103=
new TH2F(
"h103",
"Z_MC vs Z_GE",100,-150,250,100,-150,250);
43 TH2F *
h201=
new TH2F(
"h201",
"PX_MC vs PX_GE",100,-2,2,100,-2,2);
44 TH2F *
h202=
new TH2F(
"h202",
"PY_MC vs PY_GE",100,-2,2,100,-2,2);
45 TH2F *
h203=
new TH2F(
"h203",
"PZ_MC vs PZ_GE",100,-2,2,100,-2,2);
62 h101->Fill(fTrkF->GetX(),fTrkG->GetX());
63 h102->Fill(fTrkF->GetY(),fTrkG->GetY());
64 h103->Fill(fTrkF->GetZ(),fTrkG->GetZ());
66 h201->Fill(fTrkF->GetPx(),fTrkG->GetPx());
67 h202->Fill(fTrkF->GetPy(),fTrkG->GetPy());
68 h203->Fill(fTrkF->GetPz(),fTrkG->GetPz());
70 if(fTrkG->GetDPhi())h1->Fill((fTrkF->GetPhi()-fTrkG->GetPhi())/fTrkG->GetDPhi());
71 if(fTrkG->GetDLambda())h2->Fill((fTrkF->GetLambda()-fTrkG->GetLambda())/fTrkG->GetDLambda());
72 if(fTrkG->GetDQp())h3->Fill((fTrkF->GetQp()-fTrkG->GetQp())/fTrkG->GetDQp());
73 if(fTrkG->GetDY())h4->Fill((fTrkF->GetY() -fTrkG->GetY()) /fTrkG->GetDY());
74 if(fTrkG->GetDZ())h5->Fill((fTrkF->GetZ() -fTrkG->GetZ()) /fTrkG->GetDZ());
75 if(fTrkG->GetDPx())h6->Fill((fTrkF->GetPx()-fTrkG->GetPx())/fTrkG->GetDPx());
76 if(fTrkG->GetDPy())h7->Fill((fTrkF->GetPy()-fTrkG->GetPy())/fTrkG->GetDPy());
77 if(fTrkG->GetDPz())h8->Fill((fTrkF->GetPz()-fTrkG->GetPz())/fTrkG->GetDPz());
78 if(fTrkG->GetDY_sc())h9->Fill((fTrkF->GetY_sc()-fTrkG->GetY_sc())/fTrkG->GetDY_sc());
79 if(fTrkG->GetDY_sc())h10->Fill((fTrkF->GetY_sc()-fTrkG->GetY_sc())/fTrkG->GetDY_sc());
80 if(fTrkG->GetDZ_sc())h11->Fill((fTrkF->GetZ_sc()-fTrkG->GetZ_sc())/fTrkG->GetDZ_sc());
84 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")