Geant4  10.02.p03
plot2.C File Reference

Go to the source code of this file.

Functions

c1 SetLogy (1)
 
c1 cd ()
 
c1 Update ()
 
ha1 SetStats (kFALSE)
 
ha1 SetLineColor (kBlue)
 
ha1 Draw ("HIST")
 
hb1 SetLineColor (kRed)
 
hb1 Draw ("HIST SAME")
 
le AddEntry (ha1,"Li7","l")
 
le AddEntry (hb1,"Li6","l")
 
le Draw ()
 

Variables

TCanvas * c1 = new TCanvas("c1", " ")
 
TFile fa = TFile("Li7.root")
 
TFile fb = TFile("Li6.root")
 
TH1D * ha1 = (TH1D*)fa.Get("6")
 
TH1D * hb1 = (TH1D*)fb.Get("6")
 
TLegend * le = new TLegend(0.6,0.6,0.8,0.8)
 

Function Documentation

◆ AddEntry() [1/2]

le AddEntry ( ha1  ,
"Li7"  ,
"l"   
)

◆ AddEntry() [2/2]

le AddEntry ( hb1  ,
"Li6"  ,
"l"   
)

◆ cd()

c1 cd ( )

◆ Draw() [1/3]

ha1 Draw ( "HIST"  )

◆ Draw() [2/3]

hb1 Draw ( "HIST SAME"  )

◆ Draw() [3/3]

le Draw ( )

◆ SetLineColor() [1/2]

ha1 SetLineColor ( kBlue  )

◆ SetLineColor() [2/2]

hb1 SetLineColor ( kRed  )

◆ SetLogy()

c1 SetLogy ( )

◆ SetStats()

ha1 SetStats ( kFALSE  )

◆ Update()

c1 Update ( )

Variable Documentation

◆ c1

TCanvas* c1 = new TCanvas("c1", " ")

Definition at line 6 of file plot2.C.

◆ fa

TFile fa = TFile("Li7.root")

Definition at line 12 of file plot2.C.

◆ fb

TFile fb = TFile("Li6.root")

Definition at line 13 of file plot2.C.

◆ ha1

TH1D* ha1 = (TH1D*)fa.Get("6")

Definition at line 15 of file plot2.C.

◆ hb1

TH1D* hb1 = (TH1D*)fb.Get("6")

Definition at line 19 of file plot2.C.

◆ le

TLegend* le = new TLegend(0.6,0.6,0.8,0.8)

Definition at line 24 of file plot2.C.