-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathmakePlots.py
More file actions
31 lines (27 loc) · 780 Bytes
/
makePlots.py
File metadata and controls
31 lines (27 loc) · 780 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
#! /usr/bin/env python
#-------------------------------------------------------------
# File: makePlots.py
# Created: 16 March 2016 Kelly Tsai
#-------------------------------------------------------------
import os,sys
from ROOT import *
def main():
massPoints = [600, 800, 1000, 1200, 1400, 1700, 2000, 2500]
for mass in massPoints:
f1 = TFile("RootFile/output_"+str(mass)+".root")
print 'test'
h_scale = f1.Get("h_scale")
h_pdf = f1.Get("h_pdf")
c1 = TCanvas("c1","Example",800,400)
c1.Divide(2)
c1.cd(1)
h_scale.Draw()
c1.cd(2)
h_pdf.Draw()
c1.SaveAs('RootFile/MZp'+str(mass)+'.png')
try:
main()
except KeyboardInterrupt:
print
print "ciao!"
print