Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

First working version of the framework. Btag sfs are disabled #1

Open
wants to merge 2 commits into
base: 80X
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion TTHAnalysis/macros/prepareEventVariablesFriendTree.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,14 @@
ROOT.PyConfig.IgnoreCommandLineOptions = True

MODULES = []
from CMGTools.TTHAnalysis.tools.multilepFriendTreeProducersToCleanup import MODULES as multiModules
MODULES += multiModules

class VariableProducer(Module):
def __init__(self,name,booker,modules):
Module.__init__(self,name,booker)
self._modules = [ (n,m() if type(m) == types.FunctionType else m) for (n,m) in modules ]
print self._modules
def init(self,tree):
for n,m in self._modules:
if hasattr(m, 'init'): m.init(tree)
Expand Down Expand Up @@ -182,6 +185,7 @@ def analyze(self,event):

runner = ""
super = ""
theoutput= args[1].replace('/pool/ciencias/','/pool/cienciasrw/')
if options.env == "cern":
runner = "lxbatch_runner.sh"
super = "bsub -q {queue}".format(queue = options.queue)
Expand All @@ -193,7 +197,6 @@ def analyze(self,event):
options.queue = "batch"
super = "qsub -q {queue} -N happyTreeFriend".format(queue = options.queue)
runner = "lxbatch_runner.sh"
theoutput= args[1].replace('/pool/ciencias/','/pool/cienciasrw/')
else:
raise RuntimeError, "I do not know what to do. Where am I? Please set the [env] option"

Expand Down Expand Up @@ -295,6 +298,7 @@ def _runIt(myargs):
if re.match(pat,m):
toRun[m] = True
modulesToRun = [ (m,v) for (m,v) in MODULES if m in toRun ]
print 'looooping ###############'
el = EventLoop([ VariableProducer(options.treeDir,booker,modulesToRun), ])
el.loop([tb], eventRange=range)
booker.done()
Expand Down
230 changes: 230 additions & 0 deletions TTHAnalysis/macros/submit.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,230 @@
import os
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@sscruz the idea was to have it in the susyMaintenance stuff, but for me it can be left here without any problem.

Perhaps let's ping @nachosandres , since he wrote the bulk of the script.


## this script creates a sub-directory in the tree path for a given module
## and runs the friend tree producer for this module

batch = True
queue = "batch" #"batch" for Oviedo, "8nh" or others for lxplus
path = "/mnt_pool/fanae105/user/sscruz/TTH/samples"
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If we add it to this main repo, we should clean it up quite heavily, in order not to have (too many) hardcoded paths and such

@sscruz @nachosandres

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would definitely keep this script out of the repo (personally, I never add it to my commits), since it works by hardcoding your path (user specific), friend tree module (analysis specific) and accepted/excluded samples (both), all of which one changes again and again when running. It's only an unnecessary source of changes in our commit history.

#path = "trees/"
force = True # if the friend tree already exists, module is not run; set to True to still run it

## first: module to run, second: list of modules (comma separated) that are required to run
modules = [
["leptonJetReCleanerTTH", ""],
# ["eventBTagWeight","leptonJetReCleanerTTH"]
#["fastCombinedObjectRecleaner", ""]
#["leptonJetReCleanerSusyEWK2L" , "" ],
# ["leptonJetReCleanerSusyEWK3L" , "" ],
#["WZCRvars" , "leptonJetReCleanerSusyEWK2L" ],
#["leptonBuilderEWK" , "leptonJetReCleanerSusyEWK3L" ],
#["leptonJetReCleanerSusyRA7" , "" ],
#["leptonBuilderRA7" , "leptonJetReCleanerSusyRA7" ],
#["leptonJetReCleanerWZSM" , "" ],
#["leptonBuilderWZSM" , "leptonJetReCleanerWZSM" ],
]

