Beispiel #1
0
    def getFullNames(self, sampleAlias):
        ProductionKey = SKFlatV + '_' + self.Year
        sampleFullName, _ = Tools.GetInputSamples([sampleAlias], "ALL",
                                                  self.Year, self.Category,
                                                  ProductionKey)
        outDict = {}
        for key1, value1 in sampleFullName.iteritems():
            key2 = value1['key']
            value2 = key1
            if key2 in outDict:
                outDict[key2].append(value2)
            else:
                outDict[key2] = [value2]

        # {alias : [full names]}
        return outDict
Beispiel #2
0
from ShapeAnalysis.python.ShapeFactory import ShapeFactory

parser = argparse.ArgumentParser(description='SKFlat Command')
parser.add_argument('--InSkim', dest='InSkim', default="")
parser.add_argument('--dry_run', action='store_true')
parser.add_argument('--doBatch', action='store_true')
parser.add_argument('--doHadd', action='store_true')
parser.add_argument('--userflags', dest='Userflags', default="test")
parser.add_argument('--skimV', dest='skimV', default="0")
parser.add_argument('--nTotFiles', dest='nTotFiles', default=0, type=int)
parser.add_argument('--MonitJob', dest='MonitJob', default=False, type=bool)
parser.add_argument('--Category', dest='Category', default="SMP")
parser.add_argument('--treeName', dest='treeName', default="")
parser.add_argument('--cleanUp', dest='cleanUp', action='store_true')

Tools.AddOptions(parser)
Tools.LoadOptDefaults(parser)
opt = parser.parse_args()
print '=================================================================='
print "Let's go for", SKFlatV, "to make histograms of", opt.InputSampleKey
print '=================================================================='
##########################
# Dump configurations
##########################

sys.path.append(os.getcwd())

variables = {}
columns = []
if opt.variableCfg != '':
    if os.path.exists(opt.variableCfg):
Beispiel #3
0
    '--invertXY',
    dest='invertXY',
    help=
    'Invert the weighting for X <-> Y. Instead of slices along Y, do slices along X',
    action='store_true',
    default=False)

parser.add_argument(
    '--postFit',
    dest='postFit',
    help='Plot sum of post-fit backgrounds, and the data/post-fit ratio.',
    default='n')

ROOT.gROOT.SetBatch()

Tools.AddOptions(parser)
Tools.LoadOptDefaults(parser)
opt = parser.parse_args()

print ""
print "          configuration file =", opt.pycfg
print "                        lumi =", opt.lumi
print "                   inputFile =", opt.inputFile
print "              outputDirPlots =", opt.outputDirPlots
print " plotNormalizedDistributions =", opt.plotNormalizedDistributions
print "          showIntegralLegend =", opt.showIntegralLegend
print "                 scaleToPlot =", opt.scaleToPlot
print "                     minLogC =", opt.minLogC
print "                     maxLogC =", opt.maxLogC
print "                minLogCratio =", opt.minLogCratio
print "                maxLogCratio =", opt.maxLogCratio