コード例 #1
0
             for proc in hww_processes :
                 os.system(r"root -l -b -q {CMSSW_BASE}/src/HiggsAnalysis/HiggsToTauTau/macros/rescaleSignal.C+\(true,{SCALE},\"{INPUTFILE}\",\"{PROCESS}\",0\)".format(
                     CMSSW_BASE=os.environ.get("CMSSW_BASE"),
                     SCALE=hww_over_htt['125']*float(options.hww_scale),
                     INPUTFILE=file,
                     PROCESS=proc+'125'
                     ))
 ## if requested apply horizontal morphing for processes to get templates for intermediate masses
 if options.interpolate:
     for i in range(len(masspoints)-1):
         for chn in config.channels:
             for per in config.periods:
                 for cat in config.categories[chn][per]:
                     for file in glob.glob("{SETUP}/{CHN}/htt_{CHN}.inputs-sm-{PER}*.root".format(SETUP=setup,CHN=chn, PER=per, CAT=cat)):
                         for proc in ['ggH','qqH','VH']:
                             template_morphing = Morph(file, get_channel_dirs(chn,"0"+cat,per)[0], proc+'{MASS}', ','.join(get_shape_systematics(setup,per,chn,"0"+cat,proc)), masspoints[i]+','+masspoints[i+1], options.interpolate, True,'', '') 
                             template_morphing.run()
         ## add the new points to the masses array
         masses.append(masspoints[i]+'-'+masspoints[i+1]+':'+options.interpolate)
     ## set the masspoint list to the new points
     masspoints = [str(m) for m in range(int(masspoints[0]),int(masspoints[-1])+1,int(options.interpolate))]
 ## set up directory structure
 dir = "{CMSSW_BASE}/src/setups{LABEL}".format(CMSSW_BASE=cmssw_base, LABEL=options.label)
 if os.path.exists(dir) :
     if os.path.exists(dir.replace('src/', 'src/backup/')):
         os.system("rm -r "+dir.replace('src/', 'src/backup/'))
     os.system("mv {DIR} {CMSSW_BASE}/src/backup/".format(DIR=dir, CMSSW_BASE=cmssw_base))
 os.system("mkdir -p {DIR}".format(DIR=dir))
 for ana in analyses :
     if 'hww-sig' in ana :
         continue
コード例 #2
0
 ## if requested apply horizontal morphing for processes to get templates for intermediate masses
 if options.interpolate:
     for i in range(len(masspoints) - 1):
         for chn in config.channels:
             for per in config.periods:
                 for cat in config.categories[chn][per]:
                     for file in glob.glob(
                             "{SETUP}/{CHN}/htt_{CHN}.inputs-sm-{PER}*.root"
                             .format(SETUP=setup, CHN=chn, PER=per,
                                     CAT=cat)):
                         for proc in ['ggH', 'qqH', 'VH']:
                             template_morphing = Morph(
                                 file,
                                 get_channel_dirs(chn, "0" + cat, per)[0],
                                 proc + '{MASS}', ','.join(
                                     get_shape_systematics(
                                         setup, per, chn, "0" + cat, proc)),
                                 masspoints[i] + ',' + masspoints[i + 1],
                                 options.interpolate, True, '', '')
                             template_morphing.run()
         ## add the new points to the masses array
         masses.append(masspoints[i] + '-' + masspoints[i + 1] + ':' +
                       options.interpolate)
     ## set the masspoint list to the new points
     masspoints = [
         str(m)
         for m in range(int(masspoints[0]),
                        int(masspoints[-1]) + 1, int(options.interpolate))
     ]
 ## set up directory structure
 dir = "{CMSSW_BASE}/src/setups{LABEL}".format(CMSSW_BASE=cmssw_base,
                                               LABEL=options.label)