## in case you want to run only specific samples
accept = ['MuonEG_Run2016H-PromptReco-v2_runs_281613_284035'
#'TTTT',
#"WZTo3LNu",
#"WGToLNuG",
#"DoubleEG_Run2016G_23Sep2016_v1_runs_271036_284044_part1",
#
#"DoubleEG_Run2016G_23Sep2016_v1_runs_271036_284044_part2",
#
#"DoubleMuon_Run2016F_23Sep2016_v1_runs_271036_284044_part2",
#
#"DoubleMuon_Run2016G_23Sep2016_v1_runs_271036_284044_part5",
#@@"DoubleEG_Run2016G_23Sep2016_v1_runs_271036_284044_part2",
#@@"DoubleEG_Run2016G_23Sep2016_v1_runs_271036_284044_part3",
#@@"DoubleEG_Run2016G_23Sep2016_v1_runs_271036_284044_part4",
#@@"DoubleEG_Run2016G_23Sep2016_v1_runs_271036_284044_part5",
#@@"DoubleMuon_Run2016F_23Sep2016_v1_runs_271036_284044_part2",
#@@"DoubleMuon_Run2016G_23Sep2016_v1_runs_271036_284044_part3",
##"DoubleEG_Run2016G_23Sep2016_v1_runs_271036_284044_part2",
#"DoubleEG_Run2016G_23Sep2016_v1_runs_271036_284044_part3",
#
#"DoubleEG_Run2016G_23Sep2016_v1_runs_271036_284044_part4",
#
#
#"DoubleEG_Run2016G_23Sep2016_v1_runs_271036_284044_part5",
#
#"DoubleMuon_Run2016G_23Sep2016_v1_runs_271036_284044_part3",
#"DoubleEG_Run2016G_23Sep2016_v1_runs_271036_284044_part5",
###"JetHT_Run2016B_23Sep2016_v3_runs_273150_275376_part1",
###"MET_Run2016H-PromptReco-v3_runs_284036_284044",
###"SingleMuon_Run2016H-PromptReco-v3_runs_284036_284044",
#"DoubleMuon_Run2016G_23Sep2016_v1_runs_271036_284044_part2",
#"DoubleMuon_Run2016G_23Sep2016_v1_runs_271036_284044_part5",
#"DoubleMuon_Run2016G_23Sep2016_v1_runs_271036_284044_part7",
#"DoubleMuon_Run2016G_23Sep2016_v1_runs_271036_284044_part7",
#
#"DoubleEG_Run2016B_23Sep2016_v3_runs_273150_275376_skimmed_part1",
#"DoubleEG_Run2016D_23Sep2016_v1_runs_271036_284044_part4",
#"DoubleEG_Run2016E_23Sep2016_v1_runs_271036_284044_part2",
#"DoubleEG_Run2016H-PromptReco-v2_runs_281613_284035_part4",
#"DoubleMuon_Run2016B_23Sep2016_v3_runs_273150_275376_skimmed_part1",
#"DoubleMuon_Run2016B_23Sep2016_v3_runs_273150_275376_skimmed_part3",
#"DoubleMuon_Run2016B_23Sep2016_v3_runs_273150_275376_skimmed_part6",
#"DoubleMuon_Run2016H-PromptReco-v2_runs_281613_284035_part10",
#"TTJets_SingleLeptonFromTbar_part2",
#"TTJets_SingleLeptonFromTbar_part3",
#"Run2016G",
#"Run2016F",
#"DoubleEG_Run2016E_23Sep2016_v1_runs_271036_284044_part2"
#"DYJetsToLL_M50_LO_part2",
#"TTJets_SingleLeptonFromT_part3",
#"TTJets_SingleLeptonFromTbar_part1",
#"SingleLeptonFromTbar_part2",
#"SingleLeptonFromTbar_part3",
#"DoubleEG_Run2016B_23Sep2016_v3_runs_273150_275376_part1",
#"DoubleEG_Run2016B_23Sep2016_v3_runs_273150_275376_part3",
#"DoubleEG_Run2016B_23Sep2016_v3_runs_273150_275376_part4",
#"DoubleEG_Run2016C_23Sep2016_v1_runs_271036_284044_part1",
#"DoubleEG_Run2016D_23Sep2016_v1_runs_271036_284044_part2",
#"DoubleEG_Run2016D_23Sep2016_v1_runs_271036_284044_part4",
#"DoubleEG_Run2016E_23Sep2016_v1_runs_271036_284044_part1",
#"DoubleEG_Run2016E_23Sep2016_v1_runs_271036_284044_part2",
#"DoubleEG_Run2016H-PromptReco-v2_runs_281613_284035_part4",
#"DoubleEG_Run2016H-PromptReco-v2_runs_281613_284035_part5",
#"SingleElectron_Run2016E_23Sep2016_v1_runs_271036_284044",
#"DoubleEG_Run2016B_23Sep2016_v3_runs_273150_275376_part1",
#"DoubleEG_Run2016B_23Sep2016_v3_runs_273150_275376_part3",
#"DoubleEG_Run2016B_23Sep2016_v3_runs_273150_275376_part4",
#"DoubleEG_Run2016C_23Sep2016_v1_runs_271036_284044_part1",
#"DoubleEG_Run2016D_23Sep2016_v1_runs_271036_284044_part2",
#"DoubleEG_Run2016D_23Sep2016_v1_runs_271036_284044_part4",
#"DoubleEG_Run2016E_23Sep2016_v1_runs_271036_284044_part1",
#"DoubleEG_Run2016E_23Sep2016_v1_runs_271036_284044_part2",
#"DoubleEG_Run2016H-PromptReco-v2_runs_281613_284035_part4",
#"DoubleEG_Run2016H-PromptReco-v2_runs_281613_284035_part5",
#"DoubleMuon_Run2016B_23Sep2016_v3_runs_273150_275376_part10",
#"DoubleMuon_Run2016B_23Sep2016_v3_runs_273150_275376_part9",
#"DoubleMuon_Run2016C_23Sep2016_v1_runs_271036_284044_part2",
#"DoubleMuon_Run2016C_23Sep2016_v1_runs_271036_284044_part1",
#"DoubleMuon_Run2016D_23Sep2016_v1_runs_271036_284044_part1",
#"DoubleMuon_Run2016D_23Sep2016_v1_runs_271036_284044_part6",
#"DoubleMuon_Run2016E_23Sep2016_v1_runs_271036_284044_part1",
#"MuonEG_Run2016H-PromptReco-v2_runs_281613_284035",
#"SingleElectron_Run2016E_23Sep2016_v1_runs_271036_284044",
#"SingleMuon_Run2016H-PromptReco-v3_runs_284036_284044",
#"WWZ"
#"TChiNeuSlepSneu_mCh450_mChi300",
#"TChiNeuSlepSneu_mCh300_mChi270",
#"TChiNeuSlepSneu_mCh750_mChi100"
#"TChiNeuWZ_mCh150_mChi120",
#"TChiNeuWZ_mCh200_mChi100",
#"TChiNeuWZ_mCh350_mChi100",
#"TChiNeuWZ_mCh350_mChi20"
# "TChiNeuWZ_mCh350_mChi20"
# "T6ttWW_mG_1000_mN_100",
#"T6ttWW_mG_1200_mN_100",
#"T1tttt_mG_1200_mN_900",
#"T1tttt_mG_1300_mN_1000",
#"T1tttt_mG_1400_mN_1100",
#"T1tttt_mG_1500_mN_1200",
#"T1tttt_mG_1600_mN_1300",
#"1250_mN_950",
#"800_mN_700",
#"DYJets"
#"TGJets",
#"TTGJets",
#"TTJets_Di",
#"TTJets_Single",
#"TTLL",
#"TTW",
#"TTZ",
#"TTW",
#"TTWTo",
#"TTZTo",
#"TTH",
#"TBar",
#"TTHnobb_pow",
#"tZq",
#"VH",
#"WG",
#"ZG",
#"WWZ",
#"WZZ",
#"ZZZ",
#"ZZTo4L",
#"WWTo2L2Nu",
#"TTTT",
#"FromTbar",
#"romT",
#"WZTo3LNu",
#"T5qqqqVV_noDM_mG_1000_mN_100",
#"MuonEG_Run2016B",
#"GGHZZ",
#"Run",
#"DYJetsToLL_M10to50_LO",
#"DYJetsToLL_M50_LO",
#"DoubleMuon_Run2016B_PromptReco_v2_runs_275126_275783",
#"T1tttt",
#"T5qqqq",
#"T6ttWW",
]

#annot open file evVarFriend_SingleMuon_Run2016D_PromptReco_v2_runs_276284_276811.chunk68.root cannot open file evVarFriend_DoubleEG_Run2016D_PromptReco_v2_runs_276284_276811.chunk14.root

## in case you want to exclude specific samples
exclude = [#"_SS",
#"_OS",
#"_TD",
#"_LO",
#"Tau",
#"TChi",
#"WZTo3LNu",
#"DoubleEG",
#"DoubleMuon",
#"MuonEG",
#"ZToMuMu",
#"QCD",
#"50to",
#"amcatnlo",
#"Run",
#"runs_273150_275125",
#"TTW","TTZ",
#"WZTo3LNu"
#"amcatnlo",
]

## --------------- do not touch beyond this line ---------------

def cmd(cmd):
print cmd
os.system(cmd)

def mkdir(path):
if os.path.isdir(path): return
cmd("mkdir " + path)

def submit(sample, module):
global batch, queue, path
super = "python prepareEventVariablesFriendTree.py " + path + " " + path + "/" + module[0] + " -d " + sample + " --tra2 --tree treeProducerSusyMultilepton -m " + module[0]
if not module[1].strip() == "":
sm = module[1].strip().split(",")
for f in sm: super += " -F sf/t " + path + "/" + f + "/evVarFriend_" + sample + ".root"
if batch:
#super += " --env cern -q " + queue + " -N 50000 --log " + path + "/" + module[0] + "/log"
super += " -q " + queue + " -N 50000 --env oviedo"
cmd(super)


