Exemplo n.º 1
0
from DevTools.Plotter.Plotter import Plotter

blind = True

mPlotter = Plotter(
    inputDirectory  = 'flat/SingleMuon',
    outputDirectory = 'plots/SingleMuon',
    saveFileName    = 'plots.root',
)

sigMap = {
    'WZ'  : ['WZTo3LNu_TuneCUETP8M1_13TeV-powheg-pythia8'],
    'ZZ'  : ['ZZTo4L_13TeV_powheg_pythia8',
             'GluGluToContinToZZTo2e2mu_13TeV_MCFM701_pythia8',
             'GluGluToContinToZZTo2mu2tau_13TeV_MCFM701_pythia8',
             'GluGluToContinToZZTo4e_13TeV_MCFM701_pythia8',
             'GluGluToContinToZZTo4mu_13TeV_MCFM701_pythia8',
             'GluGluToContinToZZTo4tau_13TeV_MCFM701_pythia8',
             'ZZTo2L2Nu_13TeV_powheg_pythia8',
             'ZZTo2L2Q_13TeV_amcatnloFXFX_madspin_pythia8'],
    'VVV' : ['WZZ_TuneCUETP8M1_13TeV-amcatnlo-pythia8'],
    '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',
Exemplo n.º 2
0
from DevTools.Plotter.Plotter import Plotter

wzPlotter = Plotter(
    inputDirectory  = 'flat/WZ',
    outputDirectory = 'plots/WZ',
    saveFileName    = 'plots.root',
)

sigMap = {
    'WZ'  : ['WZTo3LNu_TuneCUETP8M1_13TeV-powheg-pythia8'],
    'ZZ'  : ['ZZTo4L_13TeV_powheg_pythia8',
             'GluGluToContinToZZTo2e2mu_13TeV_MCFM701_pythia8',
             'GluGluToContinToZZTo2mu2tau_13TeV_MCFM701_pythia8',
             'GluGluToContinToZZTo4e_13TeV_MCFM701_pythia8',
             'GluGluToContinToZZTo4mu_13TeV_MCFM701_pythia8',
             'GluGluToContinToZZTo4tau_13TeV_MCFM701_pythia8',
             'ZZTo2L2Nu_13TeV_powheg_pythia8',
             'ZZTo2L2Q_13TeV_amcatnloFXFX_madspin_pythia8'],
    'VVV' : ['WZZ_TuneCUETP8M1_13TeV-amcatnlo-pythia8'],
    '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'],
}
Exemplo n.º 3
0
import os
import sys
import logging

from DevTools.Plotter.Plotter import Plotter
from copy import deepcopy

logging.basicConfig(
    level=logging.INFO,
    stream=sys.stderr,
    format='%(asctime)s.%(msecs)03d %(levelname)s %(name)s: %(message)s',
    datefmt='%Y-%m-%d %H:%M:%S')

dyPlotter = Plotter(
    'ModDY',
    intLumi=34867,  # z skim lumi
    new=True,
)