コード例 #3
0
     for file in glob.glob("{SETUP}/em/htt_em.inputs-sm-7TeV*.root".format(SETUP=setup)) :
         template_morphing = Morph(file, 'emu_0jet_low,emu_1jet_low,emu_vbf_loose', 'ggH_hww{MASS}', 'QCDscale_ggH1in,CMS_scale_e_7TeV', '140,150', 5, True,'', '', False) 
         template_morphing.run()
         template_morphing = Morph(file, 'emu_0jet_high,emu_1jet_high', 'ggH_hww{MASS}', 'QCDscale_ggH1in,CMS_scale_e_highpt_7TeV', '140,150', 5, True,'', '', False) 
         template_morphing.run()
         template_morphing = Morph(file, 'emu_0jet_low,emu_1jet_low,emu_vbf_loose', 'qqH_hww{MASS}', 'CMS_scale_e_7TeV', '140,150', 5, True,'', '', False) 
         template_morphing.run()
         template_morphing = Morph(file, 'emu_0jet_high,emu_1jet_high', 'qqH_hww{MASS}', 'CMS_scale_e_highpt_7TeV', '140,150', 5, True,'', '', False) 
         template_morphing.run()
     for per in config.periods:
         for cat in config.categories['vhtt'][per]:
             for file in glob.glob("{SETUP}/{CHN}/vhtt.inputs-sm-{PER}*.root".format(SETUP=setup,CHN=chn, PER=per, CAT=cat)):
                 if cat in ['0','1']:
                     proc = 'WH_hww'
                     for dir in get_channel_dirs(chn,"0"+cat,per):
                         template_morphing = Morph(file, dir, proc+'{MASS}', ','.join(get_shape_systematics(setup,per,'vhtt',"0"+cat,proc,dir)), '135,140', 5, True,'145', '', False) 
                         template_morphing.run()
 ## scale to SM cross section (main processes and all channels but those listed in do_not_scales)
 for chn in config.channels :
     for file in glob.glob("{SETUP}/{CHN}/*-sm-*.root".format(SETUP=setup, CHN=chn)) :
         if not chn in do_not_scales :
             if chn == 'vhtt':
                 ## vhtt is part of do_no_scale in the current configuration. So nothing will
                 ## happen here for the moment.
                 process = RescaleSamples(file, ['VH' , 'WH' , 'ZH'], masspoints)
                 process.rescale()
             else:
                 process = RescaleSamples(file, ['ggH', 'qqH', 'VH', 'WH', 'ZH'], masspoints)
                 process.rescale()
 if 'em' in config.channels :
     print "##"
コード例 #4
0
     for file in glob.glob("{SETUP}/em/htt_em.inputs-sm-7TeV*.root".format(SETUP=setup)) :
         template_morphing = Morph(file, 'emu_0jet_low,emu_1jet_low,emu_vbf_loose', 'ggH_hww{MASS}', 'QCDscale_ggH1in,CMS_scale_e_7TeV', '140,150', 5, True,'', '', False) 
         template_morphing.run()
         template_morphing = Morph(file, 'emu_0jet_high,emu_1jet_high', 'ggH_hww{MASS}', 'QCDscale_ggH1in,CMS_scale_e_highpt_7TeV', '140,150', 5, True,'', '', False) 
         template_morphing.run()
         template_morphing = Morph(file, 'emu_0jet_low,emu_1jet_low,emu_vbf_loose', 'qqH_hww{MASS}', 'CMS_scale_e_7TeV', '140,150', 5, True,'', '', False) 
         template_morphing.run()
         template_morphing = Morph(file, 'emu_0jet_high,emu_1jet_high', 'qqH_hww{MASS}', 'CMS_scale_e_highpt_7TeV', '140,150', 5, True,'', '', False) 
         template_morphing.run()
     for per in config.periods:
         for cat in config.categories['vhtt'][per]:
             for file in glob.glob("{SETUP}/{CHN}/vhtt.inputs-sm-{PER}*.root".format(SETUP=setup,CHN=chn, PER=per, CAT=cat)):
                 if cat in ['0','1']:
                     proc = 'WH_hww'
                     for dir in get_channel_dirs(chn,"0"+cat,per):
                         template_morphing = Morph(file, dir, proc+'{MASS}', ','.join(get_shape_systematics(setup,per,'vhtt',"0"+cat,proc,dir)), '135,140', 5, True,'145', '', False) 
                         template_morphing.run()
 ## scale to SM cross section (main processes and all channels but those listed in do_not_scales)
 for chn in config.channels :
     for file in glob.glob("{SETUP}/{CHN}/*-sm-*.root".format(SETUP=setup, CHN=chn)) :
         if not chn in do_not_scales :
             if chn == 'vhtt':
                 ## vhtt is part of do_no_scale in the current configuration. So nothing will
                 ## happen here for the moment.
                 process = RescaleSamples(file, ['VH' , 'WH' , 'ZH'], masspoints)
                 process.rescale()
             else:
                 process = RescaleSamples(file, ['ggH', 'qqH', 'VH', 'WH', 'ZH'], masspoints)
                 process.rescale()
 if 'em' in config.channels :
     print "##"