path = path.rstrip("/")
listdir = os.listdir(path)

for module in modules:

mkdir( module[0])
#mkdir(path + "/" + module[0] + "/log")

for d in listdir:
if not os.path.isdir(path + "/" + d): continue
if not ( os.path.exists(path + "/" + d + "/treeProducerSusyMultilepton/tree.root") or os.path.exists(path + "/" + d + "/treeProducerSusyMultilepton/tree.root.url") ): continue
if not force and os.path.exists(path + "/" + module[0] + "/evVarFriend_" + d + ".root"): continue
if accept != [] and all([d.find(a) == -1 for a in accept ]): continue
if exclude != [] and any([d.find(e) > -1 for e in exclude]): continue
submit(d, module)

34 changes: 17 additions & 17 deletions TTHAnalysis/python/plotter/ttH-multilepton/mca-2lss-mc.txt
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
ttH+ : TTHnobb_mWCutfix_ch0 : 0.5071*0.418 : LepGood1_isMatchRightCharge && LepGood2_isMatchRightCharge; FillColor=ROOT.kOrange+10
#ttH+ : TTHnobb_mWCutfix_ch0 : 0.5071*0.418 : LepGood1_isMatchRightCharge && LepGood2_isMatchRightCharge; FillColor=ROOT.kOrange+10
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are you sure these commented lines does not mess up things for other people? Perhaps we should have a different mca, for the moment, or use the one used by everyone?

@sscruz


TTW : TTWToLNu : 0.196 : LepGood1_isMatchRightCharge && LepGood2_isMatchRightCharge ; FillColor=ROOT.kGreen-5
TTZ : TTZToLLNuNu : 0.2526 : LepGood1_isMatchRightCharge && LepGood2_isMatchRightCharge ; FillColor=ROOT.kSpring+2
TTZ : TTLLJets_m1to10 : xsec : LepGood1_isMatchRightCharge && LepGood2_isMatchRightCharge ; FillColor=ROOT.kSpring+2
TTZ : TTJets_DiLepton : xsec : LepGood1_isMatchRightCharge && LepGood2_isMatchRightCharge ; FillColor=ROOT.kSpring+2
TTZ : TTJets_SingleLeptonFromT+TTJets_SingleLeptonFromT_ext : xsec : LepGood1_isMatchRightCharge && LepGood2_isMatchRightCharge ; FillColor=ROOT.kSpring+2
TTZ : TTJets_SingleLeptonFromTbar+TTJets_SingleLeptonFromTbar_ext : xsec : LepGood1_isMatchRightCharge && LepGood2_isMatchRightCharge ; FillColor=ROOT.kSpring+2
#TTZ : TTJets_DiLepton : xsec : LepGood1_isMatchRightCharge && LepGood2_isMatchRightCharge ; FillColor=ROOT.kSpring+2
#TTZ : TTJets_SingleLeptonFromT+TTJets_SingleLeptonFromT_ext : xsec : LepGood1_isMatchRightCharge && LepGood2_isMatchRightCharge ; FillColor=ROOT.kSpring+2
#TTZ : TTJets_SingleLeptonFromTbar+TTJets_SingleLeptonFromTbar_ext : xsec : LepGood1_isMatchRightCharge && LepGood2_isMatchRightCharge ; FillColor=ROOT.kSpring+2

