def main():
    print "# --------------------------------------------------------------------------------------"
    print "# Blinding datacards. "
    print "# --------------------------------------------------------------------------------------"
    print "# You are using the following configuration: "
    print "# --update-file       :", options.update_file
    print "# --recycle-templates :", options.recycle_templates
    print "# --seed              :", options.seed
    print "# --inject-signal     :", options.inject_signal
    print "# --injected-scale    :", options.injected_scale
    print "# --injected-mass     :", options.injected_mass
    print "# --extra-templates   :", options.extra_templates
    print "# --blacklist         :", blacklist
    print "# Check option --help in case of doubt about the meaning of one or more of these confi-"
    print "# guration parameters.                           "
    print "# --------------------------------------------------------------------------------------"
    cardMaker = AsimovDatacard(options, options.update_file, options.seed,
                               options.inject_signal, options.injected_mass,
                               options.injected_scale, options.extra_templates,
                               blacklist)
    for dir in args:
        ## clean up directory from former trials
        if not options.recycle_templates:
            cardMaker.cleanup(dir, '_asimov')
        cardMaker.make_asimov_datacards(dir, options.recycle_templates)
예제 #2
0
                        "perl -pi -e 's/WH_hww/WH_hww{MASS}/g' {FILE}".format(
                            MASS=options.hww_mass, FILE=file))
                    os.system(
                        "perl -pi -e 's/ZH_hww/ZH_hww{MASS}/g' {FILE}".format(
                            MASS=options.hww_mass, FILE=file))
        ## fix the problem in the datacards, that the massindex is already contained in the process name
        if not options.hww_mass == '':
            file = "{DIR}/{ANA}/sm/htt_{em,vhtt}/{htt_em,vhtt}_*.txt".format(
                DIR=dir, ANA=ana)
            os.system(
                "sed -i -e '/_hww125/ s/$PROCESS$MASS/$PROCESS/g' {FILE}".
                format(MASS=options.hww_mass, FILE=file))
        ## blind datacards
        if options.blind_datacards:
            for chn in channels:
                cardMaker = AsimovDatacard('', True, -1, False, '125', '1.0',
                                           options.extra_templates)
                for dir in '{DIR}/{ANA}/sm/{CHN}'.format(
                        DIR=dir,
                        ANA=ana,
                        CHN=chn if chn == 'vhtt' else 'htt_' + chn):
                    cardMaker.cleanup(dir, '_asimov')
                    cardMaker.make_asimov_datacards(dir, False)

if options.update_limits:
    print "##"
    print "## update LIMITS directory:"
    print "##"
    ## setup directory structure
    dir = "{CMSSW_BASE}/src/LIMITS{LABEL}".format(CMSSW_BASE=cmssw_base,
                                                  LABEL=options.label)
    if os.path.exists(dir):