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_IFITRESULT_H
0008 #define AIDA_IFITRESULT_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 <string>
0016 #include <vector>
0017 
0018 namespace AIDA {
0019 
0020 class IFitParameterSettings;
0021 class IFunction;
0022 
0023 /** @interface
0024  *
0025  * Represents the result of the fit.
0026  *
0027  * Holds internal copies of fit parameter settings (set in IFitter) and the
0028  * fitted function (clone of original function). The value of the parameters
0029  * of the fitted function are obtained from the fitting.
0030  *
0031  * @author The AIDA team (http://aida.freehep.org/)
0032  *
0033  */
0034  
0035 class IFitResult {
0036 
0037 public: 
0038     /// Destructor.
0039     virtual ~IFitResult() { /* nop */; }
0040 
0041     /// True if fit successful, otherwise false.
0042     virtual bool isValid() = 0;
0043 
0044     /// Status of the fit. PENDING: what are the suggested values?
0045     virtual int fitStatus() = 0;
0046 
0047     /// Fitted function. The parameters hold the results of the fit.
0048     virtual IFunction & fittedFunction() = 0;
0049 
0050     /// Quality of the fit. Depending on the fit method this may be the value
0051     /// of Chi2 or Maximu Likelihood.
0052     virtual double quality() = 0;
0053 
0054     /// Number of degrees of freedom.
0055     virtual int ndf() = 0;
0056 
0057     /// Covariance matrix. PENDING: interface for matrix to be defined.
0058     virtual double covMatrixElement(int i, int j) = 0;
0059 
0060     /// Fit method name as set in the fitter.
0061     virtual std::string fitMethodName() = 0;
0062 
0063     /// Engine used to do fitting.
0064     virtual std::string engineName() = 0;
0065 
0066     /// Textual description of data - this is a hint for the user how to find
0067     /// the data in the tree if he wanted to repeat the fit later and lost
0068     /// the pointer to his orignal data object.
0069     /// PENDING: the contents and format of this string to be defined.
0070     /// PENDING: XML? stor name and path? ranges of DataPipe?
0071     virtual std::string dataDescription() = 0;
0072 
0073     /// Vector of constraints.
0074     virtual std::vector<std::string>  constraints() = 0;
0075 
0076     /// Access to applied parameter settings.
0077     virtual IFitParameterSettings * fitParameterSettings(const std::string & name) = 0;
0078 
0079     /**
0080      * Get the array of the fitted parameter values (including fixed and constrained ones).
0081      * @return The array containing the fitted values.
0082      *
0083      */
0084     virtual const std::vector<double>  & fittedParameters() const = 0;
0085 
0086     /**
0087      * Get the names of the fitted parameters (including fixed and constrained ones).
0088      * @return The array containing the names of the fitted parameters.
0089      *
0090      */
0091     virtual std::vector<std::string>  fittedParameterNames() const = 0;
0092 
0093     /**
0094      * Get the value of a fitted parameter by name.
0095      * @return The value.
0096      *
0097      */
0098     virtual double fittedParameter(const std::string & name) = 0;
0099 
0100     /**
0101      * Get the parabolic errors on the fitted parameters. If a parameter was fixed
0102      * or constrained the error is zero.
0103      * @return The parabolic errors on the fitted parameters.
0104      *
0105      */
0106     virtual const std::vector<double>  & errors() const = 0;
0107 
0108     /**
0109      * Get the positive part of the asymmetric errors on the fitted parameters. If a parameter was fixed
0110      * or constrained the error is zero.
0111      * @return The positive part of the asymmetric errors on the fitted parameters.
0112      *
0113      */
0114     virtual const std::vector<double>  & errorsPlus() const = 0;
0115 
0116     /**
0117      * Get the negative part of the asymmetric errors on the fitted parameters. If a parameter was fixed
0118      * or constrained the error is zero.
0119      * @return The negative part of the asymmetric errors on the fitted parameters.
0120      *
0121      */
0122     virtual const std::vector<double>  & errorsMinus() const = 0;
0123 
0124     /** @link aggregation 
0125      * @supplierRole <<internal copy>>*/
0126     /*#  IFitParameterSettings lnkIFitParameterProperty; */
0127 }; // class
0128 } // namespace AIDA
0129 #endif /* ifndef AIDA_IFITRESULT_H */