Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-02-23 09:20:56

0001 {
0002   gROOT->Reset();
0003   
0004   // Draw histos filled by Geant4 simulation 
0005   //   
0006   TFile f("allproc.root");  
0007   TCanvas* c1 = new TCanvas("c1", "  ");
0008 
0009   c1->Divide(3,1);
0010 
0011   c1->cd(1);
0012   TH1D* hist1 = (TH1D*)f.Get("h1");
0013   //  c1->SetLogy(1);
0014   hist1->Draw("HIST");
0015 
0016   TH1D* hist11 = (TH1D*)f.Get("h11");
0017   hist11->SetLineColor(2);
0018   hist11->Draw("HIST SAME");
0019 
0020   c1->cd(2);
0021   // c1->SetLogy(1);
0022   TH1D* hist2 = (TH1D*)f.Get("h2");
0023   hist2->Draw("HIST");
0024   
0025   TH1D* hist12 = (TH1D*)f.Get("h12");
0026   hist12->SetLineColor(2);
0027   hist12->Draw("HIST SAME");
0028 
0029   c1->cd(3);
0030   // c1->SetLogy(1);
0031   TH1D* hist3 = (TH1D*)f.Get("h3");
0032   hist3->Draw("HIST");
0033     
0034   TH1D* hist13 = (TH1D*)f.Get("h13");
0035   hist13->SetLineColor(2);
0036   hist13->Draw("HIST SAME");          
0037 
0038   c1->Print("allproc.gif");
0039   c1->Close();
0040 }