16return [int(''.join(g)) if k else''.join(g) for k, g in groupby(s[0], str.isdigit)]
17
18# NOTES
19# Option 1
20# - Freeze cross-calibration histograms by hand outside of eta=0.8 to twice the value of the last sensible bin
21# - Freeze flavour histograms by hand wherever input histogram falls below 0: extrapolate forward in pT from around 2 TeV centrally and from lower pT as eta increases.
22# - Set eta-intercalibration by hand to:
23# - The run-1 uncertainty for |eta| < 0.8
24# - Twice the run-1 uncertainty /in these same bins/ for 0.8 < |eta| < 2.5
25# - Three times the run-1 uncertainty /in these same bins/ for 2.5 < |eta|
26# - FlavorResponse histogram inverted from input file to match Run I convention
27# - Pileup values not changed!!
28# Use flag OPT1
29
30# Option 2
31#
32
33# Check useage and store arguments
34if len(sys.argv) < 2:
35print"USAGE: Expected the following arguments"
36print" 1. Directory path to share directory for current 2015 recommendations"
57# For now, everything except flavour and cross calibration inputs
58# are read in from the final 2012 calibration files.
59theCurrentHistos = ReadCurrentHistograms(theCurrentDir) # First true activates eta-intercalibration scaling. Second true turns off relative in situ components at large eta