|
[Rivet-svn] r3635 - in branches/2011-07-aida2yoda: . bin pyext testblackhole at projects.hepforge.org blackhole at projects.hepforge.orgTue Mar 20 14:46:44 GMT 2012
Author: hoeth Date: Tue Mar 20 14:46:44 2012 New Revision: 3635 Log: merge c3610-3611 from trunk and update ChangeLog Modified: branches/2011-07-aida2yoda/ChangeLog branches/2011-07-aida2yoda/bin/compare-histos branches/2011-07-aida2yoda/pyext/lighthisto.py branches/2011-07-aida2yoda/test/testMath.cc Modified: branches/2011-07-aida2yoda/ChangeLog ============================================================================== --- branches/2011-07-aida2yoda/ChangeLog Tue Mar 20 14:41:28 2012 (r3634) +++ branches/2011-07-aida2yoda/ChangeLog Tue Mar 20 14:46:44 2012 (r3635) @@ -1,3 +1,18 @@ +2012-03-16 Hendrik Hoeth <hendrik.hoeth at cern.ch> + + * Improve default plot behaviour for 2D histograms + +2012-03-15 Hendrik Hoeth <hendrik.hoeth at cern.ch> + + * Make ATLAS_2012_I1084540 less verbose, and general code + cleanup of that analysis. + * New-style plugin hook in ATLAS_2011_I926145, + ATLAS_2011_I944826 and ATLAS_2012_I1084540 + * Fix compiler warnings in ATLAS_2011_I944826 and CMS_2011_S8973270 + * CMS_2011_S8941262: Weights are double, not int. + * disable inRange() tests in test/testMath.cc until we have a proper + fix for the compiler warnings we see on SL5. + 2012-03-07 Andy Buckley <andy.buckley at cern.ch> * Marking ATLAS_2011_I919017 as VALIDATED (this should have @@ -98,6 +113,35 @@ * Tidying lighthisto, including fixing the order in which +- error values are passed to the Bin constructor in fromFlatHisto. +2012-01-16 Frank Siegert <frank.siegert at cern.ch> + + * Bugfix in ATLAS_2012_I1083318: Include non-signal neutrinos in + jet clustering. + + * Add first version of ATLAS_2012_I1083318 (W+jets). Still + UNVALIDATED until final happiness with validation plots arises and + data is in Hepdata. + + * Bugfix in ATLAS_2010_S8919674: Really use neutrino with highest + pT for Etmiss. Doesn't seem to make very much difference, but is + more correct in principle. + +2012-01-16 Peter Richardson <peter.richardson at durham.ac.uk> + + * Fixes to ATLAS_20111_S9225137 to include reference data + +2012-01-13 Holger Schulz <holger.schulz at physik.hu-berlin.de> + + * Add ATLAS inclusive lepton analysis + +2012-01-12 Hendrik Hoeth <hendrik.hoeth at durham.ac.uk> + + * Font selection support in rivet-mkhtml + +2012-01-11 Peter Richardson <peter.richardson at durham.ac.uk> + + * Added pi0 to list of particles. + 2012-01-11 Andy Buckley <andy.buckley at cern.ch> * Removing references to Boost random numbers. Modified: branches/2011-07-aida2yoda/bin/compare-histos ============================================================================== --- branches/2011-07-aida2yoda/bin/compare-histos Tue Mar 20 14:41:28 2012 (r3634) +++ branches/2011-07-aida2yoda/bin/compare-histos Tue Mar 20 14:46:44 2012 (r3635) @@ -453,19 +453,35 @@ logging.debug("Could not get plot headers: %s" % err) headers = {} + is2dim = False + if HISTOS[activefiles[0]][name].is2dim(): + is2dim = True + if is2dim and len(activefiles)>1: + logging.warning("More than one histogram file for 2-dim histogram '%s', only using first file" % name) + activefiles = [activefiles[0]] + drawonlystr = "" for hfile in activefiles: drawonlystr += hfile.replace(' ','_') + HISTOS[hfile][name].fullPath().replace(' ','_') + " " - paramdefaults = {"Title" : title, - "XLabel" : xlabel, - "YLabel" : ylabel, - "Legend" : "1", - "LogY" : "%d" % int((len(HISTOS[ref][name].getBins()) > 1) and not opts.LINEAR), - "DrawOnly" : drawonlystr, - "RatioPlot" : "%d" % int(not opts.NORATIO), - "XTwosidedTicks" : "1", - "YTwosidedTicks" : "1", - "RatioPlotReference" : "%s%s" % (ref.replace(' ','_'), HISTOS[ref][name].fullPath().replace(' ','_'))} + paramdefaults = {} + if not is2dim: + paramdefaults = {"Title" : title, + "XLabel" : xlabel, + "YLabel" : ylabel, + "Legend" : "1", + "LogY" : "%d" % int((len(HISTOS[ref][name].getBins()) > 1) and not opts.LINEAR), + "DrawOnly" : drawonlystr, + "RatioPlot" : "%d" % int(not opts.NORATIO), + "XTwosidedTicks" : "1", + "YTwosidedTicks" : "1", + "RatioPlotReference" : "%s%s" % (ref.replace(' ','_'), HISTOS[ref][name].fullPath().replace(' ','_'))} + else: + paramdefaults = {"Title" : title, + "XLabel" : xlabel, + "YLabel" : ylabel, + "Legend" : "1", + "XTwosidedTicks" : "1", + "YTwosidedTicks" : "1"} if opts.RATIO_DEVIATION: @@ -526,8 +542,12 @@ color, style = STYLES[i % len(STYLES)] if opts.MC_ERRS: histstr += "ErrorBars=1\n" - histstr += 'LineColor=%s\n' % color - histstr += 'LineStyle=%s\n' % style + if not is2dim: + histstr += 'LineColor=%s\n' % color + histstr += 'LineStyle=%s\n' % style + else: + histstr += 'LineStyle=none\n' + histstr += 'LineWidth=0pt\n' histstr += 'Title=%s\n' % LABELS[hfile][name] for key, val in histopts.iteritems(): #if key == 'ErrorBars' and opts.MC_ERRS: Modified: branches/2011-07-aida2yoda/pyext/lighthisto.py ============================================================================== --- branches/2011-07-aida2yoda/pyext/lighthisto.py Tue Mar 20 14:41:28 2012 (r3634) +++ branches/2011-07-aida2yoda/pyext/lighthisto.py Tue Mar 20 14:46:44 2012 (r3635) @@ -178,6 +178,11 @@ r += ind + "</dataPointSet>\n" return r + def is2dim(self): + if self.numBins()==0: + return False + return self._bins[0].is2dim() + def numBins(self): return len(self._bins) @@ -466,8 +471,13 @@ self.val, self.errplus, self.errminus) return out - def asFlat(self): + def is2dim(self): if self.ylow is None or self.yhigh is None: + return False + return True + + def asFlat(self): + if not self.is2dim(): out = "%e\t%e\t%e\t%e\t%e" % (self.xlow, self.xhigh, self.val, self.errminus, self.errplus) else: out = "%e\t%e\t%e\t%e\t%e\t%e" % (self.xlow, self.xhigh, self.ylow, self.yhigh, self.val, 0.5*(self.errminus+self.errplus)) Modified: branches/2011-07-aida2yoda/test/testMath.cc ============================================================================== --- branches/2011-07-aida2yoda/test/testMath.cc Tue Mar 20 14:41:28 2012 (r3634) +++ branches/2011-07-aida2yoda/test/testMath.cc Tue Mar 20 14:46:44 2012 (r3635) @@ -24,14 +24,15 @@ linspace(0, 10, 50); logspace(0.000001, 1.0, 50); - inRange(1, 0, 2); - inRange(1, 0.0, 2); - inRange(1, 0, 2.0); - inRange(1, 0.0, 2.0); - inRange(1.0, 0, 2); - inRange(1.0, 0.0, 2); - inRange(1.0, 0, 2.0); - inRange(1.0, 0.0, 2.0); +// // These tests are disabled, because they trigger compiler warnings on SL5 +// inRange(1, 0, 2); +// inRange(1, 0.0, 2); +// inRange(1, 0, 2.0); +// inRange(1, 0.0, 2.0); +// inRange(1.0, 0, 2); +// inRange(1.0, 0.0, 2); +// inRange(1.0, 0, 2.0); +// inRange(1.0, 0.0, 2.0); assert(isZero(1e-15)); assert(fuzzyEquals(1e-15, 0.0));
More information about the Rivet-svn mailing list |