ATLAS Offline Software
Classes | Namespaces | Functions | Variables
fitman.py File Reference

Go to the source code of this file.

Classes

class  fitman.Plots
 

Namespaces

 fitman
 

Functions

def fitman.logresult (cmd='', fitresult=None)
 
def fitman.tmpHist (what, wmin=-1e10, wmax=+1e10)
 

Variables

string fitman.__author__ = 'Juerg Beringer'
 
string fitman.__version__ = '$Id: fitman.py 721742 2016-02-03 23:34:44Z beringer $'
 
string fitman.__usage__
 
list fitman.qargv = [ ]
 
string fitman.qcmd = ' '.join(qargv)
 
 fitman.parser = OptionParser(usage=__usage__, version=__version__)
 
 fitman.dest
 
 fitman.default
 
 fitman.None
 
 fitman.help
 
 fitman.type
 
 fitman.action
 
 fitman.False
 
 fitman.options
 
 fitman.args
 
 fitman.cmdList = args
 
 fitman.srcFile = ROOT.TFile(options.srcNtName)
 
 fitman.srcNt = srcFile.Get(options.srcTreeName)
 
 fitman.nEntries = srcNt.GetEntries()
 
 fitman.dstFile = ROOT.TFile(options.ntName,'recreate')
 
 fitman.dstNt = ROOT.TTree(options.ntTree,'Vertices')
 
 fitman.bx = array('d',[0]); dstNt.Branch('x',bx,'x/D')
 
 fitman.by = array('d',[0]); dstNt.Branch('y',by,'y/D')
 
 fitman.bz = array('d',[0]); dstNt.Branch('z',bz,'z/D')
 
 fitman.bvxx = array('d',[0]); dstNt.Branch('vxx',bvxx,'vxx/D')
 
 fitman.bvyy = array('d',[0]); dstNt.Branch('vyy',bvyy,'vyy/D')
 
 fitman.bvxy = array('d',[0]); dstNt.Branch('vxy',bvxy,'vxy/D')
 
 fitman.bvxz = array('d',[0]); dstNt.Branch('vxz',bvxz,'vxz/D')
 
 fitman.bvyz = array('d',[0]); dstNt.Branch('vyz',bvyz,'vyz/D')
 
 fitman.bvzz = array('d',[0]); dstNt.Branch('vzz',bvzz,'vzz/D')
 
int fitman.nSelected = 0
 
int fitman.nWritten = 0
 
 fitman.maxVtxErr2 = options.maxvtxerr*options.maxvtxerr
 
 fitman.minVtxErr2 = options.minvtxerr*options.minvtxerr
 
 fitman.x = RooRealVar("x","x [mm]",-3,3)
 
 fitman.y = RooRealVar("y","y [mm]",-3,3)
 
 fitman.z = RooRealVar("z","z [mm]",-300,300)
 
 fitman.vxx = RooRealVar("vxx","vxx",-3,3)
 
 fitman.vyy = RooRealVar("vyy","vyy",-3,3)
 
 fitman.vxy = RooRealVar("vxy","vxy",-3,3)
 
 fitman.vxz = RooRealVar("vxz","vxz",-3,3)
 
 fitman.vyz = RooRealVar("vyz","vyz",-3,3)
 
 fitman.vzz = RooRealVar("vzz","vzz",-3,3)
 
 fitman.vtxDataFile = ROOT.TFile(options.ntName)
 
 fitman.vtxData = vtxDataFile.Get(options.ntTree)
 
def fitman.hx = tmpHist('x',-3.,3.)
 
def fitman.hy = tmpHist('y',-3.,3.)
 
