'TTV' : ['TTWJetsToLNu_TuneCUETP8M1_13TeV-amcatnloFXFX-madspin-pythia8'], 'ZG' : ['ZGTo2LG_TuneCUETP8M1_13TeV-amcatnloFXFX-pythia8'], 'WW' : ['WWTo2L2Nu_13TeV-powheg'], 'Z' : ['DYJetsToLL_M-50_TuneCUETP8M1_13TeV-amcatnloFXFX-pythia8', 'DYJetsToLL_M-10to50_TuneCUETP8M1_13TeV-amcatnloFXFX-pythia8'], 'TT' : ['TTJets_TuneCUETP8M1_13TeV-amcatnloFXFX-pythia8'], 'data': ['DoubleMuon', 'DoubleEG', 'MuonEG', 'SingleMuon', 'SingleElectron'], 'HppHmm500GeV' : ['HPlusPlusHMinusMinusHTo4L_M-500_13TeV-pythia8'], } mPlotter.addHistogram('HppHmm500GeV',sigMap['HppHmm500GeV']) plots = { 'pt_v_dxy': {'xaxis':'p_{T} (GeV)', 'yaxis': '|#Delta_{xy}|'}, 'pt_v_dz' : {'xaxis':'p_{T} (GeV)', 'yaxis': '|#Delta_{z}|'}, } for plot,kwargs in plots.iteritems(): mPlotter.plot2D(plot,'hpp_{0}'.format(plot),logz=0,**kwargs) mPlotter.clearHistograms() mPlotter.addHistogram('Z',sigMap['Z']) for plot,kwargs in plots.iteritems(): mPlotter.plot2D(plot,'dy_{0}'.format(plot),logz=1,**kwargs)
'regionC': 'highmass/regionC_fakeForA/{}'.format(plot), 'regionD': 'highmass/regionD_fakeForA/{}'.format(plot), } savename = 'highmass/regions_datadriven/{}_{}'.format(plot, s) plotter.plot(plotname, savename, **kwargs) savename = 'highmass/regions_datadriven_normalized/{}_{}'.format( plot, s) plotter.plotNormalized(plotname, savename, **kwargs) ################ ### 2D plots ### ################ if do2D: allsamples = samples + signals + ['data'] if doAllSignals: allsamples = samples + allsignals + ['data'] for sample in allsamples: plotter.clearHistograms() plotter.addHistogram(sample, sigMap[sample]) for plot in plots2D: for sel in sels: #if sample=='data' and blind and 'regionD' not in sel: continue kwargs = deepcopy(plots2D[plot]) #if sample not in allsignals: # kwargs['rebinx'] = 10 # kwargs['rebiny'] = 10 plotname = '{0}/{1}'.format(sel, plot) savename = '{0}/2D/{1}/{2}'.format(sel, sample, plot) plotter.plot2D(plotname, savename, **kwargs)
plotter.plotNormalized(plotname,savename,**kwargs) ################ ### 2D plots ### ################ if do2D: allsamples = signals+['data'] if doAllSignals: allsamples = allsignals+['data'] for sample in allsamples: plotter.clearHistograms() plotter.addHistogram(sample,sigMap[sample]) for plot in plots2D: thesels = signalsels if sample in allsignals else sels for sel in thesels: #if sample=='data' and blind and 'regionD' not in sel: continue kwargs = deepcopy(plots2D[plot]) #if sample not in allsignals: # kwargs['rebinx'] = 10 # kwargs['rebiny'] = 10 plotname = '{0}/{1}'.format(sel,plot) savename = '{0}/2D/{1}/{2}'.format(sel,sample,plot) plotter.plot2D(plotname,savename,**kwargs)