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 computeBatch(cudaStream_t*, double* output, size_t size, RooFit::Detail::DataMap const&) const override;
45
46 std::unique_ptr<RooAbsArg> compileForNormSet(RooArgSet const &normSet, RooFit::Detail::CompileContext & ctx) const override;
47
48protected:
49
50 RooListProxy _set1 ; ///< Set of constraint terms
51 RooArgSet _paramSet ; ///< Set of parameters to which constraints apply
52 const bool _takeGlobalObservablesFromData = false; ///< If the global observable values are taken from data
53
54 double evaluate() const override;
55
56 ClassDefOverride(RooConstraintSum,4) // sum of -log of set of RooAbsPdf representing parameter constraints
57};
58
59#endif
size_t size(const MatrixT &matrix)
retrieve the size of a square matrix
#define ClassDefOverride(name, id)
Definition Rtypes.h:341
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
RooAbsData is the common abstract base class for binned and unbinned datasets.
Definition RooAbsData.h:59
RooAbsReal is the common abstract base class for objects that represent a real value and implements f...
Definition RooAbsReal.h:62
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:55
RooConstraintSum calculates the sum of the -(log) likelihoods of a set of RooAbsPfs that represent co...
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...
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.
void computeBatch(cudaStream_t *, double *output, size_t size, RooFit::Detail::DataMap const &) const override
Base function for computing multiple values of a RooAbsReal.
RooArgSet _paramSet
Set of parameters to which constraints apply.
const RooArgList & list()
const bool _takeGlobalObservablesFromData
If the global observable values are taken from data.
RooRealVar represents a variable that can be changed from the outside.
Definition RooRealVar.h:40
The RooWorkspace is a persistable container for RooFit projects.
Mother of all ROOT objects.
Definition TObject.h:41
static void output()