Back to home page

EIC code displayed by LXR

 
 

    


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

0001 /*****************************************************************************
0002  * Project: RooFit                                                           *
0003  * Package: RooFitModels                                                     *
0004  *    File: $Id$
0005  * Authors:                                                                  *
0006  *   Kyle Cranmer
0007  *                                                                           *
0008  *                                                                           *
0009  * Redistribution and use in source and binary forms,                        *
0010  * with or without modification, are permitted according to the terms        *
0011  * listed in LICENSE (http://roofit.sourceforge.net/license.txt)             *
0012  *****************************************************************************/
0013 #ifndef ROO_CHISQUARE
0014 #define ROO_CHISQUARE
0015 
0016 #include "RooAbsPdf.h"
0017 #include "RooRealProxy.h"
0018 
0019 class RooRealVar;
0020 class RooArgList ;
0021 
0022 class RooChiSquarePdf : public RooAbsPdf {
0023 public:
0024 
0025   RooChiSquarePdf() ;
0026   RooChiSquarePdf(const char *name, const char *title,
0027                RooAbsReal& x,  RooAbsReal& ndof) ;
0028 
0029   RooChiSquarePdf(const RooChiSquarePdf& other, const char *name = nullptr);
0030   TObject* clone(const char* newname) const override { return new RooChiSquarePdf(*this, newname); }
0031 
0032   Int_t getAnalyticalIntegral(RooArgSet& allVars, RooArgSet& analVars, const char* rangeName=nullptr) const override ;
0033   double analyticalIntegral(Int_t code, const char* rangeName=nullptr) const override ;
0034 
0035 private:
0036 
0037   RooRealProxy _x;
0038   RooRealProxy _ndof;
0039 
0040   double evaluate() const override;
0041   void doEval(RooFit::EvalContext &) const override;
0042   inline bool canComputeBatchWithCuda() const override { return true; }
0043 
0044   ClassDefOverride(RooChiSquarePdf,1) // Chi Square distribution (eg. the PDF )
0045 };
0046 
0047 #endif