|
[yoda-svn] r524 - in trunk: . include/YODA pyext/yoda/includeblackhole at projects.hepforge.org blackhole at projects.hepforge.orgTue Aug 7 11:49:26 BST 2012
Author: buckley Date: Tue Aug 7 11:49:26 2012 New Revision: 524 Log: Removing unused (beyond 2nd order) sumWXYZ counter from Dbn3D. Modified: trunk/ChangeLog trunk/TODO trunk/include/YODA/Dbn3D.h trunk/include/YODA/Histo2D.h trunk/pyext/yoda/include/Dbn3D.pyx Modified: trunk/ChangeLog ============================================================================== --- trunk/ChangeLog Tue Aug 7 02:08:15 2012 (r523) +++ trunk/ChangeLog Tue Aug 7 11:49:26 2012 (r524) @@ -1,7 +1,13 @@ +2012-08-07 Andy Buckley <andy.buckley at cern.ch> + + * Removing unused (beyond 2nd order) sumWXYZ counter from Dbn3D. + 2012-08-07 Dave Mallows <dave.mallows at gmail.com> + * Converted Axis1D to use new Utils/BinSearcher. 2012-08-02 Dave Mallows <dave.mallows at gmail.com> + * Heavily refactored Cython bindings * HistoBin1D, ProfileBin1D etc. now inherit from Bin1D[DBN] Modified: trunk/TODO ============================================================================== --- trunk/TODO Tue Aug 7 02:08:15 2012 (r523) +++ trunk/TODO Tue Aug 7 11:49:26 2012 (r524) @@ -10,6 +10,9 @@ Ignore anything after "#" on data lines -- use this to write convenience height & error info for each bin since not obvious from sumWX2 etc. +* Remove non-const bin access from Histos and Profiles? + cf. David D's point re. consistency via email on 7/8/2012 + * Add Axis2D -> Histo2D/Profile2D bin adding and erasing. (AB) * Make Python interface test scripts (DM) @@ -22,12 +25,8 @@ * Add stdErr to HistoBinXD (AB) -* Add Dbn3D, ProfileBin2D, Profile2D and Scatter3D in Cython (AB) - * Test Histo2D and Scatter2D from Python (AB) -* Sort out _dealloc treatment (AB, DM) - * Adding 2D operator support and bin-adding/erasing Modified: trunk/include/YODA/Dbn3D.h ============================================================================== --- trunk/include/YODA/Dbn3D.h Tue Aug 7 02:08:15 2012 (r523) +++ trunk/include/YODA/Dbn3D.h Tue Aug 7 11:49:26 2012 (r524) @@ -28,18 +28,16 @@ /// Constructor to set a distribution with a pre-filled state. /// /// Principally designed for internal persistency use. - Dbn3D(unsigned long numEntries, - double sumW, double sumW2, - double sumWX, double sumWX2, - double sumWY, double sumWY2, - double sumWZ, double sumWZ2, - double sumWXY, double sumWXZ, double sumWYZ, - double sumWXYZ) + Dbn3D(unsigned long numEntries, + double sumW, double sumW2, + double sumWX, double sumWX2, + double sumWY, double sumWY2, + double sumWZ, double sumWZ2, + double sumWXY, double sumWXZ, double sumWYZ) : _dbnX(numEntries, sumW, sumW2, sumWX, sumWX2), _dbnY(numEntries, sumW, sumW2, sumWY, sumWY2), _dbnZ(numEntries, sumW, sumW2, sumWZ, sumWZ2), - _sumWXY(sumWXY), _sumWXZ(sumWXZ), _sumWYZ(sumWYZ), - _sumWXYZ(sumWXYZ) + _sumWXY(sumWXY), _sumWXZ(sumWXZ), _sumWYZ(sumWYZ) { } @@ -53,7 +51,6 @@ _sumWXY = toCopy._sumWXY; _sumWXZ = toCopy._sumWXZ; _sumWYZ = toCopy._sumWYZ; - _sumWXYZ = toCopy._sumWXYZ; } @@ -67,7 +64,6 @@ _sumWXY = toCopy._sumWXY; _sumWXZ = toCopy._sumWXZ; _sumWYZ = toCopy._sumWYZ; - _sumWXYZ = toCopy._sumWXYZ; return *this; } @@ -85,7 +81,6 @@ _sumWXY += weight*valX*valY; _sumWXZ += weight*valX*valZ; _sumWYZ += weight*valY*valZ; - _sumWXYZ += weight*valX*valY*valZ; } @@ -104,7 +99,6 @@ _sumWXY = 0; _sumWXZ = 0; _sumWYZ = 0; - _sumWXYZ = 0; } @@ -116,7 +110,6 @@ _sumWXY *= scalefactor; _sumWXZ *= scalefactor; _sumWYZ *= scalefactor; - _sumWXYZ *= scalefactor; } @@ -125,7 +118,6 @@ _dbnX.scaleX(xscale); _sumWXY *= xscale; _sumWXZ *= xscale; - _sumWXYZ *= xscale; } @@ -134,7 +126,6 @@ _dbnY.scaleX(yscale); _sumWXY *= yscale; _sumWYZ *= yscale; - _sumWXYZ *= yscale; } @@ -143,7 +134,6 @@ _dbnZ.scaleX(zscale); _sumWXZ *= zscale; _sumWYZ *= zscale; - _sumWXYZ *= zscale; } @@ -329,11 +319,6 @@ return _sumWXZ; } - /// The sum of x*y*z*weight - double sumWXYZ() const { - return _sumWXYZ; - } - //@} @@ -407,7 +392,6 @@ _sumWXY += d._sumWXY; _sumWXZ += d._sumWXZ; _sumWYZ += d._sumWYZ; - _sumWXYZ += d._sumWXYZ; return *this; } @@ -419,7 +403,6 @@ _sumWXY -= d._sumWXY; _sumWXZ -= d._sumWXZ; _sumWYZ -= d._sumWYZ; - _sumWXYZ -= d._sumWXYZ; return *this; } @@ -442,7 +425,6 @@ double _sumWXY; double _sumWXZ; double _sumWYZ; - double _sumWXYZ; //@} }; Modified: trunk/include/YODA/Histo2D.h ============================================================================== --- trunk/include/YODA/Histo2D.h Tue Aug 7 02:08:15 2012 (r523) +++ trunk/include/YODA/Histo2D.h Tue Aug 7 11:49:26 2012 (r524) @@ -462,8 +462,7 @@ /// @brief Divide two histograms /// - /// Keep in mind that for the following to work, two Histos must - /// be _exactly_ the same, including the ghost bins. + /// Keep in mind that for the following to work, two Histos must be _exactly_ the same. Scatter3D divide(const Histo2D& numer, const Histo2D& denom); Modified: trunk/pyext/yoda/include/Dbn3D.pyx ============================================================================== --- trunk/pyext/yoda/include/Dbn3D.pyx Tue Aug 7 02:08:15 2012 (r523) +++ trunk/pyext/yoda/include/Dbn3D.pyx Tue Aug 7 11:49:26 2012 (r524) @@ -16,9 +16,9 @@ def fill(self, x, y, z, weight=1.0): """ (x, y, z, weight=1.0) -> None - + Fills the distribution with the given weight at given (x, y). - + """ self._Dbn3D().fill(x, y, z, weight) @@ -81,8 +81,8 @@ def rms(self): """Weighted root mean squared (RMS) of x""" return util.XYZ(self._Dbn3D().xRMS(), - self._Dbn3D().yRMS(), - self._Dbn3D().zRMS()) + self._Dbn3D().yRMS(), + self._Dbn3D().zRMS()) @property def numEntries(self):
More information about the yoda-svn mailing list |