WZ : WZTo3LNu : 1.1*xsec : LepGood1_isMatchRightCharge && LepGood2_isMatchRightCharge ; FillColor=ROOT.kViolet-4
WZ : WJetsToLNu_LO : xsec : LepGood1_isMatchRightCharge && LepGood2_isMatchRightCharge ; FillColor=ROOT.kViolet-4
Rares : ZZTo4L : xsec : LepGood1_isMatchRightCharge && LepGood2_isMatchRightCharge ; FillColor=ROOT.kAzure-9

Gstar : DYJetsToLL_M10to50: xsec : LepGood1_isMatchRightCharge && LepGood2_isMatchRightCharge ; FillColor=ROOT.kCyan+1
Gstar : DYJetsToLL_M50: xsec : LepGood1_isMatchRightCharge && LepGood2_isMatchRightCharge ; FillColor=ROOT.kCyan+1
#Gstar : DYJetsToLL_M10to50: xsec : LepGood1_isMatchRightCharge && LepGood2_isMatchRightCharge ; FillColor=ROOT.kCyan+1
#Gstar : DYJetsToLL_M50: xsec : LepGood1_isMatchRightCharge && LepGood2_isMatchRightCharge ; FillColor=ROOT.kCyan+1

WWss: WpWpJJ : xsec : LepGood1_isMatchRightCharge && LepGood2_isMatchRightCharge ; FillColor=ROOT.kOrange-3

Expand All @@ -23,30 +23,30 @@ Rares: ZZZ : xsec : LepGood1_isMatchRightCharge && LepGood2_isMatchRightCharge ;
Rares: TTTT : xsec : LepGood1_isMatchRightCharge && LepGood2_isMatchRightCharge ; FillColor=ROOT.kMagenta-7
Rares: tZq_ll : xsec : LepGood1_isMatchRightCharge && LepGood2_isMatchRightCharge ; FillColor=ROOT.kMagenta-7

Convs : TTGJets : xsec : ((LepGood1_mcMatchId==0 && LepGood1_mcPromptGamma==1) || (LepGood2_mcMatchId==0 && LepGood2_mcPromptGamma==1)) ; FillColor=ROOT.kOrange
#Convs : TTGJets : xsec : ((LepGood1_mcMatchId==0 && LepGood1_mcPromptGamma==1) || (LepGood2_mcMatchId==0 && LepGood2_mcPromptGamma==1)) ; FillColor=ROOT.kOrange
Convs : WGToLNuG : xsec : ((LepGood1_mcMatchId==0 && LepGood1_mcPromptGamma==1) || (LepGood2_mcMatchId==0 && LepGood2_mcPromptGamma==1)) ; FillColor=ROOT.kOrange
Convs : ZGTo2LG : xsec : ((LepGood1_mcMatchId==0 && LepGood1_mcPromptGamma==1) || (LepGood2_mcMatchId==0 && LepGood2_mcPromptGamma==1)) ; FillColor=ROOT.kOrange
Convs : TGJets : xsec : ((LepGood1_mcMatchId==0 && LepGood1_mcPromptGamma==1) || (LepGood2_mcMatchId==0 && LepGood2_mcPromptGamma==1)) ; FillColor=ROOT.kOrange

