RooAddition.h

Go to the documentation of this file.
00001 /*****************************************************************************
00002  * Project: RooFit                                                           *
00003  * Package: RooFitCore                                                       *
00004  *    File: $Id: RooAddition.h,v 1.3 2007/05/11 09:11:30 verkerke Exp $
00005  * Authors:                                                                  *
00006  *   WV, Wouter Verkerke, UC Santa Barbara, verkerke@slac.stanford.edu       *
00007  *   DK, David Kirkby,    UC Irvine,         dkirkby@uci.edu                 *
00008  *                                                                           *
00009  * Copyright (c) 2000-2005, Regents of the University of California          *
00010  *                          and Stanford University. All rights reserved.    *
00011  *                                                                           *
00012  * Redistribution and use in source and binary forms,                        *
00013  * with or without modification, are permitted according to the terms        *
00014  * listed in LICENSE (http://roofit.sourceforge.net/license.txt)             *
00015  *****************************************************************************/
00016 #ifndef ROO_ADDITION
00017 #define ROO_ADDITION
00018 
00019 #include "RooAbsReal.h"
00020 #include "RooListProxy.h"
00021 #include "RooObjCacheManager.h"
00022 
00023 class RooRealVar;
00024 class RooArgList ;
00025 
00026 class RooAddition : public RooAbsReal {
00027 public:
00028 
00029   RooAddition() ;
00030   RooAddition(const char *name, const char *title, const RooArgSet& sumSet, Bool_t takeOwnerShip=kFALSE) ;
00031   RooAddition(const char *name, const char *title, const RooArgList& sumSet1, const RooArgList& sumSet2, Bool_t takeOwnerShip=kFALSE) ;
00032   virtual ~RooAddition() ;
00033 
00034   RooAddition(const RooAddition& other, const char* name = 0);
00035   virtual TObject* clone(const char* newname) const { return new RooAddition(*this, newname); }
00036 
00037   virtual Double_t defaultErrorLevel() const ;
00038 
00039   void printMetaArgs(ostream& os) const ;
00040 
00041   const RooArgList& list1() const { return _set ; }
00042   const RooArgList& list() const { return _set ; }
00043 
00044   virtual Bool_t forceAnalyticalInt(const RooAbsArg& /*dep*/) const {
00045       // Force RooRealIntegral to offer all observables for internal integration
00046       return kTRUE ;
00047   }
00048   Int_t getAnalyticalIntegral(RooArgSet& allVars, RooArgSet& numVars, const char* rangeName=0) const;
00049   Double_t analyticalIntegral(Int_t code, const char* rangeName=0) const ;
00050 
00051 
00052 
00053      
00054 
00055 protected:
00056 
00057   RooArgList   _ownedList ;      // List of owned components
00058   RooListProxy _set ;            // set of terms to be summed
00059   mutable TIterator* _setIter ;  //! Iterator over set
00060 
00061   class CacheElem : public RooAbsCacheElement {
00062   public:
00063       virtual ~CacheElem();
00064       // Payload
00065       RooArgList _I ;
00066       virtual RooArgList containedArgs(Action) ;
00067   };
00068   mutable RooObjCacheManager _cacheMgr ; // The cache manager
00069 
00070   Double_t evaluate() const;
00071 
00072   ClassDef(RooAddition,2) // Sum of RooAbsReal objects
00073 };
00074 
00075 #endif

Generated on Tue Jul 5 14:26:04 2011 for ROOT_528-00b_version by  doxygen 1.5.1