[Rivet-svn] rivet: 2 new changesets

Rivet Mercurial rivet at projects.hepforge.org
Wed Dec 16 16:30:01 GMT 2015


details:   https://rivet.hepforge.org/hg/rivet/rev/ba77ba044646
branches:  release-2-4-x
changeset: 4956:ba77ba044646
user:      Andy Buckley <andy at insectnation.org>
date:      Wed Dec 16 16:24:50 2015 +0000
description:
Update to even newer boost.m4

details:   https://rivet.hepforge.org/hg/rivet/rev/2b397752b1ab
branches:  release-2-4-x
changeset: 4957:2b397752b1ab
user:      Andy Buckley <andy at insectnation.org>
date:      Wed Dec 16 16:25:35 2015 +0000
description:
Further improvements to variation plot handling

diffs (truncated from 310 to 50 lines):

--- a/bin/rivet-cmphistos	Wed Dec 16 10:02:43 2015 +0000
+++ b/bin/rivet-cmphistos	Wed Dec 16 16:25:35 2015 +0000
@@ -109,7 +109,7 @@
                 continue
             isref = bool(m.group(1))
             basepath = m.group(2)
-            index = int(m.group(3)[1:-1]) if m.group(3) else 0
+            index = m.group(3)[1:-1] if m.group(3) else 0
 
             ## Conventionally don't plot data objects whose names start with an underscore
             if os.path.basename(basepath).startswith("_"):
@@ -369,10 +369,11 @@
                 ## For now, just plot all the different variation histograms (reversed, so [0] is on top)
                 # TODO: calculate and plot an appropriate error band, somehow...
                 for i in sorted(hmcs.keys(), reverse=True):
+                    iscanonical = (str(i) == "0")
                     hmc = hmcs[i]
                     ## Default linecolor, linestyle
                     if not is2d:
-                        setStyle(hmc, styleidx, i != 0)
+                        setStyle(hmc, styleidx, not iscanonical)
                         if opts.MC_ERRS:
                             hmc.setAnnotation('ErrorBars', '1')
                     ## Plot defaults from .plot files
@@ -380,18 +381,20 @@
                         hmc.setAnnotation(key, val)
                     ## Command line plot options
                     setOptions(hmc, plotoptions[infile])
+                    ## Set path attribute
                     fullpath = "/"+infile+hpath
-                    if i != 0:
+                    if not iscanonical:
                         fullpath += "["+str(i)+"]"
                     hmc.setAnnotation('Path', fullpath)
+                    ## Add object / path to appropriate lists
                     anaobjects.append(hmc)
-                    if i == 0:
+                    if iscanonical:
                         mainlines.append(fullpath)
                     else:
                         varlines.append(fullpath)
-                    if showratio and ratioreference is None:
+                    if showratio and ratioreference is None and iscanonical:
                         ratioreference = fullpath
-                    ## For 2D, plot each histo now
+                    ## For 2D, plot each histo now (since overlay makes no sense)
                     if is2d:
                         s = mkOutput(hpath, [hmc], plot, special)
                         writeOutput(s, fullpath)
--- a/m4/boost.m4	Wed Dec 16 10:02:43 2015 +0000


More information about the Rivet-svn mailing list