def __init__(self, path=__file__, doc=__doc__):
     from dps.analysis.xsection.lib import closure_tests as CTs
     from dps.config.xsection import XSectionConfig
     variables = '|'.join(XSectionConfig.variables)
     closure_tests = '|'.join(CTs.keys())
     doc = doc.format(variables=variables, closure_tests=closure_tests)
     super(Command, self).__init__(path, doc)
Beispiel #2
0
 def __init__(self, path=__file__, doc=__doc__):
     from dps.analysis.xsection.lib import closure_tests as CTs
     from dps.config.xsection import XSectionConfig
     variables = '|'.join(XSectionConfig.variables)
     closure_tests = '|'.join(CTs.keys())
     doc = doc.format(variables=variables, closure_tests=closure_tests)
     super(Command, self).__init__(path, doc)
def parse_arguments():
    parser = ArgumentParser(__doc__)
    parser.add_argument(
        "-p",
        "--path",
        dest="path",
        default='data',
        help="set output path for JSON files. Default is 'data'.")
    parser.add_argument("-i",
                        "--input",
                        dest="input",
                        default='config/measurements/background_subtraction/',
                        help="set output path for JSON files")
    parser.add_argument(
        "-v",
        "--variable",
        dest="variable",
        default='MET',
        help=
        "set the variable to analyse (MET, HT, ST, MT, WPT). Default is MET.")
    parser.add_argument(
        "-c",
        "--centre-of-mass-energy",
        dest="CoM",
        default=13,
        type=int,
        help="set the centre of mass energy for analysis. Default = 13 [TeV]")
    parser.add_argument('-d',
                        '--debug',
                        dest="debug",
                        action="store_true",
                        help="Print the debug information")
    parser.add_argument(
        '--closure_test',
        dest="closure_test",
        action="store_true",
        help="Perform fit on data == sum(MC) * scale factor (MC process)")
    parser.add_argument('--closure_test_type',
                        dest="closure_test_type",
                        default='simple',
                        help="Type of closure test (relative normalisation):" +
                        '|'.join(closure_tests.keys()))
    parser.add_argument('--test',
                        dest="test",
                        action="store_true",
                        help="Just run the central measurement")
    parser.add_argument('--visiblePS',
                        dest="visiblePS",
                        action="store_true",
                        help="Unfold to visible phase space")

    args = parser.parse_args()
    # fix some of the inputs
    if not args.path.endswith('/'):
        args.path = args.path + '/'
    if not args.input.endswith('/'):
        args.input = args.input + '/'

    return args
def parse_options():
    parser = OptionParser(__doc__)
    parser.add_option("-p", "--path", dest="path", default='data',
                      help="set output path for JSON files. Default is 'data'.")
    parser.add_option("-i", "--input", dest="input",
                      default='config/measurements/background_subtraction/',
                      help="set output path for JSON files")
    parser.add_option("-v", "--variable", dest="variable", default='MET',
                      help="set the variable to analyse (MET, HT, ST, MT, WPT). Default is MET.")
    parser.add_option("-c", "--centre-of-mass-energy", dest="CoM", default=13, type=int,
                      help="set the centre of mass energy for analysis. Default = 13 [TeV]")
    parser.add_option('-d', '--debug', dest="debug", action="store_true",
                      help="Print the debug information")
    parser.add_option('--closure_test', dest="closure_test", action="store_true",
                      help="Perform fit on data == sum(MC) * scale factor (MC process)")
    parser.add_option('--closure_test_type', dest="closure_test_type", default='simple',
                      help="Type of closure test (relative normalisation):" + '|'.join(closure_tests.keys()))
    parser.add_option('--test', dest="test", action="store_true",
                      help="Just run the central measurement")
    parser.add_option('--visiblePS', dest="visiblePS", action="store_true",
                      help="Unfold to visible phase space")

    (options, args) = parser.parse_args()
    # fix some of the inputs
    if not options.path.endswith('/'):
        options.path = options.path + '/'
    if not options.input.endswith('/'):
        options.input = options.input + '/'

    return options, args
Beispiel #5
0
 def __init__(self, path=__file__, doc=__doc__):
     variables = '|'.join(XSectionConfig.variables)
     closure_tests = '|'.join(CTs.keys())
     doc = doc.format(variables=variables, closure_tests=closure_tests)
     super(Command, self).__init__(path, doc)
    parser.add_option( "-b", "--bjetbin", dest = "bjetbin", default = '2m',
                      help = "set b-jet multiplicity for analysis. Options: exclusive: 0-3, inclusive (N or more): 0m, 1m, 2m, 3m, 4m" )
    parser.add_option( "--bjetbin-vjets", dest = "bjetbin_VJets", default = '2m',
                      help = "set b-jet multiplicity for V+Jets samples. Options: exclusive: 0-3, inclusive (N or more): 0m, 1m, 2m, 3m, 4m" )
    parser.add_option( "-m", "--metType", dest = "metType", default = 'type1',
                      help = "set MET type for analysis of MET, ST or MT" )
    parser.add_option( "-c", "--centre-of-mass-energy", dest = "CoM", default = 13, type = int,
                      help = "set the centre of mass energy for analysis. Default = 13 [TeV]" )
    parser.add_option( '--fitter', dest = "use_fitter", default = 'Minuit',
                      help = 'Fitter to be used: Minuit|RooFit. Default = Minuit.' )
    parser.add_option( '-V', '--verbose', dest = "verbose", action = "store_true",
                      help = "Print the fit info and correlation matrix" )
    parser.add_option( '--closure_test', dest = "closure_test", action = "store_true",
                      help = "Perform fit on data == sum(MC) * scale factor (MC process)" )
    parser.add_option( '--closure_test_type', dest = "closure_test_type", default = 'simple',
                      help = "Type of closure test (relative normalisation):" + '|'.join( closure_tests.keys() ) )
    parser.add_option( '--no_combined_signal', dest = "make_combined_signal", 
                       action = "store_false", default=False,
                       help = "Do not make a combined template from TTbar and single top" )
    parser.add_option( '--test', dest = "test", action = "store_true",
                      help = "Just run the central measurement" )
    parser.add_option( '--disable-constraints', dest = "enable_constraints", 
                       action = "store_false", default=True,
                       help = "Do not constrain QCD and VJets templates." )

    translate_options = {
                        '0':'0btag',
                        '1':'1btag',
                        '2':'2btags',
                        '3':'3btags',
                        '0m':'0orMoreBtag',