Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 09:28:09

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_IPROFILE2D_H
0008 #define AIDA_IPROFILE2D_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/IProfile.h"
0016 
0017 namespace AIDA {
0018 
0019 class IAxis;
0020 
0021 /**
0022  * User level interface to a 2-dimensional profile histogram
0023  *
0024  * @author The AIDA team (http://aida.freehep.org/)
0025  *
0026  */
0027 
0028 class IProfile2D : virtual public IProfile {
0029 
0030 public: 
0031     /// Destructor.
0032     virtual ~IProfile2D() { /* nop */; }
0033 
0034     /**
0035      * Fill the IProfile2D.
0036      *
0037      */
0038     virtual bool fill(double x, double y, double z, double weight = 1) = 0;
0039 
0040     /**
0041      * The weighted mean along x of a given bin. 
0042      * @param indexX The x bin number (0...N-1) or OVERFLOW or UNDERFLOW.
0043      * @param indexY The y bin number (0...N-1) or OVERFLOW or UNDERFLOW.
0044      * @return       The mean of the corresponding bin along the x axis.
0045      *
0046      */
0047     virtual double binMeanX(int indexX, int indexY) const = 0;
0048 
0049     /**
0050      * The weighted mean along y of a given bin. 
0051      * @param indexX The x bin number (0...N-1) or OVERFLOW or UNDERFLOW.
0052      * @param indexY The y bin number (0...N-1) or OVERFLOW or UNDERFLOW.
0053      * @return       The mean of the corresponding bin along the x axis.
0054      *
0055      */
0056     virtual double binMeanY(int indexX, int indexY) const = 0;
0057 
0058     /**
0059      * The number of entries (ie the number of times fill was called for this bin).
0060      * @param indexX the x bin number (0...Nx-1) or OVERFLOW or UNDERFLOW.
0061      * @param indexY the y bin number (0...Ny-1) or OVERFLOW or UNDERFLOW.
0062      *
0063      */
0064     virtual int binEntries(int indexX, int indexY) const = 0;
0065 
0066     /**
0067      * Equivalent to <tt>projectionX().binEntries(indexX)</tt>.
0068      *
0069      */
0070     virtual int binEntriesX(int indexX) const = 0;
0071 
0072     /**
0073      * Equivalent to <tt>projectionY().binEntries(indexY)</tt>.
0074      *
0075      */
0076     virtual int binEntriesY(int indexY) const = 0;
0077 
0078     /**
0079      * Total height of the corresponding bin (ie the sum of the weights in this bin).
0080      * @param indexX the x bin number (0...Nx-1) or OVERFLOW or UNDERFLOW.
0081      * @param indexY the y bin number (0...Ny-1) or OVERFLOW or UNDERFLOW.
0082      *
0083      */
0084     virtual double binHeight(int indexX, int indexY) const = 0;
0085 
0086     /**
0087      * Equivalent to <tt>projectionX().binHeight(indexX)</tt>.
0088      *
0089      */
0090     virtual double binHeightX(int indexX) const = 0;
0091 
0092     /**
0093      * Equivalent to <tt>projectionY().binHeight(indexY)</tt>.
0094      *
0095      */
0096     virtual double binHeightY(int indexY) const = 0;
0097 
0098     /**
0099      * The error on this bin.
0100      * @param indexX the x bin number (0...Nx-1) or OVERFLOW or UNDERFLOW.
0101      * @param indexY the y bin number (0...Ny-1) or OVERFLOW or UNDERFLOW.
0102      *
0103      */
0104     virtual double binError(int indexX, int indexY) const = 0;
0105 
0106     /**
0107      * The spread (RMS) of this bin.
0108      * @param indexX the x bin number (0...Nx-1) or OVERFLOW or UNDERFLOW.
0109      * @param indexY the y bin number (0...Ny-1) or OVERFLOW or UNDERFLOW.
0110      *
0111      */
0112     virtual double binRms(int indexX, int indexY) const = 0;
0113 
0114     /**
0115      * Returns the mean of the profile, as calculated on filling-time projected on the X axis.
0116      *
0117      */
0118     virtual double meanX() const = 0;
0119 
0120     /**
0121      * Returns the mean of the profile, as calculated on filling-time projected on the Y axis.
0122      *
0123      */
0124     virtual double meanY() const = 0;
0125 
0126     /**
0127      * Returns the rms of the profile as calculated on filling-time projected on the X axis.
0128      *
0129      */
0130     virtual double rmsX() const = 0;
0131 
0132     /**
0133      * Returns the rms of the profile as calculated on filling-time projected on the Y axis.
0134      *
0135      */
0136     virtual double rmsY() const = 0;
0137 
0138     /**
0139      * Return the X axis.
0140      *
0141      */
0142     virtual const IAxis & xAxis() const = 0;
0143 
0144     /**
0145      * Return the Y axis.
0146      *
0147      */
0148     virtual const IAxis & yAxis() const = 0;
0149 
0150     /**
0151      * Convenience method, equivalent to <tt>xAxis().coordToIndex(coord)</tt>.
0152      * @see IAxis#coordToIndex(double)
0153      *
0154      */
0155     virtual int coordToIndexX(double coordX) const = 0;
0156 
0157     /**
0158      * Convenience method, equivalent to <tt>yAxis().coordToIndex(coord)</tt>.
0159      * @see IAxis#coordToIndex(double)
0160      *
0161      */
0162     virtual int coordToIndexY(double coordY) const = 0;
0163 
0164     /**
0165      * Modifies this profile by adding the contents of profile to it.
0166      *
0167      * @param profile The IProfile2D to be added to this IProfile2D
0168      * @return false if the profile binnings are incompatible
0169      *
0170      */
0171     virtual bool add(const IProfile2D & h) = 0;
0172 }; // class
0173 } // namespace AIDA
0174 #endif /* ifndef AIDA_IPROFILE2D_H */