from ROOT import * # this module is a pythonification of #/home/rpm1/Root/plotfiducial.C #below are from my thesis (the intermediate Alex/Dick fiducial that is probably final) acmin = 0.54 acmax = 0.96 ptotmax = 52.0 pzmin = 14.0 ptmin = 10.0 ptmax = 38.0 def fiducial_lines(): linecolor = 1 #4=blue linewidth = 2 pzminpos = TFormula("pzminpos","[0]/x") pzminpos.SetParameter(0,pzmin) pzminneg = TFormula("pzminneg","-[0]/x") pzminneg.SetParameter(0,pzmin); ## (there's no pzmax limit) ## Define ptmin curves. ptminpos = TFormula("ptminpos","sqrt(1-([0]/x)^2)") ptminpos.SetParameter(0,ptmin) ptminneg = TFormula("ptminneg","-sqrt(1-([0]/x)^2)") ptminneg.SetParameter(0,ptmin) ## Define ptmax curves. ptmaxpos = TFormula("ptmaxpos","sqrt(1-([0]/x)^2)") ptmaxpos.SetParameter(0,ptmax) ptmaxneg = TFormula("ptmaxneg","-sqrt(1-([0]/x)^2)") ptmaxneg.SetParameter(0,ptmax) ## Now figure out drawing range? ## (There's gotta be a better way to figure this out... -RPM) ## pzmin go from ptot=0.1...53.0 ## Double_t ptminstart, ptminend; dptot = 10.0 while dptot pzminpos.Eval(dptot) ): ptminstart = dptot break dptot+=0.1 dptot = ptotmax while dptot>ptminstart: if (ptminpos.Eval(dptot) < acmax): ptminend=dptot break dptot-=0.1 # dptot = 10.0 # while dptotptminstart: # if ptminpos.Eval(dptot) < acmax: # ptminend = dptot # break # dptot-=0.1 # dptot +- 0.1 ptminposcurve = TF1("ptminposcurve", "ptminpos", ptminstart, ptminend) ptminnegcurve = TF1("ptminnegcurve", "ptminneg", ptminstart, ptminend) # Double_t ptmaxstart; dptot = ptmax+0.001 while dptot<53.0: if ( ptmaxpos.Eval(dptot) > acmin ): ptmaxstart = dptot break dptot+=0.1 ptmaxposcurve = TF1("ptmaxposcurve","ptmaxpos",ptmaxstart,ptotmax) ptmaxnegcurve = TF1("ptmaxnegcurve","ptmaxneg",ptmaxstart,ptotmax) #Double_t pzminstart; # Double_t pzminend; # // The pzmin line meets the ptmin line. pzminstart = ptminstart dptot = 0.1 while dptot<53.0: if pzminpos.Eval(dptot)