4 from array
import array
8 input_file_1=TFile(file+
'.root',
'READ')
9 h1 = input_file_1.Get(
"Source Energy Spectrum")
10 h2 = input_file_1.Get(
"Source X-Y distribution")
11 h3 = input_file_1.Get(
"Source X-Z distribution")
12 h4 = input_file_1.Get(
"Source Y-Z distribution")
13 h5 = input_file_1.Get(
"Source phi-std::cos(theta) distribution")
14 h6 = input_file_1.Get(
"Source phi-theta distribution")
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 = gROOT.FindObject(
'MyTuple')
67 for i
in range(t1.GetEntries()):
69 h_1.Fill(t1.Energy,t1.Weight)
73 t2 = gROOT.FindObject(
"MyTuple")
74 for i
in range(t2.GetEntries()):
76 h_2.Fill(t2.Energy,t2.Weight)
78 h_2.SetLineStyle(kDashed);
79 h_2.SetLineColor(kBlue);
83 c1.Print(
"./"+file+
".png")