Beispiel #1
0
samples['ZPlusJet']     = ['Rare', 'WZJets3LNu', 'ZJets', 'WJets']
samples['QCD2l']        = ['ZJets', 'WJets', 'QCD', 'ttbar']
samples['SameSign']     = ['Rare', 'WZJets3LNu', 'ttbar', 'ZJets', 'WJets', 'QCD']
#samples['SameSign']     = ['WZJets3LNu', 'ttbar', 'ZJets', 'W1JetsToLNu', 'W2JetsToLNu', 'W3JetsToLNu', 'W4JetsToLNu']

if doPlots:

    print '\nMaking the plots...\n'

    r.gROOT.SetBatch()

    ### Initialize plot producer ###
    plotter = PlotProducer(inputFile = 'fakeEstimator/histos/{0}.root'.format(batch), savePath = '', scale = LUMIDATA, isAFS = False)
    plotter.set_period(period)
    plotter.set_output_type(plotType)
    plotter.set_save_path('plots/{0}/{1}_{2}_{3}/log'.format(currentDate, selection, batch, suffix))

    ### DATASETS ###

    plotter.add_datasets(samples['inclusive'])
    plotter._overlayList.extend(['DATA'])
    plotter.get_scale_factors(corrected = False)

    plotter._directoryList1D            = ['Muon', 'Electron']

    plotter._variableDict['Muon']       = ['MuPassLepPt', 'MuPassLepEta', 'MuPassTransverseMass', 
                                           'MuProbeLepPt', 'MuProbeLepEta', 'MuProbeTransverseMass',
                                           'MuNumerPt', 'MuNumerEta', 'MuNumerMet', 'MuNumerIsoRel',
                                           'MuDenomPt', 'MuDenomEta', 'MuDenomMet', 'MuDenomIsoRel',
                                           'MuNumerPtLowJet', 'MuNumerPtHighJet',
                                           'MuDenomPtLowJet', 'MuDenomPtHighJet',
plotter._variableDict['2D_Dilepton']    = ['DileptonM12VsLepPt1', 'DileptonM12VsLepPt2', 'DileptonMVsDeltaPhi12', 'DileptonM12VsQt12',
                                           'DileptonM12VsM23', 'DileptonM12VsM13', 'DileptonM23VsM13', 'DileptonM12VsLepPt3', 
                                           'DileptonM13VsLepPt1', 'DileptonM13VsLepPt2', 'DileptonM13VsLepPt3',
                                           'DileptonM23VsLepPt1', 'DileptonM23VsLepPt2', 'DileptonM23VsLepPt3',
                                           'DileptonMos1VsMss', 'DileptonMos2VsMss']
                                           #'DileptonMVsDeltaPhi13', 'DileptonM12VsQt13', 'DileptonMVsDeltaPhi23', 'DileptonM12VsQt23'


 ###################   
 ### MAKE PLOTS! ###  
 ###################   

r.gROOT.SetStyle('Plain')
r.gStyle.SetOptStat(0)
#r.gROOT.ProcessLine('.L ./tdrStyle.C')
#r.setTDRStyle()


for i, cut in enumerate(cutList):
    print cut

    plotter.set_input_file('histos/' + selection + '_cut' + str(i+1) + '_' + period + '.root')
    plotter.set_save_path('../plots/fakes/' + currentDate + '/' + cut)

    for category in cat3l:
        print '\t' + category
        plotter._category = category
        plotter.make_overlays_1D(logScale = True, doRatio = True, doEff = False)