])

# attach FilterStatistics dump modules to process
process.load("TauAnalysis.Configuration.dumpAHtoElecTau_grid_cff")

makePlots(
    process,
    channel=channel,
    samples=recoSampleDefinitionsAHtoElecTau,
    inputFilePath=inputFilePath,
    jobId=jobId,
    analyzer_drawJobConfigurator_indOutputFileName_sets=analyzer_draw_jobs,
    # Uncomment to enable local file running
    #skimStatFileMapper = reg.makeSkimStatFileMapper(channel),
    #skimFilterStatistic = 'evtSelDiMuPairZmumuHypothesisVetoByLooseIsolation',
    drawJobTemplate=plots_AHtoElecTau,
    #enableFactorizationFunction = enableFactorization_makeAHtoElecTauPlots_grid2,
    dqmDirectoryFilterStatistics={
        'factorizationDisabled':
        'ahElecTauAnalyzerOS_woBtag/FilterStatistics',
        'factorizationEnabled':
        'ahElecTauAnalyzerOS_woBtag_factorizedWithElectronIsolation/FilterStatistics'
    },
    dumpDQMStore=False,
    outputFileNameMaker=outputFileNameMaker,
    plotsDirectory=plotsDirectory)

bgYieldCorrections = {
    'woBtag': {
        #  desired number / lumi-weighted number (sum if necessary) / processing inefficiency
        'ZtautauEmbeddedSum': 12232. / 12548,
inputFilePath = getHarvestingFilePath(channel)
jobId = getJobId(channel)

makePlots(
    process,
    channel=channel,
    samples=recoSampleDefinitionsZtoElecTau,
    inputFilePath=inputFilePath,
    jobId=jobId,
    analyzer_drawJobConfigurator_indOutputFileName_sets=[
        [
            "zElecTauAnalyzerOS", drawJobConfigurator_ZtoElecTauOS,
            "plotZtoElecTauOS_#PLOT#.png"
        ],
        [
            "zElecTauAnalyzerSS", drawJobConfigurator_ZtoElecTauSS,
            "plotZtoElecTauSS_#PLOT#.png"
        ]
    ],
    drawJobTemplate=plots_ZtoElecTau,
    enableFactorizationFunction=enableFactorization_makeZtoElecTauPlots_grid2,
    dqmDirectoryFilterStatistics={
        'factorizationDisabled':
        'zElecTauAnalyzerOS/FilterStatistics',
        'factorizationEnabled':
        'zElecTauAnalyzerOS_factorizedWithElectronIsolation/FilterStatistics'
    },
    dumpDQMStore=False)

# print-out all python configuration parameter information
#print process.dumpPython()
from TauAnalysis.Configuration.tools.factorizationTools import enableFactorization_makeZtoDiTauPlots_grid

process = cms.Process("makeZtoDiTauPlots")

process.load("TauAnalysis.Configuration.dumpZtoDiTau_grid_cff")

channel = "ZtoDiTau"
inputFilePath = getHarvestingFilePath(channel)
jobId = getJobId(channel)

makePlots(
    process,
    channel=channel,
    samples=recoSampleDefinitionsZtoDiTau_7TeV,
    inputFilePath=inputFilePath,
    jobId=jobId,
    analyzer_drawJobConfigurator_indOutputFileName_sets=[
        ["zDiTauAnalyzer", drawJobConfigurator_ZtoDiTau, "plotZtoDiTau_#PLOT#.png"]
    ],
    drawJobTemplate=plots_ZtoDiTau,
    enableFactorizationFunction=enableFactorization_makeZtoDiTauPlots_grid,
    dqmDirectoryFilterStatistics={
        "factorizationDisabled": "zDiTauAnalyzer/FilterStatistics",
        "factorizationEnabled": "zDiTauAnalyzer_factorizedTight2ndTau/FilterStatistics",
    },
    dumpDQMStore=False,
)

# print-out all python configuration parameter information
# print process.dumpPython()
from TauAnalysis.Configuration.plotWtoTauNu_drawJobs_cfi import *

from TauAnalysis.Configuration.makePlots2_grid import makePlots
from TauAnalysis.Configuration.userRegistry import getHarvestingFilePath, getJobId

process = cms.Process('makeWtoTauNuPlots')

process.load("TauAnalysis.Configuration.dumpWtoTauNu_grid_cff")
#from TauAnalysis.Configuration.dumpWtoTauNu_grid_cff import dumpWtoTauNu 

channel = 'WtoTauNu'
inputFilePath = getHarvestingFilePath(channel)
jobId = getJobId(channel)

makePlots(process, channel = channel,
          samples = recoSampleDefinitionsWtoTauNu_grid,
          inputFilePath = inputFilePath, jobId = jobId,
          analyzer_drawJobConfigurator_indOutputFileName_sets = [
    [ "wTauNuAnalyzer", drawJobConfigurator_WtoTauNu, "plotWtoTauNu_#PLOT#.png" ]
    ],
          drawJobTemplate = plots_WtoTauNu,
#          enableFactorizationFunction = enableFactorization_makeWtoTauNuPlots_grid,
          dqmDirectoryFilterStatistics = {
    'factorizationDisabled' : 'wTauNuAnalyzer/FilterStatistics',
#    'factorizationEnabled' : 'wTauNuAnalyzer_factorizedWithTauIsolation/FilterStatistics'
    },
          dumpDQMStore = True)

# print-out all python configuration parameter information
#print process.dumpPython()
process = cms.Process('prodBgEstTemplatesZtoMuTau')

channel = 'ZtoMuTau_bgEstTemplate'
inputFilePath = getHarvestingFilePath(channel)
jobId = getJobId(channel)

makePlots(process,
          channel=channel,
          samples=recoSampleDefinitionsZtoMuTau_7TeV,
          inputFilePath=inputFilePath,
          jobId=jobId,
          analyzer_drawJobConfigurator_indOutputFileName_sets=[
              ['BgEstTemplateAnalyzer_ZmumuJetMisIdEnriched'],
              ['BgEstTemplateAnalyzer_ZmumuMuonMisIdEnriched'],
              ['BgEstTemplateAnalyzer_WplusJetsEnriched'],
              ['BgEstTemplateAnalyzer_TTplusJetsEnriched'],
              ['BgEstTemplateAnalyzer_QCDenriched']
          ],
          dqmDirectoryFilterStatistics={
              'factorizationDisabled':
              'BgEstTemplateAnalyzer_QCDenriched/FilterStatistics/',
              'factorizationEnabled':
              'BgEstTemplateAnalyzer_QCDenriched/FilterStatistics/'
          },
          dumpDQMStore=False)


#--------------------------------------------------------------------------------
# Print-out cut-flow information for background enriched samples
# from which template histograms are obtained
#
    ["ahMuTauAnalyzerOS_wBtag", drawJobConfigurator_AHtoMuTau_wBtag, "plotAHtoMuTauOS_wBtag_#PLOT#.pdf"],
    ["ahMuTauAnalyzerSS_woBtag", drawJobConfigurator_AHtoMuTau_woBtagSS, "plotAHtoMuTauSS_woBtag_#PLOT#.pdf"],
    ["ahMuTauAnalyzerSS_wBtag", drawJobConfigurator_AHtoMuTau_wBtagSS, "plotAHtoMuTauSS_wBtag_#PLOT#.pdf"],
]

process.load("TauAnalysis.Configuration.dumpAHtoMuTau_grid_cff")

makePlots(
    process,
    channel=channel,
    samples=recoSampleDefinitionsAHtoMuTau_7TeV,
    inputFilePath=inputFilePath,
    jobId=jobId,
    analyzer_drawJobConfigurator_indOutputFileName_sets=analyzer_draw_jobs,
    # Uncomment to enable local file running
    skimStatFileMapper=reg.makeSkimStatFileMapper(channel),
    skimFilterStatistic="evtSelDiMuPairZmumuHypothesisVetoByLooseIsolation",
    drawJobTemplate=plots_AHtoMuTau,
    enableFactorizationFunction=enableFactorization_makeAHtoMuTauPlots_grid2,
    dqmDirectoryFilterStatistics={
        "factorizationDisabled": "ahMuTauAnalyzerOS_woBtag/FilterStatistics",
        "factorizationEnabled": "ahMuTauAnalyzerOS_woBtag_factorizedWithMuonIsolation/FilterStatistics",
    },
    dumpDQMStore=False,
    outputFileNameMaker=outputFileNameMaker,
    plotsDirectory=plotsDirectory,
)

# print-out all python configuration parameter information
print process.dumpPython()
Beispiel #7
0
process = cms.Process('makeWtoTauNuPlots')

process.load("TauAnalysis.Configuration.dumpWtoTauNu_grid_cff")
#from TauAnalysis.Configuration.dumpWtoTauNu_grid_cff import dumpWtoTauNu

channel = 'WtoTauNu'
inputFilePath = getHarvestingFilePath(channel)
jobId = getJobId(channel)

makePlots(
    process,
    channel=channel,
    samples=recoSampleDefinitionsWtoTauNu_grid,
    inputFilePath=inputFilePath,
    jobId=jobId,
    analyzer_drawJobConfigurator_indOutputFileName_sets=[[
        "wTauNuAnalyzer", drawJobConfigurator_WtoTauNu,
        "plotWtoTauNu_#PLOT#.png"
    ]],
    drawJobTemplate=plots_WtoTauNu,
    #          enableFactorizationFunction = enableFactorization_makeWtoTauNuPlots_grid,
    dqmDirectoryFilterStatistics={
        'factorizationDisabled': 'wTauNuAnalyzer/FilterStatistics',
        #    'factorizationEnabled' : 'wTauNuAnalyzer_factorizedWithTauIsolation/FilterStatistics'
    },
    dumpDQMStore=True)

# print-out all python configuration parameter information
#print process.dumpPython()
from TauAnalysis.Configuration.makePlots2_grid import makePlots
from TauAnalysis.Configuration.userRegistry import getHarvestingFilePath, getJobId

process = cms.Process('prodBgEstTemplatesZtoMuTau')

channel = 'ZtoMuTau_bgEstTemplate'
inputFilePath = getHarvestingFilePath(channel)
jobId = getJobId(channel)

makePlots(process, channel = channel, samples = recoSampleDefinitionsZtoMuTau_7TeV,
          inputFilePath = inputFilePath, jobId = jobId,
          analyzer_drawJobConfigurator_indOutputFileName_sets = [
              [ 'BgEstTemplateAnalyzer_ZmumuJetMisIdEnriched' ],
              [ 'BgEstTemplateAnalyzer_ZmumuMuonMisIdEnriched' ],
              [ 'BgEstTemplateAnalyzer_WplusJetsEnriched' ],
              [ 'BgEstTemplateAnalyzer_TTplusJetsEnriched' ],
              [ 'BgEstTemplateAnalyzer_QCDenriched' ]
          ],
          dqmDirectoryFilterStatistics = {
              'factorizationDisabled' : 'BgEstTemplateAnalyzer_QCDenriched/FilterStatistics/',
              'factorizationEnabled' : 'BgEstTemplateAnalyzer_QCDenriched/FilterStatistics/'
          },
          dumpDQMStore = False)

#--------------------------------------------------------------------------------
# Print-out cut-flow information for background enriched samples
# from which template histograms are obtained
#
def configureDQMDumpFilterStatisticsTable(dqmDirectoriesProcess, dqmDirectoryFilterStatisticsTable):
    module = cms.EDAnalyzer("DQMDumpFilterStatisticsTables",
        dqmDirectories = cms.PSet(),
        columnsSummaryTable = cms.vstring("Passed"),
Beispiel #9
0
inputFilePath = getHarvestingFilePath(channel)
#inputFilePath = '/afs/crc.nd.edu/user/l/lantonel/CMSSW_3_8_7_patch1/src/TauAnalysis/BgEstimationTools/test'
jobId = getJobId(channel)
#jobId = 1

makePlots(process, channel = channel, samples = recoSampleDefinitionsZtoElecTau,
          inputFilePath = inputFilePath, jobId = jobId,
          analyzer_drawJobConfigurator_indOutputFileName_sets = [
##                [ 'BgEstTemplateAnalyzer_ZeeJetMisIdEnriched' ],
##                [ 'BgEstTemplateAnalyzer_ZeeElectronMisIdEnriched' ],
##                [ 'BgEstTemplateAnalyzer_WplusJetsEnriched' ],
##                [ 'BgEstTemplateAnalyzer_PhotonPlusJetsEnriched' ],
##                [ 'BgEstTemplateAnalyzer_QCDenriched' ],
##                [ 'BgEstTemplateAnalyzer_ZtautauEnriched' ]
                  [ "BgEstTemplateAnalyzer_ZtautauEnriched", drawJobConfigurator_ForElecTau, "plotZtoElecTau_#PLOT#.png" ],
##                [ 'BgEstTemplateAnalyzer_ZtautauEnriched',drawJobConfigurator_ForElecTau, "plotZtoElecTau_#PLOT#.png"  ]
          ],
          dqmDirectoryFilterStatistics = {
              'factorizationDisabled' : 'BgEstTemplateAnalyzer_ZtautauEnriched/FilterStatistics/',
              'factorizationEnabled' : 'BgEstTemplateAnalyzer_ZtautauEnriched/FilterStatistics/'
          },
          dumpDQMStore = False,
          drawJobTemplate = plots_ZtoElecTau
          )

#--------------------------------------------------------------------------------
# Print-out cut-flow information for background enriched samples
# from which template histograms are obtained
#
def configureDQMDumpFilterStatisticsTable(dqmDirectoriesProcess, dqmDirectoryFilterStatisticsTable):
)
process.source = cms.Source("EmptySource")

# Load the regular analysis workflow file
reg.overrideJobId(channel, _REGULAR_JOBID)
makePlots.makePlots(
    process, channel, samples,
    inputFilePath = reg.getHarvestingFilePath(channel),
    jobId = reg.getJobId(channel),
    skimStatFileMapper = reg.makeSkimStatFileMapper(channel),
    skimFilterStatistic = 'evtSelDiMuPairZmumuHypothesisVetoByLooseIsolation',
    analyzer_drawJobConfigurator_indOutputFileName_sets  = [],
    drawJobTemplate = plots_AHtoMuTau,
    enableFactorizationFunction = None,
    dqmDirectoryFilterStatistics = {
        'factorizationDisabled' : 'ahMuTauAnalyzerOS_woBtag/FilterStatistics',
        'factorizationEnabled' : 'ahMuTauAnalyzerOS_woBtag_factorizedWithMuonIsolation/FilterStatistics'
    },
    dqmDirectoryFilterStatisticsForSkim = {
        'factorizationDisabled' : 'ahMuTauAnalyzerOS_woBtag/FilterStatistics',
        'factorizationEnabled' : 'ahMuTauAnalyzerOS_woBtag_factorizedWithMuonIsolation/FilterStatistics'
    },
    disableFactorizationSample = True,
    disableFactorizationSkim = False,
    dumpDQMStore = False,
    moduleLabel = "Regular",
)

# Load the fake rate workflow file
reg.overrideJobId(channel, _FR_JOBID)
makePlots.makePlots(
    process, channel, samples,
Beispiel #11
0
from TauAnalysis.Configuration.recoSampleDefinitionsWtoTauNu_grid_cfi import recoSampleDefinitionsWtoTauNu_grid
from TauAnalysis.Configuration.makePlots2_grid import makePlots
from TauAnalysis.Configuration.userRegistry import getHarvestingFilePath, getJobId

process = cms.Process('prodBgEstTemplatesWtoTauNu')

channel = 'WtoTauNu_bgEstTemplate'
inputFilePath = getHarvestingFilePath(channel)
jobId = getJobId(channel)

makePlots(process, channel = channel,
          samples = recoSampleDefinitionsWtoTauNu_grid,
          inputFilePath = inputFilePath, jobId = jobId,
          analyzer_drawJobConfigurator_indOutputFileName_sets = [
    [ 'bgEstTemplateAnalyzer_QCDEnriched' ]
    ],
          dqmDirectoryFilterStatistics = {
    'factorizationDisabled' : 'BgEstTemplateAnalyzer_QCDEnriched/FilterStatistics/'
#    'factorizationEnabled' : 'BgEstTemplateAnalyzer_QCDenriched/FilterStatistics/'
    },
          dumpDQMStore = False)

#--------------------------------------------------------------------------------
# Print-out cut-flow information for background enriched samples
# from which template histograms are obtained
#
def configureDQMDumpFilterStatisticsTable(dqmDirectoriesProcess, dqmDirectoryFilterStatisticsTable):
    module = cms.EDAnalyzer("DQMDumpFilterStatisticsTables",
        dqmDirectories = cms.PSet(),
        columnsSummaryTable = cms.vstring("Passed"),
        printSummaryTableOnly = cms.bool(True)                                                    
from TauAnalysis.Configuration.userRegistry import getHarvestingFilePath, overrideJobId, getJobId

# import utility function to enable factorization
from TauAnalysis.Configuration.tools.factorizationTools import enableFactorization_makeZtoMuTauPlots_grid2

process = cms.Process('makeZtoMuTauPlots')

process.load("TauAnalysis.Configuration.dumpZtoMuTau_grid_cff")

channel = 'ZtoMuTau'
overrideJobId(channel, '2011Apr09_HPSloose')
inputFilePath = getHarvestingFilePath(channel)
jobId = getJobId(channel)

makePlots(process, channel = channel, samples = recoSampleDefinitionsZtoMuTau_7TeV,
          inputFilePath = inputFilePath, jobId = jobId,
          analyzer_drawJobConfigurator_indOutputFileName_sets = [
              [ "zMuTauAnalyzerOS", drawJobConfigurator_ZtoMuTauOS, "plotZtoMuTauOS_#PLOT#.pdf" ],
	      [ "zMuTauAnalyzerSS", drawJobConfigurator_ZtoMuTauSS, "plotZtoMuTauSS_#PLOT#.pdf" ]
          ],
          drawJobTemplate = plots_ZtoMuTau,
          enableFactorizationFunction = enableFactorization_makeZtoMuTauPlots_grid2,
          dqmDirectoryFilterStatistics = {
              'factorizationDisabled' : 'zMuTauAnalyzerOS/FilterStatistics',
              'factorizationEnabled' : 'zMuTauAnalyzerOS_factorizedWithMuonIsolation/FilterStatistics'
          },
          dumpDQMStore = False)

# print-out all python configuration parameter information
#print process.dumpPython()
Beispiel #13
0
process = cms.Process('makeZtoDiTauPlots')

process.load("TauAnalysis.Configuration.dumpZtoDiTau_grid_cff")

channel = 'ZtoDiTau'
inputFilePath = getHarvestingFilePath(channel)
jobId = getJobId(channel)

makePlots(
    process,
    channel=channel,
    samples=recoSampleDefinitionsZtoDiTau_7TeV,
    inputFilePath=inputFilePath,
    jobId=jobId,
    analyzer_drawJobConfigurator_indOutputFileName_sets=[[
        "zDiTauAnalyzer", drawJobConfigurator_ZtoDiTau,
        "plotZtoDiTau_#PLOT#.png"
    ]],
    drawJobTemplate=plots_ZtoDiTau,
    enableFactorizationFunction=enableFactorization_makeZtoDiTauPlots_grid,
    dqmDirectoryFilterStatistics={
        'factorizationDisabled':
        'zDiTauAnalyzer/FilterStatistics',
        'factorizationEnabled':
        'zDiTauAnalyzer_factorizedTight2ndTau/FilterStatistics'
    },
    dumpDQMStore=False)

# print-out all python configuration parameter information
#print process.dumpPython()