--- PamCut/CollectionActions/Histo2DActions/Histo2DAction/Histo2DAction.h 2009/09/25 15:36:45 1.1 +++ PamCut/CollectionActions/Histo2DActions/Histo2DAction/Histo2DAction.h 2009/10/27 10:17:48 1.2 @@ -106,17 +106,19 @@ */ void SetYAxis(TString label, unsigned int nBins, float min, float max, bool logBinning = false); + /*! @brief Sets the ROOT histogram's title. + * + * @param title The histogram title as it will appear on the histogram itself. + */ + void SetTitle(TString &title) { + _title = title; + } /*! @brief Sets up the histogram * * This routine effectively prepares the histogram, after the desired parameters has been set by #SetXAxis() and #SetYAxis(). * * @param events Pointer to PamLevel2 events (unused). */ - - /*! @brief Sets the ROOT histogram's title. */ - void SetTitle(TString &title){ - _title = title; - } void Setup(PamLevel2 *events) { CollectionAction::Setup(events); _InitHistos(); @@ -141,7 +143,12 @@ return _histo; } - /*! Fills the ROOT and the vector histogram. */ + /*! Fills the ROOT and the vector histogram. + * + * @param value The value of the X coordinate associated to the event. + * @param value The value of the Y coordinate associated to the event. + * @param weight The weight which will be applied to the event. + */ void Fill(double xValue, double yValue, double weight = 1.); /*! @brief Gets the X overflow histogram. @@ -236,9 +243,13 @@ protected: + /*! @brief The vector containing the limits of the X bins(from lower to higher). */ std::vector _xBins; + /*! @brief The vector containing the limits of the Y bins(from lower to higher). */ std::vector _yBins; + /*! @brief A matrix containing the value of the histogram for each X-Y bin. */ SimpleMatrix _histo; + /*! @brief The ROOT histogram. */ TH2 *_rootHisto; private: @@ -267,13 +278,13 @@ _CreateHisto(); - if (_xBins.size() < 2){ + if (_xBins.size() < 2) { _xBins.resize(2); _xBins[0] = 0.; _xBins[1] = 1.; } - if (_yBins.size() < 2){ + if (_yBins.size() < 2) { _yBins.resize(2); _yBins[0] = 0.; _yBins[1] = 1.; @@ -501,7 +512,7 @@ return; } else { - if (yBin == (int)_yBins.size()) { + if (yBin == (int) _yBins.size()) { _xUnderYOverflow += (HistoType) weight; return; } @@ -512,13 +523,13 @@ } } - if (xBin == (int)_xBins.size()) { + if (xBin == (int) _xBins.size()) { if (yBin == -1) { _xOverYUnderflow += (HistoType) weight; return; } else { - if (yBin ==(int) _yBins.size()) { + if (yBin == (int) _yBins.size()) { _xOverYOverflow += (HistoType) weight; return; } @@ -534,7 +545,7 @@ return; } - if (yBin == (int)_yBins.size()) { + if (yBin == (int) _yBins.size()) { _yOverflow[xBin] += (HistoType) weight; return; }