'sig_900', 'sig_1000', 'sig_1100'] # sig_sample_list=['sig_900'] sig_samples = [] for sig in sig_sample_list: print 'setting up signal sample: ', sig exclusion_sr_config = configMgr.addFitConfigClone(background_config, "Sig_excl_%s" % sig) sig_sample = Sample(sig, kViolet+5) sig_sample.setStatConfig(use_stat) sig_sample.setFileList(sig_files) sig_sample.setNormByTheory() sig_sample.setNormFactor("mu_SIG", 1., 0., 5.) sig_sample.weights = [nominal_weight_sig] # add baseline systematics to signal samples addSystematic([sig_sample], (btag_sf_uncert_sig_list + jes_uncert_list + [jer_uncert])) # apply the correct cross section systematic to the signal # sample if it is available if sig in signal_xsec_rel_uncert: this_signal_xsec_uncert = Systematic( name='SigXSec', nominal=nominal_weight_sig, high=(1+signal_xsec_rel_uncert[sig]), low=(1-signal_xsec_rel_uncert[sig]),
# if "225" not in s : continue # if "135" not in s : continue # s_ = s.replace(".0", "") s_ = s extlx = configMgr.addFitConfigClone(tlx, "Sig_%s" % s_) userPrint(" > Adding signal sample to exclusion fit config : %s" % s) sigSample_ = Sample(s, kPink) sigSample_.setFileList(signal_files) sigSample_.setNormByTheory() sigSample_.setStatConfig(not runOptions.doSplitMCsys()) if runOptions.doSplitMCsys(): sigSample_.addSystematic(sysObj.mcstat_SIG) ## set the signal weight to be the weight with no PUPW sigSample_.weights = ["eventweightNOPUPW"] if runOptions.doTheoryBand(): ### TODO check if we need the configMgr setRunOnlyNominalXSec sigXSSyst = Systematic( "SigXSec", ["eventweightNOPUPW"], 1.07, 0.93, "user", "overallSys" ) ### TODO add xsec util to grab the uncertainties on xsec (rather than storing in tree) # sigXSSyst = Systematic("SigXSec", configMgr.weights, 1.07, 0.93, "user", "overallSys") ### TODO add xsec util to grab the uncertainties on xsec (rather than storing in tree) sigSample_.addSystematic(sigXSSyst) ## add systematics sigSample_ = addSys(sigSample_, False, sysObj, True) ## attach the signal strength sigSample_.setNormFactor("mu_SIG", 1.0, 0.0, 5.0) extlx.addSamples(sigSample_)