コード例 #1
0
             ('e1e2Mass', 'e1-e2 Inv Mass (GeV)', 1),
             ('tPt', '#tau p_{T} (GeV)', 2), ('tPhi', '#tau #phi', 4),
             ('tEta', '#tau #eta', 2), ('tAbsEta', '#tau |#eta|', 2),
             ('etDR', 'e #tau dR', 2), ('etDPhi', 'e #tau #Delta#phi', 2),
             ('ztDR', 'Z #tau dR', 2), ('ztDPhi', 'Z #tau #Delta#phi', 2),
             ('type1_pfMetEt', 'type1_pfMet', 2),
             ('jetN_30', 'Number of jets, p_{T}>30', 1),
             ('bjetCSVVeto30', 'Number of b-jets', 1),
             ('tRawIso3Hits', 'tRawIso3Hits', 1)]

#rebins = [5, 5, 2, 5, 5, 2, 1, 5, 5, 2, 1]
#rebins = []
#for n in histoname :
#    rebins.append(1)

plotter.mc_samples = new_mc_samples

print plotter.mc_samples

for i in tauiso:
    for s in sign:
        #for histo, axis in zip(histoname, axistitle):
        #        for n,h in enumerate(histoname) :
        foldername = s + '/' + i
        if not os.path.exists(outputdir + foldername):
            os.makedirs(outputdir + foldername)

        if i == 'tNoCuts':
            plotter.plot_mc_vs_data(foldername,
                                    'CUT_FLOW',
                                    rebin=1,
コード例 #2
0
ファイル: PlotControlEM.py プロジェクト: lgray/UWHiggs
    views.TitleView(
        views.ScaleView(
            views.SumView(views.PathModifierView(plotter.data, get_ss), mc_inverted),
            1.4 if sqrts == 8 else 1.28 # OS/SS from Valentina
        ),
        'QCD'),
    **data_styles['WZ*'])

plotter.views['QCD'] = { 'view': qcd_view }

# Override ordering
plotter.mc_samples = [
    #'WZJetsTo3LNu*',
    #'ZZJetsTo4L*',
    'QCD',
    'WW*',
    'WplusJets_madgraph',
    'TTplusJets_madgraph',
    'Zjets_M50',
]


plotter.plot_mc_vs_data('em', 'emMass', rebin=5, leftside=False,
                        xaxis='m_{e#mu} (GeV)')
plotter.add_cms_blurb(sqrts)
plotter.save('mass')

plotter.plot_mc_vs_data('em', 'mPt')
plotter.save('mPt')
plotter.plot_mc_vs_data('em', 'ePt', rebin=10)
plotter.save('ePt')
コード例 #3
0
    #'ZZ*',
    #'WW*',
    'TT*',
    #'WplusJets*',
    "data_DoubleMu*",
]

files = []
lumifiles = []

for x in samples:
    files.extend(glob.glob('results/%s/ControlZMM/%s.root' % (jobid, x)))
    lumifiles.extend(glob.glob('inputs/%s/%s.lumicalc.sum' % (jobid, x)))

plotter = Plotter(files, lumifiles, output_dir)
plotter.mc_samples = ['Zjets_M50']

sqrts = 7 if '7TeV' in jobid else 8

plotter.plot_mc_vs_data('zmm', 'm1m2Mass', rebin=2, xaxis='m_{#mu#mu} (GeV)')
plotter.add_cms_blurb(sqrts)
plotter.save('mass')

plotter.plot_mc_vs_data('zmm', 'm1m2Mass', rebin=6, xaxis='m_{#mu#mu} (GeV)')
plotter.add_cms_blurb(sqrts)
plotter.save('mass_rebin')

plotter.plot_mc_vs_data('zmm', 'm1Pt')
plotter.save('m1Pt')
plotter.plot_mc_vs_data('zmm', 'm1Pt', 5)
plotter.save('m1Pt_rebin')
コード例 #4
0
ファイル: PlotEM.py プロジェクト: mverzett/UWHiggs
]

