diff --git a/analyses/pluginATLAS/ATLAS_2011_S9002537.yoda b/analyses/pluginATLAS/ATLAS_2011_S9002537.yoda
--- a/analyses/pluginATLAS/ATLAS_2011_S9002537.yoda
+++ b/analyses/pluginATLAS/ATLAS_2011_S9002537.yoda
@@ -1,37 +1,19 @@
 BEGIN YODA_SCATTER2D_V2 /REF/ATLAS_2011_S9002537/d01-x01-y01
 IsRef: 1
 Path: /REF/ATLAS_2011_S9002537/d01-x01-y01
-Title: ~
+Title: doi:10.17182/hepdata.85594.v1/t1
 Type: Scatter2D
 ---
 # xval	 xerr-	 xerr+	 yval	 yerr-	 yerr+
-1.050000e-01	1.050000e-01	1.050000e-01	1.470000e-01	2.024000e-02	2.024000e-02
-3.150000e-01	1.050000e-01	1.050000e-01	1.500000e-01	1.562000e-02	1.562000e-02
-5.250000e-01	1.050000e-01	1.050000e-01	1.580000e-01	1.562000e-02	1.562000e-02
-7.350000e-01	1.050000e-01	1.050000e-01	1.840000e-01	1.802000e-02	1.802000e-02
-9.450000e-01	1.050000e-01	1.050000e-01	1.860000e-01	2.024000e-02	2.024000e-02
-1.210000e+00	1.600000e-01	1.600000e-01	2.400000e-01	1.360000e-02	1.360000e-02
-1.445000e+00	7.500000e-02	7.500000e-02	2.500000e-01	1.486000e-02	1.486000e-02
-1.630000e+00	1.100000e-01	1.100000e-01	2.690000e-01	1.345000e-02	1.345000e-02
-1.845000e+00	1.050000e-01	1.050000e-01	2.730000e-01	1.345000e-02	1.345000e-02
-2.065000e+00	1.150000e-01	1.150000e-01	2.760000e-01	1.499000e-02	1.499000e-02
-2.290000e+00	1.100000e-01	1.100000e-01	2.730000e-01	1.562000e-02	1.562000e-02
+1.050000e-01	1.050000e-01	1.050000e-01	1.470000e-01	2.024846e-02	2.024846e-02
+3.150000e-01	1.050000e-01	1.050000e-01	1.490000e-01	1.562050e-02	1.562050e-02
+5.250000e-01	1.050000e-01	1.050000e-01	1.570000e-01	1.562050e-02	1.562050e-02
+7.350000e-01	1.050000e-01	1.050000e-01	1.840000e-01	1.802776e-02	1.802776e-02
+9.450000e-01	1.050000e-01	1.050000e-01	1.860000e-01	2.024846e-02	2.024846e-02
+1.210000e+00	1.600000e-01	1.600000e-01	2.390000e-01	1.360147e-02	1.360147e-02
+1.445000e+00	7.500000e-02	7.500000e-02	2.490000e-01	1.486607e-02	1.486607e-02
+1.630000e+00	1.100000e-01	1.100000e-01	2.690000e-01	1.345362e-02	1.345362e-02
+1.845000e+00	1.050000e-01	1.050000e-01	2.720000e-01	1.345362e-02	1.345362e-02
+2.065000e+00	1.150000e-01	1.150000e-01	2.770000e-01	1.500000e-02	1.500000e-02
+2.290000e+00	1.100000e-01	1.100000e-01	2.730000e-01	1.562050e-02	1.562050e-02
 END YODA_SCATTER2D_V2
-
-BEGIN YODA_SCATTER2D_V2 /REF/ATLAS_2011_S9002537/d02-x01-y01
-IsRef: 1
-Path: /REF/ATLAS_2011_S9002537/d02-x01-y01
-Title: ~
-Type: Scatter2D
----
-# xval	 xerr-	 xerr+	 yval	 yerr-	 yerr+
-END YODA_SCATTER2D_V2
-
-BEGIN YODA_SCATTER2D_V2 /REF/ATLAS_2011_S9002537/d02-x02-y01
-IsRef: 1
-Path: /REF/ATLAS_2011_S9002537/d02-x02-y01
-Title: ~
-Type: Scatter2D
----
-# xval	 xerr-	 xerr+	 yval	 yerr-	 yerr+
-END YODA_SCATTER2D_V2
diff --git a/analyses/pluginATLAS/ATLAS_2012_I1199269.yoda b/analyses/pluginATLAS/ATLAS_2012_I1199269.yoda
--- a/analyses/pluginATLAS/ATLAS_2012_I1199269.yoda
+++ b/analyses/pluginATLAS/ATLAS_2012_I1199269.yoda
@@ -1,140 +1,137 @@
 BEGIN YODA_SCATTER2D_V2 /REF/ATLAS_2012_I1199269/d01-x01-y01
 IsRef: 1
 Path: /REF/ATLAS_2012_I1199269/d01-x01-y01
-Title: ~
+Title: doi:10.17182/hepdata.62320.v1/t1
 Type: Scatter2D
 ---
 # xval	 xerr-	 xerr+	 yval	 yerr-	 yerr+
-1.000000e+01	1.000000e+01	1.000000e+01	2.470000e-02	7.700000e-03	3.600000e-03
-2.500000e+01	5.000000e+00	5.000000e+00	7.040000e-02	1.440000e-02	9.300000e-03
-3.500000e+01	5.000000e+00	5.000000e+00	9.100000e-02	1.500000e-02	1.200000e-02
-4.500000e+01	5.000000e+00	5.000000e+00	2.520000e-01	3.700000e-02	2.600000e-02
-5.500000e+01	5.000000e+00	5.000000e+00	8.800000e-01	1.200000e-01	7.400000e-02
-6.500000e+01	5.000000e+00	5.000000e+00	8.570000e-01	6.800000e-02	7.100000e-02
-7.500000e+01	5.000000e+00	5.000000e+00	6.260000e-01	5.300000e-02	5.100000e-02
-8.500000e+01	5.000000e+00	5.000000e+00	3.840000e-01	4.900000e-02	5.000000e-02
-9.500000e+01	5.000000e+00	5.000000e+00	3.050000e-01	3.500000e-02	3.200000e-02
-1.050000e+02	5.000000e+00	5.000000e+00	2.120000e-01	2.100000e-02	2.100000e-02
-1.150000e+02	5.000000e+00	5.000000e+00	1.480000e-01	1.500000e-02	1.500000e-02
-1.250000e+02	5.000000e+00	5.000000e+00	1.220000e-01	1.100000e-02	1.500000e-02
-1.350000e+02	5.000000e+00	5.000000e+00	8.290000e-02	7.700000e-03	1.150000e-02
-1.450000e+02	5.000000e+00	5.000000e+00	6.560000e-02	6.100000e-03	9.100000e-03
-1.550000e+02	5.000000e+00	5.000000e+00	5.350000e-02	5.400000e-03	7.500000e-03
-1.650000e+02	5.000000e+00	5.000000e+00	4.510000e-02	4.200000e-03	6.500000e-03
-1.750000e+02	5.000000e+00	5.000000e+00	3.430000e-02	3.500000e-03	5.200000e-03
-1.850000e+02	5.000000e+00	5.000000e+00	2.620000e-02	2.700000e-03	3.500000e-03
-1.950000e+02	5.000000e+00	5.000000e+00	2.090000e-02	2.200000e-03	2.800000e-03
-2.125000e+02	1.250000e+01	1.250000e+01	1.490000e-02	1.500000e-03	2.400000e-03
-2.375000e+02	1.250000e+01	1.250000e+01	9.700000e-03	9.900000e-04	1.580000e-03
-2.625000e+02	1.250000e+01	1.250000e+01	6.160000e-03	7.500000e-04	1.110000e-03
-2.875000e+02	1.250000e+01	1.250000e+01	4.640000e-03	6.900000e-04	8.700000e-04
-3.250000e+02	2.500000e+01	2.500000e+01	2.350000e-03	3.100000e-04	5.100000e-04
-3.750000e+02	2.500000e+01	2.500000e+01	1.160000e-03	1.700000e-04	2.600000e-04
-4.500000e+02	5.000000e+01	5.000000e+01	4.690000e-04	6.900000e-05	9.300000e-05
-6.500000e+02	1.500000e+02	1.500000e+02	8.600000e-05	1.600000e-05	1.900000e-05
+1.000000e+01	1.000000e+01	1.000000e+01	2.470000e-02	7.746612e-03	3.534119e-03
+2.500000e+01	5.000000e+00	5.000000e+00	7.040000e-02	1.436106e-02	9.269844e-03
+3.500000e+01	5.000000e+00	5.000000e+00	9.100000e-02	1.552417e-02	1.170470e-02
+4.500000e+01	5.000000e+00	5.000000e+00	2.520000e-01	3.748333e-02	2.570992e-02
+5.500000e+01	5.000000e+00	5.000000e+00	8.800000e-01	1.205985e-01	7.397973e-02
+6.500000e+01	5.000000e+00	5.000000e+00	8.570000e-01	6.873136e-02	7.170077e-02
+7.500000e+01	5.000000e+00	5.000000e+00	6.260000e-01	5.261179e-02	5.162364e-02
+8.500000e+01	5.000000e+00	5.000000e+00	3.840000e-01	4.866210e-02	4.964877e-02
+9.500000e+01	5.000000e+00	5.000000e+00	3.050000e-01	3.452535e-02	3.157531e-02
+1.050000e+02	5.000000e+00	5.000000e+00	2.120000e-01	2.137756e-02	2.137756e-02
+1.150000e+02	5.000000e+00	5.000000e+00	1.480000e-01	1.456022e-02	1.552417e-02
+1.250000e+02	5.000000e+00	5.000000e+00	1.220000e-01	1.044031e-02	1.529706e-02
+1.350000e+02	5.000000e+00	5.000000e+00	8.290000e-02	7.716217e-03	1.147563e-02
+1.450000e+02	5.000000e+00	5.000000e+00	6.560000e-02	6.109828e-03	9.070832e-03
+1.550000e+02	5.000000e+00	5.000000e+00	5.350000e-02	5.442426e-03	7.446476e-03
+1.650000e+02	5.000000e+00	5.000000e+00	4.510000e-02	4.162932e-03	6.525335e-03
+1.750000e+02	5.000000e+00	5.000000e+00	3.430000e-02	3.443835e-03	5.220153e-03
+1.850000e+02	5.000000e+00	5.000000e+00	2.620000e-02	2.729469e-03	3.453983e-03
+1.950000e+02	5.000000e+00	5.000000e+00	2.090000e-02	2.195450e-03	2.731300e-03
+2.125000e+02	1.250000e+01	1.250000e+01	1.490000e-02	1.523155e-03	2.376973e-03
+2.375000e+02	1.250000e+01	1.250000e+01	9.700000e-03	9.897980e-04	1.578005e-03
+2.625000e+02	1.250000e+01	1.250000e+01	6.160000e-03	7.494665e-04	1.110720e-03
+2.875000e+02	1.250000e+01	1.250000e+01	4.640000e-03	6.911584e-04	8.772685e-04
+3.250000e+02	2.500000e+01	2.500000e+01	2.350000e-03	3.106445e-04	5.092151e-04
+3.750000e+02	2.500000e+01	2.500000e+01	1.160000e-03	1.702939e-04	2.640076e-04
+4.500000e+02	5.000000e+01	5.000000e+01	4.690000e-04	6.862215e-05	9.349332e-05
+6.500000e+02	1.500000e+02	1.500000e+02	9.000000e-05	1.640122e-05	1.984943e-05
 END YODA_SCATTER2D_V2
-
 BEGIN YODA_SCATTER2D_V2 /REF/ATLAS_2012_I1199269/d02-x01-y01
 IsRef: 1
 Path: /REF/ATLAS_2012_I1199269/d02-x01-y01
-Title: ~
+Title: doi:10.17182/hepdata.62320.v1/t2
 Type: Scatter2D
 ---
 # xval	 xerr-	 xerr+	 yval	 yerr-	 yerr+
-1.000000e+00	1.000000e+00	1.000000e+00	7.270000e-01	9.400000e-02	6.100000e-02
-3.000000e+00	1.000000e+00	1.000000e+00	1.750000e+00	2.300000e-01	1.300000e-01
-5.000000e+00	1.000000e+00	1.000000e+00	2.030000e+00	2.300000e-01	1.500000e-01
-7.000000e+00	1.000000e+00	1.000000e+00	1.880000e+00	2.100000e-01	1.600000e-01
-9.000000e+00	1.000000e+00	1.000000e+00	1.720000e+00	1.900000e-01	1.400000e-01
-1.100000e+01	1.000000e+00	1.000000e+00	1.400000e+00	1.600000e-01	1.200000e-01
-1.300000e+01	1.000000e+00	1.000000e+00	1.280000e+00	1.300000e-01	1.100000e-01
-1.500000e+01	1.000000e+00	1.000000e+00	1.122000e+00	1.170000e-01	9.700000e-02
-1.700000e+01	1.000000e+00	1.000000e+00	9.990000e-01	9.300000e-02	9.000000e-02
-1.900000e+01	1.000000e+00	1.000000e+00	8.100000e-01	7.900000e-02	7.500000e-02
-2.250000e+01	2.500000e+00	2.500000e+00	6.740000e-01	7.500000e-02	5.800000e-02
-2.750000e+01	2.500000e+00	2.500000e+00	4.920000e-01	4.700000e-02	4.300000e-02
-3.250000e+01	2.500000e+00	2.500000e+00	4.050000e-01	4.400000e-02	3.500000e-02
-3.750000e+01	2.500000e+00	2.500000e+00	3.250000e-01	3.500000e-02	3.000000e-02
-4.250000e+01	2.500000e+00	2.500000e+00	2.720000e-01	2.800000e-02	2.600000e-02
-4.750000e+01	2.500000e+00	2.500000e+00	2.820000e-01	2.800000e-02	2.400000e-02
-5.250000e+01	2.500000e+00	2.500000e+00	2.350000e-01	2.600000e-02	2.500000e-02
-5.750000e+01	2.500000e+00	2.500000e+00	1.940000e-01	2.400000e-02	2.100000e-02
-6.250000e+01	2.500000e+00	2.500000e+00	1.500000e-01	1.700000e-02	1.600000e-02
-6.750000e+01	2.500000e+00	2.500000e+00	1.020000e-01	1.300000e-02	1.400000e-02
-7.250000e+01	2.500000e+00	2.500000e+00	8.360000e-02	9.600000e-03	1.110000e-02
-7.750000e+01	2.500000e+00	2.500000e+00	7.480000e-02	9.300000e-03	9.400000e-03
-8.500000e+01	5.000000e+00	5.000000e+00	5.210000e-02	5.900000e-03	6.300000e-03
-9.500000e+01	5.000000e+00	5.000000e+00	3.810000e-02	4.000000e-03	4.700000e-03
-1.050000e+02	5.000000e+00	5.000000e+00	2.390000e-02	2.600000e-03	3.100000e-03
-1.150000e+02	5.000000e+00	5.000000e+00	1.750000e-02	1.900000e-03	2.700000e-03
-1.250000e+02	5.000000e+00	5.000000e+00	1.060000e-02	1.400000e-03	1.700000e-03
-1.350000e+02	5.000000e+00	5.000000e+00	9.000000e-03	1.200000e-03	1.500000e-03
-1.450000e+02	5.000000e+00	5.000000e+00	6.460000e-03	9.000000e-04	1.100000e-03
-1.625000e+02	1.250000e+01	1.250000e+01	3.330000e-03	4.900000e-04	5.600000e-04
-1.875000e+02	1.250000e+01	1.250000e+01	1.950000e-03	2.800000e-04	3.400000e-04
-2.250000e+02	2.500000e+01	2.500000e+01	7.700000e-04	1.300000e-04	1.600000e-04
-3.750000e+02	1.250000e+02	1.250000e+02	1.180000e-04	2.100000e-05	2.500000e-05
+1.000000e+00	1.000000e+00	1.000000e+00	7.270000e-01	9.459387e-02	6.109828e-02
+3.000000e+00	1.000000e+00	1.000000e+00	1.750000e+00	2.334524e-01	1.360147e-01
+5.000000e+00	1.000000e+00	1.000000e+00	2.030000e+00	2.334524e-01	1.552417e-01
+7.000000e+00	1.000000e+00	1.000000e+00	1.880000e+00	2.137756e-01	1.552417e-01
+9.000000e+00	1.000000e+00	1.000000e+00	1.720000e+00	1.923538e-01	1.334166e-01
+1.100000e+01	1.000000e+00	1.000000e+00	1.400000e+00	1.627882e-01	1.236932e-01
+1.300000e+01	1.000000e+00	1.000000e+00	1.280000e+00	1.334166e-01	1.044031e-01
+1.500000e+01	1.000000e+00	1.000000e+00	1.122000e+00	1.169273e-01	9.656604e-02
+1.700000e+01	1.000000e+00	1.000000e+00	9.990000e-01	9.314505e-02	8.928606e-02
+1.900000e+01	1.000000e+00	1.000000e+00	8.100000e-01	7.884795e-02	7.500000e-02
+2.250000e+01	2.500000e+00	2.500000e+00	6.740000e-01	7.496666e-02	5.727128e-02
+2.750000e+01	2.500000e+00	2.500000e+00	4.920000e-01	4.632494e-02	4.244997e-02
+3.250000e+01	2.500000e+00	2.500000e+00	4.050000e-01	4.393177e-02	3.517101e-02
+3.750000e+01	2.500000e+00	2.500000e+00	3.250000e-01	3.517101e-02	2.941088e-02
+4.250000e+01	2.500000e+00	2.500000e+00	2.720000e-01	2.816026e-02	2.529822e-02
+4.750000e+01	2.500000e+00	2.500000e+00	2.820000e-01	2.816026e-02	2.435159e-02
+5.250000e+01	2.500000e+00	2.500000e+00	2.350000e-01	2.596151e-02	2.404163e-02
+5.750000e+01	2.500000e+00	2.500000e+00	1.940000e-01	2.473863e-02	1.992486e-02
+6.250000e+01	2.500000e+00	2.500000e+00	1.500000e-01	1.708801e-02	1.615549e-02
+6.750000e+01	2.500000e+00	2.500000e+00	1.020000e-01	1.300000e-02	1.392839e-02
+7.250000e+01	2.500000e+00	2.500000e+00	8.360000e-02	9.617692e-03	1.108603e-02
+7.750000e+01	2.500000e+00	2.500000e+00	7.480000e-02	9.323090e-03	9.415413e-03
+8.500000e+01	5.000000e+00	5.000000e+00	5.210000e-02	5.980803e-03	6.262587e-03
+9.500000e+01	5.000000e+00	5.000000e+00	3.810000e-02	3.981206e-03	4.623851e-03
+1.050000e+02	5.000000e+00	5.000000e+00	2.390000e-02	2.641969e-03	3.087070e-03
+1.150000e+02	5.000000e+00	5.000000e+00	1.750000e-02	1.941649e-03	2.640076e-03
+1.250000e+02	5.000000e+00	5.000000e+00	1.060000e-02	1.421267e-03	1.749286e-03
+1.350000e+02	5.000000e+00	5.000000e+00	9.000000e-03	1.131371e-03	1.442221e-03
+1.450000e+02	5.000000e+00	5.000000e+00	6.460000e-03	8.980535e-04	1.096221e-03
+1.625000e+02	1.250000e+01	1.250000e+01	3.330000e-03	4.981967e-04	5.630275e-04
+1.875000e+02	1.250000e+01	1.250000e+01	1.950000e-03	2.860070e-04	3.397058e-04
+2.250000e+02	2.500000e+01	2.500000e+01	7.700000e-04	1.280625e-04	1.562050e-04
+3.750000e+02	1.250000e+02	1.250000e+02	1.180000e-04	2.080865e-05	2.475884e-05
 END YODA_SCATTER2D_V2
-
 BEGIN YODA_SCATTER2D_V2 /REF/ATLAS_2012_I1199269/d03-x01-y01
 IsRef: 1
 Path: /REF/ATLAS_2012_I1199269/d03-x01-y01
-Title: ~
+Title: doi:10.17182/hepdata.62320.v1/t3
 Type: Scatter2D
 ---
 # xval	 xerr-	 xerr+	 yval	 yerr-	 yerr+
-2.500000e-01	2.500000e-01	2.500000e-01	2.680000e+00	5.200000e-01	2.400000e-01
-7.500000e-01	2.500000e-01	2.500000e-01	3.100000e+00	3.700000e-01	2.600000e-01
-1.250000e+00	2.500000e-01	2.500000e-01	3.460000e+00	3.700000e-01	3.100000e-01
-1.625000e+00	1.250000e-01	1.250000e-01	4.510000e+00	4.400000e-01	3.900000e-01
-1.875000e+00	1.250000e-01	1.250000e-01	6.260000e+00	6.100000e-01	5.500000e-01
-2.125000e+00	1.250000e-01	1.250000e-01	8.930000e+00	1.040000e+00	7.600000e-01
-2.300000e+00	5.000000e-02	5.000000e-02	1.160000e+01	1.200000e+00	1.000000e+00
-2.400000e+00	5.000000e-02	5.000000e-02	1.390000e+01	1.400000e+00	1.100000e+00
-2.500000e+00	5.000000e-02	5.000000e-02	1.740000e+01	1.700000e+00	1.400000e+00
-2.600000e+00	5.000000e-02	5.000000e-02	2.180000e+01	2.300000e+00	2.000000e+00
-2.675000e+00	2.500000e-02	2.500000e-02	2.670000e+01	2.500000e+00	2.300000e+00
-2.725000e+00	2.500000e-02	2.500000e-02	2.960000e+01	3.500000e+00	3.300000e+00
-2.775000e+00	2.500000e-02	2.500000e-02	3.580000e+01	3.300000e+00	3.000000e+00
-2.825000e+00	2.500000e-02	2.500000e-02	4.290000e+01	3.900000e+00	3.400000e+00
-2.875000e+00	2.500000e-02	2.500000e-02	4.840000e+01	4.600000e+00	3.900000e+00
-2.925000e+00	2.500000e-02	2.500000e-02	5.740000e+01	4.700000e+00	4.400000e+00
-2.975000e+00	2.500000e-02	2.500000e-02	7.170000e+01	6.100000e+00	5.600000e+00
-3.025000e+00	2.500000e-02	2.500000e-02	8.080000e+01	7.600000e+00	6.300000e+00
-3.075000e+00	2.500000e-02	2.500000e-02	1.005000e+02	8.600000e+00	7.400000e+00
-3.120000e+00	2.000000e-02	2.000000e-02	1.076000e+02	9.800000e+00	8.100000e+00
+2.500000e-01	2.500000e-01	2.500000e-01	2.680000e+00	5.261179e-01	2.340940e-01
+7.500000e-01	2.500000e-01	2.500000e-01	3.100000e+00	3.710795e-01	2.657066e-01
+1.250000e+00	2.500000e-01	2.500000e-01	3.460000e+00	3.710795e-01	3.036445e-01
+1.625000e+00	1.250000e-01	1.250000e-01	4.510000e+00	4.459821e-01	3.900000e-01
+1.875000e+00	1.250000e-01	1.250000e-01	6.260000e+00	6.140033e-01	5.565968e-01
+2.125000e+00	1.250000e-01	1.250000e-01	8.930000e+00	1.039423e+00	7.569016e-01
+2.300000e+00	5.000000e-02	5.000000e-02	1.160000e+01	1.170470e+00	9.848858e-01
+2.400000e+00	5.000000e-02	5.000000e-02	1.390000e+01	1.360147e+00	1.170470e+00
+2.500000e+00	5.000000e-02	5.000000e-02	1.740000e+01	1.649242e+00	1.360147e+00
+2.600000e+00	5.000000e-02	5.000000e-02	2.180000e+01	2.256103e+00	2.061553e+00
+2.675000e+00	2.500000e-02	2.500000e-02	2.670000e+01	2.529822e+00	2.247221e+00
+2.725000e+00	2.500000e-02	2.500000e-02	2.960000e+01	3.492850e+00	3.298485e+00
+2.775000e+00	2.500000e-02	2.500000e-02	3.580000e+01	3.228002e+00	2.941088e+00
+2.825000e+00	2.500000e-02	2.500000e-02	4.290000e+01	3.929377e+00	3.448188e+00
+2.875000e+00	2.500000e-02	2.500000e-02	4.840000e+01	4.535416e+00	3.956008e+00
+2.925000e+00	2.500000e-02	2.500000e-02	5.740000e+01	4.753946e+00	4.464303e+00
+2.975000e+00	2.500000e-02	2.500000e-02	7.170000e+01	6.041523e+00	5.554278e+00
+3.025000e+00	2.500000e-02	2.500000e-02	8.080000e+01	7.531268e+00	6.258594e+00
+3.075000e+00	2.500000e-02	2.500000e-02	1.005000e+02	8.649277e+00	7.473286e+00
+3.120000e+00	2.000000e-02	2.000000e-02	1.076000e+02	9.767292e+00	8.102469e+00
 END YODA_SCATTER2D_V2
-
 BEGIN YODA_SCATTER2D_V2 /REF/ATLAS_2012_I1199269/d04-x01-y01
 IsRef: 1
 Path: /REF/ATLAS_2012_I1199269/d04-x01-y01
-Title: ~
+Title: doi:10.17182/hepdata.62320.v1/t4
 Type: Scatter2D
 ---
 # xval	 xerr-	 xerr+	 yval	 yerr-	 yerr+
--9.600000e-01	4.000000e-02	4.000000e-02	1.100000e+01	1.700000e+00	1.300000e+00
--8.800000e-01	4.000000e-02	4.000000e-02	1.450000e+01	1.600000e+00	1.200000e+00
--8.000000e-01	4.000000e-02	4.000000e-02	1.650000e+01	1.600000e+00	1.400000e+00
--7.200000e-01	4.000000e-02	4.000000e-02	1.880000e+01	1.700000e+00	1.500000e+00
--6.400000e-01	4.000000e-02	4.000000e-02	2.180000e+01	1.900000e+00	1.600000e+00
--5.600000e-01	4.000000e-02	4.000000e-02	2.270000e+01	2.100000e+00	1.900000e+00
--4.800000e-01	4.000000e-02	4.000000e-02	2.390000e+01	2.100000e+00	1.900000e+00
--4.000000e-01	4.000000e-02	4.000000e-02	2.460000e+01	2.100000e+00	1.900000e+00
--3.200000e-01	4.000000e-02	4.000000e-02	2.520000e+01	2.300000e+00	1.900000e+00
--2.400000e-01	4.000000e-02	4.000000e-02	2.830000e+01	2.700000e+00	2.200000e+00
--1.600000e-01	4.000000e-02	4.000000e-02	2.810000e+01	2.600000e+00	2.100000e+00
--8.000000e-02	4.000000e-02	4.000000e-02	2.960000e+01	2.800000e+00	2.400000e+00
-0.000000e+00	4.000000e-02	4.000000e-02	3.140000e+01	3.000000e+00	2.600000e+00
-8.000000e-02	4.000000e-02	4.000000e-02	2.900000e+01	2.600000e+00	2.500000e+00
-1.600000e-01	4.000000e-02	4.000000e-02	2.780000e+01	3.100000e+00	2.200000e+00
-2.400000e-01	4.000000e-02	4.000000e-02	2.620000e+01	2.300000e+00	2.000000e+00
-3.200000e-01	4.000000e-02	4.000000e-02	2.570000e+01	2.200000e+00	2.100000e+00
-4.000000e-01	4.000000e-02	4.000000e-02	2.500000e+01	2.000000e+00	2.000000e+00
-4.800000e-01	4.000000e-02	4.000000e-02	2.490000e+01	2.100000e+00	1.800000e+00
-5.600000e-01	4.000000e-02	4.000000e-02	2.270000e+01	2.200000e+00	2.000000e+00
-6.400000e-01	4.000000e-02	4.000000e-02	2.130000e+01	1.900000e+00	1.700000e+00
-7.200000e-01	4.000000e-02	4.000000e-02	1.950000e+01	1.900000e+00	1.500000e+00
-8.000000e-01	4.000000e-02	4.000000e-02	1.690000e+01	1.700000e+00	1.500000e+00
-8.800000e-01	4.000000e-02	4.000000e-02	1.390000e+01	1.800000e+00	1.200000e+00
-9.600000e-01	4.000000e-02	4.000000e-02	1.170000e+01	1.400000e+00	1.100000e+00
+-9.600000e-01	4.000000e-02	4.000000e-02	1.100000e+01	1.649242e+00	1.264911e+00
+-8.800000e-01	4.000000e-02	4.000000e-02	1.450000e+01	1.649242e+00	1.170470e+00
+-8.000000e-01	4.000000e-02	4.000000e-02	1.650000e+01	1.676305e+00	1.392839e+00
+-7.200000e-01	4.000000e-02	4.000000e-02	1.880000e+01	1.676305e+00	1.486607e+00
+-6.400000e-01	4.000000e-02	4.000000e-02	2.180000e+01	1.992486e+00	1.615549e+00
+-5.600000e-01	4.000000e-02	4.000000e-02	2.270000e+01	2.088061e+00	1.897367e+00
+-4.800000e-01	4.000000e-02	4.000000e-02	2.390000e+01	2.184033e+00	1.897367e+00
+-4.000000e-01	4.000000e-02	4.000000e-02	2.460000e+01	2.088061e+00	1.897367e+00
+-3.200000e-01	4.000000e-02	4.000000e-02	2.520000e+01	2.280351e+00	1.897367e+00
+-2.400000e-01	4.000000e-02	4.000000e-02	2.830000e+01	2.668333e+00	2.184033e+00
+-1.600000e-01	4.000000e-02	4.000000e-02	2.810000e+01	2.692582e+00	2.118962e+00
+-8.000000e-02	4.000000e-02	4.000000e-02	2.960000e+01	2.789265e+00	2.404163e+00
+0.000000e+00	4.000000e-02	4.000000e-02	3.140000e+01	2.983287e+00	2.596151e+00
+8.000000e-02	4.000000e-02	4.000000e-02	2.900000e+01	2.596151e+00	2.500000e+00
+1.600000e-01	4.000000e-02	4.000000e-02	2.780000e+01	3.080584e+00	2.213594e+00
+2.400000e-01	4.000000e-02	4.000000e-02	2.620000e+01	2.376973e+00	1.897367e+00
+3.200000e-01	4.000000e-02	4.000000e-02	2.570000e+01	2.184033e+00	2.088061e+00
+4.000000e-01	4.000000e-02	4.000000e-02	2.500000e+01	1.992486e+00	1.992486e+00
+4.800000e-01	4.000000e-02	4.000000e-02	2.490000e+01	2.088061e+00	1.802776e+00
+5.600000e-01	4.000000e-02	4.000000e-02	2.270000e+01	2.280351e+00	1.992486e+00
+6.400000e-01	4.000000e-02	4.000000e-02	2.130000e+01	1.897367e+00	1.708801e+00
+7.200000e-01	4.000000e-02	4.000000e-02	1.950000e+01	1.868154e+00	1.486607e+00
+8.000000e-01	4.000000e-02	4.000000e-02	1.690000e+01	1.676305e+00	1.486607e+00
+8.800000e-01	4.000000e-02	4.000000e-02	1.390000e+01	1.746425e+00	1.170470e+00
+9.600000e-01	4.000000e-02	4.000000e-02	1.170000e+01	1.456022e+00	1.077033e+00
 END YODA_SCATTER2D_V2
diff --git a/analyses/pluginATLAS/ATLAS_2013_I1217867.yoda b/analyses/pluginATLAS/ATLAS_2013_I1217867.yoda
--- a/analyses/pluginATLAS/ATLAS_2013_I1217867.yoda
+++ b/analyses/pluginATLAS/ATLAS_2013_I1217867.yoda
@@ -1,389 +1,376 @@
 BEGIN YODA_SCATTER2D_V2 /REF/ATLAS_2013_I1217867/d01-x01-y01
 IsRef: 1
 Path: /REF/ATLAS_2013_I1217867/d01-x01-y01
-Title: ~
+Title: doi:10.17182/hepdata.60309.v1/t1
 Type: Scatter2D
 ---
 # xval	 xerr-	 xerr+	 yval	 yerr-	 yerr+
-1.062500e+00	6.250000e-02	6.250000e-02	1.245240e-02	8.502279e-03	7.534729e-03
-1.207500e+00	8.250000e-02	8.250000e-02	1.829030e-02	9.114659e-03	7.600499e-03
-1.420000e+00	1.300000e-01	1.300000e-01	2.366540e-02	1.037010e-02	6.880469e-03
-1.725000e+00	1.750000e-01	1.750000e-01	2.686640e-02	1.089360e-02	6.320089e-03
-2.175000e+00	2.750000e-01	2.750000e-01	2.657420e-02	9.055819e-03	5.089429e-03
-2.775000e+00	3.250000e-01	3.250000e-01	2.934420e-02	9.073849e-03	5.271819e-03
-3.550000e+00	4.500000e-01	4.500000e-01	3.657330e-02	1.015590e-02	7.108549e-03
-4.500000e+00	5.000000e-01	5.000000e-01	4.812879e-02	1.115800e-02	9.670149e-03
-5.650000e+00	6.500000e-01	6.500000e-01	5.636059e-02	1.012280e-02	9.610959e-03
-7.150000e+00	8.500000e-01	8.500000e-01	6.105149e-02	7.085779e-03	7.251639e-03
-9.000000e+00	1.000000e+00	1.000000e+00	5.780939e-02	2.095130e-03	2.610120e-03
-1.125000e+01	1.250000e+00	1.250000e+00	4.771519e-02	2.226900e-03	3.004770e-03
-1.425000e+01	1.750000e+00	1.750000e+00	3.379770e-02	4.065539e-03	4.620269e-03
-1.800000e+01	2.000000e+00	2.000000e+00	2.177190e-02	3.354500e-03	3.449320e-03
-2.250000e+01	2.500000e+00	2.500000e+00	1.409200e-02	2.266280e-03	2.264990e-03
-2.825000e+01	3.250000e+00	3.250000e+00	8.942029e-03	8.828809e-04	1.017260e-03
-3.575000e+01	4.250000e+00	4.250000e+00	5.351159e-03	3.252110e-04	5.101039e-04
-4.500000e+01	5.000000e+00	5.000000e+00	2.776920e-03	2.579820e-04	3.029420e-04
-5.650000e+01	6.500000e+00	6.500000e+00	1.448290e-03	1.471350e-04	1.731590e-04
-7.150000e+01	8.500000e+00	8.500000e+00	6.920449e-04	9.315159e-05	1.040230e-04
-9.000000e+01	1.000000e+01	1.000000e+01	3.566340e-04	4.265289e-05	5.420499e-05
-1.125000e+02	1.250000e+01	1.250000e+01	1.682450e-04	1.785110e-05	1.785110e-05
-1.425000e+02	1.750000e+01	1.750000e+01	6.064919e-05	7.449719e-06	7.449719e-06
-1.850000e+02	2.500000e+01	2.500000e+01	2.845440e-05	4.874079e-06	4.874079e-06
-2.475000e+02	3.750000e+01	3.750000e+01	5.050229e-06	1.206510e-06	1.206510e-06
-3.675000e+02	8.250000e+01	8.250000e+01	6.039099e-07	3.665330e-07	3.665330e-07
+1.062500e+00	6.250000e-02	6.250000e-02	1.245000e-02	8.500000e-03	7.530000e-03
+1.207500e+00	8.250000e-02	8.250000e-02	1.829000e-02	9.110000e-03	7.600000e-03
+1.420000e+00	1.300000e-01	1.300000e-01	2.367000e-02	1.037000e-02	6.880000e-03
+1.725000e+00	1.750000e-01	1.750000e-01	2.687000e-02	1.089000e-02	6.320000e-03
+2.175000e+00	2.750000e-01	2.750000e-01	2.657000e-02	9.060000e-03	5.090000e-03
+2.775000e+00	3.250000e-01	3.250000e-01	2.934000e-02	9.070000e-03	5.270000e-03
+3.550000e+00	4.500000e-01	4.500000e-01	3.657000e-02	1.016000e-02	7.110000e-03
+4.500000e+00	5.000000e-01	5.000000e-01	4.813000e-02	1.116000e-02	9.670000e-03
+5.650000e+00	6.500000e-01	6.500000e-01	5.636000e-02	1.012000e-02	9.610000e-03
+7.150000e+00	8.500000e-01	8.500000e-01	6.105000e-02	7.090000e-03	7.250000e-03
+9.000000e+00	1.000000e+00	1.000000e+00	5.781000e-02	2.100000e-03	2.610000e-03
+1.125000e+01	1.250000e+00	1.250000e+00	4.772000e-02	2.230000e-03	3.000000e-03
+1.425000e+01	1.750000e+00	1.750000e+00	3.380000e-02	4.070000e-03	4.620000e-03
+1.800000e+01	2.000000e+00	2.000000e+00	2.177000e-02	3.350000e-03	3.450000e-03
+2.250000e+01	2.500000e+00	2.500000e+00	1.409000e-02	2.270000e-03	2.260000e-03
+2.825000e+01	3.250000e+00	3.250000e+00	8.942000e-03	8.830000e-04	1.017000e-03
+3.575000e+01	4.250000e+00	4.250000e+00	5.351000e-03	3.250000e-04	5.100000e-04
+4.500000e+01	5.000000e+00	5.000000e+00	2.777000e-03	2.580000e-04	3.030000e-04
+5.650000e+01	6.500000e+00	6.500000e+00	1.448000e-03	1.470000e-04	1.730000e-04
+7.150000e+01	8.500000e+00	8.500000e+00	6.920000e-04	9.320000e-05	1.040000e-04
+9.000000e+01	1.000000e+01	1.000000e+01	3.566000e-04	4.270000e-05	5.420000e-05
+1.125000e+02	1.250000e+01	1.250000e+01	1.682000e-04	1.790000e-05	1.790000e-05
+1.425000e+02	1.750000e+01	1.750000e+01	6.065000e-05	7.450000e-06	7.450000e-06
+1.850000e+02	2.500000e+01	2.500000e+01	2.845000e-05	4.870000e-06	4.870000e-06
+2.475000e+02	3.750000e+01	3.750000e+01	5.050000e-06	1.207000e-06	1.207000e-06
+3.675000e+02	8.250000e+01	8.250000e+01	6.039000e-07	3.665000e-07	3.665000e-07
 END YODA_SCATTER2D_V2
-
 BEGIN YODA_SCATTER2D_V2 /REF/ATLAS_2013_I1217867/d01-x01-y02
 IsRef: 1
 Path: /REF/ATLAS_2013_I1217867/d01-x01-y02
-Title: ~
+Title: doi:10.17182/hepdata.60309.v1/t1
 Type: Scatter2D
 ---
 # xval	 xerr-	 xerr+	 yval	 yerr-	 yerr+
-1.062500e+00	6.250000e-02	6.250000e-02	1.304210e-02	6.443192e-03	5.656761e-03
-1.207500e+00	8.250000e-02	8.250000e-02	1.921676e-02	9.462968e-03	7.227965e-03
-1.420000e+00	1.300000e-01	1.300000e-01	2.510602e-02	9.681302e-03	8.876008e-03
-1.725000e+00	1.750000e-01	1.750000e-01	2.947071e-02	1.135575e-02	9.517356e-03
-2.175000e+00	2.750000e-01	2.750000e-01	2.965971e-02	1.058323e-02	8.661807e-03
-2.775000e+00	3.250000e-01	3.250000e-01	3.069448e-02	8.825043e-03	6.930989e-03
-3.550000e+00	4.500000e-01	4.500000e-01	3.682154e-02	8.923422e-03	7.831658e-03
-4.500000e+00	5.000000e-01	5.000000e-01	4.534626e-02	9.782740e-03	8.889318e-03
-5.650000e+00	6.500000e-01	6.500000e-01	5.665392e-02	1.030930e-02	9.799947e-03
-7.150000e+00	8.500000e-01	8.500000e-01	6.183488e-02	7.185941e-03	7.632697e-03
-9.000000e+00	1.000000e+00	1.000000e+00	5.960474e-02	2.029741e-03	2.975858e-03
-1.125000e+01	1.250000e+00	1.250000e+00	4.864249e-02	2.140994e-03	3.122143e-03
-1.425000e+01	1.750000e+00	1.750000e+00	3.385524e-02	4.535026e-03	4.726595e-03
-1.800000e+01	2.000000e+00	2.000000e+00	2.133692e-02	3.950488e-03	3.798414e-03
-2.250000e+01	2.500000e+00	2.500000e+00	1.318838e-02	2.314154e-03	2.189446e-03
-2.825000e+01	3.250000e+00	3.250000e+00	8.164468e-03	1.054865e-03	1.086108e-03
-3.575000e+01	4.250000e+00	4.250000e+00	5.122969e-03	4.389834e-04	4.788102e-04
-4.500000e+01	5.000000e+00	5.000000e+00	2.753354e-03	3.569336e-04	3.369446e-04
-5.650000e+01	6.500000e+00	6.500000e+00	1.464318e-03	1.742037e-04	1.692034e-04
-7.150000e+01	8.500000e+00	8.500000e+00	8.050648e-04	8.750426e-05	9.560618e-05
-9.000000e+01	1.000000e+01	1.000000e+01	4.002018e-04	5.603830e-05	5.206381e-05
-1.125000e+02	1.250000e+01	1.250000e+01	1.696280e-04	1.186594e-05	1.282100e-05
-1.425000e+02	1.750000e+01	1.750000e+01	7.144572e-05	6.010838e-06	6.349256e-06
-1.850000e+02	2.500000e+01	2.500000e+01	3.193009e-05	4.218877e-06	4.316765e-06
-2.475000e+02	3.750000e+01	3.750000e+01	8.382875e-06	1.522769e-06	1.541559e-06
-3.675000e+02	8.250000e+01	8.250000e+01	2.412733e-06	8.475573e-07	8.503668e-07
+1.062500e+00	6.250000e-02	6.250000e-02	1.304000e-02	6.440000e-03	5.660000e-03
+1.207500e+00	8.250000e-02	8.250000e-02	1.922000e-02	9.460000e-03	7.230000e-03
+1.420000e+00	1.300000e-01	1.300000e-01	2.511000e-02	9.680000e-03	8.880000e-03
+1.725000e+00	1.750000e-01	1.750000e-01	2.947000e-02	1.136000e-02	9.520000e-03
+2.175000e+00	2.750000e-01	2.750000e-01	2.966000e-02	1.058000e-02	8.660000e-03
+2.775000e+00	3.250000e-01	3.250000e-01	3.069000e-02	8.830000e-03	6.930000e-03
+3.550000e+00	4.500000e-01	4.500000e-01	3.682000e-02	8.920000e-03	7.830000e-03
+4.500000e+00	5.000000e-01	5.000000e-01	4.535000e-02	9.780000e-03	8.890000e-03
+5.650000e+00	6.500000e-01	6.500000e-01	5.665000e-02	1.031000e-02	9.800000e-03
+7.150000e+00	8.500000e-01	8.500000e-01	6.183000e-02	7.190000e-03	7.630000e-03
+9.000000e+00	1.000000e+00	1.000000e+00	5.960000e-02	2.030000e-03	2.980000e-03
+1.125000e+01	1.250000e+00	1.250000e+00	4.864000e-02	2.140000e-03	3.120000e-03
+1.425000e+01	1.750000e+00	1.750000e+00	3.386000e-02	4.540000e-03	4.730000e-03
+1.800000e+01	2.000000e+00	2.000000e+00	2.134000e-02	3.950000e-03	3.800000e-03
+2.250000e+01	2.500000e+00	2.500000e+00	1.319000e-02	2.310000e-03	2.190000e-03
+2.825000e+01	3.250000e+00	3.250000e+00	8.164000e-03	1.055000e-03	1.086000e-03
+3.575000e+01	4.250000e+00	4.250000e+00	5.123000e-03	4.390000e-04	4.790000e-04
+4.500000e+01	5.000000e+00	5.000000e+00	2.753000e-03	3.570000e-04	3.370000e-04
+5.650000e+01	6.500000e+00	6.500000e+00	1.464000e-03	1.740000e-04	1.690000e-04
+7.150000e+01	8.500000e+00	8.500000e+00	8.051000e-04	8.750000e-05	9.560000e-05
+9.000000e+01	1.000000e+01	1.000000e+01	4.002000e-04	5.600000e-05	5.210000e-05
+1.125000e+02	1.250000e+01	1.250000e+01	1.696000e-04	1.190000e-05	1.280000e-05
+1.425000e+02	1.750000e+01	1.750000e+01	7.145000e-05	6.010000e-06	6.350000e-06
+1.850000e+02	2.500000e+01	2.500000e+01	3.193000e-05	4.220000e-06	4.320000e-06
+2.475000e+02	3.750000e+01	3.750000e+01	8.383000e-06	1.523000e-06	1.542000e-06
+3.675000e+02	8.250000e+01	8.250000e+01	2.413000e-06	8.480000e-07	8.500000e-07
 END YODA_SCATTER2D_V2
-
 BEGIN YODA_SCATTER2D_V2 /REF/ATLAS_2013_I1217867/d02-x01-y01
 IsRef: 1
 Path: /REF/ATLAS_2013_I1217867/d02-x01-y01
-Title: ~
+Title: doi:10.17182/hepdata.60309.v1/t2
 Type: Scatter2D
 ---
 # xval	 xerr-	 xerr+	 yval	 yerr-	 yerr+
-1.062500e+00	6.250000e-02	6.250000e-02	3.215839e-02	1.801950e-02	1.083770e-02
-1.207500e+00	8.250000e-02	8.250000e-02	4.159439e-02	1.950000e-02	1.120020e-02
-1.420000e+00	1.300000e-01	1.300000e-01	4.905109e-02	1.938500e-02	1.275210e-02
-1.725000e+00	1.750000e-01	1.750000e-01	5.200919e-02	1.760520e-02	1.158500e-02
-2.175000e+00	2.750000e-01	2.750000e-01	5.454169e-02	1.527170e-02	8.724719e-03
-2.775000e+00	3.250000e-01	3.250000e-01	6.406019e-02	1.657920e-02	9.974798e-03
-3.550000e+00	4.500000e-01	4.500000e-01	7.811479e-02	1.667720e-02	1.309870e-02
-4.500000e+00	5.000000e-01	5.000000e-01	8.965498e-02	1.468240e-02	1.423520e-02
-5.650000e+00	6.500000e-01	6.500000e-01	9.262598e-02	9.533238e-03	1.044640e-02
-7.150000e+00	8.500000e-01	8.500000e-01	8.712149e-02	3.997279e-03	3.997159e-03
-9.000000e+00	1.000000e+00	1.000000e+00	6.859629e-02	3.939599e-03	6.493479e-03
-1.125000e+01	1.250000e+00	1.250000e+00	4.467879e-02	6.626929e-03	8.061869e-03
-1.425000e+01	1.750000e+00	1.750000e+00	2.403910e-02	4.991399e-03	5.711339e-03
-1.800000e+01	2.000000e+00	2.000000e+00	1.194310e-02	2.975529e-03	2.972899e-03
-2.250000e+01	2.500000e+00	2.500000e+00	6.201639e-03	1.514700e-03	1.595280e-03
-2.825000e+01	3.250000e+00	3.250000e+00	3.107449e-03	4.938859e-04	7.560649e-04
-3.575000e+01	4.250000e+00	4.250000e+00	1.292120e-03	2.621300e-04	2.594780e-04
-4.500000e+01	5.000000e+00	5.000000e+00	6.672749e-04	8.277219e-05	9.277018e-05
-5.650000e+01	6.500000e+00	6.500000e+00	3.039599e-04	4.604729e-05	4.650189e-05
-7.150000e+01	8.500000e+00	8.500000e+00	1.301700e-04	2.856140e-05	3.281489e-05
-9.000000e+01	1.000000e+01	1.000000e+01	5.626289e-05	9.856978e-06	9.856978e-06
-1.125000e+02	1.250000e+01	1.250000e+01	2.774080e-05	7.260239e-06	7.260239e-06
-1.425000e+02	1.750000e+01	1.750000e+01	3.077779e-06	2.710700e-06	2.710700e-06
-1.925000e+02	3.250000e+01	3.250000e+01	2.699160e-06	1.100730e-06	1.100730e-06
-2.875000e+02	6.250000e+01	6.250000e+01	9.399338e-07	3.978989e-07	3.978989e-07
+1.062500e+00	6.250000e-02	6.250000e-02	3.216000e-02	1.802000e-02	1.084000e-02
+1.207500e+00	8.250000e-02	8.250000e-02	4.159000e-02	1.950000e-02	1.120000e-02
+1.420000e+00	1.300000e-01	1.300000e-01	4.905000e-02	1.938000e-02	1.275000e-02
+1.725000e+00	1.750000e-01	1.750000e-01	5.201000e-02	1.761000e-02	1.158000e-02
+2.175000e+00	2.750000e-01	2.750000e-01	5.454000e-02	1.527000e-02	8.720000e-03
+2.775000e+00	3.250000e-01	3.250000e-01	6.406000e-02	1.658000e-02	9.970000e-03
+3.550000e+00	4.500000e-01	4.500000e-01	7.811000e-02	1.668000e-02	1.310000e-02
+4.500000e+00	5.000000e-01	5.000000e-01	8.965000e-02	1.468000e-02	1.424000e-02
+5.650000e+00	6.500000e-01	6.500000e-01	9.263000e-02	9.530000e-03	1.045000e-02
+7.150000e+00	8.500000e-01	8.500000e-01	8.712000e-02	4.000000e-03	4.000000e-03
+9.000000e+00	1.000000e+00	1.000000e+00	6.860000e-02	3.940000e-03	6.490000e-03
+1.125000e+01	1.250000e+00	1.250000e+00	4.468000e-02	6.630000e-03	8.060000e-03
+1.425000e+01	1.750000e+00	1.750000e+00	2.404000e-02	4.990000e-03	5.710000e-03
+1.800000e+01	2.000000e+00	2.000000e+00	1.194000e-02	2.980000e-03	2.970000e-03
+2.250000e+01	2.500000e+00	2.500000e+00	6.202000e-03	1.515000e-03	1.595000e-03
+2.825000e+01	3.250000e+00	3.250000e+00	3.107000e-03	4.940000e-04	7.560000e-04
+3.575000e+01	4.250000e+00	4.250000e+00	1.292000e-03	2.620000e-04	2.590000e-04
+4.500000e+01	5.000000e+00	5.000000e+00	6.673000e-04	8.280000e-05	9.280000e-05
+5.650000e+01	6.500000e+00	6.500000e+00	3.040000e-04	4.600000e-05	4.650000e-05
+7.150000e+01	8.500000e+00	8.500000e+00	1.302000e-04	2.860000e-05	3.280000e-05
+9.000000e+01	1.000000e+01	1.000000e+01	5.626000e-05	9.860000e-06	9.860000e-06
+1.125000e+02	1.250000e+01	1.250000e+01	2.774000e-05	7.260000e-06	7.260000e-06
+1.425000e+02	1.750000e+01	1.750000e+01	3.078000e-06	2.711000e-06	2.711000e-06
+1.925000e+02	3.250000e+01	3.250000e+01	2.699000e-06	1.101000e-06	1.101000e-06
+2.875000e+02	6.250000e+01	6.250000e+01	9.399000e-07	3.979000e-07	3.979000e-07
 END YODA_SCATTER2D_V2
-
 BEGIN YODA_SCATTER2D_V2 /REF/ATLAS_2013_I1217867/d02-x01-y02
 IsRef: 1
 Path: /REF/ATLAS_2013_I1217867/d02-x01-y02
-Title: ~
+Title: doi:10.17182/hepdata.60309.v1/t2
 Type: Scatter2D
 ---
 # xval	 xerr-	 xerr+	 yval	 yerr-	 yerr+
-1.062500e+00	6.250000e-02	6.250000e-02	3.319444e-02	2.055072e-02	1.256865e-02
-1.207500e+00	8.250000e-02	8.250000e-02	4.202901e-02	2.023696e-02	1.457031e-02
-1.420000e+00	1.300000e-01	1.300000e-01	4.821145e-02	2.030630e-02	1.628639e-02
-1.725000e+00	1.750000e-01	1.750000e-01	5.179563e-02	2.148091e-02	1.647919e-02
-2.175000e+00	2.750000e-01	2.750000e-01	5.599187e-02	1.797304e-02	1.511827e-02
-2.775000e+00	3.250000e-01	3.250000e-01	6.314702e-02	1.644988e-02	1.393468e-02
-3.550000e+00	4.500000e-01	4.500000e-01	7.669611e-02	1.650313e-02	1.478243e-02
-4.500000e+00	5.000000e-01	5.000000e-01	9.093470e-02	1.496001e-02	1.458403e-02
-5.650000e+00	6.500000e-01	6.500000e-01	9.393625e-02	9.870577e-03	1.107412e-02
-7.150000e+00	8.500000e-01	8.500000e-01	8.875708e-02	4.785803e-03	4.785853e-03
-9.000000e+00	1.000000e+00	1.000000e+00	6.996758e-02	5.023643e-03	7.500671e-03
-1.125000e+01	1.250000e+00	1.250000e+00	4.300359e-02	7.761731e-03	8.435095e-03
-1.425000e+01	1.750000e+00	1.750000e+00	2.271986e-02	5.717459e-03	5.489895e-03
-1.800000e+01	2.000000e+00	2.000000e+00	1.104953e-02	2.900730e-03	2.710828e-03
-2.250000e+01	2.500000e+00	2.500000e+00	6.177014e-03	1.292693e-03	1.289538e-03
-2.825000e+01	3.250000e+00	3.250000e+00	3.219904e-03	5.848176e-04	5.771357e-04
-3.575000e+01	4.250000e+00	4.250000e+00	1.472582e-03	2.714357e-04	2.721029e-04
-4.500000e+01	5.000000e+00	5.000000e+00	7.374818e-04	1.237954e-04	1.214361e-04
-5.650000e+01	6.500000e+00	6.500000e+00	3.300152e-04	6.229802e-05	5.531721e-05
-7.150000e+01	8.500000e+00	8.500000e+00	1.594968e-04	2.980268e-05	2.704405e-05
-9.000000e+01	1.000000e+01	1.000000e+01	8.096368e-05	1.314429e-05	1.761626e-05
-1.125000e+02	1.250000e+01	1.250000e+01	3.851117e-05	1.002999e-05	1.147712e-05
-1.425000e+02	1.750000e+01	1.750000e+01	1.696629e-05	4.039187e-06	4.728189e-06
-1.925000e+02	3.250000e+01	3.250000e+01	5.233461e-06	1.622267e-06	1.790670e-06
-2.875000e+02	6.250000e+01	6.250000e+01	4.828103e-07	3.229095e-07	3.303981e-07
+1.062500e+00	6.250000e-02	6.250000e-02	3.319000e-02	2.055000e-02	1.257000e-02
+1.207500e+00	8.250000e-02	8.250000e-02	4.203000e-02	2.024000e-02	1.457000e-02
+1.420000e+00	1.300000e-01	1.300000e-01	4.821000e-02	2.031000e-02	1.629000e-02
+1.725000e+00	1.750000e-01	1.750000e-01	5.180000e-02	2.148000e-02	1.648000e-02
+2.175000e+00	2.750000e-01	2.750000e-01	5.599000e-02	1.797000e-02	1.512000e-02
+2.775000e+00	3.250000e-01	3.250000e-01	6.315000e-02	1.645000e-02	1.393000e-02
+3.550000e+00	4.500000e-01	4.500000e-01	7.670000e-02	1.650000e-02	1.478000e-02
+4.500000e+00	5.000000e-01	5.000000e-01	9.093000e-02	1.496000e-02	1.458000e-02
+5.650000e+00	6.500000e-01	6.500000e-01	9.394000e-02	9.870000e-03	1.107000e-02
+7.150000e+00	8.500000e-01	8.500000e-01	8.876000e-02	4.790000e-03	4.790000e-03
+9.000000e+00	1.000000e+00	1.000000e+00	6.997000e-02	5.020000e-03	7.500000e-03
+1.125000e+01	1.250000e+00	1.250000e+00	4.300000e-02	7.760000e-03	8.440000e-03
+1.425000e+01	1.750000e+00	1.750000e+00	2.272000e-02	5.720000e-03	5.490000e-03
+1.800000e+01	2.000000e+00	2.000000e+00	1.105000e-02	2.900000e-03	2.710000e-03
+2.250000e+01	2.500000e+00	2.500000e+00	6.177000e-03	1.293000e-03	1.290000e-03
+2.825000e+01	3.250000e+00	3.250000e+00	3.220000e-03	5.850000e-04	5.770000e-04
+3.575000e+01	4.250000e+00	4.250000e+00	1.473000e-03	2.710000e-04	2.720000e-04
+4.500000e+01	5.000000e+00	5.000000e+00	7.375000e-04	1.238000e-04	1.214000e-04
+5.650000e+01	6.500000e+00	6.500000e+00	3.300000e-04	6.230000e-05	5.530000e-05
+7.150000e+01	8.500000e+00	8.500000e+00	1.595000e-04	2.980000e-05	2.700000e-05
+9.000000e+01	1.000000e+01	1.000000e+01	8.096000e-05	1.314000e-05	1.762000e-05
+1.125000e+02	1.250000e+01	1.250000e+01	3.851000e-05	1.003000e-05	1.148000e-05
+1.425000e+02	1.750000e+01	1.750000e+01	1.697000e-05	4.040000e-06	4.730000e-06
+1.925000e+02	3.250000e+01	3.250000e+01	5.233000e-06	1.622000e-06	1.791000e-06
+2.875000e+02	6.250000e+01	6.250000e+01	4.828000e-07	3.229000e-07	3.304000e-07
 END YODA_SCATTER2D_V2
-
 BEGIN YODA_SCATTER2D_V2 /REF/ATLAS_2013_I1217867/d03-x01-y01
 IsRef: 1
 Path: /REF/ATLAS_2013_I1217867/d03-x01-y01
-Title: ~
+Title: doi:10.17182/hepdata.60309.v1/t3
 Type: Scatter2D
 ---
 # xval	 xerr-	 xerr+	 yval	 yerr-	 yerr+
-1.062500e+00	6.250000e-02	6.250000e-02	5.924431e-02	2.576250e-02	1.555340e-02
-1.207500e+00	8.250000e-02	8.250000e-02	6.926121e-02	2.757760e-02	1.796170e-02
-1.420000e+00	1.300000e-01	1.300000e-01	7.356941e-02	2.730340e-02	1.782530e-02
-1.725000e+00	1.750000e-01	1.750000e-01	7.559581e-02	2.230940e-02	1.461360e-02
-2.175000e+00	2.750000e-01	2.750000e-01	8.181781e-02	2.151360e-02	1.274580e-02
-2.775000e+00	3.250000e-01	3.250000e-01	9.684552e-02	2.351450e-02	1.641660e-02
-3.550000e+00	4.500000e-01	4.500000e-01	1.144470e-01	2.151300e-02	2.068120e-02
-4.500000e+00	5.000000e-01	5.000000e-01	1.175770e-01	1.524840e-02	1.646650e-02
-5.650000e+00	6.500000e-01	6.500000e-01	1.137450e-01	7.284911e-03	8.448731e-03
-7.150000e+00	8.500000e-01	8.500000e-01	9.241872e-02	5.188411e-03	8.389241e-03
-9.000000e+00	1.000000e+00	1.000000e+00	6.164351e-02	9.480322e-03	1.206800e-02
-1.125000e+01	1.250000e+00	1.250000e+00	3.273761e-02	8.691531e-03	9.855312e-03
-1.425000e+01	1.750000e+00	1.750000e+00	1.413150e-02	4.993361e-03	5.285201e-03
-1.800000e+01	2.000000e+00	2.000000e+00	5.620791e-03	2.195060e-03	2.219690e-03
-2.250000e+01	2.500000e+00	2.500000e+00	2.514020e-03	8.042461e-04	8.191071e-04
-2.825000e+01	3.250000e+00	3.250000e+00	1.111410e-03	2.679110e-04	2.851700e-04
-3.575000e+01	4.250000e+00	4.250000e+00	3.531051e-04	5.229821e-05	5.229821e-05
-4.500000e+01	5.000000e+00	5.000000e+00	1.141740e-04	2.660340e-05	2.660340e-05
-5.750000e+01	7.500000e+00	7.500000e+00	4.920761e-05	1.322360e-05	1.322360e-05
-8.250000e+01	1.750000e+01	1.750000e+01	6.069921e-06	4.976781e-06	4.976781e-06
-1.500000e+02	5.000000e+01	5.000000e+01	1.082950e-06	6.367441e-07	6.367441e-07
+1.062500e+00	6.250000e-02	6.250000e-02	5.924000e-02	2.576000e-02	1.555000e-02
+1.207500e+00	8.250000e-02	8.250000e-02	6.926000e-02	2.758000e-02	1.796000e-02
+1.420000e+00	1.300000e-01	1.300000e-01	7.357000e-02	2.730000e-02	1.783000e-02
+1.725000e+00	1.750000e-01	1.750000e-01	7.560000e-02	2.231000e-02	1.461000e-02
+2.175000e+00	2.750000e-01	2.750000e-01	8.182000e-02	2.151000e-02	1.275000e-02
+2.775000e+00	3.250000e-01	3.250000e-01	9.685000e-02	2.351000e-02	1.642000e-02
+3.550000e+00	4.500000e-01	4.500000e-01	1.144000e-01	2.150000e-02	2.070000e-02
+4.500000e+00	5.000000e-01	5.000000e-01	1.176000e-01	1.520000e-02	1.650000e-02
+5.650000e+00	6.500000e-01	6.500000e-01	1.137000e-01	7.300000e-03	8.400000e-03
+7.150000e+00	8.500000e-01	8.500000e-01	9.242000e-02	5.190000e-03	8.390000e-03
+9.000000e+00	1.000000e+00	1.000000e+00	6.164000e-02	9.480000e-03	1.207000e-02
+1.125000e+01	1.250000e+00	1.250000e+00	3.274000e-02	8.690000e-03	9.860000e-03
+1.425000e+01	1.750000e+00	1.750000e+00	1.413000e-02	4.990000e-03	5.290000e-03
+1.800000e+01	2.000000e+00	2.000000e+00	5.621000e-03	2.195000e-03	2.220000e-03
+2.250000e+01	2.500000e+00	2.500000e+00	2.514000e-03	8.040000e-04	8.190000e-04
+2.825000e+01	3.250000e+00	3.250000e+00	1.111000e-03	2.680000e-04	2.850000e-04
+3.575000e+01	4.250000e+00	4.250000e+00	3.531000e-04	5.230000e-05	5.230000e-05
+4.500000e+01	5.000000e+00	5.000000e+00	1.142000e-04	2.660000e-05	2.660000e-05
+5.750000e+01	7.500000e+00	7.500000e+00	4.921000e-05	1.322000e-05	1.322000e-05
+8.250000e+01	1.750000e+01	1.750000e+01	6.070000e-06	4.977000e-06	4.977000e-06
+1.500000e+02	5.000000e+01	5.000000e+01	1.083000e-06	6.370000e-07	6.370000e-07
 END YODA_SCATTER2D_V2
-
 BEGIN YODA_SCATTER2D_V2 /REF/ATLAS_2013_I1217867/d03-x01-y02
 IsRef: 1
 Path: /REF/ATLAS_2013_I1217867/d03-x01-y02
-Title: ~
+Title: doi:10.17182/hepdata.60309.v1/t3
 Type: Scatter2D
 ---
 # xval	 xerr-	 xerr+	 yval	 yerr-	 yerr+
-1.062500e+00	6.250000e-02	6.250000e-02	5.807970e-02	2.902309e-02	1.962154e-02
-1.207500e+00	8.250000e-02	8.250000e-02	6.690673e-02	3.088127e-02	2.143614e-02
-1.420000e+00	1.300000e-01	1.300000e-01	7.240704e-02	2.749866e-02	2.067747e-02
-1.725000e+00	1.750000e-01	1.750000e-01	7.461466e-02	2.423500e-02	1.928327e-02
-2.175000e+00	2.750000e-01	2.750000e-01	8.107144e-02	2.185081e-02	1.740561e-02
-2.775000e+00	3.250000e-01	3.250000e-01	9.465220e-02	2.213914e-02	1.757059e-02
-3.550000e+00	4.500000e-01	4.500000e-01	1.139446e-01	2.170582e-02	1.936304e-02
-4.500000e+00	5.000000e-01	5.000000e-01	1.212227e-01	1.469196e-02	1.656224e-02
-5.650000e+00	6.500000e-01	6.500000e-01	1.167459e-01	1.026850e-02	1.153668e-02
-7.150000e+00	8.500000e-01	8.500000e-01	9.553115e-02	6.884653e-03	1.022694e-02
-9.000000e+00	1.000000e+00	1.000000e+00	6.213669e-02	1.038313e-02	1.222727e-02
-1.125000e+01	1.250000e+00	1.250000e+00	3.036048e-02	9.646639e-03	9.913718e-03
-1.425000e+01	1.750000e+00	1.750000e+00	1.245777e-02	4.915393e-03	4.462260e-03
-1.800000e+01	2.000000e+00	2.000000e+00	5.576728e-03	1.828404e-03	1.647723e-03
-2.250000e+01	2.500000e+00	2.500000e+00	2.565094e-03	7.688320e-04	6.897778e-04
-2.825000e+01	3.250000e+00	3.250000e+00	1.067034e-03	3.004907e-04	2.669651e-04
-3.575000e+01	4.250000e+00	4.250000e+00	4.174304e-04	3.017273e-05	3.167849e-05
-4.500000e+01	5.000000e+00	5.000000e+00	1.153288e-04	2.230833e-05	2.246705e-05
-5.750000e+01	7.500000e+00	7.500000e+00	7.183508e-05	1.291375e-05	1.302019e-05
-8.250000e+01	1.750000e+01	1.750000e+01	2.207710e-05	3.480270e-06	3.517502e-06
-1.500000e+02	5.000000e+01	5.000000e+01	3.042149e-06	9.413285e-07	9.439524e-07
+1.062500e+00	6.250000e-02	6.250000e-02	5.808000e-02	2.902000e-02	1.962000e-02
+1.207500e+00	8.250000e-02	8.250000e-02	6.691000e-02	3.088000e-02	2.144000e-02
+1.420000e+00	1.300000e-01	1.300000e-01	7.241000e-02	2.750000e-02	2.068000e-02
+1.725000e+00	1.750000e-01	1.750000e-01	7.461000e-02	2.423000e-02	1.928000e-02
+2.175000e+00	2.750000e-01	2.750000e-01	8.107000e-02	2.185000e-02	1.741000e-02
+2.775000e+00	3.250000e-01	3.250000e-01	9.465000e-02	2.214000e-02	1.757000e-02
+3.550000e+00	4.500000e-01	4.500000e-01	1.139000e-01	2.170000e-02	1.940000e-02
+4.500000e+00	5.000000e-01	5.000000e-01	1.212000e-01	1.470000e-02	1.660000e-02
+5.650000e+00	6.500000e-01	6.500000e-01	1.167000e-01	1.030000e-02	1.150000e-02
+7.150000e+00	8.500000e-01	8.500000e-01	9.553000e-02	6.880000e-03	1.023000e-02
+9.000000e+00	1.000000e+00	1.000000e+00	6.214000e-02	1.038000e-02	1.223000e-02
+1.125000e+01	1.250000e+00	1.250000e+00	3.036000e-02	9.650000e-03	9.910000e-03
+1.425000e+01	1.750000e+00	1.750000e+00	1.246000e-02	4.920000e-03	4.460000e-03
+1.800000e+01	2.000000e+00	2.000000e+00	5.577000e-03	1.828000e-03	1.648000e-03
+2.250000e+01	2.500000e+00	2.500000e+00	2.565000e-03	7.690000e-04	6.900000e-04
+2.825000e+01	3.250000e+00	3.250000e+00	1.067000e-03	3.000000e-04	2.670000e-04
+3.575000e+01	4.250000e+00	4.250000e+00	4.174000e-04	3.020000e-05	3.170000e-05
+4.500000e+01	5.000000e+00	5.000000e+00	1.153000e-04	2.230000e-05	2.250000e-05
+5.750000e+01	7.500000e+00	7.500000e+00	7.184000e-05	1.291000e-05	1.302000e-05
+8.250000e+01	1.750000e+01	1.750000e+01	2.208000e-05	3.480000e-06	3.520000e-06
+1.500000e+02	5.000000e+01	5.000000e+01	3.042000e-06	9.410000e-07	9.440000e-07
 END YODA_SCATTER2D_V2
-
 BEGIN YODA_SCATTER2D_V2 /REF/ATLAS_2013_I1217867/d04-x01-y01
 IsRef: 1
 Path: /REF/ATLAS_2013_I1217867/d04-x01-y01
-Title: ~
+Title: doi:10.17182/hepdata.60309.v1/t4
 Type: Scatter2D
 ---
 # xval	 xerr-	 xerr+	 yval	 yerr-	 yerr+
-1.062500e+00	6.250000e-02	6.250000e-02	8.514195e-02	2.922012e-02	2.398731e-02
-1.207500e+00	8.250000e-02	8.250000e-02	9.071726e-02	3.060672e-02	2.466882e-02
-1.420000e+00	1.300000e-01	1.300000e-01	9.192046e-02	2.752092e-02	2.207951e-02
-1.725000e+00	1.750000e-01	1.750000e-01	9.420106e-02	2.338441e-02	1.840671e-02
-2.175000e+00	2.750000e-01	2.750000e-01	1.079751e-01	2.396571e-02	1.973121e-02
-2.775000e+00	3.250000e-01	3.250000e-01	1.305941e-01	2.592202e-02	2.299401e-02
-3.550000e+00	4.500000e-01	4.500000e-01	1.387011e-01	2.083161e-02	2.035531e-02
-4.500000e+00	5.000000e-01	5.000000e-01	1.383311e-01	1.393181e-02	1.543211e-02
-5.650000e+00	6.500000e-01	6.500000e-01	1.266231e-01	5.499783e-03	5.500443e-03
-7.150000e+00	8.500000e-01	8.500000e-01	8.783395e-02	8.390855e-03	1.229841e-02
-9.000000e+00	1.000000e+00	1.000000e+00	4.958693e-02	1.180461e-02	1.309001e-02
-1.125000e+01	1.250000e+00	1.250000e+00	2.200081e-02	9.170496e-03	8.638315e-03
-1.425000e+01	1.750000e+00	1.750000e+00	7.772325e-03	4.882853e-03	3.958642e-03
-1.800000e+01	2.000000e+00	2.000000e+00	2.185901e-03	1.857141e-03	1.343851e-03
-2.250000e+01	2.500000e+00	2.500000e+00	6.871294e-04	5.829324e-04	4.171993e-04
-2.825000e+01	3.250000e+00	3.250000e+00	2.362831e-04	1.191671e-04	1.003291e-04
-3.575000e+01	4.250000e+00	4.250000e+00	9.059186e-05	2.573532e-05	2.573532e-05
-4.500000e+01	5.000000e+00	5.000000e+00	1.817011e-05	1.309201e-05	1.309201e-05
-6.000000e+01	1.000000e+01	1.000000e+01	4.009792e-06	4.763063e-06	4.763063e-06
-8.500000e+01	1.500000e+01	1.500000e+01	8.491595e-08	6.701654e-07	6.701654e-07
-1.500000e+02	5.000000e+01	5.000000e+01	2.838822e-07	4.937573e-07	4.937573e-07
+1.062500e+00	6.250000e-02	6.250000e-02	8.514000e-02	2.922000e-02	2.399000e-02
+1.207500e+00	8.250000e-02	8.250000e-02	9.072000e-02	3.061000e-02	2.467000e-02
+1.420000e+00	1.300000e-01	1.300000e-01	9.192000e-02	2.752000e-02	2.208000e-02
+1.725000e+00	1.750000e-01	1.750000e-01	9.420000e-02	2.338000e-02	1.841000e-02
+2.175000e+00	2.750000e-01	2.750000e-01	1.080000e-01	2.400000e-02	1.970000e-02
+2.775000e+00	3.250000e-01	3.250000e-01	1.306000e-01	2.590000e-02	2.300000e-02
+3.550000e+00	4.500000e-01	4.500000e-01	1.387000e-01	2.080000e-02	2.040000e-02
+4.500000e+00	5.000000e-01	5.000000e-01	1.383000e-01	1.390000e-02	1.540000e-02
+5.650000e+00	6.500000e-01	6.500000e-01	1.266000e-01	5.500000e-03	5.500000e-03
+7.150000e+00	8.500000e-01	8.500000e-01	8.783000e-02	8.390000e-03	1.230000e-02
+9.000000e+00	1.000000e+00	1.000000e+00	4.959000e-02	1.180000e-02	1.309000e-02
+1.125000e+01	1.250000e+00	1.250000e+00	2.200000e-02	9.170000e-03	8.640000e-03
+1.425000e+01	1.750000e+00	1.750000e+00	7.772000e-03	4.883000e-03	3.959000e-03
+1.800000e+01	2.000000e+00	2.000000e+00	2.186000e-03	1.857000e-03	1.344000e-03
+2.250000e+01	2.500000e+00	2.500000e+00	6.871000e-04	5.829000e-04	4.172000e-04
+2.825000e+01	3.250000e+00	3.250000e+00	2.363000e-04	1.192000e-04	1.003000e-04
+3.575000e+01	4.250000e+00	4.250000e+00	9.059000e-05	2.574000e-05	2.574000e-05
+4.500000e+01	5.000000e+00	5.000000e+00	1.817000e-05	1.309000e-05	1.309000e-05
+6.000000e+01	1.000000e+01	1.000000e+01	4.010000e-06	4.763000e-06	4.763000e-06
+8.500000e+01	1.500000e+01	1.500000e+01	8.492000e-08	6.701700e-07	6.701700e-07
+1.500000e+02	5.000000e+01	5.000000e+01	2.839000e-07	4.938000e-07	4.938000e-07
 END YODA_SCATTER2D_V2
-
 BEGIN YODA_SCATTER2D_V2 /REF/ATLAS_2013_I1217867/d04-x01-y02
 IsRef: 1
 Path: /REF/ATLAS_2013_I1217867/d04-x01-y02
-Title: ~
+Title: doi:10.17182/hepdata.60309.v1/t4
 Type: Scatter2D
 ---
 # xval	 xerr-	 xerr+	 yval	 yerr-	 yerr+
-1.062500e+00	6.250000e-02	6.250000e-02	8.047647e-02	3.501480e-02	2.067441e-02
-1.207500e+00	8.250000e-02	8.250000e-02	8.758388e-02	3.430463e-02	1.933337e-02
-1.420000e+00	1.300000e-01	1.300000e-01	9.160216e-02	3.064086e-02	1.808371e-02
-1.725000e+00	1.750000e-01	1.750000e-01	9.516227e-02	2.810879e-02	1.932489e-02
-2.175000e+00	2.750000e-01	2.750000e-01	1.069154e-01	2.732207e-02	2.147049e-02
-2.775000e+00	3.250000e-01	3.250000e-01	1.281595e-01	2.762828e-02	2.473499e-02
-3.550000e+00	4.500000e-01	4.500000e-01	1.414852e-01	2.126203e-02	2.227275e-02
-4.500000e+00	5.000000e-01	5.000000e-01	1.410702e-01	1.626277e-02	1.834772e-02
-5.650000e+00	6.500000e-01	6.500000e-01	1.264492e-01	7.993080e-03	1.050197e-02
-7.150000e+00	8.500000e-01	8.500000e-01	9.016823e-02	9.867735e-03	1.425068e-02
-9.000000e+00	1.000000e+00	1.000000e+00	4.754070e-02	1.369158e-02	1.491025e-02
-1.125000e+01	1.250000e+00	1.250000e+00	1.980028e-02	8.747740e-03	7.969443e-03
-1.425000e+01	1.750000e+00	1.750000e+00	7.545400e-03	3.122000e-03	2.812442e-03
-1.800000e+01	2.000000e+00	2.000000e+00	2.666311e-03	1.059768e-03	9.430933e-04
-2.250000e+01	2.500000e+00	2.500000e+00	9.261757e-04	3.566157e-04	3.413510e-04
-2.825000e+01	3.250000e+00	3.250000e+00	3.094504e-04	1.460731e-04	1.199347e-04
-3.575000e+01	4.250000e+00	4.250000e+00	9.426077e-05	1.804177e-05	1.841606e-05
-4.500000e+01	5.000000e+00	5.000000e+00	6.797035e-05	1.506274e-05	1.529637e-05
-6.000000e+01	1.000000e+01	1.000000e+01	1.544700e-05	5.097896e-06	5.133709e-06
-8.500000e+01	1.500000e+01	1.500000e+01	1.099069e-06	9.743679e-07	9.753215e-07
-1.500000e+02	5.000000e+01	5.000000e+01	6.041377e-07	2.850524e-07	2.860343e-07
+1.062500e+00	6.250000e-02	6.250000e-02	8.048000e-02	3.501000e-02	2.067000e-02
+1.207500e+00	8.250000e-02	8.250000e-02	8.758000e-02	3.430000e-02	1.933000e-02
+1.420000e+00	1.300000e-01	1.300000e-01	9.160000e-02	3.064000e-02	1.808000e-02
+1.725000e+00	1.750000e-01	1.750000e-01	9.516000e-02	2.811000e-02	1.932000e-02
+2.175000e+00	2.750000e-01	2.750000e-01	1.069000e-01	2.730000e-02	2.150000e-02
+2.775000e+00	3.250000e-01	3.250000e-01	1.282000e-01	2.760000e-02	2.470000e-02
+3.550000e+00	4.500000e-01	4.500000e-01	1.415000e-01	2.130000e-02	2.230000e-02
+4.500000e+00	5.000000e-01	5.000000e-01	1.411000e-01	1.630000e-02	1.830000e-02
+5.650000e+00	6.500000e-01	6.500000e-01	1.264000e-01	8.000000e-03	1.050000e-02
+7.150000e+00	8.500000e-01	8.500000e-01	9.017000e-02	9.870000e-03	1.425000e-02
+9.000000e+00	1.000000e+00	1.000000e+00	4.754000e-02	1.369000e-02	1.491000e-02
+1.125000e+01	1.250000e+00	1.250000e+00	1.980000e-02	8.750000e-03	7.970000e-03
+1.425000e+01	1.750000e+00	1.750000e+00	7.545000e-03	3.122000e-03	2.812000e-03
+1.800000e+01	2.000000e+00	2.000000e+00	2.666000e-03	1.060000e-03	9.430000e-04
+2.250000e+01	2.500000e+00	2.500000e+00	9.262000e-04	3.566000e-04	3.414000e-04
+2.825000e+01	3.250000e+00	3.250000e+00	3.095000e-04	1.461000e-04	1.199000e-04
+3.575000e+01	4.250000e+00	4.250000e+00	9.426000e-05	1.804000e-05	1.842000e-05
+4.500000e+01	5.000000e+00	5.000000e+00	6.797000e-05	1.506000e-05	1.530000e-05
+6.000000e+01	1.000000e+01	1.000000e+01	1.545000e-05	5.100000e-06	5.130000e-06
+8.500000e+01	1.500000e+01	1.500000e+01	1.099000e-06	9.740000e-07	9.750000e-07
+1.500000e+02	5.000000e+01	5.000000e+01	6.041000e-07	2.851000e-07	2.860000e-07
 END YODA_SCATTER2D_V2
-
 BEGIN YODA_SCATTER2D_V2 /REF/ATLAS_2013_I1217867/d05-x01-y01
 IsRef: 1
 Path: /REF/ATLAS_2013_I1217867/d05-x01-y01
-Title: ~
+Title: doi:10.17182/hepdata.60309.v1/t5
 Type: Scatter2D
 ---
 # xval	 xerr-	 xerr+	 yval	 yerr-	 yerr+
-1.075000e-01	7.500000e-03	7.500000e-03	6.419317e-01	1.699762e-01	1.416112e-01
-1.250000e-01	1.000000e-02	1.000000e-02	7.576218e-01	1.808762e-01	1.470202e-01
-1.475000e-01	1.250000e-02	1.250000e-02	9.371840e-01	2.128522e-01	1.649022e-01
-1.725000e-01	1.250000e-02	1.250000e-02	1.052341e+00	2.003292e-01	1.440082e-01
-2.000000e-01	1.500000e-02	1.500000e-02	1.175161e+00	1.841022e-01	1.305071e-01
-2.325000e-01	1.750000e-02	1.750000e-02	1.327041e+00	1.597392e-01	1.360321e-01
-2.700000e-01	2.000000e-02	2.000000e-02	1.432522e+00	1.460592e-01	1.431542e-01
-3.150000e-01	2.500000e-02	2.500000e-02	1.515442e+00	1.334131e-01	1.391711e-01
-3.700000e-01	3.000000e-02	3.000000e-02	1.489772e+00	1.094691e-01	1.137081e-01
-4.325000e-01	3.250000e-02	3.250000e-02	1.474172e+00	7.553138e-02	7.083158e-02
-5.025000e-01	3.750000e-02	3.750000e-02	1.328171e+00	5.951626e-02	6.355077e-02
-5.850000e-01	4.500000e-02	4.500000e-02	1.174261e+00	8.995900e-02	9.111900e-02
-6.825000e-01	5.250000e-02	5.250000e-02	1.064971e+00	9.645190e-02	9.989991e-02
-7.975000e-01	6.250000e-02	6.250000e-02	8.881970e-01	1.029921e-01	1.125571e-01
-9.300000e-01	7.000000e-02	7.000000e-02	6.953987e-01	1.203571e-01	1.289611e-01
+1.075000e-01	7.500000e-03	7.500000e-03	6.419000e-01	1.700000e-01	1.416000e-01
+1.250000e-01	1.000000e-02	1.000000e-02	7.576000e-01	1.809000e-01	1.470000e-01
+1.475000e-01	1.250000e-02	1.250000e-02	9.372000e-01	2.129000e-01	1.649000e-01
+1.725000e-01	1.250000e-02	1.250000e-02	1.052000e+00	2.000000e-01	1.440000e-01
+2.000000e-01	1.500000e-02	1.500000e-02	1.175000e+00	1.840000e-01	1.310000e-01
+2.325000e-01	1.750000e-02	1.750000e-02	1.327000e+00	1.600000e-01	1.360000e-01
+2.700000e-01	2.000000e-02	2.000000e-02	1.433000e+00	1.460000e-01	1.430000e-01
+3.150000e-01	2.500000e-02	2.500000e-02	1.515000e+00	1.330000e-01	1.390000e-01
+3.700000e-01	3.000000e-02	3.000000e-02	1.490000e+00	1.090000e-01	1.140000e-01
+4.325000e-01	3.250000e-02	3.250000e-02	1.474000e+00	7.600000e-02	7.100000e-02
+5.025000e-01	3.750000e-02	3.750000e-02	1.328000e+00	6.000000e-02	6.400000e-02
+5.850000e-01	4.500000e-02	4.500000e-02	1.174000e+00	9.000000e-02	9.100000e-02
+6.825000e-01	5.250000e-02	5.250000e-02	1.065000e+00	9.600000e-02	1.000000e-01
+7.975000e-01	6.250000e-02	6.250000e-02	8.882000e-01	1.030000e-01	1.126000e-01
+9.300000e-01	7.000000e-02	7.000000e-02	6.954000e-01	1.204000e-01	1.290000e-01
 END YODA_SCATTER2D_V2
-
 BEGIN YODA_SCATTER2D_V2 /REF/ATLAS_2013_I1217867/d05-x01-y02
 IsRef: 1
 Path: /REF/ATLAS_2013_I1217867/d05-x01-y02
-Title: ~
+Title: doi:10.17182/hepdata.60309.v1/t5
 Type: Scatter2D
 ---
 # xval	 xerr-	 xerr+	 yval	 yerr-	 yerr+
-1.075000e-01	7.500000e-03	7.500000e-03	6.369924e-01	1.820264e-01	1.872447e-01
-1.250000e-01	1.000000e-02	1.000000e-02	8.253815e-01	2.016577e-01	1.693018e-01
-1.475000e-01	1.250000e-02	1.250000e-02	1.009220e+00	2.135466e-01	2.001087e-01
-1.725000e-01	1.250000e-02	1.250000e-02	1.097368e+00	1.981333e-01	1.641387e-01
-2.000000e-01	1.500000e-02	1.500000e-02	1.233779e+00	1.858438e-01	1.588911e-01
-2.325000e-01	1.750000e-02	1.750000e-02	1.357711e+00	1.777587e-01	1.616115e-01
-2.700000e-01	2.000000e-02	2.000000e-02	1.416575e+00	1.665059e-01	1.566961e-01
-3.150000e-01	2.500000e-02	2.500000e-02	1.467440e+00	1.442901e-01	1.324211e-01
-3.700000e-01	3.000000e-02	3.000000e-02	1.437038e+00	1.015282e-01	9.485456e-02
-4.325000e-01	3.250000e-02	3.250000e-02	1.425507e+00	5.085169e-02	4.300889e-02
-5.025000e-01	3.750000e-02	3.750000e-02	1.271707e+00	3.516592e-02	4.473284e-02
-5.850000e-01	4.500000e-02	4.500000e-02	1.198446e+00	8.309452e-02	9.771141e-02
-6.825000e-01	5.250000e-02	5.250000e-02	1.067839e+00	8.476190e-02	1.085830e-01
-7.975000e-01	6.250000e-02	6.250000e-02	8.906766e-01	8.993912e-02	1.027487e-01
-9.300000e-01	7.000000e-02	7.000000e-02	7.223464e-01	8.485560e-02	8.983781e-02
+1.075000e-01	7.500000e-03	7.500000e-03	6.370000e-01	1.820000e-01	1.872000e-01
+1.250000e-01	1.000000e-02	1.000000e-02	8.254000e-01	2.017000e-01	1.693000e-01
+1.475000e-01	1.250000e-02	1.250000e-02	1.009000e+00	2.140000e-01	2.000000e-01
+1.725000e-01	1.250000e-02	1.250000e-02	1.097000e+00	1.980000e-01	1.640000e-01
+2.000000e-01	1.500000e-02	1.500000e-02	1.234000e+00	1.860000e-01	1.590000e-01
+2.325000e-01	1.750000e-02	1.750000e-02	1.358000e+00	1.780000e-01	1.620000e-01
+2.700000e-01	2.000000e-02	2.000000e-02	1.417000e+00	1.670000e-01	1.570000e-01
+3.150000e-01	2.500000e-02	2.500000e-02	1.467000e+00	1.440000e-01	1.320000e-01
+3.700000e-01	3.000000e-02	3.000000e-02	1.437000e+00	1.020000e-01	9.500000e-02
+4.325000e-01	3.250000e-02	3.250000e-02	1.426000e+00	5.100000e-02	4.300000e-02
+5.025000e-01	3.750000e-02	3.750000e-02	1.272000e+00	3.500000e-02	4.500000e-02
+5.850000e-01	4.500000e-02	4.500000e-02	1.198000e+00	8.300000e-02	9.800000e-02
+6.825000e-01	5.250000e-02	5.250000e-02	1.068000e+00	8.500000e-02	1.090000e-01
+7.975000e-01	6.250000e-02	6.250000e-02	8.907000e-01	8.990000e-02	1.027000e-01
+9.300000e-01	7.000000e-02	7.000000e-02	7.223000e-01	8.490000e-02	8.980000e-02
 END YODA_SCATTER2D_V2
-
 BEGIN YODA_SCATTER2D_V2 /REF/ATLAS_2013_I1217867/d06-x01-y01
 IsRef: 1
 Path: /REF/ATLAS_2013_I1217867/d06-x01-y01
-Title: ~
+Title: doi:10.17182/hepdata.60309.v1/t6
 Type: Scatter2D
 ---
 # xval	 xerr-	 xerr+	 yval	 yerr-	 yerr+
-1.075000e-01	7.500000e-03	7.500000e-03	2.007079e-01	1.166890e-01	7.329887e-02
-1.250000e-01	1.000000e-02	1.000000e-02	2.609129e-01	9.638867e-02	6.827438e-02
-1.475000e-01	1.250000e-02	1.250000e-02	4.315048e-01	1.694029e-01	1.117330e-01
-1.725000e-01	1.250000e-02	1.250000e-02	6.133568e-01	1.763259e-01	1.333610e-01
-2.000000e-01	1.500000e-02	1.500000e-02	8.345347e-01	1.855779e-01	1.936539e-01
-2.325000e-01	1.750000e-02	1.750000e-02	9.396637e-01	2.126749e-01	1.723719e-01
-2.700000e-01	2.000000e-02	2.000000e-02	1.080210e+00	1.791619e-01	1.346010e-01
-3.150000e-01	2.500000e-02	2.500000e-02	1.223410e+00	1.475869e-01	1.345220e-01
-3.700000e-01	3.000000e-02	3.000000e-02	1.350220e+00	1.395180e-01	1.365140e-01
-4.325000e-01	3.250000e-02	3.250000e-02	1.459389e+00	1.089050e-01	1.139410e-01
-5.025000e-01	3.750000e-02	3.750000e-02	1.424830e+00	7.001278e-02	7.023828e-02
-5.850000e-01	4.500000e-02	4.500000e-02	1.302510e+00	1.019650e-01	1.086300e-01
-6.825000e-01	5.250000e-02	5.250000e-02	1.227070e+00	1.060100e-01	1.225640e-01
-7.975000e-01	6.250000e-02	6.250000e-02	1.133980e+00	1.298350e-01	1.541929e-01
-9.300000e-01	7.000000e-02	7.000000e-02	9.485367e-01	1.831999e-01	1.970369e-01
+1.075000e-01	7.500000e-03	7.500000e-03	2.007000e-01	1.167000e-01	7.330000e-02
+1.250000e-01	1.000000e-02	1.000000e-02	2.609000e-01	9.640000e-02	6.830000e-02
+1.475000e-01	1.250000e-02	1.250000e-02	4.315000e-01	1.694000e-01	1.117000e-01
+1.725000e-01	1.250000e-02	1.250000e-02	6.134000e-01	1.763000e-01	1.334000e-01
+2.000000e-01	1.500000e-02	1.500000e-02	8.345000e-01	1.856000e-01	1.937000e-01
+2.325000e-01	1.750000e-02	1.750000e-02	9.397000e-01	2.127000e-01	1.724000e-01
+2.700000e-01	2.000000e-02	2.000000e-02	1.080000e+00	1.790000e-01	1.350000e-01
+3.150000e-01	2.500000e-02	2.500000e-02	1.223000e+00	1.480000e-01	1.350000e-01
+3.700000e-01	3.000000e-02	3.000000e-02	1.350000e+00	1.400000e-01	1.370000e-01
+4.325000e-01	3.250000e-02	3.250000e-02	1.459000e+00	1.090000e-01	1.140000e-01
+5.025000e-01	3.750000e-02	3.750000e-02	1.425000e+00	7.000000e-02	7.000000e-02
+5.850000e-01	4.500000e-02	4.500000e-02	1.303000e+00	1.020000e-01	1.090000e-01
+6.825000e-01	5.250000e-02	5.250000e-02	1.227000e+00	1.060000e-01	1.230000e-01
+7.975000e-01	6.250000e-02	6.250000e-02	1.134000e+00	1.300000e-01	1.540000e-01
+9.300000e-01	7.000000e-02	7.000000e-02	9.485000e-01	1.832000e-01	1.970000e-01
 END YODA_SCATTER2D_V2
-
 BEGIN YODA_SCATTER2D_V2 /REF/ATLAS_2013_I1217867/d06-x01-y02
 IsRef: 1
 Path: /REF/ATLAS_2013_I1217867/d06-x01-y02
-Title: ~
+Title: doi:10.17182/hepdata.60309.v1/t6
 Type: Scatter2D
 ---
 # xval	 xerr-	 xerr+	 yval	 yerr-	 yerr+
-1.075000e-01	7.500000e-03	7.500000e-03	1.676652e-01	6.101312e-02	5.131754e-02
-1.250000e-01	1.000000e-02	1.000000e-02	2.330886e-01	8.862115e-02	6.516809e-02
-1.475000e-01	1.250000e-02	1.250000e-02	3.729342e-01	1.164853e-01	1.025585e-01
-1.725000e-01	1.250000e-02	1.250000e-02	5.573719e-01	2.029208e-01	1.275742e-01
-2.000000e-01	1.500000e-02	1.500000e-02	8.018047e-01	2.315064e-01	1.624371e-01
-2.325000e-01	1.750000e-02	1.750000e-02	1.042900e+00	2.311303e-01	2.073354e-01
-2.700000e-01	2.000000e-02	2.000000e-02	1.237819e+00	2.421355e-01	2.283063e-01
-3.150000e-01	2.500000e-02	2.500000e-02	1.291823e+00	1.863122e-01	1.838440e-01
-3.700000e-01	3.000000e-02	3.000000e-02	1.393266e+00	1.255044e-01	1.674308e-01
-4.325000e-01	3.250000e-02	3.250000e-02	1.432068e+00	1.278331e-01	1.485437e-01
-5.025000e-01	3.750000e-02	3.750000e-02	1.441493e+00	9.849058e-02	1.013334e-01
-5.850000e-01	4.500000e-02	4.500000e-02	1.253174e+00	1.011095e-01	1.133739e-01
-6.825000e-01	5.250000e-02	5.250000e-02	1.245040e+00	1.364767e-01	1.246867e-01
-7.975000e-01	6.250000e-02	6.250000e-02	1.063271e+00	1.557468e-01	1.460546e-01
-9.300000e-01	7.000000e-02	7.000000e-02	9.549284e-01	1.681654e-01	1.646919e-01
+1.075000e-01	7.500000e-03	7.500000e-03	1.677000e-01	6.100000e-02	5.130000e-02
+1.250000e-01	1.000000e-02	1.000000e-02	2.331000e-01	8.860000e-02	6.520000e-02
+1.475000e-01	1.250000e-02	1.250000e-02	3.729000e-01	1.165000e-01	1.026000e-01
+1.725000e-01	1.250000e-02	1.250000e-02	5.574000e-01	2.029000e-01	1.276000e-01
+2.000000e-01	1.500000e-02	1.500000e-02	8.018000e-01	2.315000e-01	1.624000e-01
+2.325000e-01	1.750000e-02	1.750000e-02	1.043000e+00	2.310000e-01	2.070000e-01
+2.700000e-01	2.000000e-02	2.000000e-02	1.238000e+00	2.420000e-01	2.280000e-01
+3.150000e-01	2.500000e-02	2.500000e-02	1.292000e+00	1.860000e-01	1.840000e-01
+3.700000e-01	3.000000e-02	3.000000e-02	1.393000e+00	1.260000e-01	1.670000e-01
+4.325000e-01	3.250000e-02	3.250000e-02	1.432000e+00	1.280000e-01	1.490000e-01
+5.025000e-01	3.750000e-02	3.750000e-02	1.441000e+00	9.800000e-02	1.010000e-01
+5.850000e-01	4.500000e-02	4.500000e-02	1.253000e+00	1.010000e-01	1.130000e-01
+6.825000e-01	5.250000e-02	5.250000e-02	1.245000e+00	1.360000e-01	1.250000e-01
+7.975000e-01	6.250000e-02	6.250000e-02	1.063000e+00	1.560000e-01	1.460000e-01
+9.300000e-01	7.000000e-02	7.000000e-02	9.549000e-01	1.682000e-01	1.647000e-01
 END YODA_SCATTER2D_V2
-
 BEGIN YODA_SCATTER2D_V2 /REF/ATLAS_2013_I1217867/d07-x01-y01
 IsRef: 1
 Path: /REF/ATLAS_2013_I1217867/d07-x01-y01
-Title: ~
+Title: doi:10.17182/hepdata.60309.v1/t7
 Type: Scatter2D
 ---
 # xval	 xerr-	 xerr+	 yval	 yerr-	 yerr+
-1.300000e-01	3.000000e-02	3.000000e-02	2.754507e-02	2.951687e-02	1.817478e-02
-1.800000e-01	2.000000e-02	2.000000e-02	2.614887e-01	1.570958e-01	8.893721e-02
-2.250000e-01	2.500000e-02	2.500000e-02	5.617875e-01	2.324818e-01	2.014568e-01
-2.825000e-01	3.250000e-02	3.250000e-02	8.265362e-01	2.675007e-01	2.223938e-01
-3.575000e-01	4.250000e-02	4.250000e-02	1.056039e+00	2.677177e-01	1.934078e-01
-4.500000e-01	5.000000e-02	5.000000e-02	1.347719e+00	2.181378e-01	1.854278e-01
-5.650000e-01	6.500000e-02	6.500000e-02	1.592688e+00	1.465589e-01	1.465559e-01
-7.150000e-01	8.500000e-02	8.500000e-02	1.456089e+00	1.947068e-01	2.056028e-01
-9.000000e-01	1.000000e-01	1.000000e-01	1.134769e+00	2.623377e-01	2.809777e-01
+1.300000e-01	3.000000e-02	3.000000e-02	2.755000e-02	2.952000e-02	1.817000e-02
+1.800000e-01	2.000000e-02	2.000000e-02	2.615000e-01	1.571000e-01	8.890000e-02
+2.250000e-01	2.500000e-02	2.500000e-02	5.618000e-01	2.325000e-01	2.015000e-01
+2.825000e-01	3.250000e-02	3.250000e-02	8.265000e-01	2.675000e-01	2.224000e-01
+3.575000e-01	4.250000e-02	4.250000e-02	1.056000e+00	2.680000e-01	1.930000e-01
+4.500000e-01	5.000000e-02	5.000000e-02	1.348000e+00	2.180000e-01	1.850000e-01
+5.650000e-01	6.500000e-02	6.500000e-02	1.593000e+00	1.470000e-01	1.470000e-01
+7.150000e-01	8.500000e-02	8.500000e-02	1.456000e+00	1.950000e-01	2.060000e-01
+9.000000e-01	1.000000e-01	1.000000e-01	1.135000e+00	2.620000e-01	2.810000e-01
 END YODA_SCATTER2D_V2
-
 BEGIN YODA_SCATTER2D_V2 /REF/ATLAS_2013_I1217867/d07-x01-y02
 IsRef: 1
 Path: /REF/ATLAS_2013_I1217867/d07-x01-y02
-Title: ~
+Title: doi:10.17182/hepdata.60309.v1/t7
 Type: Scatter2D
 ---
 # xval	 xerr-	 xerr+	 yval	 yerr-	 yerr+
-1.300000e-01	3.000000e-02	3.000000e-02	1.255371e-01	8.455765e-02	7.963443e-02
-1.800000e-01	2.000000e-02	2.000000e-02	3.753712e-01	2.042865e-01	1.783289e-01
-2.250000e-01	2.500000e-02	2.500000e-02	5.900131e-01	2.774600e-01	2.240464e-01
-2.825000e-01	3.250000e-02	3.250000e-02	8.486630e-01	2.561510e-01	1.972960e-01
-3.575000e-01	4.250000e-02	4.250000e-02	1.094824e+00	2.453012e-01	2.160105e-01
-4.500000e-01	5.000000e-02	5.000000e-02	1.349463e+00	2.516145e-01	2.147812e-01
-5.650000e-01	6.500000e-02	6.500000e-02	1.475304e+00	1.278649e-01	1.278649e-01
-7.150000e-01	8.500000e-02	8.500000e-02	1.342537e+00	1.392515e-01	1.880024e-01
-9.000000e-01	1.000000e-01	1.000000e-01	1.223810e+00	1.785165e-01	2.292412e-01
+1.300000e-01	3.000000e-02	3.000000e-02	1.255000e-01	8.460000e-02	7.960000e-02
+1.800000e-01	2.000000e-02	2.000000e-02	3.754000e-01	2.043000e-01	1.783000e-01
+2.250000e-01	2.500000e-02	2.500000e-02	5.900000e-01	2.775000e-01	2.240000e-01
+2.825000e-01	3.250000e-02	3.250000e-02	8.487000e-01	2.562000e-01	1.973000e-01
+3.575000e-01	4.250000e-02	4.250000e-02	1.095000e+00	2.450000e-01	2.160000e-01
+4.500000e-01	5.000000e-02	5.000000e-02	1.349000e+00	2.520000e-01	2.150000e-01
+5.650000e-01	6.500000e-02	6.500000e-02	1.475000e+00	1.280000e-01	1.280000e-01
+7.150000e-01	8.500000e-02	8.500000e-02	1.343000e+00	1.390000e-01	1.880000e-01
+9.000000e-01	1.000000e-01	1.000000e-01	1.224000e+00	1.790000e-01	2.290000e-01
 END YODA_SCATTER2D_V2
diff --git a/analyses/pluginATLAS/ATLAS_2013_I1234228.yoda b/analyses/pluginATLAS/ATLAS_2013_I1234228.yoda
--- a/analyses/pluginATLAS/ATLAS_2013_I1234228.yoda
+++ b/analyses/pluginATLAS/ATLAS_2013_I1234228.yoda
@@ -1,21 +1,42 @@
+BEGIN YODA_SCATTER2D_V2 /REF/ATLAS_2013_I1234228/d01-x01-y01
+IsRef: 1
+Path: /REF/ATLAS_2013_I1234228/d01-x01-y01
+Title: doi:10.17182/hepdata.61422.v1/t1
+Type: Scatter2D
+---
+# xval	 xerr-	 xerr+	 yval	 yerr-	 yerr+
+1.230000e+02	7.000000e+00	7.000000e+00	2.240000e-01	9.725315e-03	9.725315e-03
+1.400000e+02	1.000000e+01	1.000000e+01	1.020000e-01	4.612611e-03	4.612611e-03
+1.600000e+02	1.000000e+01	1.000000e+01	5.120000e-02	2.568179e-03	2.568179e-03
+1.800000e+02	1.000000e+01	1.000000e+01	2.840000e-02	1.539374e-03	1.539374e-03
+2.000000e+02	1.000000e+01	1.000000e+01	1.870000e-02	1.138859e-03	1.138859e-03
+2.200000e+02	1.000000e+01	1.000000e+01	1.070000e-02	8.047794e-04	8.047794e-04
+2.400000e+02	1.000000e+01	1.000000e+01	8.230000e-03	6.472465e-04	6.472465e-04
+2.750000e+02	2.500000e+01	2.500000e+01	4.660000e-03	3.364572e-04	3.364572e-04
+3.500000e+02	5.000000e+01	5.000000e+01	1.700000e-03	1.325782e-04	1.325782e-04
+4.500000e+02	5.000000e+01	5.000000e+01	4.740000e-04	5.363745e-05	5.363745e-05
+6.000000e+02	1.000000e+02	1.000000e+02	1.460000e-04	1.808810e-05	1.808810e-05
+8.500000e+02	1.500000e+02	1.500000e+02	2.210000e-05	5.556953e-06	5.556953e-06
+1.250000e+03	2.500000e+02	2.500000e+02	2.880000e-06	1.467399e-06	1.467399e-06
+END YODA_SCATTER2D_V2
 BEGIN YODA_SCATTER2D_V2 /REF/ATLAS_2013_I1234228/d01-x01-y02
 IsRef: 1
 Path: /REF/ATLAS_2013_I1234228/d01-x01-y02
-Title: ~
+Title: doi:10.17182/hepdata.61422.v1/t1
 Type: Scatter2D
 ---
 # xval	 xerr-	 xerr+	 yval	 yerr-	 yerr+
 1.230000e+02	7.000000e+00	7.000000e+00	2.150000e-01	9.334566e-03	9.334566e-03
 1.400000e+02	1.000000e+01	1.000000e+01	9.840000e-02	4.449813e-03	4.449813e-03
 1.600000e+02	1.000000e+01	1.000000e+01	4.930000e-02	2.472875e-03	2.472875e-03
 1.800000e+02	1.000000e+01	1.000000e+01	2.760000e-02	1.496012e-03	1.496012e-03
 2.000000e+02	1.000000e+01	1.000000e+01	1.820000e-02	1.108408e-03	1.108408e-03
 2.200000e+02	1.000000e+01	1.000000e+01	1.040000e-02	7.822155e-04	7.822155e-04
 2.400000e+02	1.000000e+01	1.000000e+01	7.980000e-03	6.275853e-04	6.275853e-04
 2.750000e+02	2.500000e+01	2.500000e+01	4.520000e-03	3.263490e-04	3.263490e-04
 3.500000e+02	5.000000e+01	5.000000e+01	1.650000e-03	1.286788e-04	1.286788e-04
 4.500000e+02	5.000000e+01	5.000000e+01	4.580000e-04	5.182690e-05	5.182690e-05
 6.000000e+02	1.000000e+02	1.000000e+02	1.410000e-04	1.746864e-05	1.746864e-05
 8.500000e+02	1.500000e+02	1.500000e+02	2.130000e-05	5.355796e-06	5.355796e-06
 1.250000e+03	2.500000e+02	2.500000e+02	2.760000e-06	1.406257e-06	1.406257e-06
 END YODA_SCATTER2D_V2
diff --git a/analyses/pluginATLAS/ATLAS_2013_I1263495.cc b/analyses/pluginATLAS/ATLAS_2013_I1263495.cc
--- a/analyses/pluginATLAS/ATLAS_2013_I1263495.cc
+++ b/analyses/pluginATLAS/ATLAS_2013_I1263495.cc
@@ -1,133 +1,131 @@
 // -*- C++ -*-
 #include "Rivet/Analysis.hh"
 #include "Rivet/Projections/FinalState.hh"
 #include "Rivet/Projections/LeadingParticlesFinalState.hh"
 #include "Rivet/Projections/FastJets.hh"
 
 namespace Rivet {
 
 
   /// Inclusive isolated prompt photon analysis with 2011 LHC data
   class ATLAS_2013_I1263495 : public Analysis {
   public:
 
     /// Constructor
     ATLAS_2013_I1263495()
       : Analysis("ATLAS_2013_I1263495"),
         _eta_bins{0.00, 1.37, 1.52, 2.37},
         _eta_bins_areaoffset{0.0, 1.5, 3.0}
     {    }
 
 
     /// Book histograms and initialise projections before the run
     void init() {
 
       FinalState fs;
       declare(fs, "FS");
 
       // Consider the final state jets for the energy density calculation
       FastJets fj(fs, FastJets::KT, 0.5);
       fj.useJetArea(new fastjet::AreaDefinition(fastjet::VoronoiAreaSpec()));
       declare(fj, "KtJetsD05");
 
       // Consider the leading pt photon with |eta| < 2.37 and pT > 100 GeV
       LeadingParticlesFinalState photonfs(FinalState(Cuts::abseta < 2.37 && Cuts::pT > 100*GeV));
       photonfs.addParticleId(PID::PHOTON);
       declare(photonfs, "LeadingPhoton");
 
       // Book the dsigma/dEt (in eta bins) histograms
-      for (size_t i = 0; i < _eta_bins.size() - 1; i++) {
-        if (fuzzyEquals(_eta_bins[i], 1.37)) continue; // skip this bin
-        _h_Et_photon[i] = bookHisto1D(1, 1, i+1);
-      }
+      _h_Et_photon[0] = bookHisto1D(1, 1, 1);
+      _h_Et_photon[2] = bookHisto1D(2, 1, 1);
 
       // Book the dsigma/d|eta| histogram
-      _h_eta_photon = bookHisto1D(1,2,1);
+      _h_eta_photon = bookHisto1D(3,1,1);
     }
 
 
     /// Return eta bin for either dsigma/dET histogram (area_eta=false) or energy density correction (area_eta=true)
     size_t _getEtaBin(double eta_w, bool area_eta) const {
       const double eta = fabs(eta_w);
       if (!area_eta) {
         return binIndex(eta, _eta_bins);
       } else {
         return binIndex(eta, _eta_bins_areaoffset);
       }
     }
 
 
     /// Perform the per-event analysis
     void analyze(const Event& event) {
       // Retrieve leading photon
       Particles photons = apply<LeadingParticlesFinalState>(event, "LeadingPhoton").particles();
       if (photons.size() != 1) vetoEvent;
       const Particle& leadingPhoton = photons[0];
 
       // Veto events with photon in ECAL crack
       if (inRange(leadingPhoton.abseta(), 1.37, 1.52)) vetoEvent;
 
       // Compute isolation energy in cone of radius .4 around photon (all particles)
       FourMomentum mom_in_EtCone;
       Particles fs = apply<FinalState>(event, "FS").particles();
       for (const Particle& p : fs) {
         // Check if it's outside the cone of 0.4
         if (deltaR(leadingPhoton, p) >= 0.4) continue;
         // Don't count particles in the 5x7 central core
         if (deltaEta(leadingPhoton, p) < .025*5.0*0.5 &&
             deltaPhi(leadingPhoton, p) < (PI/128.)*7.0*0.5) continue;
         // Increment isolation energy
         mom_in_EtCone += p.momentum();
       }
 
       // Get the area-filtered jet inputs for computing median energy density, etc.
       vector<double> ptDensity;
       vector< vector<double> > ptDensities(_eta_bins_areaoffset.size()-1);
       FastJets fast_jets =apply<FastJets>(event, "KtJetsD05");
       const shared_ptr<fastjet::ClusterSequenceArea> clust_seq_area = fast_jets.clusterSeqArea();
       foreach (const Jet& jet, fast_jets.jets()) {
         const double area = clust_seq_area->area(jet);
         if (area > 1e-4 && jet.abseta() < _eta_bins_areaoffset.back())
           ptDensities.at( _getEtaBin(jet.abseta(), true) ).push_back(jet.pT()/area);
       }
       // Compute the median energy density, etc.
       for (size_t b = 0; b < _eta_bins_areaoffset.size()-1; b++) {
         ptDensity += ptDensities[b].empty() ? 0 : median(ptDensities[b]);
       }
       // Compute the isolation energy correction (cone area*energy density)
       const double etCone_area = PI*sqr(0.4) - (7.0*.025)*(5.0*PI/128.);
       const double correction = ptDensity[_getEtaBin(leadingPhoton.abseta(), true)]*etCone_area;
 
       // Apply isolation cut on area-corrected value
       if (mom_in_EtCone.Et() - correction > 7*GeV) vetoEvent;
 
       // Fill histograms
       const size_t eta_bin = _getEtaBin(leadingPhoton.abseta(), false);
       _h_Et_photon[eta_bin]->fill(leadingPhoton.Et(), event.weight());
       _h_eta_photon->fill(leadingPhoton.abseta(), event.weight());
     }
 
 
     /// Normalise histograms etc., after the run
     void finalize() {
       for (size_t i = 0; i < _eta_bins.size()-1; i++) {
         if (fuzzyEquals(_eta_bins[i], 1.37)) continue;
         scale(_h_Et_photon[i], crossSection()/picobarn/sumOfWeights());
       }
       scale(_h_eta_photon, crossSection()/picobarn/sumOfWeights());
     }
 
 
   private:
 
     Histo1DPtr _h_Et_photon[3];
     Histo1DPtr _h_eta_photon;
 
     vector<double> _eta_bins, _eta_bins_areaoffset;
 
   };
 
 
   DECLARE_RIVET_PLUGIN(ATLAS_2013_I1263495);
 
 }
diff --git a/analyses/pluginATLAS/ATLAS_2013_I1263495.plot b/analyses/pluginATLAS/ATLAS_2013_I1263495.plot
--- a/analyses/pluginATLAS/ATLAS_2013_I1263495.plot
+++ b/analyses/pluginATLAS/ATLAS_2013_I1263495.plot
@@ -1,18 +1,18 @@
 # BEGIN PLOT /ATLAS_2013_I1263495/d01-x01-y01
 Title=Transverse energy of isolated prompt photon, $|\eta^\gamma| < 1.37$
 XLabel=$E_\perp^\gamma$ [GeV]
 YLabel=$\mathrm{d}\sigma/\mathrm{d}E_\perp^\gamma$ [pb/GeV]
 # END PLOT
 
-# BEGIN PLOT /ATLAS_2013_I1263495/d01-x01-y03
+# BEGIN PLOT /ATLAS_2013_I1263495/d02-x01-y01
 Title=Transverse energy of isolated prompt photon, $1.52 \leq |\eta^\gamma| < 2.37$
 XLabel=$E_\perp^\gamma$ [GeV]
 YLabel=$\mathrm{d}\sigma/\mathrm{d}E_\perp^\gamma$ [pb/GeV]
 # END PLOT
 
-# BEGIN PLOT /ATLAS_2013_I1263495/d01-x02-y01
+# BEGIN PLOT /ATLAS_2013_I1263495/d03-x01-y01
 Title=Pseudorapidity of isolated prompt photon, $100 < E_\perp^\gamma < 1000$ GeV
 XLabel=$|\eta^\gamma|$ 
 YLabel=$\mathrm{d}\sigma/\mathrm{d}\eta^\gamma$ [pb]
 LogY=0
 # END PLOT
diff --git a/analyses/pluginATLAS/ATLAS_2013_I1263495.yoda b/analyses/pluginATLAS/ATLAS_2013_I1263495.yoda
--- a/analyses/pluginATLAS/ATLAS_2013_I1263495.yoda
+++ b/analyses/pluginATLAS/ATLAS_2013_I1263495.yoda
@@ -1,60 +1,58 @@
 BEGIN YODA_SCATTER2D_V2 /REF/ATLAS_2013_I1263495/d01-x01-y01
 IsRef: 1
 Path: /REF/ATLAS_2013_I1263495/d01-x01-y01
-Title: ~
+Title: doi:10.17182/hepdata.66783.v1/t1
 Type: Scatter2D
 ---
 # xval	 xerr-	 xerr+	 yval	 yerr-	 yerr+
 1.125000e+02	1.250000e+01	1.250000e+01	5.550000e+00	2.109502e-01	3.006659e-01
 1.375000e+02	1.250000e+01	1.250000e+01	2.060000e+00	8.062258e-02	1.204159e-01
 1.625000e+02	1.250000e+01	1.250000e+01	8.820000e-01	3.275668e-02	4.554119e-02
 1.875000e+02	1.250000e+01	1.250000e+01	4.280000e-01	1.581139e-02	2.745906e-02
 2.250000e+02	2.500000e+01	2.500000e+01	1.710000e-01	6.082763e-03	1.104536e-02
 2.750000e+02	2.500000e+01	2.500000e+01	5.650000e-02	2.500000e-03	3.373426e-03
 3.250000e+02	2.500000e+01	2.500000e+01	2.250000e-02	9.848858e-04	1.456022e-03
 3.750000e+02	2.500000e+01	2.500000e+01	9.430000e-03	4.517743e-04	7.021396e-04
 4.500000e+02	5.000000e+01	5.000000e+01	3.120000e-03	1.612452e-04	2.720294e-04
 5.500000e+02	5.000000e+01	5.000000e+01	8.440000e-04	7.280110e-05	9.305912e-05
 6.500000e+02	5.000000e+01	5.000000e+01	2.500000e-04	3.538361e-05	4.000000e-05
 7.500000e+02	5.000000e+01	5.000000e+01	7.770000e-05	1.881382e-05	1.977397e-05
 9.000000e+02	1.000000e+02	1.000000e+02	2.110000e-05	6.859300e-06	7.150524e-06
 END YODA_SCATTER2D_V2
-
-BEGIN YODA_SCATTER2D_V2 /REF/ATLAS_2013_I1263495/d01-x01-y03
+BEGIN YODA_SCATTER2D_V2 /REF/ATLAS_2013_I1263495/d02-x01-y01
 IsRef: 1
-Path: /REF/ATLAS_2013_I1263495/d01-x01-y03
-Title: ~
+Path: /REF/ATLAS_2013_I1263495/d02-x01-y01
+Title: doi:10.17182/hepdata.66783.v1/t2
 Type: Scatter2D
 ---
 # xval	 xerr-	 xerr+	 yval	 yerr-	 yerr+
 1.125000e+02	1.250000e+01	1.250000e+01	3.030000e+00	1.902630e-01	1.902630e-01
 1.375000e+02	1.250000e+01	1.250000e+01	1.060000e+00	6.082763e-02	9.055385e-02
 1.625000e+02	1.250000e+01	1.250000e+01	4.340000e-01	2.451530e-02	2.745906e-02
 1.875000e+02	1.250000e+01	1.250000e+01	1.900000e-01	1.044031e-02	1.627882e-02
 2.250000e+02	2.500000e+01	2.500000e+01	6.840000e-02	3.785499e-03	5.755867e-03
 2.750000e+02	2.500000e+01	2.500000e+01	1.890000e-02	1.264911e-03	1.649242e-03
 3.250000e+02	2.500000e+01	2.500000e+01	5.520000e-03	4.219005e-04	6.390618e-04
 3.750000e+02	2.500000e+01	2.500000e+01	1.760000e-03	1.886796e-04	2.147091e-04
 4.500000e+02	5.000000e+01	5.000000e+01	3.930000e-04	5.603570e-05	6.624198e-05
 5.500000e+02	5.000000e+01	5.000000e+01	6.830000e-05	2.202294e-05	2.040441e-05
 END YODA_SCATTER2D_V2
-
-BEGIN YODA_SCATTER2D_V2 /REF/ATLAS_2013_I1263495/d01-x02-y01
+BEGIN YODA_SCATTER2D_V2 /REF/ATLAS_2013_I1263495/d03-x01-y01
 IsRef: 1
-Path: /REF/ATLAS_2013_I1263495/d01-x02-y01
-Title: ~
+Path: /REF/ATLAS_2013_I1263495/d03-x01-y01
+Title: doi:10.17182/hepdata.66783.v1/t3
 Type: Scatter2D
 ---
 # xval	 xerr-	 xerr+	 yval	 yerr-	 yerr+
 1.000000e-01	1.000000e-01	1.000000e-01	1.720000e+02	9.055385e+00	8.062258e+00
 3.000000e-01	1.000000e-01	1.000000e-01	1.710000e+02	8.062258e+00	8.062258e+00
 5.000000e-01	1.000000e-01	1.000000e-01	1.750000e+02	7.071068e+00	9.055385e+00
 7.000000e-01	1.000000e-01	1.000000e-01	1.770000e+02	6.082763e+00	1.004988e+01
 9.000000e-01	1.000000e-01	1.000000e-01	1.730000e+02	7.071068e+00	9.055385e+00
 1.100000e+00	1.000000e-01	1.000000e-01	1.750000e+02	6.082763e+00	1.104536e+01
 1.285000e+00	8.500000e-02	8.500000e-02	1.760000e+02	6.082763e+00	1.303840e+01
 1.660000e+00	1.400000e-01	1.400000e-01	1.680000e+02	1.104536e+01	1.204159e+01
 1.900000e+00	1.000000e-01	1.000000e-01	1.460000e+02	8.062258e+00	1.004988e+01
 2.100000e+00	1.000000e-01	1.000000e-01	1.410000e+02	7.071068e+00	9.055385e+00
 2.285000e+00	8.500000e-02	8.500000e-02	1.170000e+02	7.071068e+00	7.071068e+00
 END YODA_SCATTER2D_V2
diff --git a/analyses/pluginATLAS/ATLAS_2014_I1279489.cc b/analyses/pluginATLAS/ATLAS_2014_I1279489.cc
--- a/analyses/pluginATLAS/ATLAS_2014_I1279489.cc
+++ b/analyses/pluginATLAS/ATLAS_2014_I1279489.cc
@@ -1,396 +1,375 @@
 // -*- C++ -*-
 #include "Rivet/Analysis.hh"
 #include "Rivet/Projections/FinalState.hh"
 #include "Rivet/Projections/IdentifiedFinalState.hh"
 #include "Rivet/Projections/VetoedFinalState.hh"
 #include "Rivet/Projections/FastJets.hh"
 #include "Rivet/Projections/DressedLeptons.hh"
 
 namespace Rivet {
 
 
   struct Plots {
     string label;
 
     Histo1DPtr h_dy;
     Histo1DPtr h_mjj;
     Histo1DPtr h_njets;
     Histo1DPtr h_dphijj;
     Histo1DPtr h_ptbal;
 
     Histo1DPtr h_jetveto_mjj_veto;
     Histo1DPtr h_jetveto_mjj_inc;
     Histo1DPtr h_jetveto_dy_veto;
     Histo1DPtr h_jetveto_dy_inc;
 
     Histo1DPtr h_ptbaleff_mjj_veto;
     Histo1DPtr h_ptbaleff_mjj_inc;
     Histo1DPtr h_ptbaleff_dy_veto;
     Histo1DPtr h_ptbaleff_dy_inc;
 
     Profile1DPtr p_avgnjets_dy;
     Profile1DPtr p_avgnjets_mjj;
   };
 
 
   struct Variables {
 
     Variables(const vector<const Jet*>& jets, const Particle* lep1, const Particle* lep2) {
       FourMomentum j1 = jets.at(0)->momentum();
       FourMomentum j2 = jets.at(1)->momentum();
       jet1pt = j1.pT();
       jet2pt = j2.pT();
       assert(jet1pt > jet2pt);
 
       zpt = (lep1->mom() + lep2->mom()).pT();
 
       deltay = fabs(j1.rapidity() - j2.rapidity());
       mjj = (j1 + j2).mass();
       deltaphijj = deltaPhi(j1, j2) / PI;
 
       FourMomentum gapjet(0., 0., 0., 0.);
       ngapjets = _getNumGapJets(jets, gapjet);
 
       double ptbal_vec = (j1 + j2 + lep1->mom() + lep2->mom()).pT();
       double ptbal_sc = j1.pT() + j2.pT() + lep1->pT() + lep2->pT();
       ptbalance2 = ptbal_vec / ptbal_sc;
 
       double ptbal3_vec = (j1 + j2 + gapjet + lep1->mom() + lep2->mom()).pT();
       double ptbal3_sc = j1.pT() + j2.pT() + gapjet.pT() + lep1->pT() + lep2->pT();
       ptbalance3 = ptbal3_vec / ptbal3_sc;
 
       pass_jetveto = gapjet.pT() < 25.0*GeV;
       pass_ptbaleff = ptbalance2 < 0.15;
     }
 
 
     double jet1pt;
     double jet2pt;
     double zpt;
 
     double deltay;
     double mjj;
     double deltaphijj;
     double ptbalance2;
     double ptbalance3;
     int ngapjets;
 
     double dilepton_dr;
 
     bool pass_jetveto;
     bool pass_ptbaleff;
 
 
   private:
 
     bool _isBetween(const Jet* probe, const Jet* boundary1, const Jet* boundary2) {
       double y_p = probe->rapidity();
       double y_b1 = boundary1->rapidity();
       double y_b2 = boundary2->rapidity();
 
       double y_min = std::min(y_b1, y_b2);
       double y_max = std::max(y_b1, y_b2);
 
       if (y_p > y_min && y_p < y_max) return true;
       else return false;
     }
 
     int _getNumGapJets(const vector<const Jet*>& jets, FourMomentum& thirdJet) {
       if (jets.size() < 2) return 0;
       // The vector of jets is already sorted by pT. So the boundary jets will be the first two.
       const Jet* bj1 = jets.at(0);
       const Jet* bj2 = jets.at(1);
 
       int n_between = 0;
       // Start loop at the 3rd hardest pT jet
       for (size_t i = 2; i < jets.size(); ++i) {
         const Jet* j = jets.at(i);
         // If this jet is between the boundary jets and is hard enough, increment counter
         if (_isBetween(j, bj1, bj2)) {
           if (n_between == 0) thirdJet = j->momentum();
           ++n_between;
         }
       }
       return n_between;
     }
 
   };
 
 
 
   class ATLAS_2014_I1279489 : public Analysis {
   public:
 
     /// Constructor
     ATLAS_2014_I1279489()
       : Analysis("ATLAS_2014_I1279489")
     {    }
 
 
     /// Book histograms and initialise projections before the run
     void init() {
 
       FinalState fs(-5.0, 5.0);
 
       IdentifiedFinalState photon_fs(fs);
       photon_fs.acceptIdPair(PID::PHOTON);
 
       IdentifiedFinalState electron_fs(fs);
       electron_fs.acceptIdPair(PID::ELECTRON);
 
       IdentifiedFinalState muon_fs(fs);
       muon_fs.acceptIdPair(PID::MUON);
 
       DressedLeptons dressed_electrons(photon_fs, electron_fs, 0.1, Cuts::abseta < 2.47 && Cuts::pT > 25*GeV);
       declare(dressed_electrons, "DressedElectrons");
 
       DressedLeptons dressed_muons(photon_fs, muon_fs, 0.1, Cuts::abseta < 2.47 && Cuts::pT > 25*GeV);
       declare(dressed_muons, "DressedMuons");
 
       FastJets jets(fs, FastJets::ANTIKT, 0.4);
       declare(jets, "Jets");
 
       initialisePlots(baseline_plots, "baseline");
       initialisePlots(highpt_plots, "highpt");
       initialisePlots(search_plots, "search");
       initialisePlots(control_plots, "control");
       initialisePlots(highmass_plots, "highmass");
     }
 
 
     void initialisePlots(Plots& plots, const string& phase_space){
-      /****************************************
-       * Plot labeling:                       *
-       * format = d0_-x0_-y0_                 *
-       * d01 = baseline fiducial region       *
-       * d02 = high-pt fiducial region        *
-       * d03 = search fiducial region         *
-       * d04 = control fiducial region        *
-       * d05 = high-mass fiducial region      *
-       *                                      *
-       * x01 = mjj on x-axis                  *
-       * x02 = delta-y on x-axis              *
-       * x03 = njets on x-axis                *
-       * x04 = dphijj on x-axis               *
-       * x05 = ptbalance on x-axis            *
-       *                                      *
-       * y01 = differential cross-section     *
-       * y02 = jet veto efficiency            *
-       * y03 = ptbalance efficiency           *
-       * y04 = average njets                  *
-       ****************************************/
       plots.label = phase_space;
 
       if (phase_space=="baseline") {
         plots.h_mjj = bookHisto1D(1, 1, 1);
-        plots.h_dy = bookHisto1D(1, 2, 1);
+        plots.h_dy = bookHisto1D(3, 1, 1);
 
-        plots.h_jetveto_mjj_veto = bookHisto1D("jetveto_mjj_baseline_veto", refData(1,1,2));
-        plots.h_jetveto_mjj_inc = bookHisto1D("jetveto_mjj_baseline_inc", refData(1,1,2));
-        plots.h_jetveto_dy_veto = bookHisto1D("jetveto_dy_baseline_veto", refData(1,2,2));
-        plots.h_jetveto_dy_inc = bookHisto1D("jetveto_dy_baseline_inc", refData(1,2,2));
+        plots.h_jetveto_mjj_veto = bookHisto1D("jetveto_mjj_baseline_veto", refData(8,1,1));
+        plots.h_jetveto_mjj_inc = bookHisto1D("jetveto_mjj_baseline_inc", refData(8,1,1));
+        plots.h_jetveto_dy_veto = bookHisto1D("jetveto_dy_baseline_veto", refData(9,1,1));
+        plots.h_jetveto_dy_inc = bookHisto1D("jetveto_dy_baseline_inc", refData(9,1,1));
 
-        plots.h_ptbaleff_mjj_veto = bookHisto1D("ptbaleff_mjj_baseline_veto", refData(1,1,3));
-        plots.h_ptbaleff_mjj_inc = bookHisto1D("ptbaleff_mjj_baseline_inc", refData(1,1,3));
-        plots.h_ptbaleff_dy_veto = bookHisto1D("ptbaleff_dy_baseline_veto", refData(1,2,3));
-        plots.h_ptbaleff_dy_inc = bookHisto1D("ptbaleff_dy_baseline_inc", refData(1,2,3));
+        plots.h_ptbaleff_mjj_veto = bookHisto1D("ptbaleff_mjj_baseline_veto", refData(12,1,1));
+        plots.h_ptbaleff_mjj_inc = bookHisto1D("ptbaleff_mjj_baseline_inc", refData(12,1,1));
+        plots.h_ptbaleff_dy_veto = bookHisto1D("ptbaleff_dy_baseline_veto", refData(13,1,1));
+        plots.h_ptbaleff_dy_inc = bookHisto1D("ptbaleff_dy_baseline_inc", refData(13,1,1));
 
-        plots.p_avgnjets_mjj = bookProfile1D(1,1,4);
-        plots.p_avgnjets_dy = bookProfile1D(1,2,4);
+        plots.p_avgnjets_mjj = bookProfile1D(10,1,1);
+        plots.p_avgnjets_dy = bookProfile1D(11,1,1);
       }
 
       if (phase_space=="highpt") {
-        plots.h_mjj = bookHisto1D(2, 1, 1);
-        plots.h_dy = bookHisto1D(2, 2, 1);
+        plots.h_mjj = bookHisto1D(14, 1, 1);
+        plots.h_dy = bookHisto1D(16, 1, 1);
 
-        plots.h_jetveto_mjj_veto = bookHisto1D("jetveto_mjj_highpt_veto", refData(2,1,2));
-        plots.h_jetveto_mjj_inc = bookHisto1D("jetveto_mjj_highpt_inc", refData(2,1,2));
-        plots.h_jetveto_dy_veto = bookHisto1D("jetveto_dy_highpt_veto", refData(2,2,2));
-        plots.h_jetveto_dy_inc = bookHisto1D("jetveto_dy_highpt_inc", refData(2,2,2));
+        plots.h_jetveto_mjj_veto = bookHisto1D("jetveto_mjj_highpt_veto", refData(18,1,1));
+        plots.h_jetveto_mjj_inc = bookHisto1D("jetveto_mjj_highpt_inc", refData(18,1,1));
+        plots.h_jetveto_dy_veto = bookHisto1D("jetveto_dy_highpt_veto", refData(19,1,1));
+        plots.h_jetveto_dy_inc = bookHisto1D("jetveto_dy_highpt_inc", refData(19,1,1));
 
-        plots.h_ptbaleff_mjj_veto = bookHisto1D("ptbaleff_mjj_highpt_veto", refData(2,1,3));
-        plots.h_ptbaleff_mjj_inc = bookHisto1D("ptbaleff_mjj_highpt_inc", refData(2,1,3));
-        plots.h_ptbaleff_dy_veto = bookHisto1D("ptbaleff_dy_highpt_veto", refData(2,2,3));
-        plots.h_ptbaleff_dy_inc = bookHisto1D("ptbaleff_dy_highpt_inc", refData(2,2,3));
+        plots.h_ptbaleff_mjj_veto = bookHisto1D("ptbaleff_mjj_highpt_veto", refData(22,1,1));
+        plots.h_ptbaleff_mjj_inc = bookHisto1D("ptbaleff_mjj_highpt_inc", refData(22,1,1));
+        plots.h_ptbaleff_dy_veto = bookHisto1D("ptbaleff_dy_highpt_veto", refData(23,1,1));
+        plots.h_ptbaleff_dy_inc = bookHisto1D("ptbaleff_dy_highpt_inc", refData(23,1,1));
 
-        plots.p_avgnjets_mjj = bookProfile1D(2,1,4);
-        plots.p_avgnjets_dy = bookProfile1D(2,2,4);
+        plots.p_avgnjets_mjj = bookProfile1D(20,1,1);
+        plots.p_avgnjets_dy = bookProfile1D(21,1,1);
       }
 
       if (phase_space=="search") {
-        plots.h_mjj = bookHisto1D(3,1,1);
-        plots.h_dy = bookHisto1D(3,2,1);
+        plots.h_mjj = bookHisto1D(2,1,1);
+        plots.h_dy = bookHisto1D(4,1,1);
       }
 
       if (phase_space=="control") {
-        plots.h_mjj = bookHisto1D(4,1,1);
-        plots.h_dy = bookHisto1D(4,2,1);
+        plots.h_mjj = bookHisto1D(15,1,1);
+        plots.h_dy = bookHisto1D(17,1,1);
       }
 
       if (phase_space=="highmass") {
-        plots.h_njets = bookHisto1D(5, 3, 1);
-        plots.h_dphijj = bookHisto1D(5, 4, 1);
-        plots.h_ptbal = bookHisto1D(5, 5, 1);
+        plots.h_njets = bookHisto1D(5, 1, 1);
+        plots.h_dphijj = bookHisto1D(7, 1, 1);
+        plots.h_ptbal = bookHisto1D(6, 1, 1);
       }
     }
 
 
 
     /// Perform the per-event analysis
     void analyze(const Event& event) {
 
       // Make sure that we have a Z-candidate:
       const Particle *lep1 = NULL, *lep2 = NULL;
       //
       const vector<DressedLepton>& muons = apply<DressedLeptons>(event, "DressedMuons").dressedLeptons();
       if (muons.size() == 2) {
         const FourMomentum dimuon = muons[0].mom() + muons[1].mom();
         if ( inRange(dimuon.mass()/GeV, 81.0, 101.0) && muons[0].threeCharge() != muons[1].threeCharge() ) {
           lep1 = &muons[0];
           lep2 = &muons[1];
         }
       }
       //
       const vector<DressedLepton>& electrons = apply<DressedLeptons>(event, "DressedElectrons").dressedLeptons();
       if (electrons.size() == 2) {
         const FourMomentum dielectron = electrons[0].mom() + electrons[1].mom();
         if ( inRange(dielectron.mass()/GeV, 81.0, 101.0) && electrons[0].threeCharge() != electrons[1].threeCharge() ) {
           if (lep1 && lep2) {
             MSG_INFO("Found Z candidates using both electrons and muons! Continuing with the muon-channel candidate");
           } else {
             lep1 = &electrons[0];
             lep2 = &electrons[1];
           }
         }
       }
       // If there's no Z-candidate, we won't use this event:
       if (!lep1 || !lep2) vetoEvent;
 
 
       // Do lepton-jet overlap removal:
       vector<const Jet*> good_jets;
       const Jets& jets = apply<FastJets>(event, "Jets").jetsByPt(Cuts::pT > 25*GeV && Cuts::absrap < 4.4);
       foreach(const Jet& j, jets) {
         bool nearby_lepton = false;
         foreach (const Particle& m, muons)
           if (deltaR(j, m) < 0.3) nearby_lepton = true;
         foreach (const Particle& e, electrons)
           if (deltaR(j, e) < 0.3) nearby_lepton = true;
         if (!nearby_lepton)
           good_jets.push_back(&j);
       }
       // If we don't have at least 2 good jets, we won't use this event.
       if (good_jets.size() < 2) vetoEvent;
 
 
       // Plotting, using variables and histo classes calculated by the Variables object constructor
       Variables vars(good_jets, lep1, lep2);
       bool pass_baseline = (vars.jet1pt > 55.0*GeV && vars.jet2pt > 45.0*GeV);
       bool pass_highpt = (vars.jet1pt > 85.0*GeV && vars.jet2pt > 75.0*GeV);
       bool pass_highmass = (pass_baseline && vars.mjj > 1000.0*GeV);
       bool pass_search = (pass_baseline && vars.zpt > 20.0*GeV && vars.ngapjets == 0 && vars.ptbalance2 < 0.15 && vars.mjj > 250.0*GeV);
       bool pass_control = (pass_baseline && vars.zpt > 20.0*GeV && vars.ngapjets > 0 && vars.ptbalance3 < 0.15 && vars.mjj > 250.0*GeV);
       //
       const double weight = event.weight();
       if (pass_baseline) fillPlots(vars, baseline_plots, "baseline", weight);
       if (pass_highpt) fillPlots(vars, highpt_plots, "highpt", weight);
       if (pass_highmass) fillPlots(vars, highmass_plots, "highmass", weight);
       if (pass_search) fillPlots(vars, search_plots, "search", weight);
       if (pass_control) fillPlots(vars, control_plots, "control", weight);
     }
 
 
     void fillPlots(const Variables& vars, Plots& plots, string phase_space, double weight) {
       if (phase_space == "baseline" || phase_space == "highpt" || phase_space == "search" || phase_space == "control") {
         plots.h_dy->fill(vars.deltay, weight);
         plots.h_mjj->fill(vars.mjj, weight);
       }
 
       if (phase_space == "baseline" || phase_space == "highpt") {
         if (vars.pass_jetveto) {
           plots.h_jetveto_dy_veto->fill(vars.deltay, weight);
           plots.h_jetveto_mjj_veto->fill(vars.mjj, weight);
         }
         plots.h_jetveto_dy_inc->fill(vars.deltay, weight);
         plots.h_jetveto_mjj_inc->fill(vars.mjj, weight);
 
         if (vars.pass_ptbaleff) {
           plots.h_ptbaleff_mjj_veto->fill(vars.mjj, weight);
           plots.h_ptbaleff_dy_veto->fill(vars.deltay, weight);
         }
         plots.h_ptbaleff_mjj_inc->fill(vars.mjj, weight);
         plots.h_ptbaleff_dy_inc->fill(vars.deltay, weight);
 
         plots.p_avgnjets_dy->fill(vars.deltay, vars.ngapjets, weight);
         plots.p_avgnjets_mjj->fill(vars.mjj, vars.ngapjets, weight);
       }
 
       if (phase_space == "highmass") {
         plots.h_njets->fill(vars.ngapjets, weight);
         plots.h_dphijj->fill(vars.deltaphijj, weight);
         plots.h_ptbal->fill(vars.ptbalance2, weight);
       }
     }
 
 
     /// Normalise histograms etc., after the run
     void finalize() {
       finalizePlots(baseline_plots);
       finalizePlots(highpt_plots);
       finalizePlots(search_plots);
       finalizePlots(control_plots);
       finalizePlots(highmass_plots);
       finalizeEfficiencies(baseline_plots);
       finalizeEfficiencies(highpt_plots);
     }
 
     void finalizePlots(Plots& plots) {
       if (plots.h_dy) normalize(plots.h_dy);
       if (plots.h_mjj) normalize(plots.h_mjj);
       if (plots.h_dphijj) normalize(plots.h_dphijj);
       if (plots.h_njets) normalize(plots.h_njets);
       if (plots.h_ptbal) normalize(plots.h_ptbal);
     }
 
     void finalizeEfficiencies(Plots& plots) {
-      int region_index = 0;
-      if (plots.label=="baseline") region_index = 1;
-      else if (plots.label=="highpt") region_index = 2;
-      else return;
 
-      if (plots.h_jetveto_mjj_veto && plots.h_jetveto_mjj_inc) divide(plots.h_jetveto_mjj_veto, plots.h_jetveto_mjj_inc, bookScatter2D(region_index, 1, 2));
-      getScatter2D(region_index, 1, 2)->addAnnotation("InclusiveSumWeights", plots.h_jetveto_mjj_inc->integral());
+      if (plots.label != "baseline" && plots.label != "highpt")  return;
+      size_t offset = plots.label == "baseline"? 0 : 10;
+
+      if (plots.h_jetveto_mjj_veto && plots.h_jetveto_mjj_inc) divide(plots.h_jetveto_mjj_veto, plots.h_jetveto_mjj_inc, bookScatter2D(8 + offset, 1, 2));
+      getScatter2D(8 + offset, 1, 2)->addAnnotation("InclusiveSumWeights", plots.h_jetveto_mjj_inc->integral());
       removeAnalysisObject(plots.h_jetveto_mjj_veto); removeAnalysisObject(plots.h_jetveto_mjj_inc);
 
-      if (plots.h_jetveto_dy_veto && plots.h_jetveto_dy_inc) divide(plots.h_jetveto_dy_veto, plots.h_jetveto_dy_inc, bookScatter2D(region_index, 2, 2));
-      getScatter2D(region_index, 2, 2)->addAnnotation("InclusiveSumWeights", plots.h_jetveto_dy_inc->integral());
+      if (plots.h_jetveto_dy_veto && plots.h_jetveto_dy_inc) divide(plots.h_jetveto_dy_veto, plots.h_jetveto_dy_inc, bookScatter2D(9 + offset, 2, 2));
+      getScatter2D(9 + offset, 2, 2)->addAnnotation("InclusiveSumWeights", plots.h_jetveto_dy_inc->integral());
       removeAnalysisObject(plots.h_jetveto_dy_veto); removeAnalysisObject(plots.h_jetveto_dy_inc);
 
-      if (plots.h_ptbaleff_mjj_veto && plots.h_ptbaleff_mjj_inc) divide(plots.h_ptbaleff_mjj_veto, plots.h_ptbaleff_mjj_inc, bookScatter2D(region_index, 1, 3));
-      getScatter2D(region_index, 1, 3)->addAnnotation("InclusiveSumWeights", plots.h_ptbaleff_mjj_inc->integral());
+      if (plots.h_ptbaleff_mjj_veto && plots.h_ptbaleff_mjj_inc) divide(plots.h_ptbaleff_mjj_veto, plots.h_ptbaleff_mjj_inc, bookScatter2D(12 + offset, 1, 3));
+      getScatter2D(12 + offset, 1, 3)->addAnnotation("InclusiveSumWeights", plots.h_ptbaleff_mjj_inc->integral());
       removeAnalysisObject(plots.h_ptbaleff_mjj_veto); removeAnalysisObject(plots.h_ptbaleff_mjj_inc);
 
-      if (plots.h_ptbaleff_dy_veto && plots.h_ptbaleff_dy_inc) divide(plots.h_ptbaleff_dy_veto, plots.h_ptbaleff_dy_inc, bookScatter2D(region_index, 2, 3));
-      getScatter2D(region_index, 2, 3)->addAnnotation("InclusiveSumWeights", plots.h_ptbaleff_dy_inc->integral());
+      if (plots.h_ptbaleff_dy_veto && plots.h_ptbaleff_dy_inc) divide(plots.h_ptbaleff_dy_veto, plots.h_ptbaleff_dy_inc, bookScatter2D(13 + offset, 2, 3));
+      getScatter2D(13 + offset, 2, 3)->addAnnotation("InclusiveSumWeights", plots.h_ptbaleff_dy_inc->integral());
       removeAnalysisObject(plots.h_ptbaleff_dy_veto); removeAnalysisObject(plots.h_ptbaleff_dy_inc);
     }
 
     //@}
 
 
   private:
 
     //Variables* vars;
 
     Plots baseline_plots;
     Plots highpt_plots;
     Plots search_plots;
     Plots control_plots;
     Plots highmass_plots;
 
   };
 
 
   DECLARE_RIVET_PLUGIN(ATLAS_2014_I1279489);
 
 }
diff --git a/analyses/pluginATLAS/ATLAS_2014_I1279489.plot b/analyses/pluginATLAS/ATLAS_2014_I1279489.plot
--- a/analyses/pluginATLAS/ATLAS_2014_I1279489.plot
+++ b/analyses/pluginATLAS/ATLAS_2014_I1279489.plot
@@ -1,166 +1,162 @@
-# # BEGIN PLOT /ATLAS_2014_I1279489/d0.*-x0.*-y0.*
-# RatioPlotMode=default
-# # END PLOT
-
 ## MJJ BASELINE
 # BEGIN PLOT /ATLAS_2014_I1279489/d01-x01-y01
 Title=m$_{\text{jj}}$ in the baseline region
 XLabel=m$_{\text{jj}}$ [GeV]
 YLabel=$\frac{1}{\sigma} \frac{d\sigma}{dm_{\text{jj}}}$
 # END PLOT
 
-# BEGIN PLOT /ATLAS_2014_I1279489/d01-x01-y02
+# BEGIN PLOT /ATLAS_2014_I1279489/d08-x01-y01
 Title=Jet veto efficiency vs. m$_{\text{jj}}$ in the baseline region
 XLabel=m$_{\text{jj}}$ [GeV]
 YLabel=Jet veto efficiency
 LogY=0
 # END PLOT
 
-# BEGIN PLOT /ATLAS_2014_I1279489/d01-x01-y03
+# BEGIN PLOT /ATLAS_2014_I1279489/d12-x01-y01
 Title=$p_{\text{T}}^{\text{balance}}$ cut efficiency vs. m$_{\text{jj}}$ in the baseline region
 XLabel=m$_{\text{jj}}$ [GeV]
 YLabel=$p_{\text{T}}^{\text{balance}}$
 LogY=0
 # END PLOT
 
-# BEGIN PLOT /ATLAS_2014_I1279489/d01-x01-y04
+# BEGIN PLOT /ATLAS_2014_I1279489/d10-x01-y01
 Title=$<N_{\text{jet}}^{\text{gap}}>$ vs. m$_{\text{jj}}$ in the baseline region
 XLabel=m$_{\text{jj}}$ [GeV]
 YLabel=$<N_{\text{jet}}^{\text{gap}}>$
 LogY=0
 # END PLOT
 
 ## DY BASELINE
-# BEGIN PLOT /ATLAS_2014_I1279489/d01-x02-y01
+# BEGIN PLOT /ATLAS_2014_I1279489/d03-x01-y01
 Title=$|\Delta y|$ in the baseline region
 XLabel=$|\Delta y|$
 YLabel=$\frac{1}{\sigma} \frac{d\sigma}{d|\Delta y|}$
 # END PLOT
 
-# BEGIN PLOT /ATLAS_2014_I1279489/d01-x02-y02
+# BEGIN PLOT /ATLAS_2014_I1279489/d09-x01-y01
 Title=Jet veto efficiency vs. $|\Delta y|$ in the baseline region
 XLabel=$|\Delta y|$
 YLabel=Jet veto efficiency
 LogY=0
 # END PLOT
 
-# BEGIN PLOT /ATLAS_2014_I1279489/d01-x02-y03
+# BEGIN PLOT /ATLAS_2014_I1279489/d13-x01-y01
 Title=$p_{\text{T}}^{\text{balance}}$ cut efficiency vs. $|\Delta y|$ in the baseline region
 XLabel=$|\Delta y|$
 YLabel=$p_{\text{T}}^{\text{balance}}$
 LogY=0
 # END PLOT
 
-# BEGIN PLOT /ATLAS_2014_I1279489/d01-x02-y04
+# BEGIN PLOT /ATLAS_2014_I1279489/d11-x01-y01
 Title=$<N_{\text{jet}}^{\text{gap}}>$ vs. $|\Delta y|$ in the baseline region
 XLabel=$|\Delta y|$
 YLabel=$<N_{\text{jet}}^{\text{gap}}>$
 LogY=0
 # END PLOT
 
 
 
 ## MJJ HIGH-PT
-# BEGIN PLOT /ATLAS_2014_I1279489/d02-x01-y01
+# BEGIN PLOT /ATLAS_2014_I1279489/d14-x01-y01
 Title=m$_{\text{jj}}$ in the high-$p_{\text{T}}$ region
 XLabel=m$_{\text{jj}}$ [GeV]
 YLabel=$\frac{1}{\sigma} \frac{d\sigma}{dm_{\text{jj}}}$
 # END PLOT
 
-# BEGIN PLOT /ATLAS_2014_I1279489/d02-x01-y02
+# BEGIN PLOT /ATLAS_2014_I1279489/d18-x01-y01
 Title=Jet veto efficiency vs. m$_{\text{jj}}$ in the high-$p_{\text{T}}$ region
 XLabel=m$_{\text{jj}}$ [GeV]
 YLabel=Jet veto efficiency
 LogY=0
 # END PLOT
 
-# BEGIN PLOT /ATLAS_2014_I1279489/d02-x01-y03
+# BEGIN PLOT /ATLAS_2014_I1279489/d22-x01-y01
 Title=$p_{\text{T}}^{\text{balance}}$ cut efficiency vs. m$_{\text{jj}}$ in the high-$p_{\text{T}}$ region
 XLabel=m$_{\text{jj}}$ [GeV]
 YLabel=$p_{\text{T}}^{\text{balance}}$
 LogY=0
 # END PLOT
 
-# BEGIN PLOT /ATLAS_2014_I1279489/d02-x01-y04
+# BEGIN PLOT /ATLAS_2014_I1279489/d20-x01-y01
 Title=$<N_{\text{jet}}^{\text{gap}}>$ vs. m$_{\text{jj}}$ in the high-$p_{\text{T}}$ region
 XLabel=m$_{\text{jj}}$ [GeV]
 YLabel=$<N_{\text{jet}}^{\text{gap}}>$
 LogY=0
 # END PLOT
 
 ## DY HIGH-PT
-# BEGIN PLOT /ATLAS_2014_I1279489/d02-x02-y01
+# BEGIN PLOT /ATLAS_2014_I1279489/d16-x01-y01
 Title=$|\Delta y|$ in the high-$p_{\text{T}}$ region
 XLabel=$|\Delta y|$
 YLabel=$\frac{1}{\sigma} \frac{d\sigma}{d|\Delta y|}$
 # END PLOT
 
-# BEGIN PLOT /ATLAS_2014_I1279489/d02-x02-y02
+# BEGIN PLOT /ATLAS_2014_I1279489/d19-x01-y01
 Title=Jet veto efficiency vs. $|\Delta y|$ in the high-$p_{\text{T}}$ region
 XLabel=$|\Delta y|$
 YLabel=Jet veto efficiency
 LogY=0
 # END PLOT
 
-# BEGIN PLOT /ATLAS_2014_I1279489/d02-x02-y03
+# BEGIN PLOT /ATLAS_2014_I1279489/d23-x01-y01
 Title=$p_{\text{T}}^{\text{balance}}$ cut efficiency vs. $|\Delta y|$ in the high-$p_{\text{T}}$ region
 XLabel=$|\Delta y|$
 YLabel=$p_{\text{T}}^{\text{balance}}$
 LogY=0
 # END PLOT
 
-# BEGIN PLOT /ATLAS_2014_I1279489/d02-x02-y04
+# BEGIN PLOT /ATLAS_2014_I1279489/d21-x01-y01
 Title=$<N_{\text{jet}}^{\text{gap}}>$ vs. $|\Delta y|$ in the high-$p_{\text{T}}$ region
 XLabel=$|\Delta y|$
 YLabel=$<N_{\text{jet}}^{\text{gap}}>$
 LogY=0
 # END PLOT
 
 
 ## MJJ SEARCH
-# BEGIN PLOT /ATLAS_2014_I1279489/d03-x01-y01
+# BEGIN PLOT /ATLAS_2014_I1279489/d02-x01-y01
 Title=m$_{\text{jj}}$ in the search region
 XLabel=m$_{\text{jj}}$ [GeV]
 YLabel=$\frac{1}{\sigma} \frac{d\sigma}{dm_{\text{jj}}}$
 # END PLOT
 
 ## DY SEARCH
-# BEGIN PLOT /ATLAS_2014_I1279489/d03-x02-y01
+# BEGIN PLOT /ATLAS_2014_I1279489/d04-x01-y01
 Title=$|\Delta y|$ in the search region
 XLabel=$|\Delta y|$
 YLabel=$\frac{1}{\sigma} \frac{d\sigma}{d|\Delta y|}$
 # END PLOT
 
 
 ## MJJ CONTROL
-# BEGIN PLOT /ATLAS_2014_I1279489/d04-x01-y01
+# BEGIN PLOT /ATLAS_2014_I1279489/d15-x01-y01
 Title=m$_{\text{jj}}$ in the control region
 XLabel=m$_{\text{jj}}$ [GeV]
 YLabel=$\frac{1}{\sigma} \frac{d\sigma}{dm_{\text{jj}}}$
 # END PLOT
 
 ## DY CONTROL
-# BEGIN PLOT /ATLAS_2014_I1279489/d04-x02-y01
+# BEGIN PLOT /ATLAS_2014_I1279489/d17-x01-y01
 Title=$|\Delta y|$ in the control region
 XLabel=$|\Delta y|$
 YLabel=$\frac{1}{\sigma} \frac{d\sigma}{d|\Delta y|}$
 # END PLOT
 
 ## HIGH MASS PLOTS
-# BEGIN PLOT /ATLAS_2014_I1279489/d05-x03-y01
+# BEGIN PLOT /ATLAS_2014_I1279489/d05-x01-y01
 Title=$N_{\text{jet}}^{\text{gap}}$ in the high-mass region
 XLabel=$N_{\text{jet}}^{\text{gap}}$
 YLabel=$\frac{1}{\sigma} \frac{d\sigma}{dN_{\text{jet}}^{\text{gap}}}$
 # END PLOT
 
-# BEGIN PLOT /ATLAS_2014_I1279489/d05-x04-y01
+# BEGIN PLOT /ATLAS_2014_I1279489/d07-x01-y01
 Title=$|\Delta\phi(\text{j,j})|/\pi$ in the high-mass region
 XLabel=$|\Delta\phi(\text{j,j})|/\pi$
 YLabel=$\frac{1}{\sigma} \frac{d\sigma}{d|\Delta\phi(\text{j,j})|}$
 # END PLOT
 
-# BEGIN PLOT /ATLAS_2014_I1279489/d05-x05-y01
+# BEGIN PLOT /ATLAS_2014_I1279489/d06-x01-y01
 Title=$p_{\text{T}}^{\text{balance}}$ in the high-mass region
 XLabel=$p_{\text{T}}^{\text{balance}}$
 YLabel=$\frac{1}{\sigma} \frac{d\sigma}{dp_{\text{T}}^{\text{balance}}}$
 # END PLOT
diff --git a/analyses/pluginATLAS/ATLAS_2014_I1279489.yoda b/analyses/pluginATLAS/ATLAS_2014_I1279489.yoda
--- a/analyses/pluginATLAS/ATLAS_2014_I1279489.yoda
+++ b/analyses/pluginATLAS/ATLAS_2014_I1279489.yoda
@@ -1,397 +1,375 @@
 BEGIN YODA_SCATTER2D_V2 /REF/ATLAS_2014_I1279489/d01-x01-y01
 IsRef: 1
 Path: /REF/ATLAS_2014_I1279489/d01-x01-y01
-Title: ~
+Title: doi:10.17182/hepdata.62729.v1/t1
 Type: Scatter2D
 ---
 # xval	 xerr-	 xerr+	 yval	 yerr-	 yerr+
 1.250000e+02	1.250000e+02	1.250000e+02	2.560000e-03	2.498152e-05	2.830886e-05
 3.750000e+02	1.250000e+02	1.250000e+02	1.096000e-03	1.324750e-05	1.171041e-05
 6.250000e+02	1.250000e+02	1.250000e+02	2.327000e-04	9.635276e-06	7.688999e-06
 8.750000e+02	1.250000e+02	1.250000e+02	6.861000e-05	4.711607e-06	4.273224e-06
 1.125000e+03	1.250000e+02	1.250000e+02	2.460000e-05	2.343445e-06	2.351042e-06
 1.375000e+03	1.250000e+02	1.250000e+02	9.870000e-06	1.266964e-06	1.317609e-06
 1.875000e+03	3.750000e+02	3.750000e+02	2.555000e-06	4.559688e-07	4.935066e-07
 2.625000e+03	3.750000e+02	3.750000e+02	2.634000e-07	1.029361e-07	8.574880e-08
 END YODA_SCATTER2D_V2
-
-BEGIN YODA_SCATTER2D_V2 /REF/ATLAS_2014_I1279489/d01-x01-y02
+BEGIN YODA_SCATTER2D_V2 /REF/ATLAS_2014_I1279489/d02-x01-y01
 IsRef: 1
-Path: /REF/ATLAS_2014_I1279489/d01-x01-y02
-Title: ~
+Path: /REF/ATLAS_2014_I1279489/d02-x01-y01
+Title: doi:10.17182/hepdata.62729.v1/t2
 Type: Scatter2D
 ---
 # xval	 xerr-	 xerr+	 yval	 yerr-	 yerr+
-1.250000e+02	1.250000e+02	1.250000e+02	8.887000e-01	8.538907e-03	8.350020e-03
-3.750000e+02	1.250000e+02	1.250000e+02	7.442000e-01	1.267124e-02	1.590813e-02
-6.250000e+02	1.250000e+02	1.250000e+02	6.187000e-01	1.852448e-02	2.516504e-02
-8.750000e+02	1.250000e+02	1.250000e+02	5.595000e-01	2.282946e-02	2.348240e-02
-1.125000e+03	1.250000e+02	1.250000e+02	5.382000e-01	2.857885e-02	2.551807e-02
-1.375000e+03	1.250000e+02	1.250000e+02	5.142000e-01	3.531618e-02	3.091876e-02
-1.875000e+03	3.750000e+02	3.750000e+02	5.815000e-01	4.919239e-02	3.713651e-02
-2.625000e+03	3.750000e+02	3.750000e+02	4.454000e-01	1.276315e-01	9.245391e-02
+3.750000e+02	1.250000e+02	1.250000e+02	3.114000e-03	2.205710e-05	2.295290e-05
+6.250000e+02	1.250000e+02	1.250000e+02	6.040000e-04	1.308926e-05	1.485253e-05
+8.750000e+02	1.250000e+02	1.250000e+02	1.721000e-04	7.265831e-06	7.062367e-06
+1.125000e+03	1.250000e+02	1.250000e+02	6.046000e-05	4.314217e-06	3.953660e-06
+1.375000e+03	1.250000e+02	1.250000e+02	2.464000e-05	2.534558e-06	2.302717e-06
+1.875000e+03	3.750000e+02	3.750000e+02	7.150000e-06	8.826894e-07	7.178346e-07
+2.625000e+03	3.750000e+02	3.750000e+02	1.072000e-06	3.347014e-07	3.014277e-07
 END YODA_SCATTER2D_V2
-
-BEGIN YODA_SCATTER2D_V2 /REF/ATLAS_2014_I1279489/d01-x01-y03
+BEGIN YODA_SCATTER2D_V2 /REF/ATLAS_2014_I1279489/d03-x01-y01
 IsRef: 1
-Path: /REF/ATLAS_2014_I1279489/d01-x01-y03
-Title: ~
-Type: Scatter2D
----
-# xval	 xerr-	 xerr+	 yval	 yerr-	 yerr+
-1.250000e+02	1.250000e+02	1.250000e+02	6.798000e-01	5.539272e-03	4.736569e-03
-3.750000e+02	1.250000e+02	1.250000e+02	6.822000e-01	7.800988e-03	8.562113e-03
-6.250000e+02	1.250000e+02	1.250000e+02	6.789000e-01	1.172059e-02	1.565558e-02
-8.750000e+02	1.250000e+02	1.250000e+02	6.832000e-01	1.738104e-02	1.597235e-02
-1.125000e+03	1.250000e+02	1.250000e+02	6.845000e-01	2.306125e-02	2.016270e-02
-1.375000e+03	1.250000e+02	1.250000e+02	7.140000e-01	2.871221e-02	2.690575e-02
-1.875000e+03	3.750000e+02	3.750000e+02	7.108000e-01	3.092013e-02	3.680562e-02
-2.625000e+03	3.750000e+02	3.750000e+02	8.026000e-01	6.762045e-02	8.119752e-02
-END YODA_SCATTER2D_V2
-
-BEGIN YODA_SCATTER2D_V2 /REF/ATLAS_2014_I1279489/d01-x01-y04
-IsRef: 1
-Path: /REF/ATLAS_2014_I1279489/d01-x01-y04
-Title: ~
-Type: Scatter2D
----
-# xval	 xerr-	 xerr+	 yval	 yerr-	 yerr+
-1.250000e+02	1.250000e+02	1.250000e+02	1.235000e-01	1.003666e-02	9.357801e-03
-3.750000e+02	1.250000e+02	1.250000e+02	3.112000e-01	2.367740e-02	1.878412e-02
-6.250000e+02	1.250000e+02	1.250000e+02	5.039000e-01	4.076016e-02	3.430479e-02
-8.750000e+02	1.250000e+02	1.250000e+02	6.213000e-01	4.611241e-02	4.213285e-02
-1.125000e+03	1.250000e+02	1.250000e+02	6.873000e-01	5.290827e-02	5.009652e-02
-1.375000e+03	1.250000e+02	1.250000e+02	7.328000e-01	6.472860e-02	6.279638e-02
-1.875000e+03	3.750000e+02	3.750000e+02	6.602000e-01	7.459531e-02	8.383477e-02
-2.625000e+03	3.750000e+02	3.750000e+02	8.392000e-01	2.154658e-01	2.975928e-01
-END YODA_SCATTER2D_V2
-
-BEGIN YODA_SCATTER2D_V2 /REF/ATLAS_2014_I1279489/d01-x02-y01
-IsRef: 1
-Path: /REF/ATLAS_2014_I1279489/d01-x02-y01
-Title: ~
+Path: /REF/ATLAS_2014_I1279489/d03-x01-y01
+Title: doi:10.17182/hepdata.62729.v1/t3
 Type: Scatter2D
 ---
 # xval	 xerr-	 xerr+	 yval	 yerr-	 yerr+
 2.500000e-01	2.500000e-01	2.500000e-01	4.214000e-01	5.947978e-03	6.075078e-03
 7.500000e-01	2.500000e-01	2.500000e-01	3.984000e-01	5.890584e-03	5.833084e-03
 1.250000e+00	2.500000e-01	2.500000e-01	3.404000e-01	4.695915e-03	4.740970e-03
 1.750000e+00	2.500000e-01	2.500000e-01	2.769000e-01	2.648272e-03	2.793802e-03
 2.250000e+00	2.500000e-01	2.500000e-01	2.112000e-01	1.852101e-03	1.840198e-03
 2.750000e+00	2.500000e-01	2.500000e-01	1.467000e-01	2.909705e-03	2.950412e-03
 3.500000e+00	5.000000e-01	5.000000e-01	7.513000e-02	3.433315e-03	3.579889e-03
 4.500000e+00	5.000000e-01	5.000000e-01	2.194000e-02	2.090522e-03	2.246587e-03
 5.500000e+00	5.000000e-01	5.000000e-01	4.854000e-03	8.011151e-04	8.946763e-04
 6.500000e+00	5.000000e-01	5.000000e-01	5.647000e-04	1.800778e-04	1.898551e-04
 END YODA_SCATTER2D_V2
-
-BEGIN YODA_SCATTER2D_V2 /REF/ATLAS_2014_I1279489/d01-x02-y02
+BEGIN YODA_SCATTER2D_V2 /REF/ATLAS_2014_I1279489/d04-x01-y01
 IsRef: 1
-Path: /REF/ATLAS_2014_I1279489/d01-x02-y02
-Title: ~
+Path: /REF/ATLAS_2014_I1279489/d04-x01-y01
+Title: doi:10.17182/hepdata.62729.v1/t4
+Type: Scatter2D
+---
+# xval	 xerr-	 xerr+	 yval	 yerr-	 yerr+
+2.500000e-01	2.500000e-01	2.500000e-01	1.869000e-01	7.429399e-03	5.911746e-03
+7.500000e-01	2.500000e-01	2.500000e-01	1.976000e-01	6.860293e-03	7.268746e-03
+1.250000e+00	2.500000e-01	2.500000e-01	2.243000e-01	7.814854e-03	5.668071e-03
+1.750000e+00	2.500000e-01	2.500000e-01	2.642000e-01	6.057568e-03	6.817987e-03
+2.250000e+00	2.500000e-01	2.500000e-01	3.176000e-01	5.479185e-03	6.210338e-03
+2.750000e+00	2.500000e-01	2.500000e-01	3.133000e-01	7.529901e-03	7.023590e-03
+3.500000e+00	5.000000e-01	5.000000e-01	1.849000e-01	4.803709e-03	5.801467e-03
+4.500000e+00	5.000000e-01	5.000000e-01	5.007000e-02	3.522894e-03	3.463404e-03
+5.500000e+00	5.000000e-01	5.000000e-01	1.150000e-02	1.652245e-03	1.404060e-03
+6.500000e+00	5.000000e-01	5.000000e-01	1.595000e-03	4.263185e-04	3.596836e-04
+END YODA_SCATTER2D_V2
+BEGIN YODA_SCATTER2D_V2 /REF/ATLAS_2014_I1279489/d05-x01-y01
+IsRef: 1
+Path: /REF/ATLAS_2014_I1279489/d05-x01-y01
+Title: doi:10.17182/hepdata.62729.v1/t5
+Type: Scatter2D
+---
+# xval	 xerr-	 xerr+	 yval	 yerr-	 yerr+
+5.000000e-01	5.000000e-01	5.000000e-01	5.380000e-01	3.598096e-02	3.342625e-02
+1.500000e+00	5.000000e-01	5.000000e-01	2.928000e-01	1.913900e-02	1.456378e-02
+2.500000e+00	5.000000e-01	5.000000e-01	1.247000e-01	1.436847e-02	1.248994e-02
+4.000000e+00	1.000000e+00	1.000000e+00	2.071000e-02	4.227172e-03	3.855113e-03
+6.500000e+00	1.500000e+00	1.500000e+00	1.017000e-03	4.656540e-04	4.557920e-04
+END YODA_SCATTER2D_V2
+BEGIN YODA_SCATTER2D_V2 /REF/ATLAS_2014_I1279489/d06-x01-y01
+IsRef: 1
+Path: /REF/ATLAS_2014_I1279489/d06-x01-y01
+Title: doi:10.17182/hepdata.62729.v1/t6
+Type: Scatter2D
+---
+# xval	 xerr-	 xerr+	 yval	 yerr-	 yerr+
+5.000000e-02	5.000000e-02	5.000000e-02	4.592000e+00	1.838269e-01	1.362589e-01
+2.000000e-01	1.000000e-01	1.000000e-01	1.626000e+00	9.802592e-02	1.416956e-01
+4.000000e-01	1.000000e-01	1.000000e-01	2.789000e-01	4.250024e-02	4.965097e-02
+7.500000e-01	2.500000e-01	2.500000e-01	2.315000e-02	1.647323e-02	1.661436e-02
+END YODA_SCATTER2D_V2
+BEGIN YODA_SCATTER2D_V2 /REF/ATLAS_2014_I1279489/d07-x01-y01
+IsRef: 1
+Path: /REF/ATLAS_2014_I1279489/d07-x01-y01
+Title: doi:10.17182/hepdata.62729.v1/t7
+Type: Scatter2D
+---
+# xval	 xerr-	 xerr+	 yval	 yerr-	 yerr+
+1.000000e-01	1.000000e-01	1.000000e-01	1.983000e-01	2.967306e-02	4.067216e-02
+3.000000e-01	1.000000e-01	1.000000e-01	2.410000e-01	2.806468e-02	3.772399e-02
+4.500000e-01	5.000000e-02	5.000000e-02	3.259000e-01	4.435377e-02	5.381814e-02
+5.500000e-01	5.000000e-02	5.000000e-02	5.121000e-01	5.735954e-02	6.896803e-02
+6.500000e-01	5.000000e-02	5.000000e-02	8.061000e-01	7.577473e-02	9.612296e-02
+7.500000e-01	5.000000e-02	5.000000e-02	1.143000e+00	8.447402e-02	1.022736e-01
+8.500000e-01	5.000000e-02	5.000000e-02	2.039000e+00	1.025232e-01	9.978726e-02
+9.500000e-01	5.000000e-02	5.000000e-02	4.295000e+00	3.582871e-01	2.131070e-01
+END YODA_SCATTER2D_V2
+BEGIN YODA_SCATTER2D_V2 /REF/ATLAS_2014_I1279489/d08-x01-y01
+IsRef: 1
+Path: /REF/ATLAS_2014_I1279489/d08-x01-y01
+Title: doi:10.17182/hepdata.62729.v1/t8
+Type: Scatter2D
+---
+# xval	 xerr-	 xerr+	 yval	 yerr-	 yerr+
+1.250000e+02	1.250000e+02	1.250000e+02	8.887000e-01	8.538907e-03	8.350020e-03
+3.750000e+02	1.250000e+02	1.250000e+02	7.442000e-01	1.267124e-02	1.590813e-02
+6.250000e+02	1.250000e+02	1.250000e+02	6.187000e-01	1.852448e-02	2.516504e-02
+8.750000e+02	1.250000e+02	1.250000e+02	5.595000e-01	2.282946e-02	2.348240e-02
+1.125000e+03	1.250000e+02	1.250000e+02	5.382000e-01	2.857885e-02	2.551807e-02
+1.375000e+03	1.250000e+02	1.250000e+02	5.142000e-01	3.531618e-02	3.091876e-02
+1.875000e+03	3.750000e+02	3.750000e+02	5.815000e-01	4.919239e-02	3.713651e-02
+2.625000e+03	3.750000e+02	3.750000e+02	4.454000e-01	1.276315e-01	9.245391e-02
+END YODA_SCATTER2D_V2
+BEGIN YODA_SCATTER2D_V2 /REF/ATLAS_2014_I1279489/d09-x01-y01
+IsRef: 1
+Path: /REF/ATLAS_2014_I1279489/d09-x01-y01
+Title: doi:10.17182/hepdata.62729.v1/t9
 Type: Scatter2D
 ---
 # xval	 xerr-	 xerr+	 yval	 yerr-	 yerr+
 2.500000e-01	2.500000e-01	2.500000e-01	9.658000e-01	2.258761e-03	3.186660e-03
 7.500000e-01	2.500000e-01	2.500000e-01	8.922000e-01	7.945083e-03	7.629711e-03
 1.250000e+00	2.500000e-01	2.500000e-01	8.335000e-01	1.108579e-02	1.097805e-02
 1.750000e+00	2.500000e-01	2.500000e-01	7.798000e-01	1.238178e-02	1.352570e-02
 2.250000e+00	2.500000e-01	2.500000e-01	7.391000e-01	1.283521e-02	1.606552e-02
 2.750000e+00	2.500000e-01	2.500000e-01	6.909000e-01	1.284508e-02	1.815860e-02
 3.500000e+00	5.000000e-01	5.000000e-01	6.440000e-01	1.345347e-02	2.093129e-02
 4.500000e+00	5.000000e-01	5.000000e-01	5.667000e-01	1.704948e-02	2.536435e-02
 5.500000e+00	5.000000e-01	5.000000e-01	5.500000e-01	2.764992e-02	3.244397e-02
 6.500000e+00	5.000000e-01	5.000000e-01	6.753000e-01	6.828859e-02	6.486486e-02
 END YODA_SCATTER2D_V2
-
-BEGIN YODA_SCATTER2D_V2 /REF/ATLAS_2014_I1279489/d01-x02-y03
+BEGIN YODA_SCATTER2D_V2 /REF/ATLAS_2014_I1279489/d10-x01-y01
 IsRef: 1
-Path: /REF/ATLAS_2014_I1279489/d01-x02-y03
-Title: ~
+Path: /REF/ATLAS_2014_I1279489/d10-x01-y01
+Title: doi:10.17182/hepdata.62729.v1/t10
+Type: Scatter2D
+---
+# xval	 xerr-	 xerr+	 yval	 yerr-	 yerr+
+1.250000e+02	1.250000e+02	1.250000e+02	1.235000e-01	1.003666e-02	9.357801e-03
+3.750000e+02	1.250000e+02	1.250000e+02	3.112000e-01	2.367740e-02	1.878412e-02
+6.250000e+02	1.250000e+02	1.250000e+02	5.039000e-01	4.076016e-02	3.430479e-02
+8.750000e+02	1.250000e+02	1.250000e+02	6.213000e-01	4.611241e-02	4.213285e-02
+1.125000e+03	1.250000e+02	1.250000e+02	6.873000e-01	5.290827e-02	5.009652e-02
+1.375000e+03	1.250000e+02	1.250000e+02	7.328000e-01	6.472860e-02	6.279638e-02
+1.875000e+03	3.750000e+02	3.750000e+02	6.602000e-01	7.459531e-02	8.383477e-02
+2.625000e+03	3.750000e+02	3.750000e+02	8.392000e-01	2.154658e-01	2.975928e-01
+END YODA_SCATTER2D_V2
+BEGIN YODA_SCATTER2D_V2 /REF/ATLAS_2014_I1279489/d11-x01-y01
+IsRef: 1
+Path: /REF/ATLAS_2014_I1279489/d11-x01-y01
+Title: doi:10.17182/hepdata.62729.v1/t11
+Type: Scatter2D
+---
+# xval	 xerr-	 xerr+	 yval	 yerr-	 yerr+
+2.500000e-01	2.500000e-01	2.500000e-01	3.615000e-02	3.352611e-03	2.548399e-03
+7.500000e-01	2.500000e-01	2.500000e-01	1.155000e-01	8.961072e-03	9.193894e-03
+1.250000e+00	2.500000e-01	2.500000e-01	1.897000e-01	1.401437e-02	1.547991e-02
+1.750000e+00	2.500000e-01	2.500000e-01	2.608000e-01	1.877429e-02	1.896084e-02
+2.250000e+00	2.500000e-01	2.500000e-01	3.202000e-01	2.366545e-02	1.980449e-02
+2.750000e+00	2.500000e-01	2.500000e-01	3.888000e-01	2.987956e-02	2.160586e-02
+3.500000e+00	5.000000e-01	5.000000e-01	4.601000e-01	3.647780e-02	2.461920e-02
+4.500000e+00	5.000000e-01	5.000000e-01	5.933000e-01	4.852127e-02	3.886572e-02
+5.500000e+00	5.000000e-01	5.000000e-01	6.199000e-01	6.502130e-02	5.721027e-02
+6.500000e+00	5.000000e-01	5.000000e-01	5.449000e-01	1.198905e-01	1.252649e-01
+END YODA_SCATTER2D_V2
+BEGIN YODA_SCATTER2D_V2 /REF/ATLAS_2014_I1279489/d12-x01-y01
+IsRef: 1
+Path: /REF/ATLAS_2014_I1279489/d12-x01-y01
+Title: doi:10.17182/hepdata.62729.v1/t12
+Type: Scatter2D
+---
+# xval	 xerr-	 xerr+	 yval	 yerr-	 yerr+
+1.250000e+02	1.250000e+02	1.250000e+02	6.798000e-01	5.539272e-03	4.736569e-03
+3.750000e+02	1.250000e+02	1.250000e+02	6.822000e-01	7.800988e-03	8.562113e-03
+6.250000e+02	1.250000e+02	1.250000e+02	6.789000e-01	1.172059e-02	1.565558e-02
+8.750000e+02	1.250000e+02	1.250000e+02	6.832000e-01	1.738104e-02	1.597235e-02
+1.125000e+03	1.250000e+02	1.250000e+02	6.845000e-01	2.306125e-02	2.016270e-02
+1.375000e+03	1.250000e+02	1.250000e+02	7.140000e-01	2.871221e-02	2.690575e-02
+1.875000e+03	3.750000e+02	3.750000e+02	7.108000e-01	3.092013e-02	3.680562e-02
+2.625000e+03	3.750000e+02	3.750000e+02	8.026000e-01	6.762045e-02	8.119752e-02
+END YODA_SCATTER2D_V2
+BEGIN YODA_SCATTER2D_V2 /REF/ATLAS_2014_I1279489/d13-x01-y01
+IsRef: 1
+Path: /REF/ATLAS_2014_I1279489/d13-x01-y01
+Title: doi:10.17182/hepdata.62729.v1/t13
 Type: Scatter2D
 ---
 # xval	 xerr-	 xerr+	 yval	 yerr-	 yerr+
 2.500000e-01	2.500000e-01	2.500000e-01	6.905000e-01	5.021447e-03	4.826039e-03
 7.500000e-01	2.500000e-01	2.500000e-01	6.846000e-01	4.498744e-03	5.008048e-03
 1.250000e+00	2.500000e-01	2.500000e-01	6.879000e-01	5.386589e-03	5.457864e-03
 1.750000e+00	2.500000e-01	2.500000e-01	6.915000e-01	6.705394e-03	6.222773e-03
 2.250000e+00	2.500000e-01	2.500000e-01	6.780000e-01	8.579212e-03	7.761404e-03
 2.750000e+00	2.500000e-01	2.500000e-01	6.621000e-01	1.024243e-02	9.305551e-03
 3.500000e+00	5.000000e-01	5.000000e-01	6.471000e-01	1.132520e-02	1.121392e-02
 4.500000e+00	5.000000e-01	5.000000e-01	6.090000e-01	1.499571e-02	1.614052e-02
 5.500000e+00	5.000000e-01	5.000000e-01	6.101000e-01	3.303124e-02	2.975323e-02
 6.500000e+00	5.000000e-01	5.000000e-01	5.904000e-01	6.435959e-02	6.685285e-02
 END YODA_SCATTER2D_V2
-
-BEGIN YODA_SCATTER2D_V2 /REF/ATLAS_2014_I1279489/d01-x02-y04
+BEGIN YODA_SCATTER2D_V2 /REF/ATLAS_2014_I1279489/d14-x01-y01
 IsRef: 1
-Path: /REF/ATLAS_2014_I1279489/d01-x02-y04
-Title: ~
-Type: Scatter2D
----
-# xval	 xerr-	 xerr+	 yval	 yerr-	 yerr+
-2.500000e-01	2.500000e-01	2.500000e-01	3.615000e-02	3.352611e-03	2.548399e-03
-7.500000e-01	2.500000e-01	2.500000e-01	1.155000e-01	8.961072e-03	9.193894e-03
-1.250000e+00	2.500000e-01	2.500000e-01	1.897000e-01	1.401437e-02	1.547991e-02
-1.750000e+00	2.500000e-01	2.500000e-01	2.608000e-01	1.877429e-02	1.896084e-02
-2.250000e+00	2.500000e-01	2.500000e-01	3.202000e-01	2.366545e-02	1.980449e-02
-2.750000e+00	2.500000e-01	2.500000e-01	3.888000e-01	2.987956e-02	2.160586e-02
-3.500000e+00	5.000000e-01	5.000000e-01	4.601000e-01	3.647780e-02	2.461920e-02
-4.500000e+00	5.000000e-01	5.000000e-01	5.933000e-01	4.852127e-02	3.886572e-02
-5.500000e+00	5.000000e-01	5.000000e-01	6.199000e-01	6.502130e-02	5.721027e-02
-6.500000e+00	5.000000e-01	5.000000e-01	5.449000e-01	1.198905e-01	1.252649e-01
-END YODA_SCATTER2D_V2
-
-BEGIN YODA_SCATTER2D_V2 /REF/ATLAS_2014_I1279489/d02-x01-y01
-IsRef: 1
-Path: /REF/ATLAS_2014_I1279489/d02-x01-y01
-Title: ~
+Path: /REF/ATLAS_2014_I1279489/d14-x01-y01
+Title: doi:10.17182/hepdata.62729.v1/t14
 Type: Scatter2D
 ---
 # xval	 xerr-	 xerr+	 yval	 yerr-	 yerr+
 1.250000e+02	1.250000e+02	1.250000e+02	1.391000e-03	2.314173e-05	3.022268e-05
 3.750000e+02	1.250000e+02	1.250000e+02	1.883000e-03	1.470480e-05	2.035220e-05
 6.250000e+02	1.250000e+02	1.250000e+02	4.780000e-04	1.281046e-05	8.740889e-06
 8.750000e+02	1.250000e+02	1.250000e+02	1.505000e-04	8.069769e-06	5.420112e-06
 1.125000e+03	1.250000e+02	1.250000e+02	5.499000e-05	4.824348e-06	3.389001e-06
 1.375000e+03	1.250000e+02	1.250000e+02	2.296000e-05	3.344464e-06	2.178016e-06
 1.875000e+03	3.750000e+02	3.750000e+02	6.147000e-06	9.180073e-07	8.797146e-07
 2.625000e+03	3.750000e+02	3.750000e+02	5.663000e-07	1.656878e-07	1.665280e-07
 END YODA_SCATTER2D_V2
-
-BEGIN YODA_SCATTER2D_V2 /REF/ATLAS_2014_I1279489/d02-x01-y02
+BEGIN YODA_SCATTER2D_V2 /REF/ATLAS_2014_I1279489/d15-x01-y01
 IsRef: 1
-Path: /REF/ATLAS_2014_I1279489/d02-x01-y02
-Title: ~
+Path: /REF/ATLAS_2014_I1279489/d15-x01-y01
+Title: doi:10.17182/hepdata.62729.v1/t15
 Type: Scatter2D
 ---
 # xval	 xerr-	 xerr+	 yval	 yerr-	 yerr+
-1.250000e+02	1.250000e+02	1.250000e+02	8.888000e-01	7.370063e-03	7.690566e-03
-3.750000e+02	1.250000e+02	1.250000e+02	7.651000e-01	1.320066e-02	1.440416e-02
-6.250000e+02	1.250000e+02	1.250000e+02	6.345000e-01	1.977932e-02	1.964623e-02
-8.750000e+02	1.250000e+02	1.250000e+02	5.644000e-01	2.160711e-02	2.366118e-02
-1.125000e+03	1.250000e+02	1.250000e+02	5.361000e-01	2.988515e-02	3.037218e-02
-1.375000e+03	1.250000e+02	1.250000e+02	5.210000e-01	4.161593e-02	4.267933e-02
-1.875000e+03	3.750000e+02	3.750000e+02	5.475000e-01	5.814126e-02	4.919773e-02
-2.625000e+03	3.750000e+02	3.750000e+02	3.375000e-01	1.062449e-01	1.046698e-01
+3.750000e+02	1.250000e+02	1.250000e+02	2.628000e-03	3.743178e-05	4.702788e-05
+6.250000e+02	1.250000e+02	1.250000e+02	8.523000e-04	2.636905e-05	1.728765e-05
+8.750000e+02	1.250000e+02	1.250000e+02	3.094000e-04	1.543101e-05	1.319555e-05
+1.125000e+03	1.250000e+02	1.250000e+02	1.179000e-04	8.610318e-06	9.452623e-06
+1.375000e+03	1.250000e+02	1.250000e+02	5.413000e-05	5.623770e-06	7.405563e-06
+1.875000e+03	3.750000e+02	3.750000e+02	1.157000e-05	1.792969e-06	2.102441e-06
+2.625000e+03	3.750000e+02	3.750000e+02	1.134000e-06	4.268335e-07	4.253285e-07
 END YODA_SCATTER2D_V2
-
-BEGIN YODA_SCATTER2D_V2 /REF/ATLAS_2014_I1279489/d02-x01-y03
+BEGIN YODA_SCATTER2D_V2 /REF/ATLAS_2014_I1279489/d16-x01-y01
 IsRef: 1
-Path: /REF/ATLAS_2014_I1279489/d02-x01-y03
-Title: ~
-Type: Scatter2D
----
-# xval	 xerr-	 xerr+	 yval	 yerr-	 yerr+
-1.250000e+02	1.250000e+02	1.250000e+02	6.781000e-01	6.084042e-03	8.112963e-03
-3.750000e+02	1.250000e+02	1.250000e+02	6.998000e-01	7.360891e-03	7.552619e-03
-6.250000e+02	1.250000e+02	1.250000e+02	7.054000e-01	8.678350e-03	9.270770e-03
-8.750000e+02	1.250000e+02	1.250000e+02	7.011000e-01	1.334144e-02	1.457368e-02
-1.125000e+03	1.250000e+02	1.250000e+02	6.997000e-01	1.883759e-02	2.065878e-02
-1.375000e+03	1.250000e+02	1.250000e+02	7.371000e-01	2.791855e-02	2.924149e-02
-1.875000e+03	3.750000e+02	3.750000e+02	7.361000e-01	4.164218e-02	3.974701e-02
-2.625000e+03	3.750000e+02	3.750000e+02	7.082000e-01	1.105269e-01	1.097044e-01
-END YODA_SCATTER2D_V2
-
-BEGIN YODA_SCATTER2D_V2 /REF/ATLAS_2014_I1279489/d02-x01-y04
-IsRef: 1
-Path: /REF/ATLAS_2014_I1279489/d02-x01-y04
-Title: ~
-Type: Scatter2D
----
-# xval	 xerr-	 xerr+	 yval	 yerr-	 yerr+
-1.250000e+02	1.250000e+02	1.250000e+02	1.260000e-01	9.951274e-03	1.106812e-02
-3.750000e+02	1.250000e+02	1.250000e+02	2.863000e-01	2.148920e-02	2.035780e-02
-6.250000e+02	1.250000e+02	1.250000e+02	4.908000e-01	3.577600e-02	3.664099e-02
-8.750000e+02	1.250000e+02	1.250000e+02	6.247000e-01	4.442955e-02	4.377382e-02
-1.125000e+03	1.250000e+02	1.250000e+02	7.112000e-01	5.728380e-02	5.976408e-02
-1.375000e+03	1.250000e+02	1.250000e+02	7.465000e-01	7.691484e-02	8.808622e-02
-1.875000e+03	3.750000e+02	3.750000e+02	7.195000e-01	1.000438e-01	1.289894e-01
-2.625000e+03	3.750000e+02	3.750000e+02	1.047000e+00	2.738760e-01	2.584592e-01
-END YODA_SCATTER2D_V2
-
-BEGIN YODA_SCATTER2D_V2 /REF/ATLAS_2014_I1279489/d02-x02-y01
-IsRef: 1
-Path: /REF/ATLAS_2014_I1279489/d02-x02-y01
-Title: ~
+Path: /REF/ATLAS_2014_I1279489/d16-x01-y01
+Title: doi:10.17182/hepdata.62729.v1/t16
 Type: Scatter2D
 ---
 # xval	 xerr-	 xerr+	 yval	 yerr-	 yerr+
 2.500000e-01	2.500000e-01	2.500000e-01	4.419000e-01	5.799262e-03	5.687815e-03
 7.500000e-01	2.500000e-01	2.500000e-01	4.122000e-01	5.330716e-03	6.099974e-03
 1.250000e+00	2.500000e-01	2.500000e-01	3.610000e-01	4.421201e-03	5.338816e-03
 1.750000e+00	2.500000e-01	2.500000e-01	2.847000e-01	3.307069e-03	3.655056e-03
 2.250000e+00	2.500000e-01	2.500000e-01	2.087000e-01	3.003496e-03	3.033268e-03
 2.750000e+00	2.500000e-01	2.500000e-01	1.348000e-01	3.567930e-03	3.162317e-03
 3.500000e+00	5.000000e-01	5.000000e-01	6.000000e-02	3.304939e-03	2.571125e-03
 4.500000e+00	5.000000e-01	5.000000e-01	1.531000e-02	1.767093e-03	1.339681e-03
 5.500000e+00	5.000000e-01	5.000000e-01	3.005000e-03	6.057672e-04	4.759772e-04
 END YODA_SCATTER2D_V2
-
-BEGIN YODA_SCATTER2D_V2 /REF/ATLAS_2014_I1279489/d02-x02-y02
+BEGIN YODA_SCATTER2D_V2 /REF/ATLAS_2014_I1279489/d17-x01-y01
 IsRef: 1
-Path: /REF/ATLAS_2014_I1279489/d02-x02-y02
-Title: ~
-Type: Scatter2D
----
-# xval	 xerr-	 xerr+	 yval	 yerr-	 yerr+
-2.500000e-01	2.500000e-01	2.500000e-01	9.526000e-01	4.581424e-03	4.564225e-03
-7.500000e-01	2.500000e-01	2.500000e-01	8.553000e-01	1.102175e-02	1.011425e-02
-1.250000e+00	2.500000e-01	2.500000e-01	7.648000e-01	1.469842e-02	1.332464e-02
-1.750000e+00	2.500000e-01	2.500000e-01	7.147000e-01	1.690683e-02	1.642657e-02
-2.250000e+00	2.500000e-01	2.500000e-01	6.587000e-01	1.751501e-02	1.869318e-02
-2.750000e+00	2.500000e-01	2.500000e-01	5.989000e-01	1.756607e-02	2.094095e-02
-3.500000e+00	5.000000e-01	5.000000e-01	5.527000e-01	1.741419e-02	2.245520e-02
-4.500000e+00	5.000000e-01	5.000000e-01	5.339000e-01	2.500345e-02	2.908750e-02
-5.500000e+00	5.000000e-01	5.000000e-01	6.093000e-01	5.422277e-02	6.282112e-02
-END YODA_SCATTER2D_V2
-
-BEGIN YODA_SCATTER2D_V2 /REF/ATLAS_2014_I1279489/d02-x02-y03
-IsRef: 1
-Path: /REF/ATLAS_2014_I1279489/d02-x02-y03
-Title: ~
-Type: Scatter2D
----
-# xval	 xerr-	 xerr+	 yval	 yerr-	 yerr+
-2.500000e-01	2.500000e-01	2.500000e-01	7.056000e-01	9.322245e-03	1.024302e-02
-7.500000e-01	2.500000e-01	2.500000e-01	7.008000e-01	6.437850e-03	8.250223e-03
-1.250000e+00	2.500000e-01	2.500000e-01	6.966000e-01	6.124805e-03	7.325207e-03
-1.750000e+00	2.500000e-01	2.500000e-01	6.980000e-01	7.120200e-03	7.244653e-03
-2.250000e+00	2.500000e-01	2.500000e-01	6.768000e-01	8.967306e-03	8.781166e-03
-2.750000e+00	2.500000e-01	2.500000e-01	6.752000e-01	1.098731e-02	1.102155e-02
-3.500000e+00	5.000000e-01	5.000000e-01	6.685000e-01	1.219738e-02	1.196511e-02
-4.500000e+00	5.000000e-01	5.000000e-01	6.169000e-01	2.004493e-02	2.325936e-02
-5.500000e+00	5.000000e-01	5.000000e-01	6.655000e-01	4.809022e-02	6.382077e-02
-END YODA_SCATTER2D_V2
-
-BEGIN YODA_SCATTER2D_V2 /REF/ATLAS_2014_I1279489/d02-x02-y04
-IsRef: 1
-Path: /REF/ATLAS_2014_I1279489/d02-x02-y04
-Title: ~
-Type: Scatter2D
----
-# xval	 xerr-	 xerr+	 yval	 yerr-	 yerr+
-2.500000e-01	2.500000e-01	2.500000e-01	5.090000e-02	5.605502e-03	4.780375e-03
-7.500000e-01	2.500000e-01	2.500000e-01	1.608000e-01	1.281325e-02	1.260483e-02
-1.250000e+00	2.500000e-01	2.500000e-01	2.806000e-01	1.944999e-02	2.116823e-02
-1.750000e+00	2.500000e-01	2.500000e-01	3.537000e-01	2.468384e-02	2.605113e-02
-2.250000e+00	2.500000e-01	2.500000e-01	4.437000e-01	3.157887e-02	3.125703e-02
-2.750000e+00	2.500000e-01	2.500000e-01	5.382000e-01	3.901098e-02	3.622619e-02
-3.500000e+00	5.000000e-01	5.000000e-01	6.420000e-01	4.376016e-02	4.045669e-02
-4.500000e+00	5.000000e-01	5.000000e-01	7.148000e-01	5.724313e-02	6.193961e-02
-5.500000e+00	5.000000e-01	5.000000e-01	5.932000e-01	1.107918e-01	1.154051e-01
-END YODA_SCATTER2D_V2
-
-BEGIN YODA_SCATTER2D_V2 /REF/ATLAS_2014_I1279489/d03-x01-y01
-IsRef: 1
-Path: /REF/ATLAS_2014_I1279489/d03-x01-y01
-Title: ~
-Type: Scatter2D
----
-# xval	 xerr-	 xerr+	 yval	 yerr-	 yerr+
-3.750000e+02	1.250000e+02	1.250000e+02	3.114000e-03	2.205710e-05	2.295290e-05
-6.250000e+02	1.250000e+02	1.250000e+02	6.040000e-04	1.308926e-05	1.485253e-05
-8.750000e+02	1.250000e+02	1.250000e+02	1.721000e-04	7.265831e-06	7.062367e-06
-1.125000e+03	1.250000e+02	1.250000e+02	6.046000e-05	4.314217e-06	3.953660e-06
-1.375000e+03	1.250000e+02	1.250000e+02	2.464000e-05	2.534558e-06	2.302717e-06
-1.875000e+03	3.750000e+02	3.750000e+02	7.150000e-06	8.826894e-07	7.178346e-07
-2.625000e+03	3.750000e+02	3.750000e+02	1.072000e-06	3.347014e-07	3.014277e-07
-END YODA_SCATTER2D_V2
-
-BEGIN YODA_SCATTER2D_V2 /REF/ATLAS_2014_I1279489/d03-x02-y01
-IsRef: 1
-Path: /REF/ATLAS_2014_I1279489/d03-x02-y01
-Title: ~
-Type: Scatter2D
----
-# xval	 xerr-	 xerr+	 yval	 yerr-	 yerr+
-2.500000e-01	2.500000e-01	2.500000e-01	1.869000e-01	7.429399e-03	5.911746e-03
-7.500000e-01	2.500000e-01	2.500000e-01	1.976000e-01	6.860293e-03	7.268746e-03
-1.250000e+00	2.500000e-01	2.500000e-01	2.243000e-01	7.814854e-03	5.668071e-03
-1.750000e+00	2.500000e-01	2.500000e-01	2.642000e-01	6.057568e-03	6.817987e-03
-2.250000e+00	2.500000e-01	2.500000e-01	3.176000e-01	5.479185e-03	6.210338e-03
-2.750000e+00	2.500000e-01	2.500000e-01	3.133000e-01	7.529901e-03	7.023590e-03
-3.500000e+00	5.000000e-01	5.000000e-01	1.849000e-01	4.803709e-03	5.801467e-03
-4.500000e+00	5.000000e-01	5.000000e-01	5.007000e-02	3.522894e-03	3.463404e-03
-5.500000e+00	5.000000e-01	5.000000e-01	1.150000e-02	1.652245e-03	1.404060e-03
-6.500000e+00	5.000000e-01	5.000000e-01	1.595000e-03	4.263185e-04	3.596836e-04
-END YODA_SCATTER2D_V2
-
-BEGIN YODA_SCATTER2D_V2 /REF/ATLAS_2014_I1279489/d04-x01-y01
-IsRef: 1
-Path: /REF/ATLAS_2014_I1279489/d04-x01-y01
-Title: ~
-Type: Scatter2D
----
-# xval	 xerr-	 xerr+	 yval	 yerr-	 yerr+
-3.750000e+02	1.250000e+02	1.250000e+02	2.628000e-03	3.743178e-05	4.702788e-05
-6.250000e+02	1.250000e+02	1.250000e+02	8.523000e-04	2.636905e-05	1.728765e-05
-8.750000e+02	1.250000e+02	1.250000e+02	3.094000e-04	1.543101e-05	1.319555e-05
-1.125000e+03	1.250000e+02	1.250000e+02	1.179000e-04	8.610318e-06	9.452623e-06
-1.375000e+03	1.250000e+02	1.250000e+02	5.413000e-05	5.623770e-06	7.405563e-06
-1.875000e+03	3.750000e+02	3.750000e+02	1.157000e-05	1.792969e-06	2.102441e-06
-2.625000e+03	3.750000e+02	3.750000e+02	1.134000e-06	4.268335e-07	4.253285e-07
-END YODA_SCATTER2D_V2
-
-BEGIN YODA_SCATTER2D_V2 /REF/ATLAS_2014_I1279489/d04-x02-y01
-IsRef: 1
-Path: /REF/ATLAS_2014_I1279489/d04-x02-y01
-Title: ~
+Path: /REF/ATLAS_2014_I1279489/d17-x01-y01
+Title: doi:10.17182/hepdata.62729.v1/t17
 Type: Scatter2D
 ---
 # xval	 xerr-	 xerr+	 yval	 yerr-	 yerr+
 2.500000e-01	2.500000e-01	2.500000e-01	3.155000e-02	2.684549e-03	2.536409e-03
 7.500000e-01	2.500000e-01	2.500000e-01	1.025000e-01	5.521914e-03	7.202364e-03
 1.250000e+00	2.500000e-01	2.500000e-01	1.909000e-01	8.214556e-03	9.813037e-03
 1.750000e+00	2.500000e-01	2.500000e-01	2.780000e-01	1.110459e-02	1.249825e-02
 2.250000e+00	2.500000e-01	2.500000e-01	3.266000e-01	9.325931e-03	9.145135e-03
 2.750000e+00	2.500000e-01	2.500000e-01	3.626000e-01	9.949208e-03	9.253909e-03
 3.500000e+00	5.000000e-01	5.000000e-01	2.437000e-01	6.859092e-03	6.218492e-03
 4.500000e+00	5.000000e-01	5.000000e-01	8.786000e-02	5.955376e-03	5.470576e-03
 5.500000e+00	5.000000e-01	5.000000e-01	2.097000e-02	2.792881e-03	2.640553e-03
 6.500000e+00	5.000000e-01	5.000000e-01	1.349000e-03	4.625916e-04	4.383164e-04
 END YODA_SCATTER2D_V2
-
-BEGIN YODA_SCATTER2D_V2 /REF/ATLAS_2014_I1279489/d05-x03-y01
+BEGIN YODA_SCATTER2D_V2 /REF/ATLAS_2014_I1279489/d18-x01-y01
 IsRef: 1
-Path: /REF/ATLAS_2014_I1279489/d05-x03-y01
-Title: ~
+Path: /REF/ATLAS_2014_I1279489/d18-x01-y01
+Title: doi:10.17182/hepdata.62729.v1/t18
 Type: Scatter2D
 ---
 # xval	 xerr-	 xerr+	 yval	 yerr-	 yerr+
-5.000000e-01	5.000000e-01	5.000000e-01	5.380000e-01	3.598096e-02	3.342625e-02
-1.500000e+00	5.000000e-01	5.000000e-01	2.928000e-01	1.913900e-02	1.456378e-02
-2.500000e+00	5.000000e-01	5.000000e-01	1.247000e-01	1.436847e-02	1.248994e-02
-4.000000e+00	1.000000e+00	1.000000e+00	2.071000e-02	4.227172e-03	3.855113e-03
-6.500000e+00	1.500000e+00	1.500000e+00	1.017000e-03	4.656540e-04	4.557920e-04
+1.250000e+02	1.250000e+02	1.250000e+02	8.888000e-01	7.370063e-03	7.690566e-03
+3.750000e+02	1.250000e+02	1.250000e+02	7.651000e-01	1.320066e-02	1.440416e-02
+6.250000e+02	1.250000e+02	1.250000e+02	6.345000e-01	1.977932e-02	1.964623e-02
+8.750000e+02	1.250000e+02	1.250000e+02	5.644000e-01	2.160711e-02	2.366118e-02
+1.125000e+03	1.250000e+02	1.250000e+02	5.361000e-01	2.988515e-02	3.037218e-02
+1.375000e+03	1.250000e+02	1.250000e+02	5.210000e-01	4.161593e-02	4.267933e-02
+1.875000e+03	3.750000e+02	3.750000e+02	5.475000e-01	5.814126e-02	4.919773e-02
+2.625000e+03	3.750000e+02	3.750000e+02	3.375000e-01	1.062449e-01	1.046698e-01
 END YODA_SCATTER2D_V2
-
-BEGIN YODA_SCATTER2D_V2 /REF/ATLAS_2014_I1279489/d05-x04-y01
+BEGIN YODA_SCATTER2D_V2 /REF/ATLAS_2014_I1279489/d19-x01-y01
 IsRef: 1
-Path: /REF/ATLAS_2014_I1279489/d05-x04-y01
-Title: ~
+Path: /REF/ATLAS_2014_I1279489/d19-x01-y01
+Title: doi:10.17182/hepdata.62729.v1/t19
 Type: Scatter2D
 ---
 # xval	 xerr-	 xerr+	 yval	 yerr-	 yerr+
-1.000000e-01	1.000000e-01	1.000000e-01	1.983000e-01	2.967306e-02	4.067216e-02
-3.000000e-01	1.000000e-01	1.000000e-01	2.410000e-01	2.806468e-02	3.772399e-02
-4.500000e-01	5.000000e-02	5.000000e-02	3.259000e-01	4.435377e-02	5.381814e-02
-5.500000e-01	5.000000e-02	5.000000e-02	5.121000e-01	5.735954e-02	6.896803e-02
-6.500000e-01	5.000000e-02	5.000000e-02	8.061000e-01	7.577473e-02	9.612296e-02
-7.500000e-01	5.000000e-02	5.000000e-02	1.143000e+00	8.447402e-02	1.022736e-01
-8.500000e-01	5.000000e-02	5.000000e-02	2.039000e+00	1.025232e-01	9.978726e-02
-9.500000e-01	5.000000e-02	5.000000e-02	4.295000e+00	3.582871e-01	2.131070e-01
+2.500000e-01	2.500000e-01	2.500000e-01	9.526000e-01	4.581424e-03	4.564225e-03
+7.500000e-01	2.500000e-01	2.500000e-01	8.553000e-01	1.102175e-02	1.011425e-02
+1.250000e+00	2.500000e-01	2.500000e-01	7.648000e-01	1.469842e-02	1.332464e-02
+1.750000e+00	2.500000e-01	2.500000e-01	7.147000e-01	1.690683e-02	1.642657e-02
+2.250000e+00	2.500000e-01	2.500000e-01	6.587000e-01	1.751501e-02	1.869318e-02
+2.750000e+00	2.500000e-01	2.500000e-01	5.989000e-01	1.756607e-02	2.094095e-02
+3.500000e+00	5.000000e-01	5.000000e-01	5.527000e-01	1.741419e-02	2.245520e-02
+4.500000e+00	5.000000e-01	5.000000e-01	5.339000e-01	2.500345e-02	2.908750e-02
+5.500000e+00	5.000000e-01	5.000000e-01	6.093000e-01	5.422277e-02	6.282112e-02
 END YODA_SCATTER2D_V2
-
-BEGIN YODA_SCATTER2D_V2 /REF/ATLAS_2014_I1279489/d05-x05-y01
+BEGIN YODA_SCATTER2D_V2 /REF/ATLAS_2014_I1279489/d20-x01-y01
 IsRef: 1
-Path: /REF/ATLAS_2014_I1279489/d05-x05-y01
-Title: ~
+Path: /REF/ATLAS_2014_I1279489/d20-x01-y01
+Title: doi:10.17182/hepdata.62729.v1/t20
 Type: Scatter2D
 ---
 # xval	 xerr-	 xerr+	 yval	 yerr-	 yerr+
-5.000000e-02	5.000000e-02	5.000000e-02	4.592000e+00	1.838269e-01	1.362589e-01
-2.000000e-01	1.000000e-01	1.000000e-01	1.626000e+00	9.802592e-02	1.416956e-01
-4.000000e-01	1.000000e-01	1.000000e-01	2.789000e-01	4.250024e-02	4.965097e-02
-7.500000e-01	2.500000e-01	2.500000e-01	2.315000e-02	1.647323e-02	1.661436e-02
+1.250000e+02	1.250000e+02	1.250000e+02	1.260000e-01	9.951274e-03	1.106812e-02
+3.750000e+02	1.250000e+02	1.250000e+02	2.863000e-01	2.148920e-02	2.035780e-02
+6.250000e+02	1.250000e+02	1.250000e+02	4.908000e-01	3.577600e-02	3.664099e-02
+8.750000e+02	1.250000e+02	1.250000e+02	6.247000e-01	4.442955e-02	4.377382e-02
+1.125000e+03	1.250000e+02	1.250000e+02	7.112000e-01	5.728380e-02	5.976408e-02
+1.375000e+03	1.250000e+02	1.250000e+02	7.465000e-01	7.691484e-02	8.808622e-02
+1.875000e+03	3.750000e+02	3.750000e+02	7.195000e-01	1.000438e-01	1.289894e-01
+2.625000e+03	3.750000e+02	3.750000e+02	1.047000e+00	2.738760e-01	2.584592e-01
 END YODA_SCATTER2D_V2
+BEGIN YODA_SCATTER2D_V2 /REF/ATLAS_2014_I1279489/d21-x01-y01
+IsRef: 1
+Path: /REF/ATLAS_2014_I1279489/d21-x01-y01
+Title: doi:10.17182/hepdata.62729.v1/t21
+Type: Scatter2D
+---
+# xval	 xerr-	 xerr+	 yval	 yerr-	 yerr+
+2.500000e-01	2.500000e-01	2.500000e-01	5.090000e-02	5.605502e-03	4.780375e-03
+7.500000e-01	2.500000e-01	2.500000e-01	1.608000e-01	1.281325e-02	1.260483e-02
+1.250000e+00	2.500000e-01	2.500000e-01	2.806000e-01	1.944999e-02	2.116823e-02
+1.750000e+00	2.500000e-01	2.500000e-01	3.537000e-01	2.468384e-02	2.605113e-02
+2.250000e+00	2.500000e-01	2.500000e-01	4.437000e-01	3.157887e-02	3.125703e-02
+2.750000e+00	2.500000e-01	2.500000e-01	5.382000e-01	3.901098e-02	3.622619e-02
+3.500000e+00	5.000000e-01	5.000000e-01	6.420000e-01	4.376016e-02	4.045669e-02
+4.500000e+00	5.000000e-01	5.000000e-01	7.148000e-01	5.724313e-02	6.193961e-02
+5.500000e+00	5.000000e-01	5.000000e-01	5.932000e-01	1.107918e-01	1.154051e-01
+END YODA_SCATTER2D_V2
+BEGIN YODA_SCATTER2D_V2 /REF/ATLAS_2014_I1279489/d22-x01-y01
+IsRef: 1
+Path: /REF/ATLAS_2014_I1279489/d22-x01-y01
+Title: doi:10.17182/hepdata.62729.v1/t22
+Type: Scatter2D
+---
+# xval	 xerr-	 xerr+	 yval	 yerr-	 yerr+
+1.250000e+02	1.250000e+02	1.250000e+02	6.781000e-01	6.084042e-03	8.112963e-03
+3.750000e+02	1.250000e+02	1.250000e+02	6.998000e-01	7.360891e-03	7.552619e-03
+6.250000e+02	1.250000e+02	1.250000e+02	7.054000e-01	8.678350e-03	9.270770e-03
+8.750000e+02	1.250000e+02	1.250000e+02	7.011000e-01	1.334144e-02	1.457368e-02
+1.125000e+03	1.250000e+02	1.250000e+02	6.997000e-01	1.883759e-02	2.065878e-02
+1.375000e+03	1.250000e+02	1.250000e+02	7.371000e-01	2.791855e-02	2.924149e-02
+1.875000e+03	3.750000e+02	3.750000e+02	7.361000e-01	4.164218e-02	3.974701e-02
+2.625000e+03	3.750000e+02	3.750000e+02	7.082000e-01	1.105269e-01	1.097044e-01
+END YODA_SCATTER2D_V2
+BEGIN YODA_SCATTER2D_V2 /REF/ATLAS_2014_I1279489/d23-x01-y01
+IsRef: 1
+Path: /REF/ATLAS_2014_I1279489/d23-x01-y01
+Title: doi:10.17182/hepdata.62729.v1/t23
+Type: Scatter2D
+---
+# xval	 xerr-	 xerr+	 yval	 yerr-	 yerr+
+2.500000e-01	2.500000e-01	2.500000e-01	7.056000e-01	9.322245e-03	1.024302e-02
+7.500000e-01	2.500000e-01	2.500000e-01	7.008000e-01	6.437850e-03	8.250223e-03
+1.250000e+00	2.500000e-01	2.500000e-01	6.966000e-01	6.124805e-03	7.325207e-03
+1.750000e+00	2.500000e-01	2.500000e-01	6.980000e-01	7.120200e-03	7.244653e-03
+2.250000e+00	2.500000e-01	2.500000e-01	6.768000e-01	8.967306e-03	8.781166e-03
+2.750000e+00	2.500000e-01	2.500000e-01	6.752000e-01	1.098731e-02	1.102155e-02
+3.500000e+00	5.000000e-01	5.000000e-01	6.685000e-01	1.219738e-02	1.196511e-02
+4.500000e+00	5.000000e-01	5.000000e-01	6.169000e-01	2.004493e-02	2.325936e-02
+5.500000e+00	5.000000e-01	5.000000e-01	6.655000e-01	4.809022e-02	6.382077e-02
+END YODA_SCATTER2D_V2
diff --git a/bin/make-pgfplots b/bin/make-pgfplots
--- a/bin/make-pgfplots
+++ b/bin/make-pgfplots
@@ -1,2818 +1,2819 @@
 #! /usr/bin/env python
 
 """\
 Usage: %prog [options] file.dat [file2.dat ...]
 
 TODO
  * Optimise output for e.g. lots of same-height bins in a row
  * Add a RatioFullRange directive to show the full range of error bars + MC envelope in the ratio
  * Tidy LaTeX-writing code -- faster to compile one doc only, then split it?
  * Handle boolean values flexibly (yes, no, true, false, etc. as well as 1, 0)
 """
 
 from __future__ import print_function
 
 ##
 ## This program is copyright by Christian Gutschow <chris.g@cern.ch> and
 ## the Rivet team https://rivet.hepforge.org. It may be used
 ## for scientific and private purposes. Patches are welcome, but please don't
 ## redistribute changed versions yourself.
 ##
 
 ## Check the Python version
 import sys
 if sys.version_info[:3] < (2,6,0):
     print("make-plots requires Python version >= 2.6.0... exiting")
     sys.exit(1)
 
 ## Try to rename the process on Linux
 try:
     import ctypes
     libc = ctypes.cdll.LoadLibrary('libc.so.6')
     libc.prctl(15, 'make-plots', 0, 0, 0)
 except Exception as e:
     pass
 
 
 import os, logging, re
 import tempfile
 import getopt
 import string
 import copy
 from math import *
 
 
 ## Regex patterns
 pat_begin_block = re.compile(r'^#+\s*BEGIN ([A-Z0-9_]+) ?(\S+)?')
 pat_end_block =   re.compile('^#+\s*END ([A-Z0-9_]+)')
 pat_comment = re.compile('^#|^\s*$')
 pat_property = re.compile('^(\w+?)=(.*)$')
+pat_property_opt = re.compile('^ReplaceOption\[(\w+=\w+)\]=(.*)$')
 pat_path_property  = re.compile('^(\S+?)::(\w+?)=(.*)$')
 pat_options = re.compile(r"((?::\w+=[^:/]+)+)")
 
 def fuzzyeq(a, b, tolerance=1e-6):
     "Fuzzy equality comparison function for floats, with given fractional tolerance"
     # if type(a) is not float or type(a) is not float:
     #     print(a, b)
     if (a == 0 and abs(b) < 1e-12) or (b == 0 and abs(a) < 1e-12):
         return True
     return 2.0*abs(a-b) < tolerance * abs(a+b)
 
 def inrange(x, a, b):
     return x >= a and x < b
 
 def floatify(x):
     if type(x) is str:
         x = x.split()
     if not hasattr(x, "__len__"):
         x = [x]
     x = [float(a) for a in x]
     return x[0] if len(x) == 1 else x
 
 def floatpair(x):
     if type(x) is str:
         x = x.split()
     if hasattr(x, "__len__"):
         assert len(x) == 2
         return [float(a) for a in x]
     return [float(x), float(x)]
 
 
 def is_end_marker(line, blockname):
     m = pat_end_block.match(line)
     return m and m.group(1) == blockname
 
 def is_comment(line):
     return pat_comment.match(line) is not None
 
 def checkColor(line):
     if '[RGB]' in line:
       # e.g. '{[RGB]{1,2,3}}'
       if line[0] == '{' and line[-1] == '}':  line = line[1:-1]
       # i.e. '[RGB]{1,2,3}'
       composition = line.split('{')[1][:-1]
       # e.g. '1,2,3'
       line = '{rgb,255:red,%s;green,%s;blue,%s}' % tuple(composition.split(','))
     return line
 
 
 class Described(object):
     "Inherited functionality for objects holding a 'props' dictionary"
 
     def __init__(self):
         pass
 
     def has_attr(self, key):
         return key in self.props
 
     def set_attr(self, key, val):
         self.props[key] = val
 
     def attr(self, key, default=None):
         return self.props.get(key, default)
 
     def attr_bool(self, key, default=None):
         x = self.attr(key, default)
         if str(x).lower() in ["1", "true", "yes", "on"]:  return True
         if str(x).lower() in ["0", "false", "no", "off"]: return False
         return None
 
     def attr_int(self, key, default=None):
         x = self.attr(key, default)
         try:
             x = int(x)
         except:
             x = None
         return x
 
     def attr_float(self, key, default=None):
         x = self.attr(key, default)
         try:
             x = float(x)
         except:
             x = None
         return x
 
     #def doGrid(self, pre = ''):
     #    grid_major = self.attr_bool(pre + 'Grid', False) or self.attr_bool(pre + 'GridMajor', False)
     #    grid_minor = self.attr_bool(pre + 'GridMinor', False)
     #    if grid_major and grid_minor:  return 'both'
     #    elif grid_major:  return 'major'
     #    elif grid_minor:  return 'minor'
 
     def ratio_names(self, skipFirst = False):
         offset = 1 if skipFirst else 0
         return  [ ('RatioPlot%s' % (str(i) if i else ''), i) for i in range(skipFirst, 9) ]
 
     def legend_names(self, skipFirst = False):
         offset = 1 if skipFirst else 0
         return  [ ('Legend%s' % (str(i) if i else ''), i) for i in range(skipFirst, 9) ]
 
 
 
 class InputData(Described):
 
     def __init__(self, filename):
         self.filename=filename
         if not self.filename.endswith(".dat"):
             self.filename += ".dat"
         self.props = {}
         self.histos = {}
         self.ratios = {}
         self.special = {}
         self.functions = {}
         # not sure what this is good for ... yet
         self.histomangler = {}
 
         self.normalised = False
         self.props['_OptSubs'] = { }
         self.props['is2dim'] = False
 
         # analyse input dat file
         f = open(self.filename)
         for line in f:
             m = pat_begin_block.match(line)
             if m:
                 name, path = m.group(1,2)
 
                 if path is None and name != 'PLOT':
                     raise Exception('BEGIN sections need a path name.')
 
                 if name == 'PLOT':
                     self.read_input(f);
                 elif name == 'SPECIAL':
                     self.special[path] = Special(f)
                 elif name == 'HISTOGRAM' or name == 'HISTOGRAM2D':
                     self.histos[path] = Histogram(f, p=path)
                     self.props['is2dim'] = self.histos[path].is2dim
                     self.histos[path].zlog = self.attr_bool('LogZ')
                     if self.attr_bool('Is3D', 0):
                         self.histos[path].zlog = False
                     if not self.histos[path].getName() == '':
                         newname = self.histos[path].getName()
                         self.histos[newname] = copy.deepcopy(self.histos[path])
                         del self.histos[path]
                 elif name == 'HISTO1D':
                     self.histos[path] = Histo1D(f, p=path)
                     if not self.histos[path].getName() == '':
                         newname = self.histos[path].getName()
                         self.histos[newname] = copy.deepcopy(self.histos[path])
                         del self.histos[path]
                 elif name == 'HISTO2D':
                     self.histos[path] = Histo2D(f, p=path)
                     self.props['is2dim'] = True
                     self.histos[path].zlog = self.attr_bool('LogZ')
                     if self.attr_bool('Is3D', 0):
                         self.histos[path].zlog = False
                     if not self.histos[path].getName() == '':
                         newname = self.histos[path].getName()
                         self.histos[newname] = copy.deepcopy(self.histos[path])
                         del self.histos[path]
                 elif name == 'HISTOGRAMMANGLER':
                     self.histomangler[path] = PlotFunction(f)
                 elif name == 'COUNTER':
                   self.histos[path] = Counter(f, p=path)
                 elif name == 'VALUE':
                   self.histos[path] = Value(f, p=path)
                 elif name == 'FUNCTION':
                     self.functions[path] = Function(f)
         f.close()
 
         self.apply_config_files(opts.CONFIGFILES)
 
         self.props.setdefault('PlotSizeX', 10.)
         self.props.setdefault('PlotSizeY', 6.)
         if self.props['is2dim']:
           self.props['PlotSizeX'] -= 1.7
           self.props['PlotSizeY'] = 10.
           self.props['RatioPlot'] = '0'
 
         if self.props.get('PlotSize', '') != '':
             plotsizes = self.props['PlotSize'].split(',')
             self.props['PlotSizeX'] = float(plotsizes[0])
             self.props['PlotSizeY'] = float(plotsizes[1])
             if len(plotsizes) == 3:
                 self.props['RatioPlotSizeY'] = float(plotsizes[2])
             del self.props['PlotSize']
 
         self.props['RatioPlotSizeY'] = 0. # default is no ratio
         if self.attr('MainPlot') == '0':
             ## has RatioPlot, but no MainPlot
             self.props['PlotSizeY'] = 0. # size of MainPlot
             self.props['RatioPlot'] = '1' #< don't allow both to be zero!
         if self.attr_bool('RatioPlot'):
             if self.has_attr('RatioPlotYSize') and self.attr('RatioPlotYSize') != '':
                 self.props['RatioPlotSizeY'] = self.attr_float('RatioPlotYSize')
             else:
                 self.props['RatioPlotSizeY'] = 6. if self.attr_bool('MainPlot') else 3.
                 if self.props['is2dim']:  self.props['RatioPlotSizeY'] *= 2.
 
         for rname, _ in self.ratio_names(True):
             if self.attr_bool(rname, False):
                 if self.props.get(rname+'YSize') != '':
                     self.props[rname+'SizeY'] = self.attr_float(rname+'YSize')
                 else:
                     self.props[rname+'SizeY'] = 3. if self.attr('MainPlot') == '0' else 6.
                     if self.props['is2dim']:  self.props[rname+'SizeY'] *= 2.
 
         ## Ensure numbers, not strings
         self.props['PlotSizeX'] = float(self.props['PlotSizeX'])
         self.props['PlotSizeY'] = float(self.props['PlotSizeY'])
         self.props['RatioPlotSizeY'] = float(self.props['RatioPlotSizeY'])
         # self.props['TopMargin'] = float(self.props['TopMargin'])
         # self.props['BottomMargin'] = float(self.props['BottomMargin'])
 
         self.props['LogX'] = self.attr_bool('LogX', 0)
         self.props['LogY'] = self.attr_bool('LogY', 0)
         self.props['LogZ'] = self.attr_bool('LogZ', 0)
         for rname, _ in self.ratio_names(True):
             self.props[rname+'LogY'] = self.attr_bool(rname+'LogY', 0)
             self.props[rname+'LogZ'] = self.attr_bool(rname+'LogZ', 0)
 
         if self.has_attr('Rebin'):
             for key in self.histos:
                 self.histos[key].props['Rebin'] = self.props['Rebin']
         if self.has_attr('ConnectBins'):
             for key in self.histos:
                 self.histos[key].props['ConnectBins'] = self.props['ConnectBins']
 
         self.histo_sorting('DrawOnly')
         for curves, _ in self.ratio_names():
             if self.has_attr(curves+'DrawOnly'):
               self.histo_sorting(curves+'DrawOnly')
             else:
               self.props[curves+'DrawOnly'] = self.props['DrawOnly']
 
         ## Inherit various values from histograms if not explicitly set
         #for k in ['LogX', 'LogY', 'LogZ',
         #          'XLabel', 'YLabel', 'ZLabel',
         #          'XCustomMajorTicks', 'YCustomMajorTicks', 'ZCustomMajorTicks']:
         #    self.inherit_from_histos(k)
 
 
 
     @property
     def is2dim(self):
         return self.attr_bool("is2dim", False)
     @is2dim.setter
     def is2dim(self, val):
         self.set_attr("is2dim", val)
 
 
     @property
     def drawonly(self):
         x = self.attr("DrawOnly")
         if type(x) is str:
             self.drawonly = x #< use setter to listify
         return x if x else []
     @drawonly.setter
     def drawonly(self, val):
         if type(val) is str:
             val = val.strip().split()
         self.set_attr("DrawOnly", val)
 
 
     @property
     def stacklist(self):
         x = self.attr("Stack")
         if type(x) is str:
             self.stacklist = x #< use setter to listify
         return x if x else []
     @stacklist.setter
     def stacklist(self, val):
         if type(val) is str:
             val = val.strip().split()
         self.set_attr("Stack", val)
 
 
     @property
     def plotorder(self):
         x = self.attr("PlotOrder")
         if type(x) is str:
             self.plotorder = x #< use setter to listify
         return x if x else []
     @plotorder.setter
     def plotorder(self, val):
         if type(val) is str:
             val = val.strip().split()
         self.set_attr("PlotOrder", val)
 
 
     @property
     def plotsizex(self):
         return self.attr_float("PlotSizeX")
     @plotsizex.setter
     def plotsizex(self, val):
         self.set_attr("PlotSizeX", val)
 
     @property
     def plotsizey(self):
         return self.attr_float("PlotSizeY")
     @plotsizey.setter
     def plotsizey(self, val):
         self.set_attr("PlotSizeY", val)
 
     @property
     def plotsize(self):
         return [self.plotsizex, self.plotsizey]
     @plotsize.setter
     def plotsize(self, val):
         if type(val) is str:
             val = [float(x) for x in val.split(",")]
         assert len(val) == 2
         self.plotsizex = val[0]
         self.plotsizey = val[1]
 
     @property
     def ratiosizey(self):
         return self.attr_float("RatioPlotSizeY")
     @ratiosizey.setter
     def ratiosizey(self, val):
         self.set_attr("RatioPlotSizeY", val)
 
 
     @property
     def scale(self):
         return self.attr_float("Scale")
     @scale.setter
     def scale(self, val):
         self.set_attr("Scale", val)
 
 
     @property
     def xmin(self):
         return self.attr_float("XMin")
     @xmin.setter
     def xmin(self, val):
         self.set_attr("XMin", val)
 
     @property
     def xmax(self):
         return self.attr_float("XMax")
     @xmax.setter
     def xmax(self, val):
         self.set_attr("XMax", val)
 
     @property
     def xrange(self):
         return [self.xmin, self.xmax]
     @xrange.setter
     def xrange(self, val):
         if type(val) is str:
             val = [float(x) for x in val.split(",")]
         assert len(val) == 2
         self.xmin = val[0]
         self.xmax = val[1]
 
 
     @property
     def ymin(self):
         return self.attr_float("YMin")
     @ymin.setter
     def ymin(self, val):
         self.set_attr("YMin", val)
 
     @property
     def ymax(self):
         return self.attr_float("YMax")
     @ymax.setter
     def ymax(self, val):
         self.set_attr("YMax", val)
 
     @property
     def yrange(self):
         return [self.ymin, self.ymax]
     @yrange.setter
     def yrange(self, val):
         if type(val) is str:
             val = [float(y) for y in val.split(",")]
         assert len(val) == 2
         self.ymin = val[0]
         self.ymax = val[1]
 
 
     # TODO: add more rw properties for plotsize(x,y), ratiosize(y),
     #   show_mainplot, show_ratioplot, show_legend, log(x,y,z), rebin,
     #   drawonly, legendonly, plotorder, stack,
     #   label(x,y,z), majorticks(x,y,z), minorticks(x,y,z),
     #   min(x,y,z), max(x,y,z), range(x,y,z)
 
     def getLegendPos(self, prefix = ''):
         xpos = self.attr_float(prefix+'LegendXPos', 0.95 if self.getLegendAlign() == 'right' else 0.53)
         ypos = self.attr_float(prefix+'LegendYPos', 0.93)
         return (xpos, ypos)
 
     def getLegendAlign(self, prefix = ''):
         la = self.attr(prefix+'LegendAlign', 'left')
         if la == 'l':    return 'left'
         elif la == 'c':  return 'center'
         elif la == 'r':  return 'right'
         else:            return  la
 
     #def inherit_from_histos(self, k):
     #    """Note: this will inherit the key from a random histogram:
     #    only use if you're sure all histograms have this key!"""
     #    if k not in self.props:
     #        h = list(self.histos.values())[0]
     #        if k in h.props:
     #            self.props[k] = h.props[k]
 
 
     def read_input(self, f):
         for line in f:
             if is_end_marker(line, 'PLOT'):
                 break
             elif is_comment(line):
                 continue
             m = pat_property.match(line)
             m_opt = pat_property_opt.match(line)
             if m_opt:
                 opt_old, opt_new = m_opt.group(1,2)
                 self.props['_OptSubs'][opt_old.strip()] = opt_new.strip()
             elif m:
                 prop, value = m.group(1,2)
                 prop = prop.strip()
                 value = value.strip()
                 if prop in self.props:
                     logging.debug("Overwriting property %s = %s -> %s" % (prop, self.props[prop], value))
                 ## Use strip here to deal with DOS newlines containing \r
                 self.props[prop.strip()] = value.strip()
 
 
     def apply_config_files(self, conffiles):
         """Use config file to overwrite cosmetic properties."""
         if conffiles is not None:
             for filename in conffiles:
                 cf = open(filename, 'r')
                 lines = cf.readlines()
                 for i in range(len(lines)):
                     ## First evaluate PLOT sections
                     m = pat_begin_block.match(lines[i])
                     if m and m.group(1) == 'PLOT' and re.match(m.group(2),self.filename):
                         while i<len(lines)-1:
                             i = i+1
                             if is_end_marker(lines[i], 'PLOT'):
                                 break
                             elif is_comment(lines[i]):
                                 continue
                             m = pat_property.match(lines[i])
                             if m:
                                 prop, value = m.group(1,2)
                                 if prop in self.props:
                                     logging.debug("Overwriting from conffile property %s = %s -> %s" % (prop, self.props[prop], value))
                                 ## Use strip here to deal with DOS newlines containing \r
                                 self.props[prop.strip()] = value.strip()
                     elif is_comment(lines[i]):
                         continue
                     else:
                         ## Then evaluate path-based settings, e.g. for HISTOGRAMs
                         m = pat_path_property.match(lines[i])
                         if m:
                             regex, prop, value = m.group(1,2,3)
                             for obj_dict in [self.special, self.histos, self.functions]:
                                 for path, obj in obj_dict.items():
                                     if re.match(regex, path):
                                         ## Use strip here to deal with DOS newlines containing \r
                                         obj.props.update({prop.strip() : value.strip()})
                 cf.close()
 
     def histo_sorting(self, curves):
         """Determine in what order to draw curves."""
         histoordermap = {}
         histolist = self.histos.keys()
         if self.has_attr(curves):
             histolist = filter(self.histos.keys().count, self.attr(curves).strip().split())
         for histo in histolist:
             order = 0
             if self.histos[histo].has_attr('PlotOrder'):
                 order = int(self.histos[histo].attr['PlotOrder'])
             if not order in histoordermap:
                 histoordermap[order] = []
             histoordermap[order].append(histo)
         sortedhistolist = []
         for i in sorted(histoordermap.keys()):
             sortedhistolist.extend(histoordermap[i])
         self.props[curves] = sortedhistolist
 
 
 class Plot(object):
 
     def __init__(self): #, inputdata):
         self.customCols = {}
 
     def panel_header(self, **kwargs):
         out = ''
         out += ('\\begin{axis}[\n')
         out += ('at={(0,%4.3fcm)},\n' % kwargs['PanelOffset'])
         out += ('xmode=%s,\n' % kwargs['Xmode'])
         out += ('ymode=%s,\n' % kwargs['Ymode'])
         #if kwargs['Zmode']:  out += ('zmode=log,\n')
         out += ('scale only axis=true,\n')
         out += ('scaled ticks=false,\n')
         out += ('clip marker paths=true,\n')
         out += ('axis on top,\n')
         out += ('axis line style={line width=0.3pt},\n')
         out += ('height=%scm,\n' % kwargs['PanelHeight'])
         out += ('width=%scm,\n'  % kwargs['PanelWidth'])
         out += ('xmin=%s,\n' % kwargs['Xmin'])
         out += ('xmax=%s,\n' % kwargs['Xmax'])
         out += ('ymin=%s,\n' % kwargs['Ymin'])
         out += ('ymax=%s,\n' % kwargs['Ymax'])
         if kwargs['is2D']:
           out += ('zmin=%s,\n' % kwargs['Zmin'])
           out += ('zmax=%s,\n' % kwargs['Zmax'])
         #out += ('legend style={\n')
         #out += ('    draw=none, fill=none, anchor = north west,\n')
         #out += ('    at={(%4.3f,%4.3f)},\n' % kwargs['LegendPos'])
         #out += ('},\n')
         #out += ('legend cell align=%s,\n' % kwargs['LegendAlign'])
         #out += ('legend image post style={sharp plot, -},\n')
         if kwargs['is2D']:
             if kwargs['is3D']:
                 hrotate = 45 + kwargs['HRotate']
                 vrotate = 30 + kwargs['VRotate']
                 out += ('view={%i}{%s}, zticklabel pos=right,\n' % (hrotate, vrotate))
             else:
                 out += ('view={0}{90}, colorbar,\n')
             out += ('colormap/%s,\n' % kwargs['ColorMap'])
             if not kwargs['is3D'] and kwargs['Zmode']:
                 out += ('colorbar style={yticklabel=$\\,10^{\\pgfmathprintnumber{\\tick}}$},\n')
         #if kwargs['Grid']:
         #    out += ('grid=%s,\n' % kwargs['Grid'])
         for axis, label in kwargs['Labels'].iteritems():
             out += ('%s={%s},\n' % (axis.lower(), label))
         if kwargs['XLabelSep'] != None:
             if not kwargs['is3D']:
                 out += ('xlabel style={at={(1,0)},below left,yshift={-%4.3fcm}},\n' % kwargs['XLabelSep'])
             out += ('xticklabel shift=%4.3fcm,\n' % kwargs['XTickShift'])
         else:
             out += ('xticklabels={,,},\n')
         if kwargs['YLabelSep'] != None:
             if not kwargs['is3D']:
                 out += ('ylabel style={at={(0,1)},left,yshift={%4.3fcm}},\n' % kwargs['YLabelSep'])
             out += ('yticklabel shift=%4.3fcm,\n' % kwargs['YTickShift'])
         out += ('major tick length={%4.3fcm},\n' % kwargs['MajorTickLength'])
         out += ('minor tick length={%4.3fcm},\n' % kwargs['MinorTickLength'])
         # check if 'number of minor tick divisions' is specified
         for axis, nticks in kwargs['MinorTicks'].iteritems():
             if nticks:
               out += ('minor %s tick num=%i,\n' % (axis.lower(), nticks))
         # check if actual major/minor tick divisions have been specified
         out += ('max space between ticks=20,\n')
         for axis, tickinfo in kwargs['CustomTicks'].iteritems():
             majorlabels, majorticks, minorticks = tickinfo
             if len(minorticks):
               out += ('minor %stick={%s},\n' % (axis.lower(), ','.join(minorticks)))
             if len(majorticks):
               if float(majorticks[0]) > float(kwargs['%smin' % axis]):
                 majorticks = [ str(2 * float(majorticks[0]) - float(majorticks[1])) ] + majorticks
                 if len(majorlabels):
                   majorlabels = [ '.' ] + majorlabels # dummy label
               if float(majorticks[-1]) < float(kwargs['%smax' % axis]):
                 majorticks.append(str(2 * float(majorticks[-1]) - float(majorticks[-2])))
                 if len(majorlabels):
                   majorlabels.append('.') # dummy label
               out += ('%stick={%s},\n' % (axis.lower(), ','.join(majorticks)))
             if kwargs['NeedsXLabels'] and len(majorlabels):
               out += ('%sticklabels={{%s}},\n' % (axis.lower(), '},{'.join(majorlabels)))
             out += ('every %s tick/.style={black},\n' % axis.lower())
         out += (']\n')
         return out
 
     def panel_footer(self):
         out = ''
         out += ('\\end{axis}\n')
         return out
 
     def set_normalisation(self, inputdata):
         if inputdata.normalised:
             return
         for method in ['NormalizeToIntegral', 'NormalizeToSum']:
             if inputdata.has_attr(method):
                 for key in inputdata.props['DrawOnly']:
                     if not inputdata.histos[key].has_attr(method):
                         inputdata.histos[key].props[method] = inputdata.props[method]
         if inputdata.has_attr('Scale'):
             for key in inputdata.props['DrawOnly']:
                 inputdata.histos[key].props['Scale'] = inputdata.attr_float('Scale')
         for key in inputdata.histos.keys():
             inputdata.histos[key].mangle_input()
         inputdata.normalised = True
 
     def stack_histograms(self, inputdata):
         if inputdata.has_attr('Stack'):
             stackhists = [h for h in inputdata.attr('Stack').strip().split() if h in inputdata.histos]
             previous = ''
             for key in stackhists:
                 if previous != '':
                     inputdata.histos[key].add(inputdata.histos[previous])
                 previous = key
 
     def set_histo_options(self, inputdata):
         if inputdata.has_attr('ConnectGaps'):
             for key in inputdata.histos.keys():
                 if not inputdata.histos[key].has_attr('ConnectGaps'):
                     inputdata.histos[i].props['ConnectGaps'] = inputdata.props['ConnectGaps']
         # Counter and Value only have dummy x-axis, ticks wouldn't make sense here, so suppress them:
         if 'Value object' in str(inputdata.histos) or 'Counter object' in str(inputdata.histos):
             inputdata.props['XCustomMajorTicks'] = ''
             inputdata.props['XCustomMinorTicks'] = ''
 
     def set_borders(self, inputdata):
         self.set_xmax(inputdata)
         self.set_xmin(inputdata)
         self.set_ymax(inputdata)
         self.set_ymin(inputdata)
         self.set_zmax(inputdata)
         self.set_zmin(inputdata)
         inputdata.props['Borders'] = (self.xmin, self.xmax, self.ymin, self.ymax, self.zmin, self.zmax)
 
     def set_xmin(self, inputdata):
         self.xmin = inputdata.xmin
         if self.xmin is None:
             xmins = [inputdata.histos[h].getXMin() for h in inputdata.props['DrawOnly']]
             self.xmin = min(xmins) if xmins else 0.0
 
 
     def set_xmax(self,inputdata):
         self.xmax = inputdata.xmax
         if self.xmax is None:
             xmaxs = [inputdata.histos[h].getXMax() for h in inputdata.props['DrawOnly']]
             self.xmax = min(xmaxs) if xmaxs else 1.0
 
 
     def set_ymin(self,inputdata):
         if inputdata.ymin is not None:
             self.ymin = inputdata.ymin
         else:
             ymins = [inputdata.histos[i].getYMin(self.xmin, self.xmax, inputdata.props['LogY']) for i in inputdata.attr('DrawOnly')]
             minymin = min(ymins) if ymins else 0.0
             if inputdata.props['is2dim']:
                 self.ymin = minymin
             else:
                 showzero = inputdata.attr_bool("ShowZero", True)
                 if showzero:
                     self.ymin = 0. if minymin > -1e-4 else 1.1*minymin
                 else:
                     self.ymin = 1.1*minymin if minymin < -1e-4 else 0 if minymin < 1e-4 else 0.9*minymin
                 if inputdata.props['LogY']:
                     ymins = [ymin for ymin in ymins if ymin > 0.0]
                     if not ymins:
                         if self.ymax == 0:
                             self.ymax = 1
                         ymins.append(2e-7*self.ymax)
                     minymin = min(ymins)
                     fullrange = opts.FULL_RANGE
                     if inputdata.has_attr('FullRange'):
                         fullrange = inputdata.attr_bool('FullRange')
                     self.ymin = minymin/1.7 if fullrange else max(minymin/1.7, 2e-7*self.ymax)
 
                 if self.ymin == self.ymax:
                     self.ymin -= 1
                     self.ymax += 1
 
     def set_ymax(self,inputdata):
         if inputdata.has_attr('YMax'):
             self.ymax = inputdata.attr_float('YMax')
         else:
             ymaxs = [inputdata.histos[h].getYMax(self.xmin, self.xmax) for h in inputdata.attr('DrawOnly')]
             self.ymax = max(ymaxs) if ymaxs else 1.0
             if not inputdata.is2dim:
                 self.ymax *= (1.7 if inputdata.attr_bool('LogY') else 1.1)
 
     def set_zmin(self,inputdata):
         if inputdata.has_attr('ZMin'):
             self.zmin = inputdata.attr_float('ZMin')
         else:
             zmins = [inputdata.histos[i].getZMin(self.xmin, self.xmax, self.ymin, self.ymax) for i in inputdata.attr('DrawOnly')]
             minzmin = min(zmins) if zmins else 0.0
             self.zmin = minzmin
             if zmins:
                 showzero = inputdata.attr_bool('ShowZero', True)
                 if showzero:
                     self.zmin = 0 if minzmin > -1e-4 else 1.1*minzmin
                 else:
                     self.zmin = 1.1*minzmin if minzmin < -1e-4 else 0. if minzmin < 1e-4 else 0.9*minzmin
                 if inputdata.attr_bool('LogZ', False):
                     zmins = [zmin for zmin in zmins if zmin > 0]
                     if not zmins:
                         if self.zmax == 0:
                             self.zmax = 1
                         zmins.append(2e-7*self.zmax)
                     minzmin = min(zmins)
                     fullrange = inputdata.attr_bool("FullRange", opts.FULL_RANGE)
                     self.zmin = minzmin/1.7 if fullrange else max(minzmin/1.7, 2e-7*self.zmax)
 
                 if self.zmin == self.zmax:
                     self.zmin -= 1
                     self.zmax += 1
 
     def set_zmax(self,inputdata):
         self.zmax = inputdata.attr_float('ZMax')
         if self.zmax is None:
             zmaxs = [inputdata.histos[h].getZMax(self.xmin, self.xmax, self.ymin, self.ymax) for h in inputdata.attr('DrawOnly')]
             self.zmax = max(zmaxs) if zmaxs else 1.0
 
     def getTicks(self, inputdata, axis):
         majorticks = []; majorlabels = []
         ticktype = '%sCustomMajorTicks' % axis
         if inputdata.attr(ticktype):
             ticks = inputdata.attr(ticktype).strip().split()
             if not len(ticks) % 2:
                 for i in range(0,len(ticks),2):
                     majorticks.append(ticks[i])
                     majorlabels.append(ticks[i+1])
         minorticks = []
         ticktype = '%sCustomMinorTicks' % axis
         if inputdata.attr(ticktype):
             ticks = inputdata.attr(ticktype).strip().split() 
             for val in ticks:
                 minorticks.append(val)
         return (majorlabels, majorticks, minorticks)
 
 
     def draw(self):
         pass
 
     def write_header(self,inputdata):
         inputdata.props.setdefault('TopMargin', 0.8)
         inputdata.props.setdefault('LeftMargin', 1.4)
         inputdata.props.setdefault('BottomMargin', 0.75)
         inputdata.props.setdefault('RightMargin', 0.35)
         if inputdata.attr('is2dim'): 
             inputdata.props['RightMargin'] += 1.8
         papersizex  = inputdata.attr_float('PlotSizeX') + 0.1 
         papersizex += inputdata.attr_float('LeftMargin') + inputdata.attr_float('RightMargin')
         papersizey  = inputdata.attr_float('PlotSizeY') + 0.2
         papersizey += inputdata.attr_float('TopMargin') + inputdata.attr_float('BottomMargin')
         for rname, _ in inputdata.ratio_names():
             if inputdata.has_attr(rname+'SizeY'):
                 papersizey += inputdata.attr_float(rname+'SizeY')
         #
         out = ""
         out += '\\documentclass{article}\n'
         if opts.OUTPUT_FONT == "MINION":
             out += ('\\usepackage{minion}\n')
         elif opts.OUTPUT_FONT == "PALATINO_OSF":
             out += ('\\usepackage[osf,sc]{mathpazo}\n')
         elif opts.OUTPUT_FONT == "PALATINO":
             out += ('\\usepackage{mathpazo}\n')
         elif opts.OUTPUT_FONT == "TIMES":
             out += ('\\usepackage{mathptmx}\n')
         elif opts.OUTPUT_FONT == "HELVETICA":
             out += ('\\renewcommand{\\familydefault}{\\sfdefault}\n')
             out += ('\\usepackage{sfmath}\n')
             out += ('\\usepackage{helvet}\n')
             out += ('\\usepackage[symbolgreek]{mathastext}\n')
         for pkg in opts.LATEXPKGS:
             out += ('\\usepackage{%s}\n' % pkg)
         out += ('\\usepackage[dvipsnames]{xcolor}\n')
         out += ('\\selectcolormodel{rgb}\n')
         out += ('\\definecolor{red}{HTML}{EE3311}\n') # (Google uses 'DC3912')
         out += ('\\definecolor{blue}{HTML}{3366FF}\n')
         out += ('\\definecolor{green}{HTML}{109618}\n')
         out += ('\\definecolor{orange}{HTML}{FF9900}\n')
         out += ('\\definecolor{lilac}{HTML}{990099}\n')
         out += ('\\usepackage{amsmath}\n')
         out += ('\\usepackage{amssymb}\n')
         out += ('\\usepackage{relsize}\n')
         out += ('\\usepackage{graphicx}\n')
         out += ('\\usepackage[dvips,\n')
         out += ('    left=%4.3fcm,\n' % (inputdata.attr_float('LeftMargin')-0.45))
         out += ('    right=0cm,\n')
         out += ('    top=%4.3fcm,\n' % (inputdata.attr_float('TopMargin')-0.70))
         out += ('    bottom=0cm,\n')
         out += ('  paperwidth=%scm,paperheight=%scm\n' % (papersizex, papersizey))
         out += (']{geometry}\n')
         if inputdata.has_attr('DefineColor'):
             out += ('% user defined colours\n')
             for color in inputdata.attr('DefineColor').split('\t'):
                 out += ('%s\n' % color)
         col_count = 0
         for obj in inputdata.histos:
           for col in inputdata.histos[obj].customCols:
             if col in self.customCols:
               # already seen, look up name
               inputdata.histos[obj].customCols[col] = self.customCols[col]
             elif ']{' in col:
               colname = 'MyColour%i' % col_count # assign custom name
               inputdata.histos[obj].customCols[col] = colname
               self.customCols[col] = colname
               col_count += 1
               # remove outer {...} if present
               while col[0] == '{' and col[-1] == '}':  col = col[1:-1]
               model, specs = tuple(col[1:-1].split(']{'))
               out += ('\\definecolor{%s}{%s}{%s}\n' % (colname, model, specs))
         out += ('\\usepackage{pgfplots}\n')
         out += ('\\usepgfplotslibrary{fillbetween}\n')
         #out += ('\\usetikzlibrary{positioning,shapes.geometric,patterns}\n')
         out += ('\\usetikzlibrary{patterns}\n')
         out += ('\\pgfplotsset{ compat=1.16,\n')
         out += ('    title style={at={(0,1)},right,yshift={0.10cm}},\n')
         out += ('}\n')
         out += ('\\begin{document}\n')
         out += ('\\pagestyle{empty}\n')
         out += ('\\begin{tikzpicture}[\n')
         out += ('    inner sep=0,\n')
         out += ('    trim axis left = %4.3f,\n' % (inputdata.attr_float('LeftMargin') + 0.1))
         out += ('    trim axis right,\n')
         out += ('    baseline,')
         out += ('    hatch distance/.store in=\\hatchdistance,\n')
         out += ('    hatch distance=8pt,\n')
         out += ('    hatch thickness/.store in=\\hatchthickness,\n')
         out += ('    hatch thickness=1pt,\n')
         out += (']\n')
         out += ('\\makeatletter\n')
         out += ('\\pgfdeclarepatternformonly[\hatchdistance,\hatchthickness]{diagonal hatch}\n')
         out += ('{\\pgfqpoint{0pt}{0pt}}\n')
         out += ('{\\pgfqpoint{\\hatchdistance}{\\hatchdistance}}\n')
         out += ('{\\pgfpoint{\\hatchdistance-1pt}{\\hatchdistance-1pt}}%\n')
         out += ('{\n')
         out += ('    \\pgfsetcolor{\\tikz@pattern@color}\n')
         out += ('    \\pgfsetlinewidth{\\hatchthickness}\n')
         out += ('    \\pgfpathmoveto{\\pgfqpoint{0pt}{0pt}}\n')
         out += ('    \\pgfpathlineto{\\pgfqpoint{\\hatchdistance}{\\hatchdistance}}\n')
         out += ('    \\pgfusepath{stroke}\n')
         out += ('}\n')
         out += ('\\pgfdeclarepatternformonly[\hatchdistance,\hatchthickness]{antidiagonal hatch}\n')
         out += ('{\\pgfqpoint{0pt}{0pt}}\n')
         out += ('{\\pgfqpoint{\\hatchdistance}{\\hatchdistance}}\n')
         out += ('{\\pgfpoint{\\hatchdistance-1pt}{\\hatchdistance-1pt}}%\n')
         out += ('{\n')
         out += ('    \\pgfsetcolor{\\tikz@pattern@color}\n')
         out += ('    \\pgfsetlinewidth{\\hatchthickness}\n')
         out += ('    \\pgfpathmoveto{\\pgfqpoint{0pt}{\\hatchdistance}}\n')
         out += ('    \\pgfpathlineto{\\pgfqpoint{\\hatchdistance}{0pt}}\n')
         out += ('    \\pgfusepath{stroke}\n')
         out += ('}\n')
         out += ('\\pgfdeclarepatternformonly[\hatchdistance,\hatchthickness]{cross hatch}\n')
         out += ('{\\pgfqpoint{0pt}{0pt}}\n')
         out += ('{\\pgfqpoint{\\hatchdistance}{\\hatchdistance}}\n')
         out += ('{\\pgfpoint{\\hatchdistance-1pt}{\\hatchdistance-1pt}}%\n')
         out += ('{\n')
         out += ('    \\pgfsetcolor{\\tikz@pattern@color}\n')
         out += ('    \\pgfsetlinewidth{\\hatchthickness}\n')
         out += ('    \\pgfpathmoveto{\\pgfqpoint{0pt}{0pt}}\n')
         out += ('    \\pgfpathlineto{\\pgfqpoint{\\hatchdistance}{\\hatchdistance}}\n')
         out += ('    \\pgfusepath{stroke}\n')
         out += ('    \\pgfsetcolor{\\tikz@pattern@color}\n')
         out += ('    \\pgfsetlinewidth{\\hatchthickness}\n')
         out += ('    \\pgfpathmoveto{\\pgfqpoint{0pt}{\\hatchdistance}}\n')
         out += ('    \\pgfpathlineto{\\pgfqpoint{\\hatchdistance}{0pt}}\n')
         out += ('    \\pgfusepath{stroke}\n')
         out += ('}\n')
         out += ('\makeatother\n')
         if inputdata.attr_bool('is2dim'):
             colorseries = '{hsb}{grad}[rgb]{0,0,1}{-.700,0,0}'
             if inputdata.attr('ColorSeries', ''):
                 colorseries = inputdata.attr('ColorSeries')
             out += ('\\definecolorseries{gradientcolors}%s\n' % colorseries)
             out += ('\\resetcolorseries[130]{gradientcolors}\n')
         return out
 
     def write_footer(self):
         out = ""
         out += ('\\end{tikzpicture}\n')
         out += ('\\end{document}\n')
         return out
 
 
 
 class MainPlot(Plot):
 
     def __init__(self, inputdata):
         self.name = 'MainPlot'
         inputdata.props['PlotStage'] = 'MainPlot'
         self.set_normalisation(inputdata)
         self.stack_histograms(inputdata)
         do_gof = inputdata.props.get('GofLegend', '0') == '1' or inputdata.props.get('GofFrame', '') != ''
         do_taylor = inputdata.props.get('TaylorPlot', '0') == '1'
         if do_gof and not do_taylor:
             self.calculate_gof(inputdata)
         self.set_histo_options(inputdata)
         self.set_borders(inputdata)
         self.yoffset = inputdata.props['PlotSizeY']
 
     def draw(self, inputdata):
         out = ""
         out += ('\n%\n% MainPlot\n%\n')
         offset = 0.
         for rname, i in inputdata.ratio_names():
             if inputdata.has_attr(rname+'SizeY'):
                 offset += inputdata.attr_float(rname+'SizeY')
         labels = self.getLabels(inputdata)
         out += self.panel_header(
           PanelOffset = offset,
           Xmode = 'log' if inputdata.attr_bool('LogX') else 'normal',
           Ymode = 'log' if inputdata.attr_bool('LogY') else 'normal',
           Zmode = inputdata.attr_bool('LogZ'),
           PanelHeight = inputdata.props['PlotSizeY'],
           PanelWidth = inputdata.props['PlotSizeX'],
           Xmin = self.xmin, Xmax = self.xmax,
           Ymin = self.ymin, Ymax = self.ymax,
           Zmin = self.zmin, Zmax = self.zmax,
           Labels = { l : inputdata.attr(l) for l in labels if inputdata.has_attr(l) },
           XLabelSep = inputdata.attr_float('XLabelSep', 0.7) if 'XLabel' in labels else None,
           YLabelSep = inputdata.attr_float('YLabelSep', 1.2) if 'YLabel' in labels else None,
           XTickShift = inputdata.attr_float('XTickShift', 0.1) if 'XLabel' in labels else None,
           YTickShift = inputdata.attr_float('YTickShift', 0.1) if 'YLabel' in labels else None,
           MajorTickLength = inputdata.attr_float('MajorTickLength', 0.30),
           MinorTickLength = inputdata.attr_float('MinorTickLength', 0.15),
           MinorTicks = { axis : inputdata.attr_int('%sMinorTickMarks' % axis, 4) for axis in ['X', 'Y', 'Z'] },
           CustomTicks = { axis : self.getTicks(inputdata, axis) for axis in ['X', 'Y', 'Z'] },
           NeedsXLabels = self.needsXLabel(inputdata),
           #Grid = inputdata.doGrid(),
           is2D = inputdata.is2dim,
           is3D = inputdata.attr_bool('Is3D', 0),
           HRotate = inputdata.attr_int('HRotate', 0),
           VRotate = inputdata.attr_int('VRotate', 0),
           ColorMap = inputdata.attr('ColorMap', 'jet'),
           #LegendAlign = inputdata.getLegendAlign(),
           #LegendPos = inputdata.getLegendPos(),
         )
         out += self.plot_object(inputdata)
         out += self.panel_footer()
         return out
 
     def plot_object(self, inputdata):
         out = ""
 
         if inputdata.attr_bool('DrawSpecialFirst', False):
             for s in inputdata.special.values():
                  out += s.draw(inputdata)
         if inputdata.attr_bool('DrawFunctionFirst', False):
             for f in inputdata.functions.values():
                 out += f.draw(inputdata, self.props['Borders'][0], self.props['Borders'][1])
         for key in inputdata.props['DrawOnly']:
             #add_legend = inputdata.attr_bool('Legend')
             out += inputdata.histos[key].draw() #add_legend)
         if not inputdata.attr_bool('DrawSpecialFirst', False):
             for s in inputdata.special.values():
                  out += s.draw(inputdata)
         if not inputdata.attr_bool('DrawFunctionFirst', False):
             for f in inputdata.functions.values():
                 out += f.draw(inputdata, self.props['Borders'][0], self.props['Borders'][1])
 
         for lname, i in inputdata.legend_names():
             if inputdata.attr_bool(lname, False):
                 legend = Legend(inputdata.props,inputdata.histos,inputdata.functions, lname, i)
                 out += legend.draw()
 
         return out
 
     def needsXLabel(self, inputdata):
         if inputdata.attr('PlotTickLabels') == '0':
             return False
         # only draw the x-axis label if there are no ratio panels
         drawlabels = not any([ inputdata.attr_bool(rname) for rname, _ in inputdata.ratio_names() ])
         return  drawlabels
 
     def getLabels(self, inputdata):
         labels = ['Title', 'YLabel']
         if self.needsXLabel(inputdata):
             labels.append('XLabel')
             if inputdata.props['is2dim']:
                 labels.append('ZLabel')
         return labels
 
     def calculate_gof(self, inputdata):
         refdata = inputdata.props.get('GofReference')
         if refdata is None:
             refdata = inputdata.props.get('RatioPlotReference')
 
         if refdata is None:
             inputdata.props['GofLegend'] = '0'
             inputdata.props['GofFrame'] = ''
             return
 
         def pickcolor(gof):
             color = None
             colordefs = {}
             for i in inputdata.props.setdefault('GofFrameColor', '0:green 3:yellow 6:red!70').strip().split():
                 foo = i.split(':')
                 if len(foo) != 2:
                     continue
                 colordefs[float(foo[0])] = foo[1]
             for col in sorted(colordefs.keys()):
                 if gof >= col:
                     color=colordefs[col]
             return color
 
         inputdata.props.setdefault('GofLegend', '0')
         inputdata.props.setdefault('GofFrame', '')
         inputdata.props.setdefault('FrameColor', None)
 
         for key in inputdata.props['DrawOnly']:
             if key == refdata:
                 continue
             if inputdata.props['GofLegend'] != '1' and key != inputdata.props['GofFrame']:
                 continue
             if inputdata.props.get('GofType', 'chi2') != 'chi2':
                 return
             gof = inputdata.histos[key].getChi2(inputdata.histos[refdata])
             if key == inputdata.props['GofFrame'] and inputdata.props['FrameColor'] is None:
                 inputdata.props['FrameColor'] = pickcolor(gof)
             if inputdata.histos[key].props.setdefault('Title', '') != '':
                 inputdata.histos[key].props['Title'] += ', '
             inputdata.histos[key].props['Title'] += '$\\chi^2/n={}$%1.2f' %gof
 
 
 
 class TaylorPlot(Plot):
 
     def __init__(self, inputdata):
         self.refdata = inputdata.props['TaylorPlotReference']
         self.calculate_taylorcoordinates(inputdata)
 
     def calculate_taylorcoordinates(self,inputdata):
         foo = inputdata.props['DrawOnly'].pop(inputdata.props['DrawOnly'].index(self.refdata))
         inputdata.props['DrawOnly'].append(foo)
         for i in inputdata.props['DrawOnly']:
             print(i)
             print('meanbinval  = ', inputdata.histos[i].getMeanBinValue())
             print('sigmabinval = ', inputdata.histos[i].getSigmaBinValue())
             print('chi2/nbins  = ', inputdata.histos[i].getChi2(inputdata.histos[self.refdata]))
             print('correlation = ', inputdata.histos[i].getCorrelation(inputdata.histos[self.refdata]))
             print('distance    = ', inputdata.histos[i].getRMSdistance(inputdata.histos[self.refdata]))
 
 
 
 class RatioPlot(Plot):
 
     def __init__(self, inputdata, i):
         self.number = i
         self.name='RatioPlot%s' % (str(i) if i else '')
         # initialise histograms even when no main plot
         self.set_normalisation(inputdata)
         self.refdata = inputdata.props[self.name+'Reference']
         if not inputdata.histos.has_key(self.refdata):
             print('ERROR: %sReference=%s not found in:' % (self.name,self.refdata))
             for i in inputdata.histos.keys():
                 print('    ', i)
             sys.exit(1)
         if not inputdata.has_attr('RatioPlotYOffset'):
             inputdata.props['RatioPlotYOffset'] = inputdata.props['PlotSizeY']
         if not inputdata.has_attr(self.name + 'SameStyle'):
           inputdata.props[self.name+'SameStyle'] = '1'
         self.yoffset = inputdata.props['RatioPlotYOffset'] + inputdata.props[self.name+'SizeY']
         inputdata.props['PlotStage'] = self.name
         inputdata.props['RatioPlotYOffset'] = self.yoffset
         inputdata.props['PlotSizeY'] = inputdata.props[self.name+'SizeY']
         inputdata.props['LogY'] = inputdata.props.get(self.name+"LogY", False)
 
         # TODO: It'd be nice it this wasn't so MC-specific
         rpmode = inputdata.props.get(self.name+'Mode', "mcdata")
         if rpmode=='deviation':
             inputdata.props['YLabel']='$(\\text{MC}-\\text{data})$'
             inputdata.props['YMin']=-2.99
             inputdata.props['YMax']=2.99
         elif rpmode=='delta':
             inputdata.props['YLabel']='\\delta'
             inputdata.props['YMin']=-0.5
             inputdata.props['YMax']=0.5
         elif rpmode=='deltapercent':
             inputdata.props['YLabel']='\\delta\;[\%]'
             inputdata.props['YMin']=-50.
             inputdata.props['YMax']=50.
         elif rpmode=='deltamc':
             inputdata.props['YLabel']='Data/MC'
             inputdata.props['YMin']=0.5
             inputdata.props['YMax']=1.5
         else:
             inputdata.props['YLabel'] = 'MC/Data'
             inputdata.props['YMin'] = 0.5
             inputdata.props['YMax'] = 1.5
 
         if inputdata.has_attr(self.name+'YLabel'):
             inputdata.props['YLabel'] = inputdata.props[self.name+'YLabel']
         if inputdata.has_attr(self.name+'YMin'):
             inputdata.props['YMin'] = inputdata.props[self.name+'YMin']
         if inputdata.has_attr(self.name+'YMax'):
             inputdata.props['YMax'] = inputdata.props[self.name+'YMax']
         if inputdata.has_attr(self.name+'YLabelSep'):
             inputdata.props['YLabelSep'] = inputdata.props[self.name+'YLabelSep']
         if not inputdata.has_attr(self.name+'ErrorBandColor'):
             inputdata.props[self.name+'ErrorBandColor'] = 'yellow'
         if inputdata.props[self.name+'SameStyle']=='0':
             inputdata.histos[self.refdata].props['ErrorBandColor'] = inputdata.props[self.name+'ErrorBandColor']
             inputdata.histos[self.refdata].props['ErrorBandOpacity'] = inputdata.props[self.name+'ErrorBandOpacity']
             inputdata.histos[self.refdata].props['ErrorBands'] = '1'
             inputdata.histos[self.refdata].props['ErrorBars'] = '0'
             inputdata.histos[self.refdata].props['ErrorTubes'] = '0' 
             inputdata.histos[self.refdata].props['LineStyle'] = 'solid'
             inputdata.histos[self.refdata].props['LineColor'] = 'black'
             inputdata.histos[self.refdata].props['LineWidth'] = '0.3pt'
             inputdata.histos[self.refdata].props['MarkerStyle'] = ''
             inputdata.histos[self.refdata].props['ConnectGaps'] = '1'
 
         self.calculate_ratios(inputdata)
         self.set_borders(inputdata)
 
 
     def draw(self, inputdata):
         out = ''
         out += ('\n%\n% RatioPlot\n%\n')
         offset = 0.
         for rname, i in inputdata.ratio_names():
             if i > self.number and inputdata.has_attr(rname+'SizeY'):
                 offset += inputdata.attr_float(rname+'SizeY')
         labels = self.getLabels(inputdata)
         out += self.panel_header(
           PanelOffset = offset,
           Xmode = 'log' if inputdata.attr_bool('LogX') else 'normal',
           Ymode = 'log' if inputdata.attr_bool('LogY') else 'normal',
           Zmode = inputdata.attr_bool('LogZ'),
           PanelHeight = inputdata.props['PlotSizeY'],
           PanelWidth = inputdata.props['PlotSizeX'],
           Xmin = self.xmin, Xmax = self.xmax,
           Ymin = self.ymin, Ymax = self.ymax,
           Zmin = self.zmin, Zmax = self.zmax,
           Labels = { l : inputdata.attr(l) for l in labels if inputdata.has_attr(l) },
           XLabelSep = inputdata.attr_float('XLabelSep', 0.7) if 'XLabel' in labels else None,
           YLabelSep = inputdata.attr_float('YLabelSep', 1.2) if 'YLabel' in labels else None,
           XTickShift = inputdata.attr_float('XTickShift', 0.1) if 'XLabel' in labels else None,
           YTickShift = inputdata.attr_float('YTickShift', 0.1) if 'YLabel' in labels else None,
           MajorTickLength = inputdata.attr_float('MajorTickLength', 0.30),
           MinorTickLength = inputdata.attr_float('MinorTickLength', 0.15),
           MinorTicks = { axis : self.getMinorTickMarks(inputdata, axis) for axis in ['X', 'Y', 'Z'] },
           CustomTicks = { axis : self.getTicks(inputdata, axis) for axis in ['X', 'Y', 'Z'] },
           NeedsXLabels = self.needsXLabel(inputdata),
           #Grid = inputdata.doGrid(self.name),
           is2D = inputdata.is2dim,
           is3D = inputdata.attr_bool('Is3D', 0),
           HRotate = inputdata.attr_int('HRotate', 0),
           VRotate = inputdata.attr_int('VRotate', 0),
           ColorMap = inputdata.attr('ColorMap', 'jet'),
           #LegendAlign = inputdata.getLegendAlign(self.name),
           #LegendPos = inputdata.getLegendPos(self.name),
         )
         out += self.add_object(inputdata)
 
         for lname, i in inputdata.legend_names():
             if inputdata.attr_bool(self.name + lname, False):
                 legend = Legend(inputdata.props,inputdata.histos,inputdata.functions, self.name + lname, i)
                 out += legend.draw()
 
         out += self.panel_footer()
         return out
 
     def calculate_ratios(self, inputdata):
         inputdata.ratios = {}
         inputdata.ratios = copy.deepcopy(inputdata.histos)
         name = inputdata.attr(self.name+'DrawOnly').pop(inputdata.attr(self.name+'DrawOnly').index(self.refdata))
         reffirst = inputdata.attr(self.name+'DrawReferenceFirst') != '0'
         if reffirst and inputdata.histos[self.refdata].attr_bool('ErrorBands'):
             inputdata.props[self.name+'DrawOnly'].insert(0, name)
         else:
             inputdata.props[self.name+'DrawOnly'].append(name)
         rpmode = inputdata.props.get(self.name+'Mode', 'mcdata')
         for i in inputdata.props[self.name+'DrawOnly']: # + [ self.refdata ]:
             if i != self.refdata:
                 if rpmode == 'deviation':
                     inputdata.ratios[i].deviation(inputdata.ratios[self.refdata])
                 elif rpmode == 'delta':
                     inputdata.ratios[i].delta(inputdata.ratios[self.refdata])
                 elif rpmode == 'deltapercent':
                     inputdata.ratios[i].deltapercent(inputdata.ratios[self.refdata])
                 elif rpmode == 'datamc':
                     inputdata.ratios[i].dividereverse(inputdata.ratios[self.refdata])
                     inputdata.ratios[i].props['ErrorBars'] = '1'
                 else:
                     inputdata.ratios[i].divide(inputdata.ratios[self.refdata])
         if rpmode == 'deviation':
             inputdata.ratios[self.refdata].deviation(inputdata.ratios[self.refdata])
         elif rpmode == 'delta':
             inputdata.ratios[self.refdata].delta(inputdata.ratios[self.refdata])
         elif rpmode == 'deltapercent':
             inputdata.ratios[self.refdata].deltapercent(inputdata.ratios[self.refdata])
         elif rpmode == 'datamc':
             inputdata.ratios[self.refdata].dividereverse(inputdata.ratios[self.refdata])
         else:
             inputdata.ratios[self.refdata].divide(inputdata.ratios[self.refdata])
 
 
     def add_object(self, inputdata):
         out = ""
 
         if inputdata.attr_bool('DrawSpecialFirst', False):
             for s in inputdata.special.values():
                  out += s.draw(inputdata)
         if inputdata.attr_bool('DrawFunctionFirst'):
             for i in inputdata.functions.keys():
                 out += inputdata.functions[i].draw(inputdata, self.props['Borders'][0], self.props['Borders'][1])
 
         for key in inputdata.props[self.name+'DrawOnly']:
             if inputdata.has_attr(self.name+'Mode') and inputdata.attr(self.name+'Mode') == 'datamc':
                 if key == self.refdata:  continue
             #add_legend = inputdata.attr_bool(self.name+'Legend')
             out += inputdata.ratios[key].draw() #add_legend)
         if not inputdata.attr_bool('DrawFunctionFirst'):
             for i in inputdata.functions.keys():
                 out += inputdata.functions[i].draw(inputdata, self.props['Borders'][0], self.props['Borders'][1])
         if not inputdata.attr_bool('DrawSpecialFirst', False):
             for s in inputdata.special.values():
                  out += s.draw(inputdata)
 
         return out
 
     def getMinorTickMarks(self, inputdata, axis):
         tag = '%sMinorTickMarks' % axis
         if inputdata.has_attr(self.name + tag):
           return inputdata.attr_int(self.name + tag)
         return inputdata.attr_int(tag, 4)
 
     def needsXLabel(self, inputdata):
         # only plot x label if it's the last ratio panel
         ratios = [ i for rname, i in inputdata.ratio_names() if inputdata.attr_bool(rname, True) and inputdata.attr(rname + 'Reference', False) ]
         return ratios[-1] == self.number
 
     def getLabels(self, inputdata):
         labels = ['YLabel']
         drawtitle = inputdata.has_attr('MainPlot') and not inputdata.attr_bool('MainPlot')
         if drawtitle and not any([inputdata.attr_bool(rname) for rname, i in inputdata.ratio_names() if i < self.number]):
             labels.append('Title')
 
         if self.needsXLabel(inputdata):
             labels.append('XLabel')
         return labels
 
 
 class Legend(Described):
 
     def __init__(self, props, histos, functions, name, number):
         self.name = name
         self.number = number
         self.histos = histos
         self.functions = functions
         self.props = props
 
     def draw(self):
         legendordermap = {}
         legendlist = self.props['DrawOnly'] + list(self.functions.keys())
         if self.name + 'Only' in self.props:
             legendlist = []
             for legend in self.props[self.name+'Only'].strip().split():
                 if legend in self.histos or legend in self.functions:
                     legendlist.append(legend)
         for legend in legendlist:
             order = 0
             if legend in self.histos and 'LegendOrder' in self.histos[legend].props:
                 order = int(self.histos[legend].props['LegendOrder'])
             if legend in self.functions and 'LegendOrder' in self.functions[legend].props:
                 order = int(self.functions[legend].props['LegendOrder'])
             if not order in legendordermap:
                 legendordermap[order] = []
             legendordermap[order].append(legend)
 
         orderedlegendlist=[]
         for i in sorted(legendordermap.keys()):
             orderedlegendlist.extend(legendordermap[i])
             
         if self.props['is2dim']:
             return self.draw_2dlegend(orderedlegendlist)
 
         out = ""
         out += '\n%\n% Legend\n%\n'
         talign = 'right' if self.getLegendAlign() == 'left' else 'left'
         posalign = 'left' if talign == 'right' else 'right'
         legx = float(self.getLegendXPos()); legy = float(self.getLegendYPos())
         ypos = legy -0.05*6/self.props['PlotSizeY']
         if self.props.has_key(self.name+'Title'):
             for i in self.props[self.name+'Title'].strip().split('\\\\'):
                 out += ('\\node[black, inner sep=0, align=%s, %s,\n' % (posalign, talign))
                 out += ('] at (rel axis cs: %4.3f,%4.3f) {%s};\n' % (legx, ypos, i))
                 ypos -= 0.075*6/self.props['PlotSizeY']
         offset = self.attr_float(self.name+'EntryOffset', 0.)
         separation = self.attr_float(self.name+'EntrySeparation', 0.)
         hline = True; vline = True
         if self.props.has_key(self.name+'HorizontalLine'):
             hline = self.props[self.name+'HorizontalLine'] != '0'
         if self.props.has_key(self.name+'VerticalLine'):
             vline = self.props[self.name+'VerticalLine'] != '0'
 
         rel_xpos_sign = 1.0
         if self.getLegendAlign() == 'right':
             rel_xpos_sign = -1.0
         xwidth = self.getLegendIconWidth()
         xpos1 = legx -0.02*rel_xpos_sign-0.08*xwidth*rel_xpos_sign
         xpos2 = legx -0.02*rel_xpos_sign
         xposc = legx -0.02*rel_xpos_sign-0.04*xwidth*rel_xpos_sign
         xpostext = 0.1*rel_xpos_sign
 
         for i in orderedlegendlist:
             if self.histos.has_key(i):
                 drawobject=self.histos[i]
             elif self.functions.has_key(i):
                 drawobject=self.functions[i]
             else:
                 continue
             title = drawobject.getTitle()
             mopts = pat_options.search(drawobject.path)
             if mopts and not self.props.get("RemoveOptions", 0):
                 opts = list(mopts.groups())[0].lstrip(':').split(":")
                 for opt in opts:
                     if opt in self.props['_OptSubs']:
                         title += ' %s' % self.props['_OptSubs'][opt]
                     else:
                         title += ' [%s]' % opt
             if title == '':
                 continue
             else:
                 titlelines=[]
                 for i in title.strip().split('\\\\'):
                     titlelines.append(i)
                 ypos -= 0.075*6/self.props['PlotSizeY']*separation
                 boxtop     = 0.045*(6./self.props['PlotSizeY'])
                 boxbottom  = 0.
                 lineheight = 0.5*(boxtop-boxbottom)
                 xico = xpostext + xposc
                 xhi = xpostext + xpos2
                 xlo = xpostext + xpos1
                 yhi = ypos + lineheight
                 ylo = ypos - lineheight
                 xleg = legx + xpostext;
                 # options set -> lineopts
                 setup = ('%s,\n' % drawobject.getLineColor())
                 linewidth = drawobject.getLineWidth()
                 try:
                     float(linewidth)
                     linewidth += 'cm'
                 except ValueError:
                     pass
                 setup += ('draw opacity=%s,\n' % drawobject.getLineOpacity())
 
                 if drawobject.getErrorBands():
                     out += ('\\fill[\n')
                     out += (' fill=none, fill opacity=%s,\n' % drawobject.getErrorBandOpacity())
                     if drawobject.getPatternFill():
                         out += ('fill=%s,\n' % drawobject.getErrorBandFillColor())
                     out += ('] (rel axis cs: %4.3f, %4.3f) rectangle (rel axis cs: %4.3f, %4.3f);\n' % (xlo,ylo,xhi,yhi))
                     if drawobject.getPattern() != '':
                         out += ('\\fill[\n')
                         out += ('pattern = %s,\n' % drawobject.getPattern())
                         if drawobject.getErroBandHatchDistance() != "":
                             out += ('hatch distance = %s,\n' % drawobject.getErroBandHatchDistance())
                         if drawobject.getPatternColor() != '':
                             out += ('pattern color = %s,\n' % drawobject.getPatternColor())
                         out += ('] (rel axis cs: %4.3f, %4.3f) rectangle (rel axis cs: %4.3f, %4.3f);\n' % (xlo,ylo,xhi,yhi))
                     if drawobject.getFillBorder():
                         out += ('\\draw[line style=solid, thin, %s] (rel axis cs: %4.3f,%4.3f)' % (setup, xlo, yhi))
                         out += ('-- (rel axis cs: %4.3f, %4.3f);\n' % (xhi, yhi))
                         out += ('\\draw[line style=solid, thin, %s] (rel axis cs: %4.3f,%4.3f)' % (setup, xlo, ylo))
                         out += ('-- (rel axis cs: %4.3f, %4.3f);\n' % (xhi, ylo))
 
                 setup += ('line width={%s},\n' % linewidth)
                 setup += ('style={%s},\n' % drawobject.getLineStyle())
                 if drawobject.getLineDash():
                     setup += ('dash pattern=%s,\n' % drawobject.getLineDash())
                 if drawobject.getErrorBars() and vline:
                     out += ('\\draw[%s] (rel axis cs: %4.3f,%4.3f)' % (setup, xico, ylo))
                     out += (' -- (rel axis cs: %4.3f, %4.3f);\n' % (xico, yhi))
                 if hline:
                     out += ('\\draw[%s] (rel axis cs: %4.3f,%4.3f)' % (setup, xlo, ypos))
                     out += ('-- (rel axis cs: %4.3f, %4.3f);\n' % (xhi, ypos))
 
                 if drawobject.getMarkerStyle() != 'none':
                     setup += ('mark options={\n')
                     setup += ('    %s, fill color=%s,\n' % (drawobject.getMarkerColor(), drawobject.getMarkerColor()))
                     setup += ('    mark size={%s}, scale=%s,\n' % (drawobject.getMarkerSize(), drawobject.getMarkerScale()))
                     setup += ('},\n')
 
                     out += ('\\draw[mark=*, %s] plot coordinates {\n' % setup)
                     out += ('(rel axis cs: %4.3f,%4.3f)};\n' % (xico, ypos))
                     ypos -= 0.075*6/self.props['PlotSizeY']*offset
                 for i in titlelines:
                     out += ('\\node[black, inner sep=0, align=%s, %s,\n' % (posalign, talign))
                     out += ('] at (rel axis cs: %4.3f,%4.3f) {%s};\n' % (xleg, ypos, i))
                     ypos -= 0.075*6/self.props['PlotSizeY']
         if 'CustomLegend' in self.props:
             for i in self.props['CustomLegend'].strip().split('\\\\'):
                 out += ('\\node[black, inner sep=0, align=%s, %s,\n' % (posalign, talign))
                 out += ('] at (rel axis cs: %4.3f, %4.3f) {%s};\n' % (xleg, ypos, i))
                 ypos -= 0.075*6/self.props['PlotSizeY']
         return out
 
     def draw_2dlegend(self,orderedlegendlist):
         histos = ""
         for i in range(0,len(orderedlegendlist)):
             if self.histos.has_key(orderedlegendlist[i]):
                 drawobject=self.histos[orderedlegendlist[i]]
             elif self.functions.has_key(orderedlegendlist[i]):
                 drawobject=self.functions[orderedlegendlist[i]]
             else:
                 continue
             title = drawobject.getTitle()
             if title == '':
                 continue
             else:
                 histos += title.strip().split('\\\\')[0]
                 if not i==len(orderedlegendlist)-1:
                     histos += ', '
         #out = '\\rput(1,1){\\rput[rB](0, 1.7\\labelsep){\\normalsize '+histos+'}}\n'
         out += ('\\node[black, inner sep=0, align=left]\n')
         out += ('at (rel axis cs: 1,1) {\\normalsize{%s}};\n' % histos)
         return out
 
 
     def getLegendXPos(self):
         return self.props.get(self.name+'XPos', '0.95' if self.getLegendAlign() == 'right' else '0.53')
 
     def getLegendYPos(self):
         return self.props.get(self.name+'YPos', '0.93')
 
     def getLegendAlign(self):
         la = self.props.get(self.name+'Align', 'left')
         if la == 'l':    return 'left'
         elif la == 'c':  return 'center'
         elif la == 'r':  return 'right'
         else:            return  la
 
     def getLegendIconWidth(self):
         return float(self.props.get(self.name+'IconWidth', '1.0'))
 
 
 class PlotFunction(object):
     def __init__(self, f):
         self.props = {}
         self.read_input(f)
 
     def read_input(self, f):
         self.code='def histomangler(x):\n'
         iscode=False
         for line in f:
             if is_end_marker(line, 'HISTOGRAMMANGLER'):
                 break
             elif is_comment(line):
                 continue
             else:
                 m = pat_property.match(line)
                 if iscode:
                     self.code+='    '+line
                 elif m:
                     prop, value = m.group(1,2)
                     if prop=='Code':
                         iscode=True
                     else:
                         self.props[prop] = value
         if not iscode:
             print('++++++++++ ERROR: No code in function')
         else:
             foo = compile(self.code, '<string>', 'exec')
             exec(foo)
             self.histomangler = histomangler
 
     def transform(self, x):
         return self.histomangler(x)
 
 
 
 class Special(Described):
 
     def __init__(self, f):
         self.props = {}
         self.data = []
         self.read_input(f)
         if not self.props.has_key('Location'):
             self.props['Location']='MainPlot'
         self.props['Location']=self.props['Location'].split('\t')
         if not self.props.has_key('Coordinates'):
             self.props['Coordinates'] = 'Relative' 
 
     def read_input(self, f):
         for line in f:
             if is_end_marker(line, 'SPECIAL'):
                 break
             elif is_comment(line):
                 continue
             else:
                 line = line.rstrip()
                 m = pat_property.match(line)
                 if m:
                     prop, value = m.group(1,2)
                     self.props[prop] = value
                 else:
                   self.data.append(line)
 
     def draw(self, inputdata):
         drawme = False
         for i in self.props['Location']:
             if i in inputdata.props['PlotStage']:
                 drawme = True
                 break
         if not drawme:
             return ""
         out = ""
         out += ('\n%\n% Special\n%\n')
         out += ('\\pgfplotsset{\n')
         out += ('  after end axis/.append code={\n')
         for l in self.data:
             cs = 'axis cs:'
             if self.props['Coordinates'].lower() == 'relative':
                 cs = 'rel ' + cs
             atpos = l.index('at')
             cspos = l[atpos:].index('(') + 1
             l = l[:atpos+cspos] + cs + l[atpos+cspos:]
             out += '    %s%s\n' % (l, ';' if l[-1:] != ';' else '')
         out += ('  }\n}\n')
         return out
 
 
 
 class DrawableObject(Described):
 
     def __init__(self, f):
         pass
 
     def getName(self):
         return self.props.get('Name', '')
 
     def getTitle(self):
         return self.props.get('Title', '')
 
     def getLineStyle(self):
         if 'LineStyle' in self.props:
             ## I normally like there to be "only one way to do it", but providing
             ## this dashdotted/dotdashed synonym just seems humane ;-)
             if self.props['LineStyle'] in ('dashdotted', 'dotdashed'):
                 self.props['LineStyle']='dashed'
                 self.props['LineDash']='3pt 3pt .8pt 3pt'
             return self.props['LineStyle']
         else:
             return 'solid'
 
     def getLineDash(self):
         pattern = self.props.get('LineDash', '')
         if pattern:
           # converting this into pgfplots syntax
           # "3pt 3pt .8pt 3pt" becomes
           # "on 3pt off 3pt on .8pt off 3pt"
           for i, val in enumerate(pattern.split(' ')):
             if i == 0:
               pattern = 'on %s' % val
             else:
               pattern += ' %s %s' % ('on' if i % 2 == 0 else 'off', val)
         return pattern
 
     def getLineWidth(self):
         return self.props.get("LineWidth", "0.8pt")
 
     def getColor(self, col):
         if col in self.customCols:
           return self.customCols[col]
         return col
 
     def getLineColor(self):
         return self.getColor(self.props.get("LineColor", "black"))
 
     def getLineOpacity(self):
         return self.props.get("LineOpacity", "1.0")
 
     def getFillOpacity(self):
         return self.props.get("FillOpacity", "1.0")
 
     def getFillBorder(self):
         return self.attr_bool("FillBorder", "1")
 
     def getHatchColor(self):
         return self.getColor(self.props.get("HatchColor", self.getErrorBandColor()))
 
     def getMarkerStyle(self):
         return self.props.get("MarkerStyle", "*" if self.getErrorBars() else "none")
 
     def getMarkerSize(self):
         return self.props.get("MarkerSize", "1.5pt")
 
     def getMarkerScale(self):
         return self.props.get("MarkerScale", "1")
 
     def getMarkerColor(self):
         return self.getColor(self.props.get("MarkerColor", "black"))
 
     def getErrorMarkStyle(self):
         return self.props.get("ErrorMarkStyle", "none")
 
     def getErrorBars(self):
         return bool(int(self.props.get("ErrorBars", "0")))
 
     def getErrorBands(self):
         return bool(int(self.props.get("ErrorBands", "0")))
 
     def getErrorBandColor(self):
         return self.getColor(self.props.get("ErrorBandColor", self.getLineColor()))
 
     def getErrorBandStyle(self):
         return self.props.get("ErrorBandStyle", "solid")
 
     def getPattern(self):
         return self.props.get("ErrorBandPattern", "")
 
     def getPatternColor(self):
         return self.getColor(self.props.get("ErrorBandPatternColor", ""))
 
     def getPatternFill(self):
         return bool(int(self.props.get("ErrorBandFill", self.getPattern() == "")))
 
     def getErrorBandFillColor(self):
         return self.getColor(self.props.get("ErrorBandFillColor", self.getErrorBandColor()))
 
     def getErroBandHatchDistance(self):
         return self.props.get("ErrorBandHatchDistance", "")
 
     def getErrorBandOpacity(self):
         return self.props.get("ErrorBandOpacity", "1.0")
 
     def removeXerrors(self):
         return bool(int(self.props.get("RemoveXerrors", "0")))
 
     def getSmoothLine(self):
         return bool(int(self.props.get("SmoothLine", "0")))
 
     def getShader(self):
         return self.props.get('Shader', 'flat')
 
     def makecurve(self, setup, metadata, data = None): #, legendName = None):
         out = ''
         out += ('\\addplot%s+[\n' % ('3' if self.is2dim else ''))
         out += setup
         out += (']\n')
         out += metadata
         out += ('{\n')
         if data:
             out += data
         out += ('};\n')
         #if legendName:
         #    out += ('\\addlegendentry[\n')
         #    out += ('    image style={yellow, mark=*},\n')
         #    out += (']{%s};\n' % legendName)
         return out
 
     def addcurve(self, points): #, legendName):
         setup = '';
         #setup += ('color=%s,\n' % self.getLineColor())
         setup += ('%s,\n' % self.getLineColor())
         linewidth = self.getLineWidth()
         try:
             float(linewidth)
             linewidth += 'cm'
         except ValueError:
             pass
         setup += ('line width={%s},\n' % linewidth)
         setup += ('style={%s},\n' % self.getLineStyle())
         setup += ('mark=%s,\n' % self.getMarkerStyle())
         if self.getLineDash():
             setup += ('dash pattern=%s,\n' % self.getLineDash())
         if self.getSmoothLine():
             setup += ('smooth,\n')
         #if not legendName:
         #    setup += ('forget plot,\n')
         if self.getMarkerStyle() != 'none':
             setup += ('mark options={\n')
             setup += ('    %s, fill color=%s,\n' % (self.getMarkerColor(), self.getMarkerColor()))
             setup += ('    mark size={%s}, scale=%s,\n' % (self.getMarkerSize(), self.getMarkerScale()))
             setup += ('},\n')
         if self.getErrorBars():
             setup += ('only marks,\n')
             setup += ('error bars/.cd,\n')
             setup += ('x dir=both,x explicit,\n')
             setup += ('y dir=both,y explicit,\n')
             setup += ('error bar style={%s, line width={%s}},\n' % (self.getLineColor(), linewidth))
             setup += ('error mark=%s,\n' % self.getErrorMarkStyle())
             if self.getErrorMarkStyle() != 'none':
                 setup += ('error mark options={line width=%s},\n' % linewidth)
 
         metadata = 'coordinates\n'
         if self.getErrorBars():
             metadata = 'table [x error plus=ex+, x error minus=ex-, y error plus=ey+, y error minus=ey-]\n'
 
         return self.makecurve(setup, metadata, points) #, legendName)
 
     def makeband(self, points):
         setup = ''
         setup += ('%s,\n' % self.getErrorBandColor())
         setup += ('fill opacity=%s,\n' % self.getErrorBandOpacity())
         setup += ('forget plot,\n')
         setup += ('solid,\n')
         setup += ('draw = %s,\n' % self.getErrorBandColor())
         if self.getPatternFill():
             setup += ('fill=%s,\n' % self.getErrorBandFillColor())
         if self.getPattern() != '':
             if self.getPatternFill():
                 setup += ('postaction={\n')
             setup += ('pattern = %s,\n' % self.getPattern())
             if self.getErroBandHatchDistance() != "":
                 setup += ('hatch distance = %s,\n' % self.getErroBandHatchDistance())
             if self.getPatternColor() != '':
                 setup += ('pattern color = %s,\n' % self.getPatternColor())
             if self.getPatternFill():
                 setup += ('fill opacity=1,\n')
                 setup += ('},\n')
         aux = 'draw=none, no markers, forget plot, name path=%s\n'
         env = 'table [x=x, y=%s]\n'
         out = ''
         out += self.makecurve(aux % 'pluserr',  env % 'y+', points)
         out += self.makecurve(aux % 'minuserr', env % 'y-', points)
         out += self.makecurve(setup, 'fill between [of=pluserr and minuserr]\n')
         return out
 
     def make2dee(self, points, zlog, zmin, zmax):
         setup = 'mark=none, surf, shader=%s,\n' % self.getShader()
         metadata = 'table [x index=0, y index=1, z index=2]\n'
         setup += 'restrict z to domain=%s:%s,\n' % (log10(zmin) if zlog else zmin, log10(zmax) if zlog else zmax)
         if zlog:
             metadata = 'table [x index=0, y index=1, z expr=log10(\\thisrowno{2})]\n'
         return self.makecurve(setup, metadata, points)
 
 
 
 class Function(DrawableObject):
 
     def __init__(self, f):
         self.props = {}
         self.read_input(f)
         if not self.props.has_key('Location'):
             self.props['Location']='MainPlot'
         self.props['Location']=self.props['Location'].split('\t')
 
     def read_input(self, f):
         self.code='def plotfunction(x):\n'
         iscode=False
         for line in f:
             if is_end_marker(line, 'FUNCTION'):
                 break
             elif is_comment(line):
                 continue
             else:
                 m = pat_property.match(line)
                 if iscode:
                     self.code+='    '+line
                 elif m:
                     prop, value = m.group(1,2)
                     if prop=='Code':
                         iscode=True
                     else:
                         self.props[prop] = value
         if not iscode:
             print('++++++++++ ERROR: No code in function')
         else:
             foo = compile(self.code, '<string>', 'exec')
             exec(foo)
             self.plotfunction = plotfunction
 
 
     def draw(self, inputdata, xmin, xmax):
         drawme = False
         for key in self.attr('Location'):
             if key in inputdata.attr('PlotStage'):
                 drawme = True
                 break
         if not drawme:
             return ''
         if self.has_attr('XMin') and self.attr('XMin'):
             xmin = self.attr_float('XMin')
         if self.props.has_attr('FunctionXMin') and self.attr('FunctionXMin'):
             xmin = max(xmin, self.attr_float('FunctionXMin'))
         if self.has_attr('XMax') and self.attr('XMax'):
             xmax = self.attr_float('XMax')
         if self.has_attr('FunctionXMax') and self.attr('FunctionXMax'):
             xmax = min(xmax, self.attr_float('FunctionXMax'))
         xmin = min(xmin, xmax)
         xmax = max(xmin, xmax)
         # TODO: Space sample points logarithmically if LogX=1
         points = ''
         xsteps = 500.
         if self.has_attr('XSteps') and self.attr('XSteps'):
             xsteps = self.attr_float('XSteps')
         dx = (xmax - xmin) / xsteps
         x = xmin - dx
         while x < (xmax+2*dx):
             y = self.plotfunction(x)
             points += ('(%s,%s)\n' % (x, y))
             x += dx
         setup = '';
         setup += ('%s,\n' % self.getLineColor())
         linewidth = self.getLineWidth()
         try:
             float(linewidth)
             linewidth += 'cm'
         except ValueError:
             pass
         setup += ('line width={%s},\n' % linewidth)
         setup += ('style={%s},\n' % self.getLineStyle())
         setup += ('smooth, mark=none,\n')
         if self.getLineDash():
             setup += ('dash pattern=%s,\n' % self.getLineDash())
         metadata = 'coordinates\n'
         return self.makecurve(setup, metadata, points)
 
 
 class BinData(object):
     """\
     Store bin edge and value+error(s) data for a 1D or 2D bin.
 
     TODO: generalise/alias the attr names to avoid mention of x and y
     """
 
     def __init__(self, low, high, val, err):
         #print("@", low, high, val, err)
         self.low = floatify(low)
         self.high = floatify(high)
         self.val = float(val)
         self.err = floatpair(err)
 
     @property
     def is2D(self):
         return hasattr(self.low, "__len__") and hasattr(self.high, "__len__")
 
     @property
     def isValid(self):
         invalid_val = (isnan(self.val) or isnan(self.err[0]) or isnan(self.err[1]))
         if invalid_val:
             return False
         if self.is2D:
             invalid_low = any(isnan(x) for x in self.low)
             invalid_high = any(isnan(x) for x in self.high)
         else:
             invalid_low, invalid_high = isnan(self.low), isnan(self.high)
         return not (invalid_low or invalid_high)
 
     @property
     def xmin(self):
         return self.low
     @xmin.setter
     def xmin(self,x):
         self.low = x
 
     @property
     def xmax(self):
         return self.high
     @xmax.setter
     def xmax(self,x):
         self.high = x
 
     @property
     def xmid(self):
         # TODO: Generalise to 2D
         return 0.5 * (self.xmin + self.xmax)
 
     @property
     def xwidth(self):
         # TODO: Generalise to 2D
         assert self.xmin <= self.xmax
         return self.xmax - self.xmin
 
     @property
     def y(self):
         return self.val
     @y.setter
     def y(self, x):
         self.val = x
 
     @property
     def ey(self):
         return self.err
     @ey.setter
     def ey(self, x):
         self.err = x
 
     @property
     def ymin(self):
         return self.y - self.ey[0]
 
     @property
     def ymax(self):
         return self.y + self.ey[1]
 
     def __getitem__(self, key):
         "dict-like access for backward compatibility"
         if key in ("LowEdge"):
             return self.xmin
         elif key == ("UpEdge", "HighEdge"):
             return self.xmax
         elif key == "Content":
             return self.y
         elif key == "Errors":
             return self.ey
 
 
 class Histogram(DrawableObject, Described):
 
     def __init__(self, f, p=None):
         self.props = {}
         self.customCols = {}
         self.is2dim = False
         self.zlog = False
         self.data = []
         self.read_input_data(f)
         self.sigmabinvalue = None
         self.meanbinvalue = None
         self.path = p
 
     def read_input_data(self, f):
         for line in f:
             if is_end_marker(line, 'HISTOGRAM'):
                 break
             elif is_comment(line):
                 continue
             else:
                 line = line.rstrip()
                 m = pat_property.match(line)
                 if m:
                     prop, value = m.group(1,2)
                     self.props[prop] = value
                     if 'Color' in prop and '{' in value:
                       self.customCols[value] = value
                 else:
                     ## Detect symm errs
                     linearray = line.split()
                     if len(linearray) == 4:
                         self.data.append(BinData(*linearray))
                     ## Detect asymm errs
                     elif len(linearray) == 5:
                         self.data.append(BinData(linearray[0], linearray[1], linearray[2], [linearray[3],linearray[4]]))
                     ## Detect two-dimensionality
                     elif len(linearray) in [6,7]:
                         self.is2dim = True
                         # If asymm z error, use the max or average of +- error
                         err = float(linearray[5])
                         if len(linearray) == 7:
                             if self.props.get("ShowMaxZErr", 1):
                                 err = max(err, float(linearray[6]))
                             else:
                                 err = 0.5 * (err + float(linearray[6]))
                         self.data.append(BinData([linearray[0], linearray[2]], [linearray[1], linearray[3]], linearray[4], err))
                     ## Unknown histo format
                     else:
                         raise RuntimeError("Unknown HISTOGRAM data line format with %d entries" % len(linearray))
 
 
     def mangle_input(self):
         norm2int = self.attr_bool("NormalizeToIntegral", False)
         norm2sum = self.attr_bool("NormalizeToSum", False)
         if norm2int or norm2sum:
             if norm2int and norm2sum:
                 print("Cannot normalise to integral and to sum at the same time. Will normalise to the integral.")
             foo = 0.0
             for point in self.data:
                 if norm2int:  foo += point.val*point.xwidth
                 else:         foo += point.val
 
             if foo != 0:
                 for point in self.data:
                     point.val /= foo
                     point.err[0] /= foo
                     point.err[1] /= foo
         scale = self.attr_float('Scale', 1.0)
         if scale != 1.0:
             # TODO: change to "in self.data"?
             for point in self.data:
                 point.val *= scale
                 point.err[0] *= scale
                 point.err[1] *= scale
         if self.attr_float("ScaleError", 0.0):
             scale = self.attr_float("ScaleError")
             for point in self.data:
                 point.err[0] *= scale
                 point.err[1] *= scale
         if self.attr_float('Shift', 0.0):
             shift = self.attr_float("Shift")
             for point in self.data:
                 point.val += shift
         if self.has_attr('Rebin') and self.attr('Rebin') != '':
             rawrebins = self.attr('Rebin').strip().split('\t')
             rebins = []
             maxindex = len(self.data)-1
             if len(rawrebins) % 2 == 1:
                 rebins.append({'Start': self.data[0].xmin,
                                'Rebin': int(rawrebins[0])})
                 rawrebins.pop(0)
             for i in range(0,len(rawrebins),2):
                 if float(rawrebins[i])<self.data[maxindex].xmin:
                     rebins.append({'Start': float(rawrebins[i]),
                                    'Rebin': int(rawrebins[i+1])})
             if (rebins[0]['Start'] > self.data[0].xmin):
                 rebins.insert(0,{'Start': self.data[0].xmin,
                                  'Rebin': 1})
             errortype = self.attr("ErrorType", "stat")
             newdata = []
             lower = self.getBin(rebins[0]['Start'])
             for k in range(0,len(rebins),1):
                 rebin = rebins[k]['Rebin']
                 upper = maxindex
                 end = 1
                 if (k<len(rebins)-1):
                     upper = self.getBin(rebins[k+1]['Start'])
                     end = 0
                 for i in range(lower,(upper/rebin)*rebin+end,rebin):
                     foo=0.
                     barl=0.
                     baru=0.
                     for j in range(rebin):
                         if i+j>maxindex:
                             break
                         binwidth = self.data[i+j].xwidth
                         foo += self.data[i+j].val * binwidth
                         if errortype=="stat":
                             barl += (binwidth * self.data[i+j].err[0])**2
                             baru += (binwidth * self.data[i+j].err[1])**2
                         elif errortype == "env":
                             barl += self.data[i+j].ymin * binwidth
                             baru += self.data[i+j].ymax * binwidth
                         else:
                             logging.error("Rebinning for ErrorType not implemented.")
                             sys.exit(1)
                     upedge = min(i+rebin-1,maxindex)
                     newbinwidth=self.data[upedge].xmax-self.data[i].xmin
                     newcentral=foo/newbinwidth
                     if errortype=="stat":
                         newerror=[sqrt(barl)/newbinwidth,sqrt(baru)/newbinwidth]
                     elif errortype=="env":
                         newerror=[(foo-barl)/newbinwidth,(baru-foo)/newbinwidth]
                     newdata.append(BinData(self.data[i].xmin, self.data[i+rebin-1].xmax, newcentral, newerror))
                 lower = (upper/rebin)*rebin+(upper%rebin)
             self.data=newdata
 
     def add(self, name):
         if len(self.data) != len(name.data):
             print('+++ Error in Histogram.add() for %s: different numbers of bins' % self.path)
         for i, b in enumerate(self.data):
             if fuzzyeq(b.xmin, name.data[i].xmin) and fuzzyeq(b.xmax, name.data[i].xmax):
                 b.val += name.data[i].val
                 b.err[0] = sqrt(b.err[0]**2 + name.data[i].err[0]**2)
                 b.err[1] = sqrt(b.err[1]**2 + name.data[i].err[1]**2)
             else:
                 print('+++ Error in Histogram.add() for %s: binning of histograms differs' % self.path)
 
     def divide(self, name):
         #print(name.path, self.path)
         if len(self.data) != len(name.data):
             print('+++ Error in Histogram.divide() for %s: different numbers of bins' % self.path)
         for i,b in enumerate(self.data):
             if fuzzyeq(b.xmin, name.data[i].xmin) and fuzzyeq(b.xmax, name.data[i].xmax):
                 try:
                     b.err[0] /= name.data[i].val
                 except ZeroDivisionError:
                     b.err[0] = 0.
                 try:
                     b.err[1] /= name.data[i].val
                 except ZeroDivisionError:
                     b.err[1] = 0.
                 try:
                     b.val /= name.data[i].val
                 except ZeroDivisionError:
                     b.val = 1.
 #                b.err[0] = sqrt(b.err[0]**2 + name.data[i].err[0]**2)
 #                b.err[1] = sqrt(b.err[1]**2 + name.data[i].err[1]**2)
             else:
                 print('+++ Error in Histogram.divide() for %s: binning of histograms differs' % self.path)
 
     def dividereverse(self, name):
         if len(self.data) != len(name.data):
             print('+++ Error in Histogram.dividereverse() for %s: different numbers of bins' % self.path)
         for i, b in enumerate(self.data):
             if fuzzyeq(b.xmin, name.data[i].xmin) and fuzzyeq(b.xmax, name.data[i].xmax):
                 try:
                     b.err[0] = name.data[i].err[0]/b.val
                 except ZeroDivisionError:
                     b.err[0] = 0.
                 try:
                     b.err[1] = name.data[i].err[1]/b.val
                 except ZeroDivisionError:
                     b.err[1] = 0.
                 try:
                     b.val = name.data[i].val/b.val
                 except ZeroDivisionError:
                     b.val = 1.
             else:
                 print('+++ Error in Histogram.dividereverse(): binning of histograms differs')
 
     def deviation(self, name):
         if len(self.data) != len(name.data):
             print('+++ Error in Histogram.deviation() for %s: different numbers of bins' % self.path)
         for i, b in enumerate(self.data):
             if fuzzyeq(b.xmin, name.data[i].xmin) and fuzzyeq(b.xmax, name.data[i].xmax):
                 b.val -= name.data[i].val
                 try:
                     b.val /= 0.5*sqrt((name.data[i].err[0] + name.data[i].err[1])**2 + (b.err[0] + b.err[1])**2)
                 except ZeroDivisionError:
                     b.val = 0.0
                 try:
                     b.err[0] /= name.data[i].err[0]
                 except ZeroDivisionError:
                     b.err[0] = 0.0
                 try:
                     b.err[1] /= name.data[i].err[1]
                 except ZeroDivisionError:
                     b.err[1] = 0.0
             else:
                 print('+++ Error in Histogram.deviation() for %s: binning of histograms differs' % self.path)
 
     def delta(self,name):
         self.divide(name)
         for point in self.data:
             point.val -= 1.
 
     def deltapercent(self,name):
         self.delta(name)
         for point in self.data:
             point.val *= 100.
             point.err[0] *= 100.
             point.err[1] *= 100.
 
     def getBin(self,x):
         if x<self.data[0].xmin or x>self.data[len(self.data)-1].xmax:
             print('+++ Error in Histogram.getBin(): x out of range')
             return float('nan')
         for i in range(1,len(self.data)-1,1):
             if x<self.data[i].xmin:
                 return i-1
         return len(self.data)-1
 
     def getChi2(self, name):
         chi2 = 0.
         for i, b in enumerate(self.data):
             if fuzzyeq(b.xmin, name.data[i].xmin) and fuzzyeq(b.xmax, name.data[i].xmax):
                 try:
                     denom  = 0.25*(b.err[0] + b.err[1])**2 + 0.25*(name.data[i].err[0] + name.data[i].err[1])**2
                     chi2 += (self.data[i].val - name.data[i].val) ** 2 / denom
                 except ZeroDivisionError:
                     pass
             else:
                 print('+++ Error in Histogram.getChi2() for %s: binning of histograms differs' % self.path)
         return chi2 / len(self.data)
 
     def getSigmaBinValue(self):
         if self.sigmabinvalue is None:
             self.sigmabinvalue = 0.
             sumofweights = 0.
             for point in self.data:
                 if self.is2dim:
                     binwidth = abs((point.xmax[0] - point.xmin[0])*(point.xmax[1] - point.xmin[1]))
                 else:
                     binwidth = abs(point.xmax - point.xmin)
                 self.sigmabinvalue += binwidth*(point.val - self.getMeanBinValue()) ** 2
                 sumofweights += binwidth
             self.sigmabinvalue = sqrt(self.sigmabinvalue / sumofweights)
         return self.sigmabinvalue
 
     def getMeanBinValue(self):
         if self.meanbinvalue==None:
             self.meanbinvalue = 0.
             sumofweights = 0.
             for point in self.data:
                 if self.is2dim:
                     binwidth = abs((point.xmax[0] - point.xmin[0])*(point.xmax[1] - point.xmin[1]))
                 else:
                     binwidth = abs(point.xmax - point.xmin)
                 self.meanbinvalue += binwidth*point.val
                 sumofweights += binwidth
             self.meanbinvalue /= sumofweights
         return self.meanbinvalue
 
     def getCorrelation(self, name):
         correlation = 0.
         sumofweights = 0.
         for i, b in enumerate(self.data):
             if fuzzyeq(b.xmin, name.data[i].xmin) and fuzzyeq(b.xmax, name.data[i].xmax):
                 if self.is2dim:
                     binwidth = abs( (b.xmax[0] - b.xmin[0]) * (b.xmax[1] - b.xmin[1]) )
                 else:
                     binwidth = abs(b.xmax - b.xmin)
                 correlation += binwidth * (b.val - self.getMeanBinValue()) * (name.data[i].val - name.getMeanBinValue())
                 sumofweights += binwidth
             else:
                 print('+++ Error in Histogram.getCorrelation(): binning of histograms differs' % self.path)
         correlation /= sumofweights
         try:
             correlation /= self.getSigmaBinValue()*name.getSigmaBinValue()
         except ZeroDivisionError:
             correlation = 0
         return correlation
 
     def getRMSdistance(self,name):
         distance = 0.
         sumofweights = 0.
         for i, b in enumerate(self.data):
             if fuzzyeq(b.xmin, name.data[i].xmin) and fuzzyeq(b.xmax, name.data[i].xmax):
                 if self.is2dim:
                     binwidth = abs( (b.xmax[0] - b.xmin[0]) * (b.xmax[1] - b.xmin[1]) )
                 else:
                     binwidth = abs(b.xmax - b.xmin)
                 distance += binwidth * ( (b.val - self.getMeanBinValue()) - (name.data[i].val - name.getMeanBinValue())) ** 2
                 sumofweights += binwidth
             else:
                 print('+++ Error in Histogram.getRMSdistance() for %s: binning of histograms differs' % self.path)
         distance = sqrt(distance/sumofweights)
         return distance
 
     def draw(self): #, addLegend = None):
         out = ''
         seen_nan = False
         if any(b.isValid for b in self.data):
             out += "% START DATA\n"
             #legendName = self.getTitle() if addLegend else ''
             if self.is2dim:
                 points = ''; rowlo = ''; rowhi = ''
                 thisx = None; thisy = None
                 xinit = True; yinit = None
                 zmin = min([ b.val for b in self.data if b.val ])
                 zmax = max([ b.val for b in self.data if b.val ])
                 for b in self.data:
                     if thisx == None or thisx != b.high[0]:
                         if thisx != None:
                             points += '%s\n%s\n' % (rowlo, rowhi)
                             rowlo = ''; rowhi = ''
                         thisx = b.high[0]
                     rowlo += ('%s %s %s\n' % (1.001 * b.low[0],  1.001 * b.low[1],  b.val))
                     rowlo += ('%s %s %s\n' % (1.001 * b.low[0],  0.999 * b.high[1], b.val))
                     rowhi += ('%s %s %s\n' % (0.999 * b.high[0], 1.001 * b.low[1],  b.val))
                     rowhi += ('%s %s %s\n' % (0.999 * b.high[0], 0.999 * b.high[1], b.val))
                 points += '%s\n%s\n' % (rowlo, rowhi)
                 points += '\n'
                 out += self.make2dee(points, self.zlog, zmin, zmax)
             else:
                 if self.getErrorBands():
                     self.props['SmoothLine'] = 0
                     points = ('x y- y+\n')
                     for b in self.data:
                         if isnan(b.val) or isnan(b.err[0]) or isnan(b.err[1]):
                             seen_nan = True
                             continue
                         points += ('%s %s %s\n' % (b.xmin, b.val - b.err[0], b.val + b.err[1]))
                         points += ('%s %s %s\n' % (b.xmax, b.val - b.err[0], b.val + b.err[1]))
                     out += self.makeband(points)
 
                 points = ''
                 if self.getErrorBars():
                     self.props['SmoothLine'] = 0
                     points += ('x y ex- ex+ ey- ey+\n')
                 for b in self.data:
                     if isnan(b.val):
                         seen_nan = True
                         continue
                     if self.getErrorBars():
                         if isnan(b.err[0]) or isnan(b.err[1]):
                             seen_nan = True
                             continue
                         if b.val == 0. and b.err == [0.,0.]:
                             continue
                         points += ('%s %s ' % (b.xmid, b.val))
                         if self.removeXerrors():
                             points += ('0 0 ')
                         else:
                             points += ('%s %s ' % (b.xmid - b.xmin, b.xmax - b.xmid))
                         points += ('%s %s'  % (b.err[0], b.err[1]))
                     elif self.getSmoothLine():
                         points += ('(%s,%s)' % (b.xmid, b.val))
                     else:
                         points += ('(%s,%s) (%s,%s)' % (b.xmin, b.val, b.xmax, b.val))
                     points += ('\n')
                 out += self.addcurve(points) #, legendName)
             out += "% END DATA\n"
         else:
             print("WARNING: No valid bin value/errors/edges to plot!")
             out += "% NO DATA!\n"
 
         if seen_nan:
             print ("WARNING: NaN-valued value or error bar!")
         return out
 
     #def addLegend(self):
     #    out = ''
     #    if self.getTitle():
     #      out += ('\\addlegendentry{%s}\n' % self.getTitle())
     #    return out
 
     def getXMin(self):
         if not self.data:
             return 0
         elif self.is2dim:
             return min(b.low[0] for b in self.data)
         else:
             return min(b.xmin for b in self.data)
 
     def getXMax(self):
         if not self.data:
             return 1
         elif self.is2dim:
             return max(b.high[0] for b in self.data)
         else:
             return max(b.xmax for b in self.data)
 
     def getYMin(self, xmin, xmax, logy):
         if not self.data:
             return 0
         elif self.is2dim:
             return min(b.low[1] for b in self.data)
         else:
             yvalues = []
             for b in self.data:
                 if (b.xmax > xmin or b.xmin >= xmin) and (b.xmin < xmax or b.xmax <= xmax):
                     foo = b.val
                     if self.getErrorBars() or self.getErrorBands():
                         foo -= b.err[0]
                     if not isnan(foo) and (not logy or foo > 0):
                         yvalues.append(foo)
             return min(yvalues) if yvalues else self.data[0].val
 
     def getYMax(self, xmin, xmax):
         if not self.data:
             return 1
         elif self.is2dim:
             return max(b.high[1] for b in self.data)
         else:
             yvalues = []
             for b in self.data:
                 if (b.xmax > xmin or b.xmin >= xmin) and (b.xmin < xmax or b.xmax <= xmax):
                     foo = b.val
                     if self.getErrorBars() or self.getErrorBands():
                         foo += b.err[1]
                     if not isnan(foo): # and (not logy or foo > 0):
                         yvalues.append(foo)
             return max(yvalues) if yvalues else self.data[0].val
 
     def getZMin(self, xmin, xmax, ymin, ymax):
         if not self.is2dim:
             return 0
         zvalues = []
         for b in self.data:
             if (b.xmax[0] > xmin and b.xmin[0] < xmax) and (b.xmax[1] > ymin and b.xmin[1] < ymax):
                 zvalues.append(b.val)
         return min(zvalues)
 
     def getZMax(self, xmin, xmax, ymin, ymax):
         if not self.is2dim:
             return 0
         zvalues = []
         for b in self.data:
             if (b.xmax[0] > xmin and b.xmin[0] < xmax) and (b.xmax[1] > ymin and b.xmin[1] < ymax):
                 zvalues.append(b.val)
         return max(zvalues)
 
 
 
 class Value(Histogram):
 
     def read_input_data(self, f):
         for line in f:
             if is_end_marker(line, 'VALUE'):
                 break
             elif is_comment(line):
                 continue
             else:
                 line = line.rstrip()
                 m = pat_property.match(line)
                 if m:
                     prop, value = m.group(1,2)
                     self.props[prop] = value
                 else:
                     linearray = line.split()
                     if len(linearray) == 3:
                         self.data.append(BinData(0.0, 1.0, linearray[0], [ linearray[1], linearray[2] ])) # dummy x-values
                     else:
                         raise Exception('Value does not have the expected number of columns. ' + line)
 
     # TODO: specialise draw() here
 
 
 class Counter(Histogram):
 
     def read_input_data(self, f):
         for line in f:
             if is_end_marker(line, 'COUNTER'):
                 break
             elif is_comment(line):
                 continue
             else:
                 line = line.rstrip()
                 m = pat_property.match(line)
                 if m:
                     prop, value = m.group(1,2)
                     self.props[prop] = value
                 else:
                     linearray = line.split()
                     if len(linearray) == 2:
                         self.data.append(BinData(0.0, 1.0, linearray[0], [ linearray[1], linearray[1] ])) # dummy x-values
                     else:
                         raise Exception('Counter does not have the expected number of columns. ' + line)
 
     # TODO: specialise draw() here
 
 
 class Histo1D(Histogram):
 
     def read_input_data(self, f):
         for line in f:
             if is_end_marker(line, 'HISTO1D'):
                 break
             elif is_comment(line):
                 continue
             else:
                 line = line.rstrip()
                 m = pat_property.match(line)
                 if m:
                     prop, value = m.group(1,2)
                     self.props[prop] = value
                     if 'Color' in prop and '{' in value:
                       self.customCols[value] = value
                 else:
                     linearray = line.split()
                     ## Detect symm errs
                     # TODO: Not sure what the 8-param version is for... auto-compatibility with YODA format?
                     if len(linearray) in [4,8]:
                         self.data.append(BinData(linearray[0], linearray[1], linearray[2], linearray[3]))
                     ## Detect asymm errs
                     elif len(linearray) == 5:
                         self.data.append(BinData(linearray[0], linearray[1], linearray[2], [linearray[3],linearray[4]]))
                     else:
                         raise Exception('Histo1D does not have the expected number of columns. ' + line)
 
     # TODO: specialise draw() here
 
 
 class Histo2D(Histogram):
 
     def read_input_data(self, f):
         self.is2dim = True #< Should really be done in a constructor, but this is easier for now...
 
         for line in f:
             if is_end_marker(line, 'HISTO2D'):
                 break
             elif is_comment(line):
                 continue
             else:
                 line = line.rstrip()
                 m = pat_property.match(line)
                 if m:
                     prop, value = m.group(1,2)
                     self.props[prop] = value
                     if 'Color' in prop and '{' in value:
                       self.customCols[value] = value
                 else:
                     linearray = line.split()
                     if len(linearray) in [6,7]:
                         # If asymm z error, use the max or average of +- error
                         err = float(linearray[5])
                         if len(linearray) == 7:
                             if self.props.get("ShowMaxZErr", 1):
                                 err = max(err, float(linearray[6]))
                             else:
                                 err = 0.5 * (err + float(linearray[6]))
                         self.data.append(BinData([linearray[0], linearray[2]], [linearray[1], linearray[3]], float(linearray[4]), err))
                     else:
                         raise Exception('Histo2D does not have the expected number of columns. '+line)
 
     # TODO: specialise draw() here
 
 
 ####################
 
 
 def try_cmd(args):
     "Run the given command + args and return True/False if it succeeds or not"
     import subprocess
     try:
         subprocess.check_output(args, stderr=subprocess.STDOUT)
         return True
     except:
         return False
 
 def have_cmd(cmd):
     return try_cmd(["which", cmd])
 
 
 import shutil, subprocess
 def process_datfile(datfile):
     global opts
     if not os.access(datfile, os.R_OK):
         raise Exception("Could not read data file '%s'" % datfile)
 
     datpath = os.path.abspath(datfile)
     datfile = os.path.basename(datpath)
     datdir = os.path.dirname(datpath)
     outdir = opts.OUTPUT_DIR if opts.OUTPUT_DIR else datdir
     filename = datfile.replace('.dat','')
 
     ## Create a temporary directory
     # cwd = os.getcwd()
     tempdir = tempfile.mkdtemp('.make-plots')
     tempdatpath = os.path.join(tempdir, datfile)
     shutil.copy(datpath, tempdir)
     if opts.NO_CLEANUP:
         logging.info('Keeping temp-files in %s' % tempdir)
 
     ## Make TeX file
     inputdata = InputData(datpath)
     if inputdata.attr_bool('IgnorePlot', False):
       return
     texpath = os.path.join(tempdir, '%s.tex' % filename)
     texfile = open(texpath, 'w')
     p = Plot()
     texfile.write(p.write_header(inputdata))
     if inputdata.attr_bool("MainPlot", True):
         mp = MainPlot(inputdata)
         texfile.write(mp.draw(inputdata))
     if not inputdata.attr_bool("is2dim", False):
         for rname, i in inputdata.ratio_names():
           if inputdata.attr_bool(rname, True) and inputdata.attr(rname + 'Reference', False):
               rp = RatioPlot(inputdata, i)
               texfile.write(rp.draw(inputdata))
     #for s in inputdata.special.values():
     #     texfile.write(p.write_special(inputdata))
     texfile.write(p.write_footer())
     texfile.close()
 
     if opts.OUTPUT_FORMAT != ["TEX"]:
 
         ## Check for the required programs
         latexavailable = have_cmd("latex")
         dvipsavailable = have_cmd("dvips")
         convertavailable = have_cmd("convert")
         ps2pnmavailable = have_cmd("ps2pnm")
         pnm2pngavailable = have_cmd("pnm2png")
 
         # TODO: It'd be nice to be able to control the size of the PNG between thumb and full-size...
         #   currently defaults (and is used below) to a size suitable for thumbnails
         def mkpngcmd(infile, outfile, outsize=450, density=300):
             if convertavailable:
                 pngcmd = ["convert",
                           "-flatten",
                           "-density", str(density),
                           infile,
                           "-quality", "100",
                           "-resize", "{size:d}x{size:d}>".format(size=outsize),
                           #"-sharpen", "0x1.0",
                           outfile]
                 #logging.debug(" ".join(pngcmd))
                 #pngproc = subprocess.Popen(pngcmd, stdout=subprocess.PIPE, cwd=tempdir)
                 #pngproc.wait()
                 return pngcmd
             else:
                 raise Exception("Required PNG maker program (convert) not found")
             # elif ps2pnmavailable and pnm2pngavailable:
             #     pstopnm = "pstopnm -stdout -xsize=461 -ysize=422 -xborder=0.01 -yborder=0.01 -portrait " + infile
             #     p1 = subprocess.Popen(pstopnm.split(), stdout=subprocess.PIPE, stderr=open("/dev/null", "w"), cwd=tempdir)
             #     p2 = subprocess.Popen(["pnmtopng"], stdin=p1.stdout, stdout=open("%s/%s.png" % (tempdir, outfile), "w"), stderr=open("/dev/null", "w"), cwd=tempdir)
             #     p2.wait()
             # else:
             #     raise Exception("Required PNG maker programs (convert, or ps2pnm and pnm2png) not found")
 
         ## Run LaTeX (in no-stop mode)
         logging.debug(os.listdir(tempdir))
         texcmd = ["latex", "\scrollmode\input", texpath]
         logging.debug("TeX command: " + " ".join(texcmd))
         texproc = subprocess.Popen(texcmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, cwd=tempdir)
         logging.debug(texproc.communicate()[0])
         logging.debug(os.listdir(tempdir))
 
         ## Run dvips
         dvcmd = ["dvips", filename]
         if not logging.getLogger().isEnabledFor(logging.DEBUG):
             dvcmd.append("-q")
         ## Handle Minion Font
         if opts.OUTPUT_FONT == "MINION":
             dvcmd.append('-Pminion')
 
         ## Choose format
         # TODO: Rationalise... this is a mess! Maybe we can use tex2pix?
         if "PS" in opts.OUTPUT_FORMAT:
             dvcmd += ["-o", "%s.ps" % filename]
             logging.debug(" ".join(dvcmd))
             dvproc = subprocess.Popen(dvcmd, stdout=subprocess.PIPE, cwd=tempdir)
             dvproc.wait()
         if "PDF" in opts.OUTPUT_FORMAT:
             dvcmd.append("-f")
             logging.debug(" ".join(dvcmd))
             dvproc = subprocess.Popen(dvcmd, stdout=subprocess.PIPE, cwd=tempdir)
             cnvproc = subprocess.Popen(["ps2pdf", "-"], stdin=dvproc.stdout, stdout=subprocess.PIPE, cwd=tempdir)
             f = open(os.path.join(tempdir, "%s.pdf" % filename), "wb")
             f.write(cnvproc.communicate()[0])
             f.close()
         if "EPS" in opts.OUTPUT_FORMAT:
             dvcmd.append("-f")
             logging.debug(" ".join(dvcmd))
             dvproc = subprocess.Popen(dvcmd, stdout=subprocess.PIPE, cwd=tempdir)
             cnvproc = subprocess.Popen(["ps2eps"], stdin=dvproc.stdout, stderr=subprocess.PIPE, stdout=subprocess.PIPE, cwd=tempdir)
             f = open(os.path.join(tempdir, "%s.eps" % filename), "wb")
             f.write(cnvproc.communicate()[0])
             f.close()
         if "PNG" in opts.OUTPUT_FORMAT:
             dvcmd.append("-f")
             logging.debug(" ".join(dvcmd))
             dvproc = subprocess.Popen(dvcmd, stdout=subprocess.PIPE, cwd=tempdir)
             #pngcmd = ["convert", "-flatten", "-density", "110", "-", "-quality", "100", "-sharpen", "0x1.0", "%s.png" % filename]
             pngcmd = mkpngcmd("-", "%s.png" % filename)
             logging.debug(" ".join(pngcmd))
             pngproc = subprocess.Popen(pngcmd, stdin=dvproc.stdout, stdout=subprocess.PIPE, cwd=tempdir)
             pngproc.wait()
         logging.debug(os.listdir(tempdir))
 
     ## Copy results back to main dir
     for fmt in opts.OUTPUT_FORMAT:
         outname = "%s.%s" % (filename, fmt.lower())
         outpath = os.path.join(tempdir, outname)
         if os.path.exists(outpath):
             shutil.copy(outpath, outdir)
         else:
             logging.error("No output file '%s' from processing %s" % (outname, datfile))
 
     ## Clean up
     if not opts.NO_CLEANUP:
         shutil.rmtree(tempdir, ignore_errors=True)
 
 
 ####################
 
 
 if __name__ == '__main__':
 
     ## Try to rename the process on Linux
     try:
         import ctypes
         libc = ctypes.cdll.LoadLibrary('libc.so.6')
         libc.prctl(15, 'make-plots', 0, 0, 0)
     except Exception:
         pass
 
     ## Try to use Psyco optimiser
     try:
         import psyco
         psyco.full()
     except ImportError:
         pass
 
     ## Find number of (virtual) processing units
     import multiprocessing
     try:
         numcores = multiprocessing.cpu_count()
     except:
         numcores = 1
 
     ## Parse command line options
     from optparse import OptionParser, OptionGroup
     parser = OptionParser(usage=__doc__)
     parser.add_option("-j", "-n", "--num-threads", dest="NUM_THREADS", type="int",
                       default=numcores, help="max number of threads to be used [%s]" % numcores)
     parser.add_option("-o", "--outdir", dest="OUTPUT_DIR", default=None,
                       help="choose the output directory (default = .dat dir)")
     parser.add_option("--font", dest="OUTPUT_FONT", choices="palatino,cm,times,helvetica,minion".split(","),
                       default="palatino", help="choose the font to be used in the plots")
     parser.add_option("-f", "--format", dest="OUTPUT_FORMAT", default="PDF",
                       help="choose plot format, perhaps multiple comma-separated formats e.g. 'pdf' or 'tex,pdf,png' (default = PDF).")
     parser.add_option("--no-cleanup", dest="NO_CLEANUP", action="store_true", default=False,
                       help="keep temporary directory and print its filename.")
     parser.add_option("--no-subproc", dest="NO_SUBPROC", action="store_true", default=False,
                       help="don't use subprocesses to render the plots in parallel -- useful for debugging.")
     parser.add_option("--full-range", dest="FULL_RANGE", action="store_true", default=False,
                       help="plot full y range in log-y plots.")
     parser.add_option("-c", "--config", dest="CONFIGFILES", action="append", default=None,
                       help="plot config file to be used. Overrides internal config blocks.")
     verbgroup = OptionGroup(parser, "Verbosity control")
     verbgroup.add_option("-v", "--verbose", action="store_const", const=logging.DEBUG, dest="LOGLEVEL",
                          default=logging.INFO, help="print debug (very verbose) messages")
     verbgroup.add_option("-q", "--quiet", action="store_const", const=logging.WARNING, dest="LOGLEVEL",
                          default=logging.INFO, help="be very quiet")
     parser.add_option_group(verbgroup)
     opts, args = parser.parse_args()
 
     ## Tweak the opts output
     logging.basicConfig(level=opts.LOGLEVEL, format="%(message)s")
     opts.OUTPUT_FONT = opts.OUTPUT_FONT.upper()
     opts.OUTPUT_FORMAT = opts.OUTPUT_FORMAT.upper().split(",")
     if opts.NUM_THREADS == 1:
         opts.NO_SUBPROC = True
 
     ## Check for no args
     if len(args) == 0:
         logging.error(parser.get_usage())
         sys.exit(2)
 
     ## Check that the files exist
     for f in args:
         if not os.access(f, os.R_OK):
             print("Error: cannot read from %s" % f)
             sys.exit(1)
 
     ## Test for external programs (kpsewhich, latex, dvips, ps2pdf/ps2eps, and convert)
     opts.LATEXPKGS = []
     if opts.OUTPUT_FORMAT != ["TEX"]:
         try:
             ## latex
             if not have_cmd("latex"):
                 logging.error("ERROR: required program 'latex' could not be found. Exiting...")
                 sys.exit(1)
             ## dvips
             if not have_cmd("dvips"):
                 logging.error("ERROR: required program 'dvips' could not be found. Exiting...")
                 sys.exit(1)
 
             ## ps2pdf / ps2eps
             if "PDF" in opts.OUTPUT_FORMAT:
                 if not have_cmd("ps2pdf"):
                     logging.error("ERROR: required program 'ps2pdf' (for PDF output) could not be found. Exiting...")
                     sys.exit(1)
             elif "EPS" in opts.OUTPUT_FORMAT:
                 if not have_cmd("ps2eps"):
                     logging.error("ERROR: required program 'ps2eps' (for EPS output) could not be found. Exiting...")
                     sys.exit(1)
             ## PNG output converter
             if "PNG" in opts.OUTPUT_FORMAT:
                 if not have_cmd("convert"):
                     logging.error("ERROR: required program 'convert' (for PNG output) could not be found. Exiting...")
                     sys.exit(1)
 
             ## kpsewhich: required for LaTeX package testing
             if not have_cmd("kpsewhich"):
                 logging.warning("WARNING: required program 'kpsewhich' (for LaTeX package checks) could not be found")
             else:
                 ## Check minion font
                 if opts.OUTPUT_FONT == "MINION":
                     p = subprocess.Popen(["kpsewhich", "minion.sty"], stdout=subprocess.PIPE)
                     p.wait()
                     if p.returncode != 0:
                         logging.warning('Warning: Using "--minion" requires minion.sty to be installed. Ignoring it.')
                         opts.OUTPUT_FONT = "PALATINO"
 
                 ## Check for HEP LaTeX packages
                 # TODO: remove HEP-specifics/non-standards?
                 for pkg in ["hepnames", "hepunits", "underscore"]:
                     p = subprocess.Popen(["kpsewhich", "%s.sty" % pkg], stdout=subprocess.PIPE)
                     p.wait()
                     if p.returncode == 0:
                         opts.LATEXPKGS.append(pkg)
 
                 ## Check for Palatino old style figures and small caps
                 if opts.OUTPUT_FONT == "PALATINO":
                     p = subprocess.Popen(["kpsewhich", "ot1pplx.fd"], stdout=subprocess.PIPE)
                     p.wait()
                     if p.returncode == 0:
                         opts.OUTPUT_FONT = "PALATINO_OSF"
         except Exception as e:
             logging.warning("Problem while testing for external packages. I'm going to try and continue without testing, but don't hold your breath...")
 
     def init_worker():
         import signal
         signal.signal(signal.SIGINT, signal.SIG_IGN)
 
     ## Run rendering jobs
     datfiles = args
     plotword = "plots" if len(datfiles) > 1 else "plot"
     logging.info("Making %d %s" % (len(datfiles), plotword))
     if opts.NO_SUBPROC:
         init_worker()
         for i, df in enumerate(datfiles):
             logging.info("Plotting %s (%d/%d remaining)" % (df, len(datfiles)-i, len(datfiles)))
             process_datfile(df)
     else:
         pool = multiprocessing.Pool(opts.NUM_THREADS, init_worker)
         try:
             for i, _ in enumerate(pool.imap(process_datfile, datfiles)):
                 logging.info("Plotting %s (%d/%d remaining)" % (datfiles[i], len(datfiles)-i, len(datfiles)))
             pool.close()
         except KeyboardInterrupt:
             print("Caught KeyboardInterrupt, terminating workers")
             pool.terminate()
         except ValueError as e:
             print(e)
             print("Perhaps your .dat file is corrupt?")
             pool.terminate()
         pool.join()