component.maxEvents = nEvents statProducer = ParaYieldProducer( "ParaYieldProducer", systList=[], channelDict={ "MuMu": LambdaFunc( 'x: abs(x.idL1[0]) == 13 and abs(x.idL2[0]) == 13 and abs(x.idL3[0]) == 13 and abs(x.idL4[0]) == 13' ), "ElEl": LambdaFunc( 'x: abs(x.idL1[0]) == 11 and abs(x.idL2[0]) == 11 and abs(x.idL3[0]) == 11 and abs(x.idL4[0]) == 11' ), "ElMu": LambdaFunc( 'x: abs(x.idL1[0]) == 11 and abs(x.idL2[0]) == 11 and abs(x.idL3[0]) == 13 and abs(x.idL4[0]) == 13' ), "MuEl": LambdaFunc( 'x: abs(x.idL1[0]) == 13 and abs(x.idL2[0]) == 13 and abs(x.idL3[0]) == 11 and abs(x.idL4[0]) == 11' ), "Mu": LambdaFunc('x: abs(x.idL3[0]) == 13 and abs(x.idL4[0]) == 13'), "El": LambdaFunc('x: abs(x.idL3[0]) == 11 and abs(x.idL4[0]) == 11'), }, binning=[8000, 0., 80.0], ) sequence = darkphoton_signal_unblind_sequence
higgsSR_sel_str = 'event.mass4l[0] > 118. and event.mass4l[0] < 130.' higgsSB_sel_str = 'not (event.mass4l[0] > 118. and event.mass4l[0] < 130.) and event.mass4l[0] > 100. and event.mass4l[0] < 170.' #higgsSB_sel_str = 'not (event.mass4l[0] > 118. and event.mass4l[0] < 130.)' input_channel_dict = { "2mu_HiggsSR": LambdaFunc('event: ' + ' and '.join([mu_ch_sel_str, higgsSR_sel_str])), "2e_HiggsSR": LambdaFunc('event: ' + ' and '.join([el_ch_sel_str, higgsSR_sel_str])), "2mu_HiggsSB": LambdaFunc('event: ' + ' and '.join([mu_ch_sel_str, higgsSB_sel_str])), "2e_HiggsSB": LambdaFunc('event: ' + ' and '.join([el_ch_sel_str, higgsSB_sel_str])), } sequence = darkphoton_signal_sequence yieldProducer = ParaYieldProducer( "ParaYieldProducer", systList=syst_list, channelDict=input_channel_dict, ) #sequence.add(variableProducer) sequence.add(yieldProducer) outputInfo = OutputInfo("OutputInfo") outputInfo.outputDir = outputDir outputInfo.TFileName = "StatInput.root" #endSequence = EndSequence(skipHadd=justEndSequence) endSequence = EndSequence(skipHadd=False)
} sequence = darkphoton_fullm4l_sequence yieldProducer = ParaYieldProducer( "ParaYieldProducer", systList=[ BaseObject( "LepScale-Up", fillValueFunc=LambdaFunc("x: x.massZ2_ScaleUp"), eventWeightFunc=LambdaFunc("x: x.weight"), ), BaseObject( "LepScale-Down", fillValueFunc=LambdaFunc("x: x.massZ2_ScaleDown"), eventWeightFunc=LambdaFunc("x: x.weight"), ), BaseObject( "LepRes-Up", fillValueFunc=LambdaFunc("x: x.massZ2_ResUp"), eventWeightFunc=LambdaFunc("x: x.weight"), ), BaseObject( "LepRes-Down", fillValueFunc=LambdaFunc("x: x.massZ2_ResDown"), eventWeightFunc=LambdaFunc("x: x.weight"), ), ], channelDict=input_channel_dict, ) leptonScaleResProducer = LeptonScaleResProducer("LeptonScaleResProducer") sequence.add(leptonScaleResProducer) sequence.add(yieldProducer)