|
||||
File indexing completed on 2025-01-18 09:28:08
0001 // -*- C++ -*- 0002 // AID-GENERATED 0003 // ========================================================================= 0004 // This class was generated by AID - Abstract Interface Definition 0005 // DO NOT MODIFY, but use the org.freehep.aid.Aid utility to regenerate it. 0006 // ========================================================================= 0007 #ifndef AIDA_IHISTOGRAM2D_H 0008 #define AIDA_IHISTOGRAM2D_H 1 0009 0010 // This file is part of the AIDA library 0011 // Copyright (C) 2002 by the AIDA team. All rights reserved. 0012 // This library is free software and under the terms of the 0013 // GNU Library General Public License described in the LGPL.txt 0014 0015 #include "AIDA/IHistogram.h" 0016 0017 namespace AIDA { 0018 0019 class IAxis; 0020 0021 /** 0022 * User level interface to 2D Histogram. 0023 * 0024 * @author The AIDA team (http://aida.freehep.org/) 0025 * 0026 */ 0027 0028 class IHistogram2D : virtual public IHistogram { 0029 0030 public: 0031 /// Destructor. 0032 virtual ~IHistogram2D() { /* nop */; } 0033 0034 /** 0035 * Fill the IHistogram2D with a couple of values and the 0036 * corresponding weight. 0037 * @param x The x value to be filled in. 0038 * @param y The y value to be filled in. 0039 * @param weight The corresponding weight (by default 1). 0040 * @return false If the weight is <0 or >1 (?). 0041 * 0042 */ 0043 virtual bool fill(double x, double y, double weight = 1.) = 0; 0044 0045 /** 0046 * The weighted mean along the x axis of a given bin. 0047 * @param indexX The x bin number (0...N-1) or OVERFLOW or UNDERFLOW. 0048 * @param indexY The y bin number (0...N-1) or OVERFLOW or UNDERFLOW. 0049 * @return The mean of the corresponding bin along the x axis. 0050 * 0051 */ 0052 virtual double binMeanX(int indexX, int indexY) const = 0; 0053 0054 /** 0055 * The weighted mean along the y axis of a given bin. 0056 * @param indexX The x bin number (0...N-1) or OVERFLOW or UNDERFLOW. 0057 * @param indexY The y bin number (0...N-1) or OVERFLOW or UNDERFLOW. 0058 * @return The mean of the corresponding bin along the y axis. 0059 * 0060 */ 0061 virtual double binMeanY(int indexX, int indexY) const = 0; 0062 0063 /** 0064 * Number of entries in the corresponding bin (ie the number of times fill was called for this bin). 0065 * @param indexX The x bin number (0...N-1) or OVERFLOW or UNDERFLOW. 0066 * @param indexY The y bin number (0...N-1) or OVERFLOW or UNDERFLOW. 0067 * @return The number of entries in the corresponding bin. 0068 * 0069 */ 0070 virtual int binEntries(int indexX, int indexY) const = 0; 0071 0072 /** 0073 * Sum of all the entries of the bins along a given x bin. 0074 * This is equivalent to <tt>projectionX().binEntries(index)</tt>. 0075 * @param index The x bin number (0...N-1) or OVERFLOW or UNDERFLOW. 0076 * @return The number of entries in the corresponding set of bins. 0077 * 0078 */ 0079 virtual int binEntriesX(int index) const = 0; 0080 0081 /** 0082 * Sum of all the entries of the bins along a given y bin. 0083 * This is equivalent to <tt>projectionY().binEntries(index)</tt>. 0084 * @param index The y bin number (0...N-1) or OVERFLOW or UNDERFLOW. 0085 * @return The number of entries in the corresponding set of bins. 0086 * 0087 */ 0088 virtual int binEntriesY(int index) const = 0; 0089 0090 /** 0091 * Total height of a give bin (ie the sum of the weights in this bin). 0092 * @param indexX The x bin number (0...N-1) or OVERFLOW or UNDERFLOW. 0093 * @param indexY The y bin number (0...N-1) or OVERFLOW or UNDERFLOW. 0094 * @return The height of the corresponding bin. 0095 * 0096 */ 0097 virtual double binHeight(int indexX, int indexY) const = 0; 0098 0099 /** 0100 * Sum of all the heights of the bins along a given x bin. 0101 * This is equivalent to <tt>projectionX().binHeight(index)</tt>. 0102 * @param index The x bin number (0...N-1) or OVERFLOW or UNDERFLOW. 0103 * @return The sum of the heights in the corresponding set of bins. 0104 * 0105 */ 0106 virtual double binHeightX(int index) const = 0; 0107 0108 /** 0109 * Sum of all the heights of the bins along a given y bin. 0110 * This is equivalent to <tt>projectionY().binHeight(index)</tt>. 0111 * @param index The y bin number (0...N-1) or OVERFLOW or UNDERFLOW. 0112 * @return The sum of the heights in the corresponding set of bins. 0113 * 0114 */ 0115 virtual double binHeightY(int index) const = 0; 0116 0117 /** 0118 * The error of a given bin. 0119 * @param indexX The x bin number (0...N-1) or OVERFLOW or UNDERFLOW. 0120 * @param indexY The y bin number (0...N-1) or OVERFLOW or UNDERFLOW. 0121 * @return The error on the corresponding bin. 0122 * 0123 */ 0124 virtual double binError(int indexX, int indexY) const = 0; 0125 0126 /** 0127 * The mean of the IHistogram2D along the x axis. 0128 * @return The mean of the IHistogram2D along the x axis. 0129 * 0130 */ 0131 virtual double meanX() const = 0; 0132 0133 /** 0134 * The mean of the IHistogram2D along the y axis. 0135 * @return The mean of the IHistogram2D along the y axis. 0136 * 0137 */ 0138 virtual double meanY() const = 0; 0139 0140 /** 0141 * The RMS of the IHistogram2D along the x axis. 0142 * @return The RMS if the IHistogram2D along the x axis. 0143 * 0144 */ 0145 virtual double rmsX() const = 0; 0146 0147 /** 0148 * The RMS of the IHistogram2D along the y axis. 0149 * @return The RMS if the IHistogram2D along the y axis. 0150 * 0151 */ 0152 virtual double rmsY() const = 0; 0153 0154 /** 0155 * Get the x axis of the IHistogram2D. 0156 * @return The x coordinate IAxis. 0157 * 0158 */ 0159 virtual const IAxis & xAxis() const = 0; 0160 0161 /** 0162 * Get the y axis of the IHistogram2D. 0163 * @return The y coordinate IAxis. 0164 * 0165 */ 0166 virtual const IAxis & yAxis() const = 0; 0167 0168 /** 0169 * Get the bin number corresponding to a given coordinate along the x axis. 0170 * This is a convenience method, equivalent to <tt>xAxis().coordToIndex(coord)</tt>. 0171 * @see IAxis#coordToIndex(double) 0172 * @param coord The coordinalte along the x axis. 0173 * @return The corresponding bin number. 0174 * 0175 */ 0176 virtual int coordToIndexX(double coord) const = 0; 0177 0178 /** 0179 * Get the bin number corresponding to a given coordinate along the y axis. 0180 * This is a convenience method, equivalent to <tt>yAxis().coordToIndex(coord)</tt>. 0181 * @see IAxis#coordToIndex(double) 0182 * @param coord The coordinalte along the y axis. 0183 * @return The corresponding bin number. 0184 * 0185 */ 0186 virtual int coordToIndexY(double coord) const = 0; 0187 0188 /** 0189 * Add to this IHistogram2D the contents of another IHistogram2D. 0190 * @param hist The IHistogram2D to be added to this IHistogram2D. 0191 * @return false If the IHistogram2Ds binnings are incompatible. 0192 * 0193 */ 0194 virtual bool add(const IHistogram2D & hist) = 0; 0195 }; // class 0196 } // namespace AIDA 0197 #endif /* ifndef AIDA_IHISTOGRAM2D_H */
[ Source navigation ] | [ Diff markup ] | [ Identifier search ] | [ general search ] |
This page was automatically generated by the 2.3.7 LXR engine. The LXR team |