Logo ROOT  
Reference Guide
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
22RooConvCoefVar is an auxilary 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
31using namespace std;
32
34;
35
36
37////////////////////////////////////////////////////////////////////////////////
38/// Constuctor given a RooAbsAnaConvPdf a coefficient index and a set with the
39/// convoluted observable(s)
40
41RooConvCoefVar::RooConvCoefVar(const char *name, const char *title, const RooAbsAnaConvPdf& input,
42 Int_t coefIdx, const RooArgSet* varList) :
43 RooAbsReal(name,title),
44 _varSet("varSet","Set of coefficient variables",this),
45 _convPdf("convPdf","Convoluted PDF",this,(RooAbsReal&)input,kFALSE,kFALSE),
46 _coefIdx(coefIdx)
47{
48 if (varList) _varSet.add(*varList) ;
49}
50
51
52
53////////////////////////////////////////////////////////////////////////////////
54/// Copy constructor
55
57 RooAbsReal(other,name),
58 _varSet("varSet",this,other._varSet),
59 _convPdf("convPdf",this,other._convPdf),
60 _coefIdx(other._coefIdx)
61{
62}
63
64
65
66////////////////////////////////////////////////////////////////////////////////
67/// Return value of chosen coefficient
68
70{
71 return evaluate() ;
72}
73
74
75
76////////////////////////////////////////////////////////////////////////////////
77/// Return value of chosen coefficient
78
80{
81 return ((RooAbsAnaConvPdf&)_convPdf.arg()).coefficient(_coefIdx) ;
82}
83
84
85
86////////////////////////////////////////////////////////////////////////////////
87/// Return analytical integration capabilities of chosen coefficient
88
89Int_t RooConvCoefVar::getAnalyticalIntegral(RooArgSet& allVars, RooArgSet& analVars, const char* rangeName) const
90{
91 Int_t code = ((RooAbsAnaConvPdf&)_convPdf.arg()).getCoefAnalyticalIntegral(_coefIdx,allVars,analVars,rangeName) ;
92 return code ;
93}
94
95
96
97////////////////////////////////////////////////////////////////////////////////
98/// Return analytical integral of chosen coefficient
99
100Double_t RooConvCoefVar::analyticalIntegral(Int_t code, const char* rangeName) const
101{
102 return ((RooAbsAnaConvPdf&)_convPdf.arg()).coefAnalyticalIntegral(_coefIdx,code,rangeName) ;
103}
104
const Bool_t kFALSE
Definition: RtypesCore.h:101
#define ClassImp(name)
Definition: Rtypes.h:375
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
RooAbsAnaConvPdf is the base class for PDFs that represent a physics model that can be analytically c...
RooAbsReal is the common abstract base class for objects that represent a real value and implements f...
Definition: RooAbsReal.h:63
RooArgSet is a container object that can hold multiple RooAbsArg objects.
Definition: RooArgSet.h:57
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...
RooConvCoefVar is an auxilary class that represents the coefficient of a RooAbsAnaConvPdf implementat...
Int_t getAnalyticalIntegral(RooArgSet &allVars, RooArgSet &analVars, const char *rangeName=0) const override
Return analytical integration capabilities of chosen coefficient.
Double_t getValV(const RooArgSet *nset=0) const override
Return value of chosen coefficient.
RooRealProxy _convPdf
RooAbsAnaConv object implementing our coefficient.
Double_t evaluate() const override
Return value of chosen coefficient.
Double_t analyticalIntegral(Int_t code, const char *rangeName=0) const override
Return analytical integral of chosen coefficient.
RooConvCoefVar()
Default constructor.
Int_t _coefIdx
Index code of the coefficient.
RooSetProxy _varSet
Not used anymore?
const T & arg() const
Return reference to object held in proxy.