Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 10:11:25

0001  /*****************************************************************************
0002   * Project: RooFit                                                           *
0003   * @(#)root/roofit:$Id$   *
0004   *                                                                           *
0005   * RooFit NonCentralChisquare PDF                                            *
0006   *                                                                           *
0007   * Author: Kyle Cranmer                                                      *
0008   *                                                                           *
0009   *****************************************************************************/
0010 
0011 #ifndef ROO_NONCENTRALCHISQUARE
0012 #define ROO_NONCENTRALCHISQUARE
0013 
0014 #include "RooAbsPdf.h"
0015 #include "RooRealProxy.h"
0016 #include "RooCategoryProxy.h"
0017 #include "RooAbsReal.h"
0018 #include "RooAbsCategory.h"
0019 
0020 class RooNonCentralChiSquare : public RooAbsPdf {
0021 public:
0022    RooNonCentralChiSquare() {} ;
0023    RooNonCentralChiSquare(const char *name, const char *title,
0024                           RooAbsReal& _x,
0025                           RooAbsReal& _k,
0026                           RooAbsReal& _lambda);
0027    RooNonCentralChiSquare(const RooNonCentralChiSquare& other, const char* name=nullptr) ;
0028    TObject* clone(const char* newname) const override { return new RooNonCentralChiSquare(*this,newname); }
0029 
0030    void SetErrorTolerance(double t) {fErrorTol = t;}
0031    void SetMaxIters(Int_t mi) {fMaxIters = mi;}
0032    void SetForceSum(bool flag);
0033 
0034 
0035    Int_t getAnalyticalIntegral(RooArgSet& allVars, RooArgSet& analVars, const char* rangeName=nullptr) const override ;
0036    double analyticalIntegral(Int_t code, const char* rangeName=nullptr) const override ;
0037 
0038 protected:
0039 
0040    RooRealProxy x ;
0041    RooRealProxy k ;
0042    RooRealProxy lambda ;
0043    double fErrorTol;
0044    Int_t fMaxIters;
0045    bool fForceSum;
0046    mutable bool fHasIssuedConvWarning;
0047    mutable bool fHasIssuedSumWarning;
0048    double evaluate() const override ;
0049 
0050 private:
0051 
0052    ClassDefOverride(RooNonCentralChiSquare,1) // non-central chisquare pdf
0053 };
0054 
0055 #endif