00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028 #include "RooFit.h"
00029
00030 #include "RooAbsAnaConvPdf.h"
00031 #include "RooAbsAnaConvPdf.h"
00032 #include "RooConvCoefVar.h"
00033
00034 ClassImp(RooConvCoefVar)
00035 ;
00036
00037
00038
00039 RooConvCoefVar::RooConvCoefVar(const char *name, const char *title, const RooAbsAnaConvPdf& input,
00040 Int_t coefIdx, const RooArgSet* varList) :
00041 RooAbsReal(name,title),
00042 _varSet("varSet","Set of coefficient variables",this),
00043 _convPdf("convPdf","Convoluted PDF",this,(RooAbsReal&)input,kFALSE,kFALSE),
00044 _coefIdx(coefIdx)
00045 {
00046
00047
00048 if (varList) _varSet.add(*varList) ;
00049 }
00050
00051
00052
00053
00054 RooConvCoefVar::RooConvCoefVar(const RooConvCoefVar& other, const char* name) :
00055 RooAbsReal(other,name),
00056 _varSet("varSet",this,other._varSet),
00057 _convPdf("convPdf",this,other._convPdf),
00058 _coefIdx(other._coefIdx)
00059 {
00060
00061 }
00062
00063
00064
00065
00066 Double_t RooConvCoefVar::getVal(const RooArgSet*) const
00067 {
00068
00069 return evaluate() ;
00070 }
00071
00072
00073
00074
00075 Double_t RooConvCoefVar::evaluate() const
00076 {
00077
00078 return ((RooAbsAnaConvPdf&)_convPdf.arg()).coefficient(_coefIdx) ;
00079 }
00080
00081
00082
00083
00084 Int_t RooConvCoefVar::getAnalyticalIntegral(RooArgSet& allVars, RooArgSet& analVars, const char* rangeName) const
00085 {
00086
00087
00088 Int_t code = ((RooAbsAnaConvPdf&)_convPdf.arg()).getCoefAnalyticalIntegral(_coefIdx,allVars,analVars,rangeName) ;
00089 return code ;
00090 }
00091
00092
00093
00094
00095 Double_t RooConvCoefVar::analyticalIntegral(Int_t code, const char* rangeName) const
00096 {
00097
00098
00099 return ((RooAbsAnaConvPdf&)_convPdf.arg()).coefAnalyticalIntegral(_coefIdx,code,rangeName) ;
00100 }
00101