options.tfileName), os.path.basename(options.tfileName))).replace( '.root', '')) if not options.includeVBF: nBind_vbf = 0 if not options.includeVH: nBind_vh = 0 # can make a special "global toy" set of datacards toymaker = 0 if options.throwGlobalToy: if not options.throwAsimov: toymaker = CombinedToyMaker(options.inputmassfacws) else: toymaker = CombinedToyMaker( "") # Dont need mass-fact workspace for asimov cards if not options.inputpdfworkspace: toymaker.createPdfs(options.treefilename, options.outputpdfworkspace, options.expSig) else: toymaker.loadPdfs(options.inputpdfworkspace, options.expSig) if not options.throwAsimov: toymaker.plotData(cardOutDir, 160, 200) toymaker.genData(cardOutDir + "/" + options.outputmassfactoy, options.expSig) toymaker.plotToy(cardOutDir, 160, 95, options.expSig) toymaker.saveToyWorkspace(cardOutDir + "/testToyWS.root") ROOT.gROOT.ProcessLine(".L python/tmvaLoader.C+") from ROOT import tmvaLoader g_tmva = tmvaLoader( options.tmvaweightsfolder + "/TMVAClassification_BDT%sMIT.weights.xml" % options.bdtType, options.bdtType)
normG.GetXaxis().SetTitle("mH") normG.GetYaxis().SetTitle("(N+dN)/N") normG.Draw("ALP") print "Check the Errors Look Sensible -> plot saved to ./%s/normErrors_%s"%(os.path.dirname(options.tfileName),os.path.basename(options.tfileName)) can.SaveAs(("./%s/normErrors_%s.pdf"%(os.path.dirname(options.tfileName),os.path.basename(options.tfileName))).replace('.root','')) if not options.includeVBF: nBind_vbf=0 if not options.includeVH: nBind_vh=0 # can make a special "global toy" set of datacards toymaker=0 if options.throwGlobalToy: if not options.throwAsimov: toymaker = CombinedToyMaker(options.inputmassfacws) else: toymaker = CombinedToyMaker("") # Dont need mass-fact workspace for asimov cards if not options.inputpdfworkspace: toymaker.createPdfs(options.treefilename,options.outputpdfworkspace,options.expSig) else: toymaker.loadPdfs(options.inputpdfworkspace,options.expSig) if not options.throwAsimov: toymaker.plotData(cardOutDir,160,200) toymaker.genData(cardOutDir+"/"+options.outputmassfactoy,options.expSig) toymaker.plotToy(cardOutDir,160,95,options.expSig) toymaker.saveToyWorkspace(cardOutDir+"/testToyWS.root") ROOT.gROOT.ProcessLine(".L python/tmvaLoader.C+") from ROOT import tmvaLoader g_tmva = tmvaLoader(options.tmvaweightsfolder+"/TMVAClassification_BDT%sMIT.weights.xml"%options.bdtType,options.bdtType) # Now we can write the cards tfile = ROOT.TFile(options.tfileName)