Logo ROOT  
Reference Guide
 
Loading...
Searching...
No Matches
RooConvCoefVar.cxx
Go to the documentation of this file.
1/*****************************************************************************
2 * Project: RooFit *
3 * Package: RooFitCore *
4 * @(#)root/roofitcore:$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
17/**
18\file RooConvCoefVar.cxx
19\class RooConvCoefVar
20\ingroup Roofitcore
21
22Auxiliary class that represents the coefficient
23of a RooAbsAnaConvPdf implementation as a separate RooAbsReal object
24to be able to interface these coefficient terms with the generic
25RooRealIntegral integration mechanism.
26**/
27
28#include "RooAbsAnaConvPdf.h"
29#include "RooConvCoefVar.h"
30
31
32
33////////////////////////////////////////////////////////////////////////////////
34/// Constructor given a RooAbsAnaConvPdf a coefficient index and a set with the
35/// convoluted observable(s).
36
37RooConvCoefVar::RooConvCoefVar(const char *name, const char *title, const RooAbsAnaConvPdf& input,
39 RooAbsReal(name,title),
40 _varSet("varSet","Set of coefficient variables",this),
41 _convPdf("convPdf","Convoluted PDF",this,(RooAbsReal&)input,false,false),
42 _coefIdx(coefIdx)
43{
44 if (varList) _varSet.add(*varList) ;
45}
46
47
48
49////////////////////////////////////////////////////////////////////////////////
50/// Copy constructor
51
54 _varSet("varSet",this,other._varSet),
55 _convPdf("convPdf",this,other._convPdf),
56 _coefIdx(other._coefIdx)
57{
58}
59
60
61
62////////////////////////////////////////////////////////////////////////////////
63/// Return value of chosen coefficient
64
66{
67 return evaluate() ;
68}
69
70
71
72////////////////////////////////////////////////////////////////////////////////
73/// Return value of chosen coefficient
74
76{
77 return (const_cast<RooAbsAnaConvPdf &>(static_cast<RooAbsAnaConvPdf const&>(_convPdf.arg()))).coefficient(_coefIdx) ;
78}
79
80
81
82////////////////////////////////////////////////////////////////////////////////
83/// Return analytical integration capabilities of chosen coefficient
84
86{
87 Int_t code = (static_cast<RooAbsAnaConvPdf const&>(_convPdf.arg())).getCoefAnalyticalIntegral(_coefIdx,allVars,analVars,rangeName) ;
88 return code ;
89}
90
91
92
93////////////////////////////////////////////////////////////////////////////////
94/// Return analytical integral of chosen coefficient
95
96double RooConvCoefVar::analyticalIntegral(Int_t code, const char* rangeName) const
97{
98 return (static_cast<RooAbsAnaConvPdf const&>(_convPdf.arg())).coefAnalyticalIntegral(_coefIdx,code,rangeName) ;
99}
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void input
char name[80]
Definition TGX11.cxx:110
Base class for PDFs that represent a physics model that can be analytically convolved with a resoluti...
Abstract base class for objects that represent a real value and implements functionality common to al...
Definition RooAbsReal.h:59
RooArgSet is a container object that can hold multiple RooAbsArg objects.
Definition RooArgSet.h:24
bool add(const RooAbsArg &var, bool valueServer, bool shapeServer, bool silent)
Overloaded RooCollection_t::add() method insert object into set and registers object as server to own...
Auxiliary class that represents the coefficient of a RooAbsAnaConvPdf implementation as a separate Ro...
double getValV(const RooArgSet *nset=nullptr) const override
Return value of chosen coefficient.
RooRealProxy _convPdf
RooAbsAnaConv object implementing our coefficient.
RooConvCoefVar()
Default constructor.
Int_t _coefIdx
Index code of the coefficient.
RooSetProxy _varSet
Not used anymore?
double evaluate() const override
Return value of chosen coefficient.
double analyticalIntegral(Int_t code, const char *rangeName=nullptr) const override
Return analytical integral of chosen coefficient.
Int_t getAnalyticalIntegral(RooArgSet &allVars, RooArgSet &analVars, const char *rangeName=nullptr) const override
Return analytical integration capabilities of chosen coefficient.
const T & arg() const
Return reference to object held in proxy.