Ejemplo n.º 1
0
Usage:
python ToolKit/MakePullPlots.py
python ToolKit/PlotMU_NP.py
"""
import sys
import math
import copy
import pickle
import ROOT
from ChannelsDict import *
from ZLFitterConfig import *
import os

from ZLFitterConfig import *
zlFitterConfig = ZLFitterConfig()

ROOT.gROOT.SetBatch(True)  # Turn off online histogram drawing

plots = {}
dMU = {}
dNP = {}
hNP = {}


def MakeBox(color=ROOT.kGreen, offset=0, ymin=-1, ymax=1):
    graph = ROOT.TGraph(4)
    graph.SetPoint(0, 0.3 + offset, ymin)
    graph.SetPoint(1, 0.3 + offset, ymax)
    graph.SetPoint(2, 0.7 + offset, ymax)
    graph.SetPoint(3, 0.7 + offset, ymin)
from zerolepton.inputs.config import InputConfig

########################################
# Log
########################################

log = Logger("ZeroLeptonFitter")
log.info("ZeroLeptonFitter says hi!")

########################################
# Config Managers
########################################

# ZeroLepton configuration instance
# If you want to overright one of the option, please change ZLFitterConfig.py locally
zlFitterConfig = ZLFitterConfig()

# HistFitter's ConfigManager settings
configMgr.blindSR = zlFitterConfig.blindSR
configMgr.blindCR = zlFitterConfig.blindCR
configMgr.blindVR = zlFitterConfig.blindVR
configMgr.writeXML = zlFitterConfig.writeXML

configMgr.useSignalInBlindedData = zlFitterConfig.useSignalInBlindedData

configMgr.fixSigXSec = zlFitterConfig.fixSigXSec
configMgr.runOnlyNominalXSec = zlFitterConfig.runOnlyNominalXSec

#######################################################################
# Commandline args
#######################################################################
from multiprocessing import Process,Lock,Queue
import ROOT
from ROOT import *
file_path = os.path.abspath("plot")
sys.path.append(file_path)
from PlotterUtils import *

file_path = os.path.abspath("python")
sys.path.append(file_path)
from math import sqrt,pow
from ChannelConfig import *
from ChannelsDict import *
from ZLFitterConfig import *


zlFitterConfig = ZLFitterConfig() 
if not zlFitterConfig.datadriven:
    sys.exit()
domeffABCD=True
domeffABCD=zlFitterConfig.meffABCD
doAlternativeZ=False
doAlternativeW=False
doAlternativeY=False
doRun2=True
version=51
if doAlternativeZ:
	versionname = '51_alternativeZ'
elif doAlternativeW:
	versionname = '51_alternativeW'
else:
	versionname = '51_baseline'
Ejemplo n.º 4
0
from multiprocessing import Process, Lock, Queue
import ROOT
from ROOT import *
file_path = os.path.abspath("plot")
sys.path.append(file_path)
from PlotterUtils import *

file_path = os.path.abspath("python")
sys.path.append(file_path)
from math import sqrt, pow
from ChannelConfig import *
from ChannelsDict import *
from ZLFitterConfig import *

zlFitterConfig = ZLFitterConfig()
if not zlFitterConfig.datadriven:
    sys.exit()
domeffABCD = True
domeffABCD = zlFitterConfig.meffABCD
doAlternativeZ = False
doAlternativeW = False
doAlternativeY = False
doRun2 = True
version = 51
if doAlternativeZ:
    versionname = '51_alternativeZ'
elif doAlternativeW:
    versionname = '51_alternativeW'
else:
    versionname = '51_baseline'
from zerolepton.inputs.config import InputConfig

########################################
# Log
########################################

log = Logger("ZeroLeptonFitter")
log.info("ZeroLeptonFitter says hi!")

########################################
# Config Managers
########################################

# ZeroLepton configuration instance
# If you want to overright one of the option, please change ZLFitterConfig.py locally
zlFitterConfig = ZLFitterConfig()

# HistFitter's ConfigManager settings
configMgr.blindSR = zlFitterConfig.blindSR
configMgr.blindCR = zlFitterConfig.blindCR
configMgr.blindVR = zlFitterConfig.blindVR
configMgr.useSignalInBlindedData = zlFitterConfig.useSignalInBlindedData

configMgr.fixSigXSec = zlFitterConfig.fixSigXSec
configMgr.runOnlyNominalXSec = zlFitterConfig.runOnlyNominalXSec

#######################################################################
# Commandline args
#######################################################################

# parse configMgr.userArg to overwrite options above if needed