4 from array
import array
8 input_file_1=TFile(file+
'.root',
'READ')
9 h1 = input_file_1.Get(
"histo/1")
10 h2 = input_file_1.Get(
"histo/2")
11 h3 = input_file_1.Get(
"histo/3")
12 h4 = input_file_1.Get(
"histo/4")
13 h5 = input_file_1.Get(
"histo/5")
14 h6 = input_file_1.Get(
"histo/6")
16 c1 = TCanvas(
'c1', file, 200, 10, 700, 900)
32 c1.Print(
"./"+file+
".png")
41 input_file_1=TFile(file+
'a.root',
'READ')
42 input_file_2=TFile(file+
'b.root',
'READ')
47 c1 = TCanvas(
'c1', file, 200, 10, 700, 500)
58 bin.append(pow(10,(-2+0.1*i)))
60 h_1 = TH1F(
'unbiased',
'Source Spectrum',40,bin)
61 h_2 = TH1F(
'biased',
'Source Spectrum',40,bin)
66 t1 = input_file_1.Get(
'ntuple/MyTuple')
68 for i
in range(t1.GetEntries()):
70 h_1.Fill(t1.Ekin,t1.weight)
74 t2 = input_file_2.Get(
'ntuple/MyTuple')
75 for i
in range(t2.GetEntries()):
77 h_2.Fill(t2.Ekin,t2.weight)
79 h_2.SetLineStyle(kDashed);
80 h_2.SetLineColor(kBlue);
84 c1.Print(
"./"+file+
".png")