files = []
lumifiles = []

for x in samples:
    files.extend(glob.glob('results/%s/AnalyzeEM/%s.root' % (jobid, x)))
    lumifiles.extend(glob.glob('inputs/%s/%s.lumicalc.sum' % (jobid, x)))

plotter = Plotter(files, lumifiles, output_dir)

# Override ordering
plotter.mc_samples = [
    'TTplusJets_madgraph',
    'WplusJets_madgraph',
    'Zjets_M50',
    'WZJetsTo3LNu*',
    'WW*',
    'ZZJetsTo4L*',
]

sqrts = 7 if '7TeV' in jobid else 8

plotter.plot_mc_vs_data('em', 'emMass', rebin=10, leftside=False,
                        xaxis='m_{e#mu} (GeV)')
plotter.add_cms_blurb(sqrts)
plotter.save('mass')

plotter.plot_mc_vs_data('em', 'mPt')
plotter.save('mPt')
plotter.plot_mc_vs_data('em', 'ePt')
plotter.save('ePt')
コード例 #5
0
ファイル: PlotControlZMM.py プロジェクト: mverzett/UWHiggs
    'ZZ*',
    'WW*',
    'TT*',
    'WplusJets*',
    "data_DoubleMu*",
]

files = []
lumifiles = []

for x in samples:
    files.extend(glob.glob('results/%s/ControlZMM/%s.root' % (jobid, x)))
    lumifiles.extend(glob.glob('inputs/%s/%s.lumicalc.sum' % (jobid, x)))

plotter = Plotter(files, lumifiles, output_dir)
plotter.mc_samples = filter(lambda x: 'data' not in x.lower(), samples) #['Zjets_M50']

sqrts = 7 if '7TeV' in jobid else 8

plotter.plot_mc_vs_data('zmm', 'm1m2Mass', rebin=2, xaxis='m_{#mu#mu} (GeV)')#, show_ratio=True)
plotter.add_cms_blurb(sqrts)
plotter.save('mass')

plotter.plot_mc_vs_data('zmm', 'm1m2Mass', rebin=6, xaxis='m_{#mu#mu} (GeV)')#, show_ratio=True)
plotter.add_cms_blurb(sqrts)
plotter.save('mass_rebin')

plotter.plot_mc_vs_data('zmm', 'm1Pt', show_ratio=True)
plotter.save('m1Pt')
plotter.plot_mc_vs_data('zmm', 'm1Pt', 5, show_ratio=True)
plotter.save('m1Pt_rebin')
コード例 #6
0
ファイル: PlotControlEM.py プロジェクト: mverzett/UWHiggs
]

fakes_samples = [
    'Fakes',
    'WWJetsTo2L2Nu-no-fakes',
    #'WW*',
    'TTplusJets_madgraph-no-fakes',
    #'TTplusJets_madgraph',
    #'WZJetsTo3LNu*',
    #'ZZJetsTo4L*',
    'Zjets_M50-no-fakes',
    #'Zjets_M50',
]

for suffix, samples in [('', os_ss_samples), ('-fakes', fakes_samples)]:
    plotter.mc_samples = samples

    #from pdb import set_trace; set_trace()
    plotter.plot_mc_vs_data('em', 'emMass', rebin=5, leftside=False,
                            xaxis='m_{e#mu} (GeV)')#, show_ratio=True)
    plotter.add_cms_blurb(sqrts)
    plotter.save('mass' + suffix)

    plotter.plot_mc_vs_data('em', 'emMass', rebin=10, leftside=False,
                            xaxis='m_{e#mu} (GeV)')#, show_ratio=True)
    plotter.add_cms_blurb(sqrts)
    plotter.save('mass_rebin' + suffix)

    plotter.plot_mc_vs_data('em', 'mPt', rebin=10, show_ratio=True)
    plotter.save('mPt' + suffix)
    plotter.plot_mc_vs_data('em', 'ePt', rebin=10, show_ratio=True)