#!/usr/bin/python from michel_spectrum import * from ROOT import * def makegstyle(cStyle): cStyle.SetPadBorderMode(0) cStyle.SetOptStat(0) ## Hide stats cStyle.SetOptTitle(1) ## Display histogram titles. cStyle.SetCanvasColor(10) ## Background color (white) cStyle.SetPadColor(10) ## Background color (white) cStyle.SetFillColor(10) ## Background color (white) cStyle.SetTitleFillColor(10) ## Background color (white) cStyle.SetStatColor(10) ## Background color (white) cStyle.SetPalette(1) ## Nicer colour scale for 2D histograms. cStyle.SetTitleBorderSize(0) ##duh return cStyle def call_ms(xc,p): x,c=xc[0],xc[1] mp ={'rho':p[0],'eta':p[1],'xi':p[2],'delta':p[3]} return michel_spectrum(x,c,mp,'all') #'all' or 'oa' or 'base' ## return michel_spectrum(x,c) if __name__ == '__main__': # set up the TF2 ms = TF2('Michel spectrum; x; cos theta',call_ms, 0.0, 1.0, -1.0, 1.0, 4) rho, eta, xi, delta = 0.75, 0.0, 1.0, 0.75 ms.SetParameter(0,rho) ms.SetParameter(1,eta) ms.SetParameter(2,xi) ms.SetParameter(3,delta) # draw it gStyle = makegstyle(gStyle) c = TCanvas() ms.Draw('surf2') au = raw_input('>')