Logo ROOT  
Reference Guide
 
Loading...
Searching...
No Matches
RooConstraintSum.h
Go to the documentation of this file.
1/*****************************************************************************
2 * Project: RooFit *
3 * Package: RooFitCore *
4 * File: $Id$
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_CONSTRAINT_SUM
17#define ROO_CONSTRAINT_SUM
18
19#include "RooAbsReal.h"
20#include "RooListProxy.h"
21#include "RooSetProxy.h"
22
23class RooRealVar;
24class RooArgList ;
25class RooWorkspace ;
26
28public:
29
31 RooConstraintSum(const char *name, const char *title, const RooArgSet& constraintSet, const RooArgSet& paramSet, bool takeGlobalObservablesFromData=false) ;
32
33 RooConstraintSum(const RooConstraintSum& other, const char* name = nullptr);
34 TObject* clone(const char* newname) const override { return new RooConstraintSum(*this, newname); }
35
36 const RooArgList& list() { return _set1 ; }
37
38 bool setData(RooAbsData const& data, bool cloneData=true);
39 /// \copydoc setData(RooAbsData const&, bool)
40 bool setData(RooAbsData& data, bool cloneData=true) override {
41 return setData(static_cast<RooAbsData const&>(data), cloneData);
42 }
43
44 void doEval(RooFit::EvalContext &) const override;
45
46 std::unique_ptr<RooAbsArg> compileForNormSet(RooArgSet const &normSet, RooFit::Detail::CompileContext & ctx) const override;
47
48 void translate(RooFit::Detail::CodeSquashContext &ctx) const override;
49protected:
50
51 RooListProxy _set1 ; ///< Set of constraint terms
52 RooArgSet _paramSet ; ///< Set of parameters to which constraints apply
53 const bool _takeGlobalObservablesFromData = false; ///< If the global observable values are taken from data
54
55 double evaluate() const override;
56
57 ClassDefOverride(RooConstraintSum,4) // sum of -log of set of RooAbsPdf representing parameter constraints
58};
59
60#endif
#define ClassDefOverride(name, id)
Definition Rtypes.h:346
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void data
char name[80]
Definition TGX11.cxx:110
R__DEPRECATED(6, 36, "Use getObservables().") RooFit R__DEPRECATED(6, 36, "Use getObservables().") RooFit R__DEPRECATED(6, 36, "Use getObservables().") RooFit const RooAbsArg &testArg const
Definition RooAbsArg.h:145
Abstract base class for binned and unbinned datasets.
Definition RooAbsData.h:57
Abstract base class for objects that represent a real value and implements functionality common to al...
Definition RooAbsReal.h:59
RooArgList is a container object that can hold multiple RooAbsArg objects.
Definition RooArgList.h:22
RooArgSet is a container object that can hold multiple RooAbsArg objects.
Definition RooArgSet.h:24
Calculates the sum of the -(log) likelihoods of a set of RooAbsPfs that represent constraint function...
void doEval(RooFit::EvalContext &) const override
Base function for computing multiple values of a RooAbsReal.
std::unique_ptr< RooAbsArg > compileForNormSet(RooArgSet const &normSet, RooFit::Detail::CompileContext &ctx) const override
bool setData(RooAbsData &data, bool cloneData=true) override
Replace the variables in this RooConstraintSum with the global observables in the dataset if they mat...
bool setData(RooAbsData const &data, bool cloneData=true)
Replace the variables in this RooConstraintSum with the global observables in the dataset if they mat...
void translate(RooFit::Detail::CodeSquashContext &ctx) const override
This function defines a translation for each RooAbsReal based object that can be used to express the ...
RooListProxy _set1
Set of constraint terms.
TObject * clone(const char *newname) const override
double evaluate() const override
Return sum of -log of constraint p.d.f.s.
RooArgSet _paramSet
Set of parameters to which constraints apply.
const RooArgList & list()
const bool _takeGlobalObservablesFromData
If the global observable values are taken from data.
A class to maintain the context for squashing of RooFit models into code.
Variable that can be changed from the outside.
Definition RooRealVar.h:37
Persistable container for RooFit projects.
Mother of all ROOT objects.
Definition TObject.h:41