Logo ROOT   6.18/05
Reference Guide
RooAddition.h
Go to the documentation of this file.
1/*****************************************************************************
2 * Project: RooFit *
3 * Package: RooFitCore *
4 * File: $Id: RooAddition.h,v 1.3 2007/05/11 09:11:30 verkerke Exp $
5 * Authors: *
6 * WV, Wouter Verkerke, UC Santa Barbara, verkerke@slac.stanford.edu *
7 * DK, David Kirkby, UC Irvine, dkirkby@uci.edu *
8 * *
9 * Copyright (c) 2000-2005, Regents of the University of California *
10 * and Stanford University. All rights reserved. *
11 * *
12 * Redistribution and use in source and binary forms, *
13 * with or without modification, are permitted according to the terms *
14 * listed in LICENSE (http://roofit.sourceforge.net/license.txt) *
15 *****************************************************************************/
16#ifndef ROO_ADDITION
17#define ROO_ADDITION
18
19#include "RooAbsReal.h"
20#include "RooListProxy.h"
21#include "RooObjCacheManager.h"
22
23class RooRealVar;
24class RooArgList ;
25
26class RooAddition : public RooAbsReal {
27public:
28
29 RooAddition() ;
30 RooAddition(const char *name, const char *title, const RooArgList& sumSet, Bool_t takeOwnerShip=kFALSE) ;
31 RooAddition(const char *name, const char *title, const RooArgList& sumSet1, const RooArgList& sumSet2, Bool_t takeOwnerShip=kFALSE) ;
32 virtual ~RooAddition() ;
33
34 RooAddition(const RooAddition& other, const char* name = 0);
35 virtual TObject* clone(const char* newname) const { return new RooAddition(*this, newname); }
36
37 virtual Double_t defaultErrorLevel() const ;
38
39 void printMetaArgs(std::ostream& os) const ;
40
41 const RooArgList& list1() const { return _set ; }
42 const RooArgList& list() const { return _set ; }
43
44 virtual Bool_t forceAnalyticalInt(const RooAbsArg& /*dep*/) const {
45 // Force RooRealIntegral to offer all observables for internal integration
46 return kTRUE ;
47 }
48 Int_t getAnalyticalIntegral(RooArgSet& allVars, RooArgSet& numVars, const char* rangeName=0) const;
49 Double_t analyticalIntegral(Int_t code, const char* rangeName=0) const ;
50
51 Bool_t setData(RooAbsData& data, Bool_t cloneData=kTRUE) ;
52
53 virtual std::list<Double_t>* binBoundaries(RooAbsRealLValue& /*obs*/, Double_t /*xlo*/, Double_t /*xhi*/) const ;
54 virtual std::list<Double_t>* plotSamplingHint(RooAbsRealLValue& /*obs*/, Double_t /*xlo*/, Double_t /*xhi*/) const ;
55 Bool_t isBinnedDistribution(const RooArgSet& obs) const ;
56
57 virtual void enableOffsetting(Bool_t) ;
58
59protected:
60
61 RooArgList _ownedList ; // List of owned components
62 RooListProxy _set ; // set of terms to be summed
63 mutable TIterator* _setIter ; //! Iterator over set
64
66 public:
67 virtual ~CacheElem();
68 // Payload
71 };
72 mutable RooObjCacheManager _cacheMgr ; // The cache manager
73
74 Double_t evaluate() const;
75
76 ClassDef(RooAddition,2) // Sum of RooAbsReal objects
77};
78
79#endif
int Int_t
Definition: RtypesCore.h:41
const Bool_t kFALSE
Definition: RtypesCore.h:88
bool Bool_t
Definition: RtypesCore.h:59
double Double_t
Definition: RtypesCore.h:55
const Bool_t kTRUE
Definition: RtypesCore.h:87
#define ClassDef(name, id)
Definition: Rtypes.h:326
char name[80]
Definition: TGX11.cxx:109
RooAbsArg is the common abstract base class for objects that represent a value (of arbitrary type) an...
Definition: RooAbsArg.h:70
RooAbsCacheElement is the abstract base class for objects to be stored in RooAbsCache cache manager o...
RooAbsData is the common abstract base class for binned and unbinned datasets.
Definition: RooAbsData.h:37
RooAbsRealLValue is the common abstract base class for objects that represent a real value that may a...
RooAbsReal is the common abstract base class for objects that represent a real value and implements f...
Definition: RooAbsReal.h:53
Iterator over set.
Definition: RooAddition.h:65
virtual RooArgList containedArgs(Action)
Return list of all RooAbsArgs in cache element.
RooAddition calculates the sum of a set of RooAbsReal terms, or when constructed with two sets,...
Definition: RooAddition.h:26
void printMetaArgs(std::ostream &os) const
virtual std::list< Double_t > * plotSamplingHint(RooAbsRealLValue &, Double_t, Double_t) const
TIterator * _setIter
Definition: RooAddition.h:63
virtual Bool_t forceAnalyticalInt(const RooAbsArg &) const
Definition: RooAddition.h:44
const RooArgList & list1() const
Definition: RooAddition.h:41
Int_t getAnalyticalIntegral(RooArgSet &allVars, RooArgSet &numVars, const char *rangeName=0) const
Interface function getAnalyticalIntergral advertises the analytical integrals that are supported.
Bool_t isBinnedDistribution(const RooArgSet &obs) const
const RooArgList & list() const
Definition: RooAddition.h:42
RooArgList _ownedList
Definition: RooAddition.h:61
virtual void enableOffsetting(Bool_t)
Double_t analyticalIntegral(Int_t code, const char *rangeName=0) const
Calculate integral internally from appropriate integral cache.
RooListProxy _set
Definition: RooAddition.h:62
Double_t evaluate() const
Calculate and return current value of self.
virtual ~RooAddition()
RooAddition()
Empty constructor.
Definition: RooAddition.cxx:53
RooObjCacheManager _cacheMgr
Definition: RooAddition.h:72
virtual std::list< Double_t > * binBoundaries(RooAbsRealLValue &, Double_t, Double_t) const
virtual TObject * clone(const char *newname) const
Definition: RooAddition.h:35
Bool_t setData(RooAbsData &data, Bool_t cloneData=kTRUE)
virtual Double_t defaultErrorLevel() const
Return the default error level for MINUIT error analysis If the addition contains one or more RooNLLV...
RooArgList is a container object that can hold multiple RooAbsArg objects.
Definition: RooArgList.h:21
RooArgSet is a container object that can hold multiple RooAbsArg objects.
Definition: RooArgSet.h:28
RooListProxy is the concrete proxy for RooArgList objects.
Definition: RooListProxy.h:25
Class RooObjCacheManager is an implementation of class RooCacheManager<RooAbsCacheElement> and specia...
RooRealVar represents a fundamental (non-derived) real valued object.
Definition: RooRealVar.h:36
Iterator abstract base class.
Definition: TIterator.h:30
Mother of all ROOT objects.
Definition: TObject.h:37