if args.small: text += "_small" if args.normalize: text += "_normalize" TopEFTSample.name = "TOP-18-009" TopEFTSample.read_variables = [ "Z_mass/F", "Z_cosThetaStar/F", "Z_pt/F", "Z_daughterPdg/F", "GenLep[pt/F,eta/F]", ] TopEFTSample.setSelectionString( "abs(Z_mass-91.2)<10&&(abs(Z_daughterPdg)==11||abs(Z_daughterPdg)==13)&&Sum$(GenLep_pt>15&&abs(GenLep_eta)<2.4)>=2" ) genSignalSample.weight = lambda event, sample: w.get_weight_func(**kwargs)( event, sample) * event.ref_lumiweight1fb comparisonSamples = [[genSignalSample], [TopEFTSample]] stack = Stack(*comparisonSamples) # Use some defaults (set defaults before you create/import list of Plots!!) Plot.setDefaults(stack=stack, weight=staticmethod(weight_), selectionString=cutInterpreter.cutString( args.selection)) #, addOverFlowBin='upper' ) # plotList addPlots = [] addPlots.append(
'legendText': '%s=%3.2f' % (WC, WCval), 'color': color, 'WC': { WC: WCval } }) params += [{'legendText': 'SM', 'color': ROOT.kBlack, 'WC': {}}] lumi_scale = 137 for i_param, param in enumerate(params): param['sample'] = sample sample.weight = lambda event, sample: event.weight * lumi_scale param['style'] = styles.lineStyle(param['color']) stack = Stack(*[[param['sample']] for param in params]) weight = [[w.get_weight_func(**param['WC'])] for param in params] if args.small: #sample.normalization = 1. sample.reduceFiles(to=1) #sample.reduceFiles( to=1) #sample.scale /= sample.normalization # Text on the plots tex = ROOT.TLatex() tex.SetNDC() tex.SetTextSize(0.04) tex.SetTextAlign(11) # align right def charge(pdgId):