126 def plot_tune2d(self, tool, canvas_name, run_number=0):
127 canvas = ROOT.TCanvas()
131 h0 = ROOT.TH2F(
"h0",
"h0", nbins_eta, -2.5, 2.5, nbins_phi, -3.1415, 3.1415)
132 h1 = ROOT.TH2F(
"h1",
"h1", nbins_eta, -2.5, 2.5, nbins_phi, -3.1415, 3.1415)
133 h2 = ROOT.TH2F(
"h2",
"h2", nbins_eta, -2.5, 2.5, nbins_phi, -3.1415, 3.1415)
134 h3 = ROOT.TH2F(
"h3",
"h3", nbins_eta, -2.5, 2.5, nbins_phi, -3.1415, 3.1415)
136 for iphi
in range(nbins_phi):
137 inputs = self.example_inputs()
138 inputs.RunNumber = run_number
139 for ieta
in range(nbins_eta):
140 inputs.eta = h0.GetXaxis().GetBinCenter(ieta)
141 inputs.phi = h0.GetYaxis().GetBinCenter(iphi)
147 tool.scale_inputs(inputs)
149 h0.SetBinContent(ieta, iphi, inputs.E0raw)
150 h1.SetBinContent(ieta, iphi, inputs.E1raw)
151 h2.SetBinContent(ieta, iphi, inputs.E2raw)
152 h3.SetBinContent(ieta, iphi, inputs.E3raw)
154 grs = (h0, h1, h2, h3)
156 for i, g
in enumerate(grs):
158 g.GetXaxis().SetTitle(
"#eta")
159 g.GetYaxis().SetTitle(
"#phi")
160 g.SetTitle(
"(E_{%d})-corrected / E_{%d}-non-corrected" % (i, i))
162 g.GetZaxis().SetRangeUser(0.93,
169 canvas.SaveAs(canvas_name)