NBINS = int(options.nbins)
    XMIN = float(options.xmin)
    XMAX = float(options.xmax)

    
    # TH1.AddDirectory(False)
    dataName = 'Data'
    weight='weight'
    
    anaDir = args[0]
    cfgFileName = args[1]
    file = open( cfgFileName, 'r' )
    cfg = imp.load_source( 'cfg', cfgFileName, file)
    embed = options.embed
    selComps, weights, zComps = prepareComponents(anaDir, cfg.config)


    can, pad, padr = buildCanvas()

    fwss, fwos, ss, os = plot_W_inclusive( options.hist, anaDir, selComps, weights,
                                           30, 60, 300, 'isSignal',
                                           weight=weight, embed=options.embed)

    ssign, osign, ssQCD, osQCD = makePlot( options.hist, weights, fwss, fwos, NBINS, XMIN, XMAX, weight=weight, embed=options.embed); draw(osQCD)
    
    # from CMGTools.H2TauTau.proto.plotter.plot_H2TauTauDataMC_TauMu_Inclusive import makePlot as makePlotInclusive

    # ssign, osign, ssQCD, osQCD = makePlotInclusive( options.hist, anaDir, selComps, weights, fwss, fwos, NBINS, XMIN, XMAX, cat_Inc + ' && mt<40', weight=weight, embed=options.embed); draw(osQCD)

    # factor_QCD_nonIsoToIso()
Beispiel #2
0
    # remove WJets from components, and aliase W3Jets -> WJets
    comps = [comp for comp in cfg.config.components if comp.name!='WJets' and  comp.name!='TTJets']
    cfg.config.components = comps

    aliases = {'DYJets':'Ztt',
               'W3Jets':'WJets',
               'TTJets11':'TTJets'
               }

    # import pdb; pdb.set_trace()
    
    selComps, weights, zComps = prepareComponents(anaDir, cfg.config, aliases)


    can, pad, padr = buildCanvas()

    # WJets normalization. relaxing tau iso to get more stat
    
    
    fwss, fwos, ss, os = plot_W( options.hist, anaDir, selComps, weights,
                                 15, 60, 120, cutw,
                                 weight=weight, embed=options.embed)

    # import pdb; pdb.set_trace()

    antiso, osign, antisoQCD, osQCD  = makePlot( options.hist, weights, fwss, fwos, NBINS, XMIN, XMAX, weight=weight, embed=options.embed); draw(osQCD)


    
##     # from CMGTools.H2TauTau.proto.plotter.plot_H2TauTauDataMC_TauMu_Inclusive import makePlot as makePlotInclusive