[Rivet-svn] rivet: 2 new changesets

Rivet Mercurial rivet at projects.hepforge.org
Tue Sep 20 14:00:02 BST 2016


details:   https://rivet.hepforge.org/hg/rivet/rev/b4cb784b58c3
branches:  release-2-5-x
changeset: 5501:b4cb784b58c3
user:      Andy Buckley <andy at insectnation.org>
date:      Tue Sep 20 13:21:13 2016 +0100
description:
Remove accidental debug print statement

details:   https://rivet.hepforge.org/hg/rivet/rev/87a44596fab6
branches:  release-2-5-x
changeset: 5502:87a44596fab6
user:      Andy Buckley <andy at insectnation.org>
date:      Tue Sep 20 13:47:14 2016 +0100
description:
Fix make-plots y-max bug

diffs (truncated from 59 to 50 lines):

--- a/bin/make-plots	Tue Sep 20 10:57:38 2016 +0100
+++ b/bin/make-plots	Tue Sep 20 13:47:14 2016 +0100
@@ -480,7 +480,7 @@
                 if not inputdata.histos[i].description.has_key('ConnectGaps'):
                     inputdata.histos[i].description['ConnectGaps'] = inputdata.description['ConnectGaps']
 
-    def set_borders(self,inputdata):
+    def set_borders(self, inputdata):
         self.set_xmax(inputdata)
         self.set_xmin(inputdata)
         self.set_ymax(inputdata)
@@ -489,7 +489,7 @@
         self.set_zmin(inputdata)
         inputdata.description['Borders'] = (self.xmin, self.xmax, self.ymin, self.ymax, self.zmin, self.zmax)
 
-    def set_xmin(self,inputdata):
+    def set_xmin(self, inputdata):
         self.xmin = inputdata.xmin
         if self.xmin is None:
             self.xmin = min(inputdata.histos[h].getXMin() for h in inputdata.description['DrawOnly'])
@@ -1910,10 +1910,7 @@
                         foo -= b.err[0]
                     if not isnan(foo) and (not logy or foo > 0):
                         yvalues.append(foo)
-            if yvalues:
-                return min(yvalues)
-            else:
-                return self.data[0].val
+            return min(yvalues) if yvalues else self.data[0].val
 
     def getYMax(self, xmin, xmax):
         if not self.data:
@@ -1926,13 +1923,10 @@
                 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]
+                        foo += b.err[1]
                     if not isnan(foo): # and (not logy or foo > 0):
                         yvalues.append(foo)
-            if yvalues:
-                return max(yvalues)
-            else:
-                return self.data[0].val
+            return max(yvalues) if yvalues else self.data[0].val
 
     def getZMin(self, xmin, xmax, ymin, ymax):
         if not self.is2dim:
--- a/bin/rivet-cmphistos	Tue Sep 20 10:57:38 2016 +0100
+++ b/bin/rivet-cmphistos	Tue Sep 20 13:47:14 2016 +0100


More information about the Rivet-svn mailing list