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_ICLOUD2D_H
0008 #define AIDA_ICLOUD2D_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 <vector>
0016 
0017 #include "AIDA/ICloud.h"
0018 
0019 namespace AIDA {
0020 
0021 class IHistogram2D;
0022 
0023 /**
0024  * User level interface to a 2D Cloud.
0025  * 
0026  * @author The AIDA team (http://aida.freehep.org/)
0027  *
0028  */
0029  
0030 class ICloud2D : virtual public ICloud {
0031 
0032 public: 
0033     /// Destructor.
0034     virtual ~ICloud2D() { /* nop */; }
0035 
0036     /**
0037      * Fill the ICloud2D with a couple of values and a corresponding weight.
0038      * @param x      The x value.
0039      * @param y      The y value.
0040      * @param weight The corresponding weight. By default it is 1.
0041      * @return false If the ICloud2D is full, if the weight's value is
0042      *                                  is not between 0 and 1.
0043      *
0044      */
0045     virtual bool fill(double x, double y, double weight = 1.) = 0;
0046 
0047     /**
0048      * Get the lower edge of the ICloud2D along the x axis.
0049      * @return The lower edge along the x axis.
0050      *
0051      */
0052     virtual double lowerEdgeX() const = 0;
0053 
0054     /**
0055      * Get the lower edge of the ICloud2D along the y axis.
0056      * @return The lower edge along the y axis.
0057      *
0058      */
0059     virtual double lowerEdgeY() const = 0;
0060 
0061     /**
0062      * Get the upper edge of the ICloud2D along the x axis.
0063      * @return The upper edge along the x axis.
0064      *
0065      */
0066     virtual double upperEdgeX() const = 0;
0067 
0068     /**
0069      * Get the upper edge of the ICloud2D along the y axis.
0070      * @return The upper edge along the y axis.
0071      *
0072      */
0073     virtual double upperEdgeY() const = 0;
0074 
0075     /**
0076      * Get the x value corresponding to a given entry.
0077      * @param index The entry's index.
0078      * @return      The x value of the index-th entry.
0079      *              If the ICloud2D has already been converted, 0 is returned. 
0080      *
0081      */
0082       
0083            
0084        
0085                                                       
0086                                       
0087                                                       
0088                                                                                          
0089       
0090        
0091       
0092     virtual double valueX(int index) const = 0;
0093 
0094     /**
0095      * Get the y value corresponding to a given entry.
0096      * @param index The entry's index.
0097      * @return      The y value of the index-th entry.
0098      *              If the ICloud2D has already been converted, 0 is returned. 
0099      *
0100      */
0101       
0102            
0103        
0104                                                       
0105                                       
0106                                                       
0107                                                                                          
0108       
0109        
0110       
0111     virtual double valueY(int index) const = 0;
0112 
0113     /**
0114      * Get the weight corresponding to a given entry.
0115      * @param index The entry's index.
0116      * @return      The weight of the index-th entry.
0117      *              If the ICloud2D has already been converted, 0 is returned. 
0118      *
0119      */
0120       
0121            
0122        
0123                                                      
0124                                       
0125                                                      
0126                                                                                        
0127       
0128        
0129       
0130     virtual double weight(int index) const = 0;
0131 
0132     /**
0133      * Get the mean of the ICloud2D along the x axis.
0134      * @return The mean along the x axis.
0135      *
0136      */
0137     virtual double meanX() const = 0;
0138 
0139     /**
0140      * Get the mean of the ICloud2D along the y axis.
0141      * @return The mean along the y axis.
0142      *
0143      */
0144     virtual double meanY() const = 0;
0145 
0146     /**
0147      * Get the RMS of the ICloud2D along the x axis.
0148      * @return The RMS along the x axis.
0149      *
0150      */
0151     virtual double rmsX() const = 0;
0152 
0153     /**
0154      * Get the RMS of the ICloud2D along the y axis.
0155      * @return The RMS along the y axis.
0156      *
0157      */
0158     virtual double rmsY() const = 0;
0159 
0160     /**
0161      * Convert internally the ICloud2D to an IHistogram2D 
0162      * with given number of bins, upper edge and lower edge.
0163      * @param nBinsX     The number of bins of the x axis.
0164      * @param lowerEdgeX The lower edge of bins of the x axis.
0165      * @param upperEdgeX The upper edge of bins of the x axis.
0166      * @param nBinsY     The number of bins of the y axis.
0167      * @param lowerEdgeY The lower edge of bins of the y axis.
0168      * @param upperEdgeY The upper edge of bins of the y axis.
0169      * @return false If the ICloud2D has already been converted.
0170      *
0171      */
0172     virtual bool convert(int nBinsX, double lowerEdgeX, double upperEdgeX, int nBinsY, double lowerEdgeY, double upperEdgeY) = 0;
0173 
0174     /**
0175      * Convert internally the ICloud2D to an IHistogram2D 
0176      * with given bin edges.
0177      * @param binEdgesX The bins edges of the x axis.
0178      * @param binEdgesY The bins edges of the y axis.
0179      * @return false If the ICloud2D has already been converted.
0180      *
0181      */
0182     virtual bool convert(const std::vector<double>  & binEdgesX, const std::vector<double>  & binEdgesY) = 0;
0183 
0184     /**     
0185      * Get the internal IHistogram2D in which the ICloud2D converted to.
0186      * @return The histogram.
0187      *                          or because of a convert() method invocation.
0188      *
0189      */
0190     virtual const IHistogram2D & histogram() const = 0;
0191 
0192     /**
0193      * Project the ICloud2D on an IHistogram2D.
0194      * @param hist The IHistogram2D to be filled.
0195      * @return false If the ICloud2D is already converted.
0196      *
0197      */
0198     virtual bool fillHistogram(IHistogram2D & hist) const = 0;
0199 }; // class
0200 } // namespace AIDA
0201 #endif /* ifndef AIDA_ICLOUD2D_H */