Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 10:10:26

0001 /*
0002  * Project: RooFit
0003  * Authors:
0004  *   PB, Patrick Bos, Netherlands eScience Center, p.bos@esciencecenter.nl
0005  *
0006  * Copyright (c) 2021, CERN
0007  *
0008  * Redistribution and use in source and binary forms,
0009  * with or without modification, are permitted according to the terms
0010  * listed in LICENSE (http://roofit.sourceforge.net/license.txt)
0011  */
0012 
0013 #ifndef ROOT_ROOFIT_TESTSTATISTICS_RooRealL
0014 #define ROOT_ROOFIT_TESTSTATISTICS_RooRealL
0015 
0016 #include "RooAbsReal.h"
0017 #include "RooSetProxy.h"
0018 
0019 #include "Rtypes.h" // ClassDef, ClassImp
0020 
0021 #include <memory> // shared_ptr
0022 
0023 namespace RooFit {
0024 namespace TestStatistics {
0025 
0026 class RooAbsL;
0027 
0028 class RooRealL : public RooAbsReal {
0029 public:
0030    RooRealL(const char *name, const char *title, std::shared_ptr<RooAbsL> likelihood);
0031    RooRealL(const RooRealL &other, const char *name = nullptr);
0032 
0033    inline TObject *clone(const char *newname) const override { return new RooRealL(*this, newname); }
0034 
0035    inline double globalNormalization() const
0036    {
0037       // Default value of global normalization factor is 1.0
0038       return 1.0;
0039    }
0040 
0041    inline double getCarry() const { return eval_carry; }
0042    inline double defaultErrorLevel() const override { return 0.5; }
0043 
0044    std::shared_ptr<RooAbsL> const &getRooAbsL() { return likelihood_; };
0045 
0046 protected:
0047    double evaluate() const override;
0048 
0049 private:
0050    std::shared_ptr<RooAbsL> likelihood_;
0051    mutable double eval_carry = 0;
0052    RooSetProxy vars_proxy_; ///< sets up client-server connections
0053    RooArgSet vars_obs_;     ///< list of observables
0054 
0055    ClassDefOverride(RooRealL, 0);
0056 };
0057 
0058 } // namespace TestStatistics
0059 } // namespace RooFit
0060 
0061 #endif // ROOT_ROOFIT_TESTSTATISTICS_RooRealL