TT : TTJets_DiLepton : xsec : ((LepGood1_mcMatchId==0 && LepGood1_mcPromptGamma==0) || (LepGood2_mcMatchId==0 && LepGood2_mcPromptGamma==0)) ; FillColor=ROOT.kGray
TT : TTJets_SingleLeptonFromT+TTJets_SingleLeptonFromT_ext : xsec : ((LepGood1_mcMatchId==0 && LepGood1_mcPromptGamma==0) || (LepGood2_mcMatchId==0 && LepGood2_mcPromptGamma==0)) ; FillColor=ROOT.kGray
TT : TTJets_SingleLeptonFromTbar+TTJets_SingleLeptonFromTbar_ext : xsec : ((LepGood1_mcMatchId==0 && LepGood1_mcPromptGamma==0) || (LepGood2_mcMatchId==0 && LepGood2_mcPromptGamma==0)) ; FillColor=ROOT.kGray
DY : DYJetsToLL_M10to50: xsec : ((LepGood1_mcMatchId==0 && LepGood1_mcPromptGamma==0) || (LepGood2_mcMatchId==0 && LepGood2_mcPromptGamma==0)) ; FillColor=ROOT.kCyan
DY : DYJetsToLL_M50: xsec : ((LepGood1_mcMatchId==0 && LepGood1_mcPromptGamma==0) || (LepGood2_mcMatchId==0 && LepGood2_mcPromptGamma==0)) ; FillColor=ROOT.kCyan
#TT : TTJets_DiLepton : xsec : ((LepGood1_mcMatchId==0 && LepGood1_mcPromptGamma==0) || (LepGood2_mcMatchId==0 && LepGood2_mcPromptGamma==0)) ; FillColor=ROOT.kGray
#TT : TTJets_SingleLeptonFromT+TTJets_SingleLeptonFromT_ext : xsec : ((LepGood1_mcMatchId==0 && LepGood1_mcPromptGamma==0) || (LepGood2_mcMatchId==0 && LepGood2_mcPromptGamma==0)) ; FillColor=ROOT.kGray
#TT : TTJets_SingleLeptonFromTbar+TTJets_SingleLeptonFromTbar_ext : xsec : ((LepGood1_mcMatchId==0 && LepGood1_mcPromptGamma==0) || (LepGood2_mcMatchId==0 && LepGood2_mcPromptGamma==0)) ; FillColor=ROOT.kGray
#DY : DYJetsToLL_M10to50: xsec : ((LepGood1_mcMatchId==0 && LepGood1_mcPromptGamma==0) || (LepGood2_mcMatchId==0 && LepGood2_mcPromptGamma==0)) ; FillColor=ROOT.kCyan
#DY : DYJetsToLL_M50: xsec : ((LepGood1_mcMatchId==0 && LepGood1_mcPromptGamma==0) || (LepGood2_mcMatchId==0 && LepGood2_mcPromptGamma==0)) ; FillColor=ROOT.kCyan
WJets : WJetsToLNu_LO : xsec : ((LepGood1_mcMatchId==0 && LepGood1_mcPromptGamma==0) || (LepGood2_mcMatchId==0 && LepGood2_mcPromptGamma==0)) ; FillColor=ROOT.kCyan+2
SingleTop: TToLeptons_tch_powheg: xsec : ((LepGood1_mcMatchId==0 && LepGood1_mcPromptGamma==0) || (LepGood2_mcMatchId==0 && LepGood2_mcPromptGamma==0)) ; FillColor=ROOT.kGray+2, Label="Single T"
SingleTop: TBarToLeptons_tch_powheg: xsec : ((LepGood1_mcMatchId==0 && LepGood1_mcPromptGamma==0) || (LepGood2_mcMatchId==0 && LepGood2_mcPromptGamma==0)) ; FillColor=ROOT.kGray+2, Label="Single T"
SingleTop: TToLeptons_sch: xsec : ((LepGood1_mcMatchId==0 && LepGood1_mcPromptGamma==0) || (LepGood2_mcMatchId==0 && LepGood2_mcPromptGamma==0)) ; FillColor=ROOT.kGray+2, Label="Single T"
SingleTop: T_tWch: xsec : ((LepGood1_mcMatchId==0 && LepGood1_mcPromptGamma==0) || (LepGood2_mcMatchId==0 && LepGood2_mcPromptGamma==0)) ; FillColor=ROOT.kGray+2, Label="Single T"
SingleTop: TBar_tWch: xsec : ((LepGood1_mcMatchId==0 && LepGood1_mcPromptGamma==0) || (LepGood2_mcMatchId==0 && LepGood2_mcPromptGamma==0)) ; FillColor=ROOT.kGray+2, Label="Single T"
WW: WWTo2L2Nu: xsec : ((LepGood1_mcMatchId==0 && LepGood1_mcPromptGamma==0) || (LepGood2_mcMatchId==0 && LepGood2_mcPromptGamma==0)) ; FillColor=ROOT.kGray+1
#WW: WWTo2L2Nu: xsec : ((LepGood1_mcMatchId==0 && LepGood1_mcPromptGamma==0) || (LepGood2_mcMatchId==0 && LepGood2_mcPromptGamma==0)) ; FillColor=ROOT.kGray+1

