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
32
33
34////////////////////////////////////////////////////////////////////////////////
35/// Constructor given a RooAbsAnaConvPdf a coefficient index and a set with the
36/// convoluted observable(s).
37
38RooConvCoefVar::RooConvCoefVar(const char *name, const char *title, const RooAbsAnaConvPdf& input,
39 Int_t coefIdx, const RooArgSet* varList) :
40 RooAbsReal(name,title),
41 _varSet("varSet","Set of coefficient variables",this),
42 _convPdf("convPdf","Convoluted PDF",this,(RooAbsReal&)input,false,false),
43 _coefIdx(coefIdx)
44{
45 if (varList) _varSet.add(*varList) ;
46}
47
48
49
50////////////////////////////////////////////////////////////////////////////////
51/// Copy constructor
52
54 RooAbsReal(other,name),
55 _varSet("varSet",this,other._varSet),
56 _convPdf("convPdf",this,other._convPdf),
57 _coefIdx(other._coefIdx)
58{
59}
60
61
62
63////////////////////////////////////////////////////////////////////////////////
64/// Return value of chosen coefficient
65
67{
68 return evaluate() ;
69}
70
71
72
73////////////////////////////////////////////////////////////////////////////////
74/// Return value of chosen coefficient
75
77{
78 return (const_cast<RooAbsAnaConvPdf &>(static_cast<RooAbsAnaConvPdf const&>(_convPdf.arg()))).coefficient(_coefIdx) ;
79}
80
81
82
83////////////////////////////////////////////////////////////////////////////////
84/// Return analytical integration capabilities of chosen coefficient
85
86Int_t RooConvCoefVar::getAnalyticalIntegral(RooArgSet& allVars, RooArgSet& analVars, const char* rangeName) const
87{
88 Int_t code = (static_cast<RooAbsAnaConvPdf const&>(_convPdf.arg())).getCoefAnalyticalIntegral(_coefIdx,allVars,analVars,rangeName) ;
89 return code ;
90}
91
92
93
94////////////////////////////////////////////////////////////////////////////////
95/// Return analytical integral of chosen coefficient
96
97double RooConvCoefVar::analyticalIntegral(Int_t code, const char* rangeName) const
98{
99 return (static_cast<RooAbsAnaConvPdf const&>(_convPdf.arg())).coefAnalyticalIntegral(_coefIdx,code,rangeName) ;
100}
#define ClassImp(name)
Definition Rtypes.h:382
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...
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 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.