Exemple #1
0
    "-c",
    "--config",
    dest="config",
    default="",
    type="string",
    help=
    "Additional configuration file to be used for the channels, periods and categories. [Default: '']"
)
## check number of arguments; in case print usage
(options, args) = parser.parse_args()
if len(args) > 0:
    parser.print_usage()
    exit(1)

#import configuration
config = configuration(options.analysis, options.config)

log = {
    ("em", "0"): [
        "false",
    ],
    ("em", "1"): [
        "false",
    ],
    ("em", "2"): [
        "false",
    ],
    ("em", "3"): [
        "false",
    ],
    ("em", "4"): [
Exemple #2
0
from HiggsAnalysis.HiggsToTauTau.utils import parseArgs

## masses
masses = args
## do_not_scales
do_not_scales = options.do_not_scales.split()
for idx in range(len(do_not_scales)) : do_not_scales[idx] = do_not_scales[idx].rstrip(',')
## analyses
analyses = options.analyses.split()
for idx in range(len(analyses)) : analyses[idx] = analyses[idx].rstrip(',')
## CMSSW_BASE
cmssw_base=os.environ['CMSSW_BASE']
## setup a backup directory
os.system("mkdir -p backup")
## configuration
config=configuration('sm', options.config)

## define inputs from cvs; Note: not all analyses are available for all inputs
directories = {}
from HiggsAnalysis.HiggsToTauTau.summer13_analyses_cfg import htt_ee, htt_mm, htt_em, htt_et, htt_mt, htt_tt, vhtt
for chn in config.channels:
    if chn != 'vhtt':
        directories[chn] = locals()['htt_'+chn](config.inputs[chn])
    else:
        directories[chn] = locals()[chn](config.inputs[chn])

## postfix pattern for input files
patterns = {
    'no-bbb' : '',
    'bbb'    : '',
    }
                         if options.verbose :
                             if out_line :
                                 print out_line
             if not move_on:
                 output_file.write(line)
	     else:
                 output_file.write("break; \n")
                 





################

config=configuration(options.analysis, options.config, options.add_mutau_soft)
fitresults = options.fitresults.format(ANALYSIS=options.analysis)
for chn in config.channels :
    if chn == 'vhtt':
        continue
    for per in config.periods :
        for cat in config.categories[chn][per] :
            if chn == "hbb" :
                histfile = "{CHN}.input_{PER}-0.root".format(CHN=chn, PER=per)
            else :
                histfile = "htt_{CHN}.input_{PER}.root".format(CHN=chn, PER=per) if options.analysis == "sm" else "htt_{CHN}.inputs-mssm-{PER}-0.root".format(CHN=chn, PER=per, MA=str(int(options.mA)), TANB=str(int(options.tanb)))
                if chn == "mm" :
                ## there is one speciality for mm, which need special input files
                    histfile.replace(".root", "-svfit.root")
            if chn == "hbb" :
                process_weight, process_shape_weight, process_uncertainties, process_shape_uncertainties = parse_dcard("datacards/{CHN}_{CAT}_{PER}.txt".format(CHN=chn, CAT=cat, PER=per), fitresults, "ANYBIN")
Exemple #4
0
parser.add_option(
    "--add-mutau-soft",
    dest="add_mutau_soft",
    action="store_true",
    default=False,
    help="Add the soft categories to the mt channel [Default: False]")
parser.add_option(
    "--hww-signal",
    dest="hwwsig",
    action="store_true",
    default=False,
    help="Add H->WW processes as signal to the em channel [Default: False]")
## check number of arguments; in case print usage
(options, args) = parser.parse_args()

config = configuration(options.analysis, options.config,
                       options.add_mutau_soft)

## a set of pre-defined lists

#categories_sm = [
#    "0jet_low",
#    "0jet_high",
#    "0jet",
#    "1jet_low",
#    "1jet_medium",
#    "1jet_high_lowhiggs",
#    "1jet_high_mediumhiggs",
#    "1jet_high",
#"1jet",  ## these are not combined at the moment due to different binning in low and high pt
#    "vbf",
#    ]
from HiggsAnalysis.HiggsToTauTau.utils import get_channel_dirs

## masses
masses = args
## do_not_scales
do_not_scales = options.do_not_scales.split()
for idx in range(len(do_not_scales)) : do_not_scales[idx] = do_not_scales[idx].rstrip(',')
## analyses
analyses = options.analyses.split()
for idx in range(len(analyses)) : analyses[idx] = analyses[idx].rstrip(',')
## CMSSW_BASE
cmssw_base=os.environ['CMSSW_BASE']
## setup a backup directory
os.system("mkdir -p backup")
## configuration
config=configuration('sm', options.config, options.add_mutau_soft)

## define inputs from cvs; Note: not all analyses are available for all inputs
directories = {}
from HiggsAnalysis.HiggsToTauTau.summer13_analyses_cfg import htt_ee, htt_mm, htt_em, htt_et, htt_mt, htt_tt, vhtt
for chn in config.channels:
    if chn != 'vhtt':
        directories[chn] = locals()['htt_'+chn](config.inputs[chn])
    else:
        directories[chn] = locals()[chn](config.inputs[chn])

## postfix pattern for input files
patterns = {
    'no-bbb'         : '',
    'bbb'            : '',
    'no-bbb:hww-sig' : '',
Exemple #6
0
from HiggsAnalysis.HiggsToTauTau.utils import get_channel_dirs

## masses
masses = args
## do_not_scales
do_not_scales = options.do_not_scales.split()
for idx in range(len(do_not_scales)) : do_not_scales[idx] = do_not_scales[idx].rstrip(',')
## analyses
analyses = options.analyses.split()
for idx in range(len(analyses)) : analyses[idx] = analyses[idx].rstrip(',')
## CMSSW_BASE
cmssw_base=os.environ['CMSSW_BASE']
## setup a backup directory
os.system("mkdir -p backup")
## configuration
config=configuration('bbA', options.config)

## define inputs from cvs; Note: not all analyses are available for all inputs
directories = {}
from HiggsAnalysis.HiggsToTauTau.summer13_analyses_cfg import htt_mt,htt_et,htt_em
for chn in config.channels:
    directories[chn] = locals()['htt_'+chn](config.inputs[chn])

## postfix pattern for input files
patterns = {
    'no-bbb'         : '',
    'bbb'            : '',
    }

if options.update_all :
    options.update_setup     = True
from HiggsAnalysis.HiggsToTauTau.utils import parseArgs
from HiggsAnalysis.HiggsToTauTau.utils import get_channel_dirs

## masses
masses = args
for idx in range(len(masses)) : masses[idx] = masses[idx].rstrip(',')
## analyses
analyses = options.analyses.split()
analyses_save = analyses
for idx in range(len(analyses)) : analyses[idx] = analyses[idx].rstrip(',')
## CMSSW_BASE
cmssw_base=os.environ['CMSSW_BASE']
## setup a backup directory
os.system("mkdir -p backup")
## configuration
config=configuration('Hhh', options.config)

##define inputs from git; Note: not all analyses are available for all inputs
directories = {}
from HiggsAnalysis.HiggsToTauTau.summer13_analyses_cfg import htt_mm, htt_em, htt_et, htt_mt, htt_tt, htt_tt
for chn in config.channels :
    directories[chn] = locals()['htt_'+chn](config.inputs[chn])

## postfix pattern for input files
patterns = {
    'plain'        : {'em': '', 'et' : '', 'mt' : '', 'tt' : '', 'mm' : ''},
    'bbb'          : {'em': '', 'et' : '', 'mt' : '', 'tt' : '', 'mm' : ''},
    }

if options.update_all :
    options.reload        = True
		           if not process_name+str(bin) in uncertainties_set:
   		               uncertainties_set+=[process_name+str(bin)]
                               out_line  += "hin->SetBinError(%(bin)i,%(uncertainty)f); \n" % {"bin":bin, "uncertainty":uncertainty}
			   elif uncertainty!=0:
                               out_line  += "hin->SetBinError(%(bin)i,sqrt(pow(hin->GetBinError(%(bin)i),2)+pow(%(uncertainty)f,2))); \n" % {"bin":bin, "uncertainty":uncertainty}
                         output_file.write(out_line)
                         if options.verbose :
                             if out_line :
                                 print out_line
             if not move_on:
                 output_file.write(line)
	     else:
                 output_file.write("break; \n")
                 

config=configuration(options.analysis, options.config)
fitresults = options.fitresults.format(ANALYSIS=options.analysis)
for chn in config.channels :
    for per in config.periods :
        for cat in config.categories[chn][per] :
            if chn == "hbb" :
                histfile = "{CHN}.input_{PER}-0.root".format(CHN=chn, PER=per)
            else :
                histfile = "htt_{CHN}.input_{PER}.root".format(CHN=chn, PER=per) if options.analysis == "sm" else "htt_{CHN}.inputs-mssm-{PER}-0.root".format(CHN=chn, PER=per, MA=str(int(options.mA)), TANB=str(int(options.tanb)))
                if chn == "mm" :
                ## there is one speciality for mm, which need special input files
                    histfile.replace(".root", "-svfit.root")
            if chn == "hbb" :
                process_weight, process_shape_weight, process_uncertainties, process_shape_uncertainties = parse_dcard("datacards/{CHN}_{CAT}_{PER}.txt".format(CHN=chn, CAT=cat, PER=per), fitresults, "ANYBIN")
                if cat=="6" :
                    plots = Analysis(options.analysis, histfile, config.categoryname[chn][int(cat)],
Exemple #9
0
## masses
masses = args
for idx in range(len(masses)):
    masses[idx] = masses[idx].rstrip(',')
## analyses
analyses = options.analyses.split()
analyses_save = analyses
for idx in range(len(analyses)):
    analyses[idx] = analyses[idx].rstrip(',')
## CMSSW_BASE
cmssw_base = os.environ['CMSSW_BASE']
## setup a backup directory
os.system("mkdir -p backup")
## configuration
config = configuration('Hhh', options.config)

##define inputs from git; Note: not all analyses are available for all inputs
directories = {}
from HiggsAnalysis.HiggsToTauTau.summer13_analyses_cfg import htt_mm, htt_em, htt_et, htt_mt, htt_tt, htt_tt
for chn in config.channels:
    directories[chn] = locals()['htt_' + chn](config.inputs[chn])

## postfix pattern for input files
patterns = {
    'plain': {
        'em': '',
        'et': '',
        'mt': '',
        'tt': '',
        'mm': ''
Exemple #10
0
## masses
masses = args
## do_not_scales
do_not_scales = options.do_not_scales.split()
for idx in range(len(do_not_scales)):
    do_not_scales[idx] = do_not_scales[idx].rstrip(',')
## analyses
analyses = options.analyses.split()
for idx in range(len(analyses)):
    analyses[idx] = analyses[idx].rstrip(',')
## CMSSW_BASE
cmssw_base = os.environ['CMSSW_BASE']
## setup a backup directory
os.system("mkdir -p backup")
## configuration
config = configuration('sm', options.config, options.add_mutau_soft)

## define inputs from cvs; Note: not all analyses are available for all inputs
directories = {}
from HiggsAnalysis.HiggsToTauTau.summer13_analyses_cfg import htt_ee, htt_mm, htt_em, htt_et, htt_mt, htt_tt, vhtt
for chn in config.channels:
    if chn != 'vhtt':
        directories[chn] = locals()['htt_' + chn](config.inputs[chn])
    else:
        directories[chn] = locals()[chn](config.inputs[chn])

## postfix pattern for input files
patterns = {
    'no-bbb': '',
    'bbb': '',
    'no-bbb:hww-sig': '',
Exemple #11
0
from HiggsAnalysis.HiggsToTauTau.utils import get_channel_dirs

## masses
masses = args
## do_not_scales
do_not_scales = options.do_not_scales.split()
for idx in range(len(do_not_scales)) : do_not_scales[idx] = do_not_scales[idx].rstrip(',')
## analyses
analyses = options.analyses.split()
for idx in range(len(analyses)) : analyses[idx] = analyses[idx].rstrip(',')
## CMSSW_BASE
cmssw_base=os.environ['CMSSW_BASE']
## setup a backup directory
os.system("mkdir -p backup")
## configuration
config=configuration('AZh', options.config)

## define inputs from cvs; Note: not all analyses are available for all inputs
directories = {}
from HiggsAnalysis.HiggsToTauTau.summer13_analyses_cfg import htt_AZh
for chn in config.channels:
    directories[chn] = locals()['htt_'+chn](config.inputs[chn])

## postfix pattern for input files
patterns = {
    'no-bbb'         : '',
    'bbb'            : '',
    }

if options.update_all :
    options.update_setup     = True