Flips : TTJets_DiLepton : xsec : (LepGood1_mcMatchId!=0 && LepGood2_mcMatchId!=0 && !(LepGood1_isMatchRightCharge && LepGood2_isMatchRightCharge)) ; Label="Flips", FillColor=ROOT.kCyan-10
Flips : DYJetsToLL_M10to50 : xsec : (LepGood1_mcMatchId!=0 && LepGood2_mcMatchId!=0 && !(LepGood1_isMatchRightCharge && LepGood2_isMatchRightCharge)) ; Label="Flips", FillColor=ROOT.kCyan-10
Flips : DYJetsToLL_M50 : xsec : (LepGood1_mcMatchId!=0 && LepGood2_mcMatchId!=0 && !(LepGood1_isMatchRightCharge && LepGood2_isMatchRightCharge)) ; Label="Flips", FillColor=ROOT.kCyan-10
#Flips : TTJets_DiLepton : xsec : (LepGood1_mcMatchId!=0 && LepGood2_mcMatchId!=0 && !(LepGood1_isMatchRightCharge && LepGood2_isMatchRightCharge)) ; Label="Flips", FillColor=ROOT.kCyan-10
#Flips : DYJetsToLL_M10to50 : xsec : (LepGood1_mcMatchId!=0 && LepGood2_mcMatchId!=0 && !(LepGood1_isMatchRightCharge && LepGood2_isMatchRightCharge)) ; Label="Flips", FillColor=ROOT.kCyan-10
#Flips : DYJetsToLL_M50 : xsec : (LepGood1_mcMatchId!=0 && LepGood2_mcMatchId!=0 && !(LepGood1_isMatchRightCharge && LepGood2_isMatchRightCharge)) ; Label="Flips", FillColor=ROOT.kCyan-10
Flips : T_tWch : xsec : (LepGood1_mcMatchId!=0 && LepGood2_mcMatchId!=0 && !(LepGood1_isMatchRightCharge && LepGood2_isMatchRightCharge)) ; Label="Flips", FillColor=ROOT.kCyan-10
Flips : TBar_tWch : xsec : (LepGood1_mcMatchId!=0 && LepGood2_mcMatchId!=0 && !(LepGood1_isMatchRightCharge && LepGood2_isMatchRightCharge)) ; Label="Flips", FillColor=ROOT.kCyan-10
Flips : WWTo2L2Nu : xsec : (LepGood1_mcMatchId!=0 && LepGood2_mcMatchId!=0 && !(LepGood1_isMatchRightCharge && LepGood2_isMatchRightCharge)) ; Label="Flips", FillColor=ROOT.kCyan-10
#Flips : WWTo2L2Nu : xsec : (LepGood1_mcMatchId!=0 && LepGood2_mcMatchId!=0 && !(LepGood1_isMatchRightCharge && LepGood2_isMatchRightCharge)) ; Label="Flips", FillColor=ROOT.kCyan-10



Loading