Back to home page

EIC code displayed by LXR

 
 

    


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_IHISTOGRAM3D_H
0008 #define AIDA_IHISTOGRAM3D_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 3D Histogram.
0023  *
0024  * @author The AIDA team (http://aida.freehep.org/)
0025  *
0026  */
0027 
0028 class IHistogram3D : virtual public IHistogram {
0029 
0030 public: 
0031     /// Destructor.
0032     virtual ~IHistogram3D() { /* nop */; }
0033 
0034     /**
0035      * Fill the IHistogram3D with a triplet 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 z      The z value to be filled in.
0040      * @param weight The corresponding weight (by default 1).
0041      * @return false If the weight is <0 or >1 (?).
0042      *
0043      */
0044     virtual bool fill(double x, double y, double z, double weight = 1.) = 0;
0045 
0046     /**
0047      * The weighted mean along the x axis of a given bin.
0048      * @param indexX The x bin number (0...N-1) or OVERFLOW or UNDERFLOW.
0049      * @param indexY The y bin number (0...N-1) or OVERFLOW or UNDERFLOW.
0050      * @param indexZ The z bin number (0...N-1) or OVERFLOW or UNDERFLOW.
0051      * @return      The mean of the corresponding bin along the x axis.
0052      *
0053      */
0054     virtual double binMeanX(int indexX, int indexY, int indexZ) const = 0;
0055 
0056     /**
0057      * The weighted mean the y axis of a given bin.
0058      * @param indexX The x bin number (0...N-1) or OVERFLOW or UNDERFLOW.
0059      * @param indexY The y bin number (0...N-1) or OVERFLOW or UNDERFLOW.
0060      * @param indexZ The z bin number (0...N-1) or OVERFLOW or UNDERFLOW.
0061      * @return      The mean of the corresponding bin along the y axis.
0062      *
0063      */
0064     virtual double binMeanY(int indexX, int indexY, int indexZ) const = 0;
0065 
0066     /**
0067      * The weighted mean the z axis of a given bin. 
0068      * @param indexX The x bin number (0...N-1) or OVERFLOW or UNDERFLOW.
0069      * @param indexY The y bin number (0...N-1) or OVERFLOW or UNDERFLOW.
0070      * @param indexZ The z bin number (0...N-1) or OVERFLOW or UNDERFLOW.
0071      * @return      The mean of the corresponding bin along the z axis.
0072      *
0073      */
0074     virtual double binMeanZ(int indexX, int indexY, int indexZ) const = 0;
0075 
0076     /**
0077      * Number of entries in the corresponding bin (ie the number of times fill was called for this bin).
0078      * @param indexX The x bin number (0...N-1) or OVERFLOW or UNDERFLOW.
0079      * @param indexY The y bin number (0...N-1) or OVERFLOW or UNDERFLOW.
0080      * @param indexZ The z bin number (0...N-1) or OVERFLOW or UNDERFLOW.
0081      * @return       The number of entries in the corresponding bin. 
0082      *
0083      */
0084     virtual int binEntries(int indexX, int indexY, int indexZ) const = 0;
0085 
0086     /**
0087      * Sum of all the entries of the bins along a given x bin.
0088      * This is equivalent to <tt>projectionXY().binEntriesX(index)</tt>.
0089      * @param index The x bin number (0...N-1) or OVERFLOW or UNDERFLOW.
0090      * @return      The number of entries in the corresponding set of bins. 
0091      *
0092      */
0093     virtual int binEntriesX(int index) const = 0;
0094 
0095     /**
0096      * Sum of all the entries of the bins along a given y bin.
0097      * This is equivalent to <tt>projectionXY().binEntriesY(index)</tt>.
0098      * @param index The y bin number (0...N-1) or OVERFLOW or UNDERFLOW.
0099      * @return      The number of entries in the corresponding set of bins. 
0100      *
0101      */
0102     virtual int binEntriesY(int index) const = 0;
0103 
0104     /**
0105      * Sum of all the entries of the bins along a given z bin.
0106      * This is equivalent to <tt>projectionXZ().binEntriesZ(index)</tt>.
0107      * @param index The z bin number (0...N-1) or OVERFLOW or UNDERFLOW.
0108      * @return      The number of entries in the corresponding set of bins. 
0109      *
0110      */
0111     virtual int binEntriesZ(int index) const = 0;
0112 
0113     /**
0114      * Total height of a give bin (ie the sum of the weights in this bin).
0115      * @param indexX The x bin number (0...N-1) or OVERFLOW or UNDERFLOW.
0116      * @param indexY The y bin number (0...N-1) or OVERFLOW or UNDERFLOW.
0117      * @param indexZ The z bin number (0...N-1) or OVERFLOW or UNDERFLOW.
0118      * @return       The height of the corresponding bin.
0119      *
0120      */
0121     virtual double binHeight(int indexX, int indexY, int indexZ) const = 0;
0122 
0123     /**
0124      * Sum of all the heights of the bins along a given x bin.
0125      * This is equivalent to <tt>projectionXY().binHeightX(index)</tt>.
0126      * @param index The x bin number (0...N-1) or OVERFLOW or UNDERFLOW.
0127      * @return      The sum of the heights in the corresponding set of bins. 
0128      *
0129      */
0130     virtual double binHeightX(int index) const = 0;
0131 
0132     /**
0133      * Sum of all the heights of the bins along a given y bin.
0134      * This is equivalent to <tt>projectionXY().binHeightY(index)</tt>.
0135      * @param index The y bin number (0...N-1) or OVERFLOW or UNDERFLOW.
0136      * @return      The sum of the heights in the corresponding set of bins. 
0137      *
0138      */
0139     virtual double binHeightY(int index) const = 0;
0140 
0141     /**
0142      * Sum of all the heights of the bins along a given z bin.
0143      * This is equivalent to <tt>projectionXZ().binHeightZ(index)</tt>.
0144      * @param index The z bin number (0...N-1) or OVERFLOW or UNDERFLOW.
0145      * @return      The sum of the heights in the corresponding set of bins. 
0146      *
0147      */
0148     virtual double binHeightZ(int index) const = 0;
0149 
0150     /**
0151      * The error of a given bin.
0152      * @param indexX The x bin number (0...N-1) or OVERFLOW or UNDERFLOW.
0153      * @param indexY The y bin number (0...N-1) or OVERFLOW or UNDERFLOW.
0154      * @param indexZ The z bin number (0...N-1) or OVERFLOW or UNDERFLOW.
0155      * @return       The error on the corresponding bin.
0156      *
0157      */
0158     virtual double binError(int indexX, int indexY, int indexZ) const = 0;
0159 
0160     /**
0161      * The mean of the IHistogram3D along the x axis.
0162      * @return The mean of the IHistogram3D along the x axis.
0163      *
0164      */
0165     virtual double meanX() const = 0;
0166 
0167     /**
0168      * The mean of the IHistogram3D along the y axis.
0169      * @return The mean of the IHistogram3D along the y axis.
0170      *
0171      */
0172     virtual double meanY() const = 0;
0173 
0174     /**
0175      * The mean of the IHistogram3D along the z axis.
0176      * @return The mean of the IHistogram3D along the z axis.
0177      *
0178      */
0179     virtual double meanZ() const = 0;
0180 
0181     /**
0182      * The RMS of the IHistogram3D along the x axis.
0183      * @return The RMS if the IHistogram3D along the x axis.
0184      *
0185      */
0186     virtual double rmsX() const = 0;
0187 
0188     /**
0189      * The RMS of the IHistogram3D along the y axis.
0190      * @return The RMS if the IHistogram3D along the y axis.
0191      *
0192      */
0193     virtual double rmsY() const = 0;
0194 
0195     /**
0196      * The RMS of the IHistogram3D along the z axis.
0197      * @return The RMS if the IHistogram3D along the z axis.
0198      *
0199      */
0200     virtual double rmsZ() const = 0;
0201 
0202     /**
0203      * Get the x axis of the IHistogram3D.
0204      * @return The x coordinate IAxis.
0205      *
0206      */
0207     virtual const IAxis & xAxis() const = 0;
0208 
0209     /**
0210      * Get the y axis of the IHistogram3D.
0211      * @return The y coordinate IAxis.
0212      *
0213      */
0214     virtual const IAxis & yAxis() const = 0;
0215 
0216     /**
0217      * Get the z axis of the IHistogram3D.
0218      * @return The z coordinate IAxis.
0219      *
0220      */
0221     virtual const IAxis & zAxis() const = 0;
0222 
0223     /**
0224      * Get the bin number corresponding to a given coordinate along the x axis.
0225      * This is a convenience method, equivalent to <tt>xAxis().coordToIndex(coord)</tt>.
0226      * @see IAxis#coordToIndex(double)
0227      * @param coord The coordinalte along the x axis.
0228      * @return      The corresponding bin number.
0229      *
0230      */
0231     virtual int coordToIndexX(double coord) const = 0;
0232 
0233     /**
0234      * Get the bin number corresponding to a given coordinate along the y axis.
0235      * This is a convenience method, equivalent to <tt>yAxis().coordToIndex(coord)</tt>.
0236      * @see IAxis#coordToIndex(double)
0237      * @param coord The coordinalte along the y axis.
0238      * @return      The corresponding bin number.
0239      *
0240      */
0241     virtual int coordToIndexY(double coord) const = 0;
0242 
0243     /**
0244      * Get the bin number corresponding to a given coordinate along the z axis.
0245      * This is a convenience method, equivalent to <tt>zAxis().coordToIndex(coord)</tt>.
0246      * @see IAxis#coordToIndex(double)
0247      * @param coord The coordinalte along the z axis.
0248      * @return      The corresponding bin number.
0249      *
0250      */
0251     virtual int coordToIndexZ(double coord) const = 0;
0252 
0253     /**
0254      * Add to this IHistogram3D the contents of another IHistogram3D.
0255      * @param hist The IHistogram3D to be added to this IHistogram3D.
0256      * @return false If the IHistogram3Ds binnings are incompatible.
0257      *
0258      */
0259     virtual bool add(const IHistogram3D & hist) = 0;
0260 }; // class
0261 } // namespace AIDA
0262 #endif /* ifndef AIDA_IHISTOGRAM3D_H */