def fitman.hz = tmpHist('z',-300.,300.)
 
 fitman.data = RooDataSet("data","data", vtxData, RooArgSet(x,y,z,vxx,vyy,vxy,vzz))
 
 fitman.mx = RooRealVar("mx","Mean x", hx.GetMean(), -2, 2)
 
 fitman.sx = RooRealVar("sx","Sigma x", hx.GetRMS(), 0, 1)
 
 fitman.ax = RooRealVar("ax","Tilt x", 0, -1e-3, 1e-3)
 
 fitman.my = RooRealVar("my","Mean y", hy.GetMean(), -2, 2)
 
 fitman.sy = RooRealVar("sy","Sigma y", hy.GetRMS(), 0, 1)
 
 fitman.ay = RooRealVar("ay","Tilt y", 0, -1e-3, 1e-3)
 
 fitman.mz = RooRealVar("mz","Mean z", hz.GetMean(), -300, 300)
 
 fitman.sz = RooRealVar("sz","Sigma z", hz.GetRMS(), 0, 100)
 
 fitman.k = RooRealVar("k","Error scale factor", 1, 0.0, 3)
 
 fitman.rho = RooRealVar("rho","Correlation coefficient", 0, -1, 1)
 
 fitman.f = RooRealVar("f", "Fraction of 1st Gauss", 0.9, 0., 1)
 
 fitman.mx2 = RooRealVar("mx2","Mean x", -0.05, -2, 2)
 
 fitman.sx2 = RooRealVar("sx2","Sigma x", 0.10, 0, 1)
 
 fitman.ax2 = RooRealVar("ax2","Tilt x", 0, -1e-3, 1e-3)
 
 fitman.my2 = RooRealVar("my2","Mean y", 1, -2, 2)
 
 fitman.sy2 = RooRealVar("sy2","Sigma y", 0.10, 0, 1)
 
 fitman.ay2 = RooRealVar("ay2","Tilt y", 0, -1e-3, 1e-3)
 
 fitman.mz2 = RooRealVar("mz2","Mean z", -3, -300, 300)
 
 fitman.sz2 = RooRealVar("sz2","Sigma z", 60, 0, 100)
 
 fitman.rho2 = RooRealVar("rho2","Correlation coefficient", 0, -1, 1)
 
 fitman.mux = RooFormulaVar("mux","@0+@1*(@2-@3)",RooArgList(mx,ax,z,mz))
 
 fitman.muy = RooFormulaVar("muy","@0+@1*(@2-@3)",RooArgList(my,ay,z,mz))
 
 fitman.cxx = RooFormulaVar("cxx","@0*@0+@1*@1*@2",RooArgList(sx,k,vxx))
 
 fitman.cxy = RooFormulaVar("cxy","@0*@1*@2+@3*@3*@4",RooArgList(rho,sx,sy,k,vxy))
 
 fitman.cyy = RooFormulaVar("cyy","@0*@0+@1*@1*@2",RooArgList(sy,k,vyy))
 
 fitman.czz = RooFormulaVar("czz","@0*@0",RooArgList(sz))
 
 fitman.czzv = RooFormulaVar("czz","@0*@0+@1",RooArgList(sz,vzz))
 
 fitman.mux2 = RooFormulaVar("mux2","@0+@1*(@2-@3)",RooArgList(mx2,ax,z,mz))
 
 fitman.muy2 = RooFormulaVar("muy2","@0+@1*(@2-@3)",RooArgList(my2,ay,z,mz))
 
 fitman.cxx2 = RooFormulaVar("cxx2","@0*@0+@1*@1*@2",RooArgList(sx2,k,vxx))
 
 fitman.cxy2 = RooFormulaVar("cxy2","@0*@1*@2+@3*@3*@4",RooArgList(rho,sx2,sy2,k,vxy))
 
 fitman.cyy2 = RooFormulaVar("cyy2","@0*@0+@1*@1*@2",RooArgList(sy2,k,vyy))
 
 fitman.czz2 = RooFormulaVar("czz","@0*@0",RooArgList(sz))
 
 fitman.dummyMatrix = ROOT.TMatrixDSym(3)
 
bool fitman.cmdOk = False
 
 fitman.fitmodel
 
 fitman.fitresult
 
 fitman.g1
 
 fitman.g2
 
 fitman.plots = Plots(whatList = ['x','y','z'])
 
 fitman.saveAsList
 
 fitman.gPadSaveAsList
 
 fitman.allCanvasDivs
 
 fitman.allCanvasSize