#include <RooEffConvGenContext.h>
|
| RooEffConvGenContext (const RooFFTConvPdf &model, const RooArgSet &vars, const RooDataSet *prototype=0, const RooArgSet *auxProto=0, Bool_t _verbose=kFALSE) |
|
| RooEffConvGenContext (const RooNumConvPdf &model, const RooArgSet &vars, const RooDataSet *prototype=0, const RooArgSet *auxProto=0, Bool_t _verbose=kFALSE) |
|
| RooEffConvGenContext (const RooAbsAnaConvPdf &model, const RooArgSet &vars, const RooDataSet *prototype=0, const RooArgSet *auxProto=0, Bool_t _verbose=kFALSE) |
|
virtual | ~RooEffConvGenContext () |
|
virtual void | attach (const RooArgSet ¶ms) |
|
Definition at line 17 of file RooEffConvGenContext.h.
◆ RooEffConvGenContext() [1/4]
RooEffConvGenContext::RooEffConvGenContext |
( |
const RooFFTConvPdf & |
model, |
|
|
const RooArgSet & |
vars, |
|
|
const RooDataSet * |
prototype = 0 , |
|
|
const RooArgSet * |
auxProto = 0 , |
|
|
Bool_t |
_verbose = kFALSE |
|
) |
| |
Definition at line 69 of file RooEffConvGenContext.cpp.
71 : RooConvGenContext(model, vars, prototype, auxProto, verbose)
73 cxcoutI(Generation) <<
"RooEffConvGenContext::ctor() setting up special generator context " 74 <<
"to apply an efficiency to the analytical convolution p.d.f. " 75 << reinterpret_cast<const RooAbsPdf*>(&model)->GetName() <<
" for generation of observable(s) " << vars << endl ;
◆ RooEffConvGenContext() [2/4]
RooEffConvGenContext::RooEffConvGenContext |
( |
const RooNumConvPdf & |
model, |
|
|
const RooArgSet & |
vars, |
|
|
const RooDataSet * |
prototype = 0 , |
|
|
const RooArgSet * |
auxProto = 0 , |
|
|
Bool_t |
_verbose = kFALSE |
|
) |
| |
Definition at line 58 of file RooEffConvGenContext.cpp.
60 : RooConvGenContext(model, vars, prototype, auxProto, verbose)
62 cxcoutI(Generation) <<
"RooEffConvGenContext::ctor() setting up special generator context " 63 <<
"to apply an efficiency to the analytical convolution p.d.f. " 64 << reinterpret_cast<const RooAbsPdf*>(&model)->GetName() <<
" for generation of observable(s) " << vars << endl ;
◆ RooEffConvGenContext() [3/4]
RooEffConvGenContext::RooEffConvGenContext |
( |
const RooAbsAnaConvPdf & |
model, |
|
|
const RooArgSet & |
vars, |
|
|
const RooDataSet * |
prototype = 0 , |
|
|
const RooArgSet * |
auxProto = 0 , |
|
|
Bool_t |
_verbose = kFALSE |
|
) |
| |
Definition at line 47 of file RooEffConvGenContext.cpp.
49 : RooConvGenContext(model, vars, prototype, auxProto, verbose)
51 cxcoutI(Generation) <<
"RooEffConvGenContext::ctor() setting up special generator context " 52 <<
"to apply an efficiency to the analytical convolution p.d.f. " 53 << reinterpret_cast<const RooAbsPdf*>(&model)->GetName() <<
" for generation of observable(s) " << vars << endl ;
◆ ~RooEffConvGenContext()
RooEffConvGenContext::~RooEffConvGenContext |
( |
| ) |
|
|
virtual |
◆ RooEffConvGenContext() [4/4]
◆ attach()
void RooEffConvGenContext::attach |
( |
const RooArgSet & |
params | ) |
|
|
virtual |
Definition at line 80 of file RooEffConvGenContext.cpp.
82 RooConvGenContext::initGenerator(theEvent);
87 RooAbsReal* eff = const_cast<RooAbsReal*>(
efficiency());
89 = (RooArgSet*)_modelVars->selectCommon(*eff->getVariables());
90 effVars->remove(*_cvModel, kTRUE, kTRUE);
91 effVars->add(*_cvOut);
92 eff->recursiveRedirectServers(*effVars, kTRUE, kFALSE, kTRUE);
const RooAbsReal * efficiency()
◆ efficiency()
const RooAbsReal * RooEffConvGenContext::efficiency |
( |
| ) |
|
|
private |
Definition at line 151 of file RooEffConvGenContext.cpp.
153 const RooAbsEffResModel* model = dynamic_cast<const RooAbsEffResModel*>(_modelCloneSet->first());
virtual const RooAbsReal * efficiency() const =0
const RooAbsReal * efficiency()
◆ generateEvent()
void RooEffConvGenContext::generateEvent |
( |
RooArgSet & |
theEvent, |
|
|
Int_t |
remaining |
|
) |
| |
|
protectedvirtual |
Definition at line 99 of file RooEffConvGenContext.cpp.
105 _modelGen->generateEvent(*_modelVars, remaining);
106 _pdfGen->generateEvent(*_pdfVars, remaining);
109 Double_t convValSmeared = _cvPdf->getVal() + _cvModel->getVal();
111 if (!_cvOut->isValidReal(convValSmeared))
continue;
115 _cvOut->setVal(convValSmeared);
119 coutE(Generation) << ClassName() <<
"::" << GetName()
120 <<
":generateEvent: value of efficiency is larger " 121 <<
"than assumed maximum of 1." << endl;
124 if (val > RooRandom::uniform() *
_maxEff) {
126 theEvent = *_modelVars;
127 theEvent = *_pdfVars;
128 _cvOut->setVal(convValSmeared);
const RooAbsReal * efficiency()
◆ initEfficiency()
void RooEffConvGenContext::initEfficiency |
( |
| ) |
|
|
private |
Definition at line 135 of file RooEffConvGenContext.cpp.
138 const RooAbsEffResModel* model = dynamic_cast<const RooAbsEffResModel*>(_modelCloneSet->first());
140 RooAbsReal* eff = const_cast<RooAbsReal*>(model->
efficiency());
141 Int_t maxCode = eff->getMaxVal(*_modelVars);
145 Double_t maxVal = eff->maxVal(maxCode);
virtual const RooAbsReal * efficiency() const =0
◆ initGenerator()
void RooEffConvGenContext::initGenerator |
( |
const RooArgSet & |
theEvent | ) |
|
|
protectedvirtual |
◆ _maxEff
double RooEffConvGenContext::_maxEff |
|
private |
The documentation for this class was generated from the following files: