LArSoft  v09_90_00
Liquid Argon Software toolkit - https://larsoft.org/
plotHisto.C
Go to the documentation of this file.
1 {
2  gROOT->Reset();
3 
4  // Draw histos filled by Geant4 simulation
5  //
6  TFile f("allproc.root");
7  TCanvas* c1 = new TCanvas("c1", " ");
8 
9  c1->Divide(3,1);
10 
11  c1->cd(1);
12  TH1D* hist1 = (TH1D*)f.Get("h1");
13  // c1->SetLogy(1);
14  hist1->Draw("HIST");
15 
16  TH1D* hist11 = (TH1D*)f.Get("h11");
17  hist11->SetLineColor(2);
18  hist11->Draw("HIST SAME");
19 
20  c1->cd(2);
21  // c1->SetLogy(1);
22  TH1D* hist2 = (TH1D*)f.Get("h2");
23  hist2->Draw("HIST");
24 
25  TH1D* hist12 = (TH1D*)f.Get("h12");
26  hist12->SetLineColor(2);
27  hist12->Draw("HIST SAME");
28 
29  c1->cd(3);
30  // c1->SetLogy(1);
31  TH1D* hist3 = (TH1D*)f.Get("h3");
32  hist3->Draw("HIST");
33 
34  TH1D* hist13 = (TH1D*)f.Get("h13");
35  hist13->SetLineColor(2);
36  hist13->Draw("HIST SAME");
37 
38  c1->Print("allproc.gif");
39  c1->Close();
40 }
TH1D * hist2
Definition: plotHisto.C:12
TH1D * hist3
Definition: plotHisto.C:15
TH1D * hist13
Definition: plotHisto.C:34
TFile f
Definition: plotHisto.C:6
TCanvas * c1
Definition: plotHisto.C:7
TH1D * hist1
Definition: plotHisto.C:9
TH1D * hist12
Definition: plotHisto.C:25
TH1D * hist11
Definition: plotHisto.C:16