Back to home page

EIC code displayed by LXR

 
 

    


Warning, file /include/root/RooAddition.h was not indexed or was modified since last indexation (in which case cross-reference links may be missing, inaccurate or erroneous).

0001 /*****************************************************************************
0002  * Project: RooFit                                                           *
0003  * Package: RooFitCore                                                       *
0004  *    File: $Id: RooAddition.h,v 1.3 2007/05/11 09:11:30 verkerke Exp $
0005  * Authors:                                                                  *
0006  *   WV, Wouter Verkerke, UC Santa Barbara, verkerke@slac.stanford.edu       *
0007  *   DK, David Kirkby,    UC Irvine,         dkirkby@uci.edu                 *
0008  *                                                                           *
0009  * Copyright (c) 2000-2005, Regents of the University of California          *
0010  *                          and Stanford University. All rights reserved.    *
0011  *                                                                           *
0012  * Redistribution and use in source and binary forms,                        *
0013  * with or without modification, are permitted according to the terms        *
0014  * listed in LICENSE (http://roofit.sourceforge.net/license.txt)             *
0015  *****************************************************************************/
0016 #ifndef ROO_ADDITION
0017 #define ROO_ADDITION
0018 
0019 #include "RooAbsReal.h"
0020 #include "RooListProxy.h"
0021 #include "RooObjCacheManager.h"
0022 #include <list>
0023 
0024 class RooRealVar;
0025 class RooArgList ;
0026 
0027 class RooAddition : public RooAbsReal {
0028 public:
0029 
0030   RooAddition() : _cacheMgr(this,10) {}
0031   RooAddition(const char *name, const char *title, const RooArgList& sumSet);
0032   RooAddition(const char *name, const char *title, const RooArgList& sumSet1, const RooArgList& sumSet2);
0033 
0034   RooAddition(const RooAddition& other, const char* name = nullptr);
0035   TObject* clone(const char* newname) const override { return new RooAddition(*this, newname); }
0036 
0037   double defaultErrorLevel() const override ;
0038 
0039   void printMetaArgs(std::ostream& os) const override ;
0040 
0041   const RooArgList& list1() const { return _set ; }
0042   const RooArgList& list() const { return _set ; }
0043 
0044   bool forceAnalyticalInt(const RooAbsArg& /*dep*/) const override {
0045       // Force RooRealIntegral to offer all observables for internal integration
0046       return true ;
0047   }
0048   Int_t getAnalyticalIntegral(RooArgSet& allVars, RooArgSet& numVars, const char* rangeName=nullptr) const override;
0049   double analyticalIntegral(Int_t code, const char* rangeName=nullptr) const override ;
0050 
0051   bool setData(RooAbsData& data, bool cloneData=true) override ;
0052 
0053   std::list<double>* binBoundaries(RooAbsRealLValue& /*obs*/, double /*xlo*/, double /*xhi*/) const override ;
0054   std::list<double>* plotSamplingHint(RooAbsRealLValue& /*obs*/, double /*xlo*/, double /*xhi*/) const override ;
0055   bool isBinnedDistribution(const RooArgSet& obs) const override  ;
0056 
0057   void doEval(RooFit::EvalContext &) const override;
0058 
0059   void translate(RooFit::Detail::CodeSquashContext &ctx) const override;
0060 
0061 protected:
0062 
0063   RooArgList   _ownedList ;      ///< List of owned components
0064   RooListProxy _set ;            ///< set of terms to be summed
0065 
0066   class CacheElem : public RooAbsCacheElement {
0067   public:
0068       // Payload
0069       RooArgList _I ;
0070       RooArgList containedArgs(Action) override { return _I; }
0071   };
0072   mutable RooObjCacheManager _cacheMgr ; ///<! The cache manager
0073 
0074   double evaluate() const override;
0075 
0076   ClassDefOverride(RooAddition,3) // Sum of RooAbsReal objects
0077 };
0078 
0079 #endif