sigMap = {
    'Z': [
        'DYJetsToLL_M-50_TuneCUETP8M1_13TeV-amcatnloFXFX-pythia8',
        'DYJetsToLL_M-10to50_TuneCUETP8M1_13TeV-amcatnloFXFX-pythia8',
    ],
    'TT': [
        'TTJets_TuneCUETP8M2T4_13TeV-amcatnloFXFX-pythia8',
        #'TTJets_DiLept_TuneCUETP8M1_13TeV-madgraphMLM-pythia8',
        #'TTJets_SingleLeptFromT_TuneCUETP8M1_13TeV-madgraphMLM-pythia8',
        #'TTJets_SingleLeptFromTbar_TuneCUETP8M1_13TeV-madgraphMLM-pythia8',
    ],
    'W': [
Exemplo n.º 4
0
def getPlotter(blind=True, datadriven=False, control=False):
    plotter = Plotter('Hpp4l')
    plotter.setSelectionMap(sampleCuts)

    if datadriven: plotter.addHistogramToStack('datadriven', datadrivenSamples)

    mcSamples = samples if datadriven else allsamples
    signalMap = sigMapDD if datadriven else sigMap
    for s in mcSamples:
        plotter.addHistogramToStack(s, signalMap[s])

    if not control:
        for signal in signals:
            plotter.addHistogram(signal, signalMap[signal], signal=True)

    if not blind: plotter.addHistogram('data', signalMap['data'])
    return plotter
Exemplo n.º 5
0
blind = False
plotCount = True
doCat = True
plotMC = True
plotDatadriven = True
plotLowmass = False
plotFakeRegions = False
plotSignal = False
plotROC = False
plotNormalization = False
plotSOverB = False
plotSignificance = False
plotAllMasses = False
plotSig500 = True

hpp3lPlotter = Plotter('Hpp3l',new=True)

#########################
### Define categories ###
#########################

cats = getCategories('Hpp3l')
catLabels = getCategoryLabels('Hpp3l')
subCatChannels = getSubCategories('Hpp3l')
subCatLabels = getSubCategoryLabels('Hpp3l')
chans = getChannels('Hpp3l')
chanLabels = getChannelLabels('Hpp3l')
genRecoMap = getGenRecoChannelMap('Hpp3l')
sigMap = getSigMap('Hpp3l')
sigMapDD = getSigMap('Hpp3l',datadriven=True)
Exemplo n.º 6
0
from DevTools.Plotter.Plotter import Plotter
import ROOT

blind = True

ePlotter = Plotter(
    inputDirectory='flat/Electron',
    outputDirectory='plots/Electron',
    saveFileName='plots.root',
)

sigMap = {
    'WZ': ['WZTo3LNu_TuneCUETP8M1_13TeV-powheg-pythia8'],
    'ZZ': [
        'ZZTo4L_13TeV_powheg_pythia8',
        'GluGluToContinToZZTo2e2mu_13TeV_MCFM701_pythia8',
        'GluGluToContinToZZTo2mu2tau_13TeV_MCFM701_pythia8',
        'GluGluToContinToZZTo4e_13TeV_MCFM701_pythia8',
        'GluGluToContinToZZTo4mu_13TeV_MCFM701_pythia8',
        'GluGluToContinToZZTo4tau_13TeV_MCFM701_pythia8',
        'ZZTo2L2Nu_13TeV_powheg_pythia8',
        'ZZTo2L2Q_13TeV_amcatnloFXFX_madspin_pythia8'
    ],
    'VVV': ['WZZ_TuneCUETP8M1_13TeV-amcatnlo-pythia8'],
    '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'
    ],
import json
import sys
import logging
from itertools import product, combinations_with_replacement

from DevTools.Plotter.Plotter import Plotter
from DevTools.Utilities.utilities import ZMASS
from DevTools.Plotter.higgsUtilities import getSigMap
from copy import deepcopy
import ROOT

logging.basicConfig(level=logging.INFO, stream=sys.stderr, format='%(asctime)s.%(msecs)03d %(levelname)s %(name)s: %(message)s', datefmt='%Y-%m-%d %H:%M:%S')

blind = False

plotter = Plotter('ThreeLepton')

#########################
### Define categories ###
#########################

sigMap = getSigMap('Hpp3l')


samples = ['TTV','VVV','ZZ','WZ']
allsamples = ['W','T','TT','TTV','Z','WW','VVV','ZZ','WZ']

allSamplesDict = {'BG':[]}
for s in allsamples:
    allSamplesDict['BG'] += sigMap[s]
Exemplo n.º 8
0
from DevTools.Plotter.Plotter import Plotter
import ROOT

sigPlotter = Plotter(
    inputDirectory  = 'efficiency',
    outputDirectory = 'plots/Efficiency/signal',
    saveFileName    = 'signalEfficiencies.root',
)

effPlotter = Plotter(
    inputDirectory  = 'efficiency',
    outputDirectory = 'plots/Efficiency',
    saveFileName    = 'efficiencies.root',
)

sigMap = {
    'QCD' : [
             'QCD_Pt-20toInf_MuEnrichedPt15_TuneCUETP8M1_13TeV_pythia8',
             'QCD_Pt-15to3000_TuneCUETP8M1_Flat_13TeV_pythia8',
            ],
    'Z'   : [
             'DY1JetsToLL_M-10to50_TuneCUETP8M1_13TeV-amcatnloFXFX-pythia8',
             'DY1JetsToLL_M-50_TuneCUETP8M1_13TeV-madgraphMLM-pythia8',
             'DY2JetsToLL_M-10to50_TuneCUETP8M1_13TeV-amcatnloFXFX-pythia8',
             'DY2JetsToLL_M-50_TuneCUETP8M1_13TeV-madgraphMLM-pythia8',
             'DY3JetsToLL_M-50_TuneCUETP8M1_13TeV-madgraphMLM-pythia8',
             'DY4JetsToLL_M-50_TuneCUETP8M1_13TeV-madgraphMLM-pythia8',
             'DYJetsToLL_M-10to50_TuneCUETP8M1_13TeV-amcatnloFXFX-pythia8',
             'DYJetsToLL_M-50_TuneCUETP8M1_13TeV-amcatnloFXFX-pythia8',
            ],
    'TT'  : [
             'SingleMuon',
             'SingleElectron',
            ],
    'dataZFakeRate': [
             'SingleMuon',
             'DoubleMuon',
             'SingleElectron',
             'DoubleEG',
            ],
}

analyses = ['DijetFakeRate','WFakeRate','ZFakeRate']

fakeratePlotters = {}
for analysis in analyses:
    fakeratePlotters[analysis] = Plotter(analysis)

chanMap = {
    'DijetFakeRate': {
        'e': 'e',
        'm': 'm',
    },
    'WFakeRate': {
        'e': 'me',
        'm': 'em',
    },
    'ZFakeRate': {
        'e': ['mme','eee'],
        'm': ['mmm','eem'],
    },
}
Exemplo n.º 10
0
def getPlotter(blind=True,datadriven=False,control=False):
     plotter = Plotter('Hpp4l')
     plotter.setSelectionMap(sampleCuts)
     
     if datadriven: plotter.addHistogramToStack('datadriven',datadrivenSamples)

     mcSamples = samples if datadriven else allsamples
     signalMap = sigMapDD if datadriven else sigMap
     for s in mcSamples:
         plotter.addHistogramToStack(s,signalMap[s])
     
     if not control:
         for signal in signals:
             plotter.addHistogram(signal,signalMap[signal],signal=True)
     
     if not blind: plotter.addHistogram('data',signalMap['data'])
     return plotter
from DevTools.Plotter.HistMaker import HistMaker
from DevTools.Plotter.Plotter import Plotter
from DevTools.Utilities.utilities import ZMASS, getCMSSWVersion
from copy import deepcopy
import ROOT

logging.basicConfig(
    level=logging.INFO,
    stream=sys.stderr,
    format='%(asctime)s.%(msecs)03d %(levelname)s %(name)s: %(message)s',
    datefmt='%Y-%m-%d %H:%M:%S')

version = getCMSSWVersion()

plotter = Plotter('MonoHZZFakeRate', new=True)
maker = HistMaker('MonoHZZFakeRate',
                  outputFileName='root/MonoHZZFakeRate/fakerates.root')

#########################
### Define categories ###
#########################

sigMap = {
    'Z': [
        'DYJetsToLL_M-50_TuneCP5_13TeV-amcatnloFXFX-pythia8',
        'DYJetsToLL_M-10to50_TuneCP5_13TeV-amcatnloFXFX-pythia8',
    ],
    'TT': [
        #'TTTo2L2Nu_TuneCP5_13TeV-powheg-pythia8',
        #'TTToSemiLeptonic_TuneCP5_13TeV-powheg-pythia8',
Exemplo n.º 12
0
import os
import sys
import logging

from DevTools.Plotter.Plotter import Plotter
from copy import deepcopy

import ROOT

logging.basicConfig(
    level=logging.INFO,
    stream=sys.stderr,
    format='%(asctime)s.%(msecs)03d %(levelname)s %(name)s: %(message)s',
    datefmt='%Y-%m-%d %H:%M:%S')

chargePlotter = Plotter('Charge')

chans = ['ee', 'mm']

labelMap = {
    'e': 'e',
    'm': '#mu',
    't': '#tau',
}
chanLabels = [''.join([labelMap[c] for c in chan]) for chan in chans]
#chanLabels[-1] = '#tau_{#mu}#tau_{h}'

sigMap = {
    'WW': [
        'WWTo2L2Nu_13TeV-powheg',
        #'WWToLNuQQ_13TeV-powheg',
Exemplo n.º 13
0
from DevTools.Plotter.Plotter import Plotter
from DevTools.Utilities.utilities import ZMASS, getCMSSWVersion
from copy import deepcopy
import ROOT

logging.basicConfig(level=logging.INFO, stream=sys.stderr, format='%(asctime)s.%(msecs)03d %(levelname)s %(name)s: %(message)s', datefmt='%Y-%m-%d %H:%M:%S')

version = getCMSSWVersion()

blind = True
doMC = False
doRegions = True
doDatadriven = True
do3P1F = True

plotter = Plotter('MonoHZZ',new=True)

#########################
### Define categories ###
#########################

sigMap = {
    'ZX'  : [
            'DYJetsToLL_M-50_TuneCP5_13TeV-amcatnloFXFX-pythia8',
            'DYJetsToLL_M-10to50_TuneCP5_13TeV-amcatnloFXFX-pythia8',
            'ttWJets_TuneCP5_13TeV_madgraphMLM_pythia8',
            'ttZJets_TuneCP5_13TeV_madgraphMLM_pythia8',
            'TTJets_TuneCP5_13TeV-amcatnloFXFX-pythia8',
            'WWW_4F_TuneCP5_13TeV-amcatnlo-pythia8',
            'WWZ_4F_TuneCP5_13TeV-amcatnlo-pythia8',
            'WZG_TuneCP5_13TeV-amcatnlo-pythia8',
Exemplo n.º 14
0
from DevTools.Plotter.Plotter import Plotter
from DevTools.Utilities.utilities import ZMASS
from DevTools.Plotter.higgsUtilities import *
from copy import deepcopy
import ROOT

logging.basicConfig(level=logging.INFO, stream=sys.stderr, format='%(asctime)s.%(msecs)03d %(levelname)s %(name)s: %(message)s', datefmt='%Y-%m-%d %H:%M:%S')

blind = True
plotCount = True
plotMC = True
plotDatadriven = True
plotFakeRegions = True

zzPlotter = Plotter('ZZ')

#########################
### Define categories ###
#########################

sigMap = getSigMap('Hpp4l')
sigMapDD = getSigMap('Hpp4l',datadriven=True)

chans = ['eeee','eemm','mmmm']
chanLabels = ['eeee','ee#mu#mu','#mu#mu#mu#mu']

samples = ['TTV','VVV','ZZ']
allsamples = ['TT','TTV','Z','WZ','VVV','ZZ']

allSamplesDict = {'BG':[]}
Exemplo n.º 15
0
import os
import sys
import logging

from DevTools.Plotter.Plotter import Plotter
from copy import deepcopy

logging.basicConfig(level=logging.INFO, stream=sys.stderr, format='%(asctime)s.%(msecs)03d %(levelname)s %(name)s: %(message)s', datefmt='%Y-%m-%d %H:%M:%S')

dyPlotter = Plotter('ModDY',
    intLumi = 34867, # z skim lumi
    new = True,
)

sigMap = {
    'Z'   : [
             'DYJetsToLL_M-50_TuneCUETP8M1_13TeV-amcatnloFXFX-pythia8',
             'DYJetsToLL_M-10to50_TuneCUETP8M1_13TeV-amcatnloFXFX-pythia8',
            ],
    'TT'  : [
             'TTJets_TuneCUETP8M2T4_13TeV-amcatnloFXFX-pythia8',
             #'TTJets_DiLept_TuneCUETP8M1_13TeV-madgraphMLM-pythia8',
             #'TTJets_SingleLeptFromT_TuneCUETP8M1_13TeV-madgraphMLM-pythia8',
             #'TTJets_SingleLeptFromTbar_TuneCUETP8M1_13TeV-madgraphMLM-pythia8',
            ],
    'W'    : [
        'WJetsToLNu_TuneCUETP8M1_13TeV-amcatnloFXFX-pythia8',
    ],
    'WW' : [
        'WWTo2L2Nu_13TeV-powheg',
    ],
import sys
import logging
from itertools import product, combinations_with_replacement

from DevTools.Plotter.Plotter import Plotter
from DevTools.Utilities.utilities import ZMASS, getCMSSWVersion
from copy import deepcopy
import ROOT

logging.basicConfig(level=logging.INFO, stream=sys.stderr, format='%(asctime)s.%(msecs)03d %(levelname)s %(name)s: %(message)s', datefmt='%Y-%m-%d %H:%M:%S')

version = getCMSSWVersion()

blind = False

plotter = Plotter('MuMuMuFakeRate')

#########################
### Define categories ###
#########################

sigMap = {
    'Z' : [
        'DYJetsToLL_M-10to50_TuneCUETP8M1_13TeV-amcatnloFXFX-pythia8',
        'DYJetsToLL_M-50_TuneCUETP8M1_13TeV-amcatnloFXFX-pythia8',
    ],
    'QCD' : [
        'QCD_Pt-15to20_MuEnrichedPt5_TuneCUETP8M1_13TeV_pythia8',
        'QCD_Pt-20to30_MuEnrichedPt5_TuneCUETP8M1_13TeV_pythia8',
        'QCD_Pt-30to50_MuEnrichedPt5_TuneCUETP8M1_13TeV_pythia8',
        'QCD_Pt-50to80_MuEnrichedPt5_TuneCUETP8M1_13TeV_pythia8',
Exemplo n.º 17
0
import os
import sys
import logging
from DevTools.Plotter.Plotter import Plotter
import ROOT

logging.basicConfig(
    level=logging.INFO,
    stream=sys.stderr,
    format='%(asctime)s.%(msecs)03d %(levelname)s %(name)s: %(message)s',
    datefmt='%Y-%m-%d %H:%M:%S')

tPlotter = Plotter('Tau')

sigMap = {
    'Z': [
        'DYJetsToLL_M-50_TuneCUETP8M1_13TeV-amcatnloFXFX-pythia8',
        'DYJetsToLL_M-10to50_TuneCUETP8M1_13TeV-amcatnloFXFX-pythia8',
    ],
    'TT': [
        #'TTJets_TuneCUETP8M1_13TeV-amcatnloFXFX-pythia8',
        'TTJets_DiLept_TuneCUETP8M1_13TeV-madgraphMLM-pythia8',
        #'TTJets_SingleLeptFromT_TuneCUETP8M1_13TeV-madgraphMLM-pythia8',
        #'TTJets_SingleLeptFromTbar_TuneCUETP8M1_13TeV-madgraphMLM-pythia8',
    ],
    'QCD': [
        'QCD_Pt_15to30_TuneCUETP8M1_13TeV_pythia8',
        'QCD_Pt_30to50_TuneCUETP8M1_13TeV_pythia8',
        'QCD_Pt_50to80_TuneCUETP8M1_13TeV_pythia8',
        'QCD_Pt_80to120_TuneCUETP8M1_13TeV_pythia8',
        'QCD_Pt_120to170_TuneCUETP8M1_13TeV_pythia8',
Exemplo n.º 18
0
import os
import sys
import logging

from DevTools.Plotter.Plotter import Plotter
from copy import deepcopy

import ROOT

logging.basicConfig(level=logging.INFO, stream=sys.stderr, format='%(asctime)s.%(msecs)03d %(levelname)s %(name)s: %(message)s', datefmt='%Y-%m-%d %H:%M:%S')

chargePlotter = Plotter('Charge')

chans = ['ee','mm']

labelMap = {
    'e': 'e',
    'm': '#mu',
    't': '#tau',
}
chanLabels = [''.join([labelMap[c] for c in chan]) for chan in chans]
#chanLabels[-1] = '#tau_{#mu}#tau_{h}'

sigMap = {
    'WW'  : [
             'WWTo2L2Nu_13TeV-powheg',
             #'WWToLNuQQ_13TeV-powheg',
            ],
    'Z'   : [
             'DYJetsToLL_M-50_TuneCUETP8M1_13TeV-amcatnloFXFX-pythia8',
             'DYJetsToLL_M-10to50_TuneCUETP8M1_13TeV-amcatnloFXFX-pythia8',
Exemplo n.º 19
0
plotMC = False
plotDatadriven = True
plotLowmass = True
plotZveto = False
plotFakeRegions = False
plotSignal = False
plotROC = False
plotNormalization = False
plotSOverB = False
plotSignificance = False
plotAllMasses = False
plotSig500 = True
doUncertainties = True
toPlot = []

hpp4lPlotter = Plotter('Hpp4l',new=True)

#########################
### Define categories ###
#########################

cats = getCategories('Hpp4l')
catLabels = getCategoryLabels('Hpp4l')
subCatChannels = getSubCategories('Hpp4l')
subCatLabels = getSubCategoryLabels('Hpp4l')
chans = getChannels('Hpp4l')
chanLabels = getChannelLabels('Hpp4l')
genRecoMap = getGenRecoChannelMap('Hpp4l')
sigMap = getSigMap('Hpp4l')
sigMapDD = getSigMap('Hpp4l',datadriven=True)
Exemplo n.º 20
0
from DevTools.Plotter.Plotter import Plotter

wzPlotter = Plotter(
    inputDirectory='flat/WZ',
    outputDirectory='plots/WZ',
    saveFileName='plots.root',
)

sigMap = {
    'WZ': ['WZTo3LNu_TuneCUETP8M1_13TeV-powheg-pythia8'],
    'ZZ': [
        'ZZTo4L_13TeV_powheg_pythia8',
        'GluGluToContinToZZTo2e2mu_13TeV_MCFM701_pythia8',
        'GluGluToContinToZZTo2mu2tau_13TeV_MCFM701_pythia8',
        'GluGluToContinToZZTo4e_13TeV_MCFM701_pythia8',
        'GluGluToContinToZZTo4mu_13TeV_MCFM701_pythia8',
        'GluGluToContinToZZTo4tau_13TeV_MCFM701_pythia8',
        'ZZTo2L2Nu_13TeV_powheg_pythia8',
        'ZZTo2L2Q_13TeV_amcatnloFXFX_madspin_pythia8'
    ],
    'VVV': ['WZZ_TuneCUETP8M1_13TeV-amcatnlo-pythia8'],
    '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'],
import os
import sys
import logging

from DevTools.Plotter.HistMaker import HistMaker
from DevTools.Plotter.Plotter import Plotter
from copy import deepcopy

import ROOT

logging.basicConfig(level=logging.INFO, stream=sys.stderr, format='%(asctime)s.%(msecs)03d %(levelname)s %(name)s: %(message)s', datefmt='%Y-%m-%d %H:%M:%S')

dijetFakeRatePlotter = Plotter(
    'DijetFakeRate',
)

dijetFakeRateMaker = HistMaker(
    'DijetFakeRate',
    outputFileName = 'root/DijetFakeRate/fakerates.root',
)

sigMap = {
    'WW'  : [
             'WWTo2L2Nu_13TeV-powheg',
             'WWToLNuQQ_13TeV-powheg',
            ],
    'W'   : [
             'WJetsToLNu_TuneCUETP8M1_13TeV-amcatnloFXFX-pythia8',
             #'WJetsToLNu_TuneCUETP8M1_13TeV-madgraphMLM-pythia8',
             #'W1JetsToLNu_TuneCUETP8M1_13TeV-madgraphMLM-pythia8',
             #'W2JetsToLNu_TuneCUETP8M1_13TeV-madgraphMLM-pythia8',
Exemplo n.º 22
0
import os
import sys
import logging

from DevTools.Plotter.Plotter import Plotter
from copy import deepcopy
from DevTools.Plotter.wzUtilities import sigMap

import ROOT

logging.basicConfig(level=logging.INFO, stream=sys.stderr, format='%(asctime)s.%(msecs)03d %(levelname)s %(name)s: %(message)s', datefmt='%Y-%m-%d %H:%M:%S')

wzPlotter = Plotter('WZ',new=True)

doCounts = True
doDatadriven = True
doMC = True
doNMinusOne = True
doControls = True
doVBS = True

plotStyles = {
    # Z
    'zMass'               : {'xaxis': 'm_{l^{+}l^{-}}', 'yaxis': 'Events / 1 GeV', 'rebin':range(60,121,1)},
    'zPt'                 : {'xaxis': 'p_{T}^{Z}', 'yaxis': 'Events / 5 GeV', 'rebin':range(0,205,5), 'overflow': True,},
    'zLeadingLeptonPt'    : {'xaxis': 'p_{T}^{Z lead}', 'yaxis': 'Events / 5 GeV', 'rebin':range(0,205,5), 'overflow': True,},
    'zSubLeadingLeptonPt' : {'xaxis': 'p_{T}^{Z sublead}', 'yaxis': 'Events / 5 GeV', 'rebin':range(0,205,5), 'overflow': True,},
    # W
    'wMass'               : {'xaxis': 'm_{T}^{W}', 'yaxis': 'Events / 5 GeV', 'rebin':range(0,205,5), 'overflow': True,},
    'wPt'                 : {'xaxis': 'p_{T}^{W}', 'yaxis': 'Events / 5 GeV', 'rebin':range(0,205,5), 'overflow': True,},
Exemplo n.º 23
0
import sys
import logging

from DevTools.Plotter.HistMaker import HistMaker
from DevTools.Plotter.Plotter import Plotter
from copy import deepcopy

import ROOT

logging.basicConfig(
    level=logging.INFO,
    stream=sys.stderr,
    format='%(asctime)s.%(msecs)03d %(levelname)s %(name)s: %(message)s',
    datefmt='%Y-%m-%d %H:%M:%S')

dijetFakeRatePlotter = Plotter('DijetFakeRate', )

dijetFakeRateMaker = HistMaker(
    'DijetFakeRate',
    outputFileName='root/DijetFakeRate/fakerates.root',
)

sigMap = {
    'WW': [
        'WWTo2L2Nu_13TeV-powheg',
        'WWToLNuQQ_13TeV-powheg',
    ],
    'W': [
        'WJetsToLNu_TuneCUETP8M1_13TeV-amcatnloFXFX-pythia8',
        #'WJetsToLNu_TuneCUETP8M1_13TeV-madgraphMLM-pythia8',
        #'W1JetsToLNu_TuneCUETP8M1_13TeV-madgraphMLM-pythia8',
Exemplo n.º 24
0
from DevTools.Plotter.Plotter import Plotter

blind = True

hpp4lPlotter = Plotter(
    inputDirectory  = 'flat/Hpp4l',
    outputDirectory = 'plots/Hpp4l',
    saveFileName    = 'plots.root',
)

sigMap = {
    'WZ'  : ['WZTo3LNu_TuneCUETP8M1_13TeV-powheg-pythia8'],
    'ZZ'  : ['ZZTo4L_13TeV_powheg_pythia8',
             'GluGluToContinToZZTo2e2mu_13TeV_MCFM701_pythia8',
             'GluGluToContinToZZTo2mu2tau_13TeV_MCFM701_pythia8',
             'GluGluToContinToZZTo4e_13TeV_MCFM701_pythia8',
             'GluGluToContinToZZTo4mu_13TeV_MCFM701_pythia8',
             'GluGluToContinToZZTo4tau_13TeV_MCFM701_pythia8',
             'ZZTo2L2Nu_13TeV_powheg_pythia8',
             'ZZTo2L2Q_13TeV_amcatnloFXFX_madspin_pythia8'],
    'VVV' : ['WZZ_TuneCUETP8M1_13TeV-amcatnlo-pythia8'],
    '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',
Exemplo n.º 25
0
import os
import sys
import logging
from DevTools.Plotter.Plotter import Plotter
import ROOT

logging.basicConfig(level=logging.INFO, stream=sys.stderr, format='%(asctime)s.%(msecs)03d %(levelname)s %(name)s: %(message)s', datefmt='%Y-%m-%d %H:%M:%S')


ePlotter = Plotter('Electron')

sigMap = {
    'Z'   : [
             'DYJetsToLL_M-50_TuneCUETP8M1_13TeV-amcatnloFXFX-pythia8',
             'DYJetsToLL_M-10to50_TuneCUETP8M1_13TeV-amcatnloFXFX-pythia8',
            ],
    'TT'  : [
             #'TTJets_TuneCUETP8M1_13TeV-amcatnloFXFX-pythia8',
             'TTJets_DiLept_TuneCUETP8M1_13TeV-madgraphMLM-pythia8',
             #'TTJets_SingleLeptFromT_TuneCUETP8M1_13TeV-madgraphMLM-pythia8',
             #'TTJets_SingleLeptFromTbar_TuneCUETP8M1_13TeV-madgraphMLM-pythia8',
            ],
    'QCD' : [
             'QCD_Pt_15to30_TuneCUETP8M1_13TeV_pythia8',
             'QCD_Pt_30to50_TuneCUETP8M1_13TeV_pythia8',
             'QCD_Pt_50to80_TuneCUETP8M1_13TeV_pythia8',
             'QCD_Pt_80to120_TuneCUETP8M1_13TeV_pythia8',
             'QCD_Pt_120to170_TuneCUETP8M1_13TeV_pythia8',
             'QCD_Pt_170to300_TuneCUETP8M1_13TeV_pythia8',
             'QCD_Pt_300to470_TuneCUETP8M1_13TeV_pythia8',
             'QCD_Pt_470to600_TuneCUETP8M1_13TeV_pythia8',
Exemplo n.º 26
0
import os
import sys
import logging
from DevTools.Plotter.Plotter import Plotter
import ROOT

logging.basicConfig(level=logging.INFO, stream=sys.stderr, format='%(asctime)s.%(msecs)03d %(levelname)s %(name)s: %(message)s', datefmt='%Y-%m-%d %H:%M:%S')


tPlotter = Plotter('Tau')

sigMap = {
    'Z'   : [
             'DYJetsToLL_M-50_TuneCUETP8M1_13TeV-amcatnloFXFX-pythia8',
             'DYJetsToLL_M-10to50_TuneCUETP8M1_13TeV-amcatnloFXFX-pythia8',
            ],
    'TT'  : [
             #'TTJets_TuneCUETP8M1_13TeV-amcatnloFXFX-pythia8',
             'TTJets_DiLept_TuneCUETP8M1_13TeV-madgraphMLM-pythia8',
             #'TTJets_SingleLeptFromT_TuneCUETP8M1_13TeV-madgraphMLM-pythia8',
             #'TTJets_SingleLeptFromTbar_TuneCUETP8M1_13TeV-madgraphMLM-pythia8',
            ],
    'QCD' : [
             'QCD_Pt_15to30_TuneCUETP8M1_13TeV_pythia8',
             'QCD_Pt_30to50_TuneCUETP8M1_13TeV_pythia8',
             'QCD_Pt_50to80_TuneCUETP8M1_13TeV_pythia8',
             'QCD_Pt_80to120_TuneCUETP8M1_13TeV_pythia8',
             'QCD_Pt_120to170_TuneCUETP8M1_13TeV_pythia8',
             'QCD_Pt_170to300_TuneCUETP8M1_13TeV_pythia8',
             'QCD_Pt_300to470_TuneCUETP8M1_13TeV_pythia8',
             'QCD_Pt_470to600_TuneCUETP8M1_13TeV_pythia8',
import json
import sys
import logging
from itertools import product, combinations_with_replacement

from DevTools.Plotter.HistMaker import HistMaker
from DevTools.Plotter.Plotter import Plotter
from DevTools.Utilities.utilities import ZMASS, getCMSSWVersion
from copy import deepcopy
import ROOT

logging.basicConfig(level=logging.INFO, stream=sys.stderr, format='%(asctime)s.%(msecs)03d %(levelname)s %(name)s: %(message)s', datefmt='%Y-%m-%d %H:%M:%S')

version = getCMSSWVersion()

plotter = Plotter('MonoHZZFakeRate',new=True)
maker = HistMaker('MonoHZZFakeRate',outputFileName = 'root/MonoHZZFakeRate/fakerates.root')

#########################
### Define categories ###
#########################

sigMap = {
    'Z'   : [
            'DYJetsToLL_M-50_TuneCP5_13TeV-amcatnloFXFX-pythia8',
            'DYJetsToLL_M-10to50_TuneCP5_13TeV-amcatnloFXFX-pythia8',
            ],
    'TT'  : [
            #'TTTo2L2Nu_TuneCP5_13TeV-powheg-pythia8',
            #'TTToSemiLeptonic_TuneCP5_13TeV-powheg-pythia8',
            #'TT_DiLept_TuneCP5_13TeV-amcatnlo-pythia8',
Exemplo n.º 28
0
import os
import sys
import logging

from DevTools.Plotter.Plotter import Plotter
from copy import deepcopy

logging.basicConfig(
    level=logging.INFO,
    stream=sys.stderr,
    format='%(asctime)s.%(msecs)03d %(levelname)s %(name)s: %(message)s',
    datefmt='%Y-%m-%d %H:%M:%S')

dyPlotter = Plotter('DY')

chans = ['ee', 'mm']

labelMap = {
    'e': 'e',
    'm': '#mu',
    't': '#tau',
}
chanLabels = [''.join([labelMap[c] for c in chan]) for chan in chans]

sigMap = {
    'Z': [
        'DYJetsToLL_M-50_TuneCUETP8M1_13TeV-amcatnloFXFX-pythia8',
        'DYJetsToLL_M-10to50_TuneCUETP8M1_13TeV-amcatnloFXFX-pythia8',
        #'DYJetsToLL_M-10to50_TuneCUETP8M1_13TeV-madgraphMLM-pythia8',
        #'DYJetsToLL_M-50_TuneCUETP8M1_13TeV-madgraphMLM-pythia8',
        #'DY1JetsToLL_M-50_TuneCUETP8M1_13TeV-madgraphMLM-pythia8',
Exemplo n.º 29
0
doLowmass = True
doChi2 = False
doHighmass = False
doDESY = False
doSameSign = False
doMatrix = False
doNormalizations = False
doSignficance = False
doGenMatch = False
#newloose = [-1,-0.2,-0.1,0.0,0.1,0.2,0.3,0.4]
#newloose = [-1,-0.2,0.0,0.2,0.4]
newloose = []

toPlot = []

plotter = Plotter('MuMuTauTau',new=True)


#########################
### Define categories ###
#########################

sigMap = getSampleMap()

#samples = ['QCD','W','Z','TT','WW','WZ','ZZ']
#samples = ['JPsi','Upsilon','W','Z','TT','WW','WZ','ZZ']
#samples = ['JPsi','W','Z','TT','WW','WZ','ZZ']
samples = ['W','Z','TT','WW','WZ','ZZ']
#samples = ['TT','W','Z']

sigMap['BG'] = []
Exemplo n.º 30
0
import os
import json
import sys
import logging
from itertools import product, combinations_with_replacement

from DevTools.Plotter.Plotter import Plotter
from copy import deepcopy
import ROOT

logging.basicConfig(level=logging.INFO, stream=sys.stderr, format='%(asctime)s.%(msecs)03d %(levelname)s %(name)s: %(message)s', datefmt='%Y-%m-%d %H:%M:%S')

fakeratePlotter = Plotter('WFakeRate')

#########################
### Define categories ###
#########################

sigMap = {
    'WW'  : [
             'WWTo2L2Nu_13TeV-powheg',
             'WWToLNuQQ_13TeV-powheg',
            ],
    'WWsub'  : [
             'WWTo2L2Nu_13TeV-powheg',
            ],
    'W'   : [
             #'WJetsToLNu_TuneCUETP8M1_13TeV-amcatnloFXFX-pythia8',
             'WJetsToLNu_TuneCUETP8M1_13TeV-madgraphMLM-pythia8',
             'W1JetsToLNu_TuneCUETP8M1_13TeV-madgraphMLM-pythia8',
             'W2JetsToLNu_TuneCUETP8M1_13TeV-madgraphMLM-pythia8',
Exemplo n.º 31
0
from DevTools.Plotter.Plotter import Plotter
import ROOT

sigPlotter = Plotter(
    'Efficiency',
    inputDirectory  = 'efficiency',
    outputDirectory = 'plots/Efficiency/signal',
)

effPlotter = Plotter(
    'Efficiency',
    inputDirectory  = 'efficiency',
    outputDirectory = 'plots/Efficiency',
)

sigMap = {
    'QCD' : [
             'QCD_Pt-20toInf_MuEnrichedPt15_TuneCUETP8M1_13TeV_pythia8',
             'QCD_Pt-15to3000_TuneCUETP8M1_Flat_13TeV_pythia8',
            ],
    'Z'   : [
             'DY1JetsToLL_M-10to50_TuneCUETP8M1_13TeV-amcatnloFXFX-pythia8',
             'DY1JetsToLL_M-50_TuneCUETP8M1_13TeV-madgraphMLM-pythia8',
             'DY2JetsToLL_M-10to50_TuneCUETP8M1_13TeV-amcatnloFXFX-pythia8',
             'DY2JetsToLL_M-50_TuneCUETP8M1_13TeV-madgraphMLM-pythia8',
             'DY3JetsToLL_M-50_TuneCUETP8M1_13TeV-madgraphMLM-pythia8',
             'DY4JetsToLL_M-50_TuneCUETP8M1_13TeV-madgraphMLM-pythia8',
             'DYJetsToLL_M-10to50_TuneCUETP8M1_13TeV-amcatnloFXFX-pythia8',
             'DYJetsToLL_M-50_TuneCUETP8M1_13TeV-amcatnloFXFX-pythia8',
            ],
    'TT'  : [
Exemplo n.º 32
0
do2D = True
doDM = True
doAllSignals = True
doDatadriven = False
doLowmass = True
doHighmass = True
doMatrix = False
doNormalizations = False
doSignficance = False
#newloose = [-1,-0.2,-0.1,0.0,0.1,0.2,0.3,0.4]
#newloose = [-1,-0.2,0.0,0.2,0.4]
newloose = []

toPlot = []

plotter = Plotter('MuMuTauTau', new=True)

#########################
### Define categories ###
#########################

sigMap = getSampleMap()

#samples = ['QCD','W','Z','TT','WW','WZ','ZZ']
#samples = ['JPsi','Upsilon','W','Z','TT','WW','WZ','ZZ']
#samples = ['JPsi','W','Z','TT','WW','WZ','ZZ']
samples = ['W', 'Z', 'TT', 'WW', 'WZ', 'ZZ']
#samples = ['TT','W','Z']

sigMap['BG'] = []
for s in samples:
Exemplo n.º 33
0
import os
import sys
import logging
from DevTools.Plotter.Plotter import Plotter
import ROOT

logging.basicConfig(level=logging.INFO, stream=sys.stderr, format='%(asctime)s.%(msecs)03d %(levelname)s %(name)s: %(message)s', datefmt='%Y-%m-%d %H:%M:%S')


mPlotter = Plotter('Muon')

sigMap = {
    'Z'   : [
             'DYJetsToLL_M-50_TuneCUETP8M1_13TeV-amcatnloFXFX-pythia8',
             'DYJetsToLL_M-10to50_TuneCUETP8M1_13TeV-amcatnloFXFX-pythia8',
            ],
    'TT'  : [
             #'TTJets_TuneCUETP8M1_13TeV-amcatnloFXFX-pythia8',
             'TTJets_DiLept_TuneCUETP8M1_13TeV-madgraphMLM-pythia8',
             #'TTJets_SingleLeptFromT_TuneCUETP8M1_13TeV-madgraphMLM-pythia8',
             #'TTJets_SingleLeptFromTbar_TuneCUETP8M1_13TeV-madgraphMLM-pythia8',
            ],
    'QCD' : [
             'QCD_Pt_15to30_TuneCUETP8M1_13TeV_pythia8',
             'QCD_Pt_30to50_TuneCUETP8M1_13TeV_pythia8',
             'QCD_Pt_50to80_TuneCUETP8M1_13TeV_pythia8',
             'QCD_Pt_80to120_TuneCUETP8M1_13TeV_pythia8',
             'QCD_Pt_120to170_TuneCUETP8M1_13TeV_pythia8',
             'QCD_Pt_170to300_TuneCUETP8M1_13TeV_pythia8',
             'QCD_Pt_300to470_TuneCUETP8M1_13TeV_pythia8',
             'QCD_Pt_470to600_TuneCUETP8M1_13TeV_pythia8',
Exemplo n.º 34
0
logging.basicConfig(
    level=logging.INFO,
    stream=sys.stderr,
    format='%(asctime)s.%(msecs)03d %(levelname)s %(name)s: %(message)s',
    datefmt='%Y-%m-%d %H:%M:%S')

version = getCMSSWVersion()

blind = True
doMC = False
doRegions = True
doDatadriven = True
do3P1F = True

plotter = Plotter('MonoHZZ', new=True)

#########################
### Define categories ###
#########################

sigMap = {
    'ZX': [
        'DYJetsToLL_M-50_TuneCP5_13TeV-amcatnloFXFX-pythia8',
        'DYJetsToLL_M-10to50_TuneCP5_13TeV-amcatnloFXFX-pythia8',
        'ttWJets_TuneCP5_13TeV_madgraphMLM_pythia8',
        'ttZJets_TuneCP5_13TeV_madgraphMLM_pythia8',
        'TTJets_TuneCP5_13TeV-amcatnloFXFX-pythia8',
        'WWW_4F_TuneCP5_13TeV-amcatnlo-pythia8',
        'WWZ_4F_TuneCP5_13TeV-amcatnlo-pythia8',
        'WZG_TuneCP5_13TeV-amcatnlo-pythia8',
Exemplo n.º 35
0
import sys
import logging

from DevTools.Plotter.Plotter import Plotter
from copy import deepcopy
from DevTools.Plotter.wzUtilities import sigMap

import ROOT

logging.basicConfig(
    level=logging.INFO,
    stream=sys.stderr,
    format='%(asctime)s.%(msecs)03d %(levelname)s %(name)s: %(message)s',
    datefmt='%Y-%m-%d %H:%M:%S')

wzPlotter = Plotter('WZ', new=True)

doCounts = True
doDatadriven = True
doMC = True
doNMinusOne = True
doControls = True
doVBS = True

plotStyles = {
    # Z
    'zMass': {
        'xaxis': 'm_{l^{+}l^{-}}',
        'yaxis': 'Events / 1 GeV',
        'rebin': range(60, 121, 1)
    },
Exemplo n.º 36
0
plotDatadriven = True
plotLowmass = True
plotZveto = False
plotFakeRegions = False
plotSignal = True
plotROC = False
plotNormalization = False
plotSOverB = False
plotSignificance = False
plotAllMasses = True
plotSig500 = True
doUncertainties = True
plotAllChannels = True
toPlot = []

hpp4lPlotter = Plotter('Hpp4l',new=True)

#########################
### Define categories ###
#########################

cats = getCategories('Hpp4l')
catLabels = getCategoryLabels('Hpp4l')
subCatChannels = getSubCategories('Hpp4l')
subCatLabels = getSubCategoryLabels('Hpp4l')
chans = getChannels('Hpp4l')
chanLabels = getChannelLabels('Hpp4l')
genRecoMap = getGenRecoChannelMap('Hpp4l')
sigMap = getSigMap('Hpp4l')
sigMapDD = getSigMap('Hpp4l',datadriven=True)
import os
import sys
import logging

from DevTools.Plotter.HistMaker import HistMaker
from DevTools.Plotter.Plotter import Plotter
from copy import deepcopy

import ROOT

logging.basicConfig(level=logging.INFO, stream=sys.stderr, format='%(asctime)s.%(msecs)03d %(levelname)s %(name)s: %(message)s', datefmt='%Y-%m-%d %H:%M:%S')

fakeratePlotter = Plotter(
    'MuMuTauFakeRate',
)

fakerateMaker = HistMaker(
    'MuMuTauFakeRate',
    outputFileName = 'root/MuMuTauFakeRate/fakerates.root',
)

sigMap = {
    'Z' : [
        'DYJetsToLL_M-10to50_TuneCUETP8M1_13TeV-amcatnloFXFX-pythia8',
        'DYJetsToLL_M-50_TuneCUETP8M1_13TeV-amcatnloFXFX-pythia8',
    ],
    'QCD' : [
        'QCD_Pt-15to20_MuEnrichedPt5_TuneCUETP8M1_13TeV_pythia8',
        'QCD_Pt-20to30_MuEnrichedPt5_TuneCUETP8M1_13TeV_pythia8',
        'QCD_Pt-30to50_MuEnrichedPt5_TuneCUETP8M1_13TeV_pythia8',
        'QCD_Pt-50to80_MuEnrichedPt5_TuneCUETP8M1_13TeV_pythia8',
Exemplo n.º 38
0
from DevTools.Plotter.Plotter import Plotter
from DevTools.Utilities.utilities import ZMASS, getCMSSWVersion
from copy import deepcopy
import ROOT

logging.basicConfig(
    level=logging.INFO,
    stream=sys.stderr,
    format='%(asctime)s.%(msecs)03d %(levelname)s %(name)s: %(message)s',
    datefmt='%Y-%m-%d %H:%M:%S')

version = getCMSSWVersion()

blind = False

plotter = Plotter('MuMuTauFakeRate')

#########################
### Define categories ###
#########################

sigMap = {
    'Z': [
        'DYJetsToLL_M-10to50_TuneCUETP8M1_13TeV-amcatnloFXFX-pythia8',
        'DYJetsToLL_M-50_TuneCUETP8M1_13TeV-amcatnloFXFX-pythia8',
    ],
    'QCD': [
        'QCD_Pt-15to20_MuEnrichedPt5_TuneCUETP8M1_13TeV_pythia8',
        'QCD_Pt-20to30_MuEnrichedPt5_TuneCUETP8M1_13TeV_pythia8',
        'QCD_Pt-30to50_MuEnrichedPt5_TuneCUETP8M1_13TeV_pythia8',
        'QCD_Pt-50to80_MuEnrichedPt5_TuneCUETP8M1_13TeV_pythia8',
Exemplo n.º 39
0
from DevTools.Plotter.Plotter import Plotter
import ROOT

sigPlotter = Plotter(
    inputDirectory="efficiency", outputDirectory="plots/Efficiency/signal", saveFileName="signalEfficiencies.root"
)

effPlotter = Plotter(inputDirectory="efficiency", outputDirectory="plots/Efficiency", saveFileName="efficiencies.root")

sigMap = {
    "QCD": [
        "QCD_Pt-20toInf_MuEnrichedPt15_TuneCUETP8M1_13TeV_pythia8",
        "QCD_Pt-15to3000_TuneCUETP8M1_Flat_13TeV_pythia8",
    ],
    "Z": [
        "DY1JetsToLL_M-10to50_TuneCUETP8M1_13TeV-amcatnloFXFX-pythia8",
        "DY1JetsToLL_M-50_TuneCUETP8M1_13TeV-madgraphMLM-pythia8",
        "DY2JetsToLL_M-10to50_TuneCUETP8M1_13TeV-amcatnloFXFX-pythia8",
        "DY2JetsToLL_M-50_TuneCUETP8M1_13TeV-madgraphMLM-pythia8",
        "DY3JetsToLL_M-50_TuneCUETP8M1_13TeV-madgraphMLM-pythia8",
        "DY4JetsToLL_M-50_TuneCUETP8M1_13TeV-madgraphMLM-pythia8",
        "DYJetsToLL_M-10to50_TuneCUETP8M1_13TeV-amcatnloFXFX-pythia8",
        "DYJetsToLL_M-50_TuneCUETP8M1_13TeV-amcatnloFXFX-pythia8",
    ],
    "TT": [
        "TTJets_DiLept_TuneCUETP8M1_13TeV-madgraphMLM-pythia8",
        "TTJets_SingleLeptFromT_TuneCUETP8M1_13TeV-madgraphMLM-pythia8",
        "TTJets_SingleLeptFromTbar_TuneCUETP8M1_13TeV-madgraphMLM-pythia8",
    ],
    "data": ["DoubleMuon", "DoubleEG", "MuonEG", "SingleMuon", "SingleElectron"],
    "HppHmm200GeV": ["HPlusPlusHMinusMinusHTo4L_M-200_13TeV-pythia8"],
Exemplo n.º 40
0
from DevTools.Plotter.Plotter import Plotter
import ROOT

blind = True

ePlotter = Plotter(
    inputDirectory  = 'flat/Electron',
    outputDirectory = 'plots/Electron',
    saveFileName    = 'plots.root',
)

sigMap = {
    'WZ'  : ['WZTo3LNu_TuneCUETP8M1_13TeV-powheg-pythia8'],
    'ZZ'  : ['ZZTo4L_13TeV_powheg_pythia8',
             'GluGluToContinToZZTo2e2mu_13TeV_MCFM701_pythia8',
             'GluGluToContinToZZTo2mu2tau_13TeV_MCFM701_pythia8',
             'GluGluToContinToZZTo4e_13TeV_MCFM701_pythia8',
             'GluGluToContinToZZTo4mu_13TeV_MCFM701_pythia8',
             'GluGluToContinToZZTo4tau_13TeV_MCFM701_pythia8',
             'ZZTo2L2Nu_13TeV_powheg_pythia8',
             'ZZTo2L2Q_13TeV_amcatnloFXFX_madspin_pythia8'],
    'VVV' : ['WZZ_TuneCUETP8M1_13TeV-amcatnlo-pythia8'],
    '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',
Exemplo n.º 41
0
import os
import sys
import logging

from DevTools.Plotter.Plotter import Plotter
from copy import deepcopy

import ROOT

logging.basicConfig(level=logging.INFO, stream=sys.stderr, format='%(asctime)s.%(msecs)03d %(levelname)s %(name)s: %(message)s', datefmt='%Y-%m-%d %H:%M:%S')

chargePlotter = Plotter('TauCharge')

chans = ['tt']

labelMap = {
    'e': 'e',
    'm': '#mu',
    't': '#tau',
}
chanLabels = ['#tau_{#mu}#tau_{h}']

sigMap = {
    'WW'  : [
             'WWTo2L2Nu_13TeV-powheg',
             #'WWToLNuQQ_13TeV-powheg',
            ],
    'W'   : [
             #'WJetsToLNu_TuneCUETP8M1_13TeV-amcatnloFXFX-pythia8',
             'WJetsToLNu_TuneCUETP8M1_13TeV-madgraphMLM-pythia8',
             'W1JetsToLNu_TuneCUETP8M1_13TeV-madgraphMLM-pythia8',
Exemplo n.º 42
0
import os
import sys
import logging

from DevTools.Plotter.Plotter import Plotter
from copy import deepcopy

import ROOT

logging.basicConfig(level=logging.INFO, stream=sys.stderr, format='%(asctime)s.%(msecs)03d %(levelname)s %(name)s: %(message)s', datefmt='%Y-%m-%d %H:%M:%S')

dijetFakeRatePlotter = Plotter('DijetFakeRate')

chans = ['e','m']

labelMap = {
    'e': 'e',
    'm': '#mu',
    't': '#tau',
}
chanLabels = [''.join([labelMap[c] for c in chan]) for chan in chans]


sigMap = {
    'WW'  : [
             'WWTo2L2Nu_13TeV-powheg',
             'WWToLNuQQ_13TeV-powheg',
            ],
    'W'   : [
             'WJetsToLNu_TuneCUETP8M1_13TeV-amcatnloFXFX-pythia8',
             #'WJetsToLNu_TuneCUETP8M1_13TeV-madgraphMLM-pythia8',
Exemplo n.º 43
0
from DevTools.Plotter.Plotter import Plotter

blind = True

mPlotter = Plotter('SingleMuon')

sigMap = {
    'WZ': ['WZTo3LNu_TuneCUETP8M1_13TeV-powheg-pythia8'],
    'ZZ': [
        'ZZTo4L_13TeV_powheg_pythia8',
        'GluGluToContinToZZTo2e2mu_13TeV_MCFM701_pythia8',
        'GluGluToContinToZZTo2mu2tau_13TeV_MCFM701_pythia8',
        'GluGluToContinToZZTo4e_13TeV_MCFM701_pythia8',
        'GluGluToContinToZZTo4mu_13TeV_MCFM701_pythia8',
        'GluGluToContinToZZTo4tau_13TeV_MCFM701_pythia8',
        'ZZTo2L2Nu_13TeV_powheg_pythia8',
        'ZZTo2L2Q_13TeV_amcatnloFXFX_madspin_pythia8'
    ],
    'VVV': ['WZZ_TuneCUETP8M1_13TeV-amcatnlo-pythia8'],
    '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'],
}
Exemplo n.º 44
0
from DevTools.Plotter.HistMaker import HistMaker
from DevTools.Plotter.Plotter import Plotter
from copy import deepcopy

import ROOT

logging.basicConfig(
    level=logging.INFO,
    stream=sys.stderr,
    format='%(asctime)s.%(msecs)03d %(levelname)s %(name)s: %(message)s',
    datefmt='%Y-%m-%d %H:%M:%S')

new = True

fakeratePlotter = Plotter(
    'WTauFakeRate',
    new=new,
)

fakerateMaker = HistMaker(
    'WTauFakeRate',
    outputFileName='root/WTauFakeRate/fakerates.root',
)

sigMap = {
    'WW': [
        'WWTo2L2Nu_13TeV-powheg',
        'WWToLNuQQ_13TeV-powheg',
    ],
    'W': [
        'WJetsToLNu_TuneCUETP8M1_13TeV-amcatnloFXFX-pythia8',
        #'WJetsToLNu_TuneCUETP8M1_13TeV-madgraphMLM-pythia8',
Exemplo n.º 45
0
from DevTools.Plotter.Plotter import Plotter
from DevTools.Utilities.utilities import ZMASS
from DevTools.Plotter.higgsUtilities import getSigMap
from copy import deepcopy
import ROOT

logging.basicConfig(
    level=logging.INFO,
    stream=sys.stderr,
    format='%(asctime)s.%(msecs)03d %(levelname)s %(name)s: %(message)s',
    datefmt='%Y-%m-%d %H:%M:%S')

blind = False

plotter = Plotter('ThreeLepton')

#########################
### Define categories ###
#########################

sigMap = getSigMap('Hpp3l')

samples = ['TTV', 'VVV', 'ZZ', 'WZ']
allsamples = ['W', 'T', 'TT', 'TTV', 'Z', 'WW', 'VVV', 'ZZ', 'WZ']

allSamplesDict = {'BG': []}
for s in allsamples:
    allSamplesDict['BG'] += sigMap[s]

########################