Example #1
0
    "LeptonTightNoSieie0": "LeptonTightInvIsoNoSieie0",
}

filterCutData = getFilterCut(args.year,
                             isData=True,
                             skipBadChargedCandidate=True)
filterCutMc = getFilterCut(args.year,
                           isData=False,
                           skipBadChargedCandidate=True)

blinding = []
if args.year != 2016 and args.blind:
    blinding += [cutInterpreter.cutString("highSieieLep")]

data_sample.setSelectionString([filterCutData, "reweightHEM>0"] + blinding)
data_sample.setWeightString("weight")
if args.small:
    data_sample.normalization = 1.
    data_sample.reduceFiles(factor=5)
    data_sample.setWeightString("weight*%f" % (1. / data_sample.normalization))

for s in mc:
    s.setSelectionString([filterCutMc, "pTStitching==1", "overlapRemoval==1"])
    s.read_variables = read_variables_MC
    sampleWeight = "1"
    if args.small:
        s.normalization = 1.
        s.reduceFiles(factor=100)
        sampleWeight = "%f" % (1. / s.normalization)

selection = cutInterpreter.cutString(args.selection)
Example #2
0
# Sample definition
os.environ["gammaSkim"] = "False"  #always false for QCD estimate
if args.year == 2016:
    from TTGammaEFT.Samples.nanoTuples_Run2016_14Dec2018_semilep_postProcessed import Run2016 as data_sample
elif args.year == 2017:
    from TTGammaEFT.Samples.nanoTuples_Run2017_14Dec2018_semilep_postProcessed import Run2017 as data_sample
elif args.year == 2018:
    from TTGammaEFT.Samples.nanoTuples_Run2018_14Dec2018_semilep_postProcessed import Run2018 as data_sample
elif args.year == "RunII":
    from TTGammaEFT.Samples.nanoTuples_RunII_postProcessed import RunII as data_sample

filterCutData = getFilterCut(args.year,
                             isData=True,
                             skipBadChargedCandidate=True)
data_sample.setSelectionString([filterCutData, "reweightHEM>0"])
data_sample.setWeightString("weight")
lumi_scale = data_sample.lumi * 0.001

replaceSelection = {
    #    "nLeptonVetoIsoCorr": "nLeptonVetoNoIso",
    "nLeptonTight": "nLeptonTightInvIso",
    "nMuonTight": "nMuonTightInvIso",
    "nElectronTight": "nElectronTightInvIso",
    "mLtight0Gamma": "mLinvtight0Gamma",
    "nPhotonGood": "nPhotonGoodInvLepIso",
    "nJetGood": "nJetGoodInvLepIso",
    "nBTagGood": "nBTagGoodInvLepIso",
    "mT": "mTinv",
    "m3": "m3inv",
    "LeptonTight0": "LeptonTightInvIso0",
    "JetGood0": "JetGoodInvLepIso0",
Example #3
0
weightStringAR = ws + ws16 + ws17 + ws18

wsInv   = "(%s*weight*
reweightHEM*reweightInvIsoTrigger*reweightL1Prefire*reweightPU*reweightLeptonTightSFInvIso*reweightLeptonTrackingTightSFInvIso*reweightPhotonSF*reweightPhotonElectronVetoSF*reweightBTag_SF)"%lumiString
wsInv16 = "+(%s*(PhotonNoChgIsoNoSieieInvLepIso0_photonCatMagic==2)*(%f-1)*(year==2016))" %(wsInv, misIDSF_val[2016].val)
wsInv17 = "+(%s*(PhotonNoChgIsoNoSieieInvLepIso0_photonCatMagic==2)*(%f-1)*(year==2017))" %(wsInv, misIDSF_val[2017].val)
wsInv18 = "+(%s*(PhotonNoChgIsoNoSieieInvLepIso0_photonCatMagic==2)*(%f-1)*(year==2018))" %(wsInv, misIDSF_val[2018].val)
weightStringInv = wsInv + wsInv16 + wsInv17 + wsInv18

filterCutData = getFilterCut( args.year, isData=True,  skipBadChargedCandidate=True )
filterCutMc   = getFilterCut( args.year, isData=False, skipBadChargedCandidate=True )
#tr            = TriggerSelector( args.year, singleLepton=True )
#triggerCutMc  = tr.getSelection( "MC" )

data_sample.setSelectionString( filterCutData )
data_sample.setWeightString( "weight*reweightHEM" )

for s in mc:
    s.setSelectionString( [ filterCutMc, "pTStitching==1", "overlapRemoval==1" ] )
    sampleWeight     = "1"

replaceSelection = {
#    "nLeptonVetoIsoCorr": "nLeptonVetoNoIso",
    "nLeptonTight":       "nLeptonTightInvIso",
    "nMuonTight":         "nMuonTightInvIso",
    "nElectronTight":     "nElectronTightInvIso",
    "mLtight0Gamma":      "mLinvtight0Gamma",
    "nPhotonGood":        "nPhotonGoodInvLepIso",
    "nJetGood":           "nJetGoodInvLepIso",
    "nBTagGood":          "nBTagGoodInvLepIso",
    "mT":                 "mTinv",