Geant4 Cross Reference |
1 { 1 { 2 2 3 c1 = new TCanvas("c1"," ",0.5, 5, 800, 600); 3 c1 = new TCanvas("c1"," ",0.5, 5, 800, 600); 4 4 5 gtit = hed[ixs] + " Cross Section for " + part 5 gtit = hed[ixs] + " Cross Section for " + part[ipart]; 6 hh[ixs] = gPad->DrawFrame(x1[ixs], y1[ixs], x2 6 hh[ixs] = gPad->DrawFrame(x1[ixs], y1[ixs], x2[ixs], y2[ixs], gtit); 7 hh[ixs]->GetYaxis()->SetTitle(axtit[1]); 7 hh[ixs]->GetYaxis()->SetTitle(axtit[1]); 8 gPad->SetLogy(); 8 gPad->SetLogy(); 9 if(ixs==0 || ixs==2) hh[ixs]->GetXaxis()->SetT 9 if(ixs==0 || ixs==2) hh[ixs]->GetXaxis()->SetTitle(axtit[2]); 10 else hh[ixs]->GetXaxis()->SetTitle(axtit[0]); 10 else hh[ixs]->GetXaxis()->SetTitle(axtit[0]); 11 11 12 leg[ixs] = new TLegend(0.9, 0.6, 1.1, 0.9); 12 leg[ixs] = new TLegend(0.9, 0.6, 1.1, 0.9); 13 13 14 for(itarg=0; itarg<ntarg; itarg++) { 14 for(itarg=0; itarg<ntarg; itarg++) { 15 gROOT->ProcessLine(".x $G4INSTALL/examples/ext 15 gROOT->ProcessLine(".x $G4INSTALL/examples/extended/hadronic/Hadr00/scripts/AddMC.C"); 16 cout << "Target# " << itarg << " max# " << nt 16 cout << "Target# " << itarg << " max# " << ntarg << endl; 17 } 17 } 18 cout << "Loop is completed ixs= " << ixs << en 18 cout << "Loop is completed ixs= " << ixs << endl; 19 leg[ixs]->Draw("SAME"); 19 leg[ixs]->Draw("SAME"); 20 cout << "Legend is done " << endl; 20 cout << "Legend is done " << endl; 21 c1->Update(); 21 c1->Update(); 22 c1->Print("a"+filp[ipart] + fil0[ixs] + ".gif" 22 c1->Print("a"+filp[ipart] + fil0[ixs] + ".gif"); 23 } 23 } 24 24