60 cxcoutI(Generation) <<
"RooConvGenContext::ctor() setting up special generator context for analytical convolution p.d.f. " << model.GetName()
61 <<
" for generation of observable(s) " << vars << std::endl ;
67 coutE(Generation) <<
"RooConvGenContext::RooConvGenContext(" <<
GetName() <<
") Couldn't deep-clone PDF, abort," << std::endl ;
76 throw std::runtime_error(
"RooConvGenContext only works with convolution variables of type RooRealVar.");
89 coutE(Generation) <<
"RooConvGenContext::RooConvGenContext(" <<
GetName() <<
") Couldn't deep-clone resolution model, abort," << std::endl;
93 modelClone->changeBasis(
nullptr) ;
94 convV =
dynamic_cast<RooRealVar*
>(&modelClone->convVar());
96 throw std::runtime_error(
"RooConvGenContext only works with convolution variables of type RooRealVar.");
102 _modelVars = std::unique_ptr<RooArgSet>{modelClone->getObservables(&vars)};
139 cxcoutI(Generation) <<
"RooConvGenContext::ctor() setting up special generator context for numeric convolution p.d.f. " << model.GetName()
140 <<
" for generation of observable(s) " << vars << std::endl ;
145 model.conv().clonePdf().getObservables(&vars, clonedPdfObservables);
155 model.conv().cloneModel().getObservables(&vars, clonedModelObservables);
188 cxcoutI(Generation) <<
"RooConvGenContext::ctor() setting up special generator context for fft convolution p.d.f. " << model.GetName()
189 <<
" for generation of observable(s) " << vars << std::endl ;
240 pdfCommon->remove(*cvPdf,
true,
true) ;
243 modelCommon->remove(*cvModel,
true,
true) ;
263 pdfCommon->remove(*
_cvPdf,
true,
true) ;
267 modelCommon->remove(*
_cvModel,
true,
true) ;
290 if (
_cvOut->isValidReal(convValSmeared)) {
294 _cvOut->setVal(convValSmeared) ;
312 _pdfGen->setProtoDataOrder(lut) ;
322 os <<
indent <<
"--- RooConvGenContext ---" << std::endl ;
323 os <<
indent <<
"List of component generators" << std::endl ;
328 _modelGen->printMultiline(os,content,verbose,indent2);
329 _pdfGen->printMultiline(os,content,verbose,indent2);
int Int_t
Signed integer 4 bytes (int).
static void indent(ostringstream &buf, int indent_level)
Base class for PDFs that represent a physics model that can be analytically convolved with a resoluti...
virtual bool changeModel(const RooResolutionModel &newModel)
Change the current resolution model to newModel.
RooAbsGenContext * genContext(const RooArgSet &vars, const RooDataSet *prototype=nullptr, const RooArgSet *auxProto=nullptr, bool verbose=false) const override
Create a generator context for this p.d.f.
RooAbsRealLValue * convVar()
Retrieve the convolution variable.
RooFit::OwningPtr< RooArgSet > getObservables(const RooArgSet &set, bool valueOnly=true) const
Given a set of possible observables, return the observables that this PDF depends on.
void assign(const RooAbsCollection &other) const
Sets the value, cache and constant attribute of any argument in our set that also appears in the othe...
RooAbsArg * find(const char *name) const
Find object with given name in list.
RooAbsGenContext(const RooAbsPdf &model, const RooArgSet &vars, const RooDataSet *prototype=nullptr, const RooArgSet *auxProto=nullptr, bool _verbose=false)
Constructor.
void printMultiline(std::ostream &os, Int_t contents, bool verbose=false, TString indent="") const override
Interface for multi-line printing.
virtual void setProtoDataOrder(Int_t *lut)
Set the traversal order of prototype data to that in the lookup tables passed as argument.
Abstract interface for all probability density functions.
virtual RooAbsGenContext * genContext(const RooArgSet &vars, const RooDataSet *prototype=nullptr, const RooArgSet *auxProto=nullptr, bool verbose=false) const
Interface function to create a generator context from a p.d.f.
RooArgSet is a container object that can hold multiple RooAbsArg objects.
RooArgSet * snapshot(bool deepCopy=true) const
Use RooAbsCollection::snapshot(), but return as RooArgSet.
RooArgSet * selectCommon(const RooAbsCollection &refColl) const
Use RooAbsCollection::selecCommon(), but return as RooArgSet.
std::unique_ptr< RooAbsGenContext > _modelGen
Resolution model generator context.
RooConvGenContext(const RooFFTConvPdf &model, const RooArgSet &vars, const RooDataSet *prototype=nullptr, const RooArgSet *auxProto=nullptr, bool _verbose=false)
Constructor for specialized generator context for FFT numerical convolutions.
std::unique_ptr< RooArgSet > _pdfCloneSet
Owner of PDF clone.
void setProtoDataOrder(Int_t *lut) override
Set the traversal order for events in the prototype dataset The argument is a array of integers with ...
std::unique_ptr< RooArgSet > _pdfVars
Holder of PDF x truth event.
std::unique_ptr< RooArgSet > _modelVars
Holder of resModel event.
RooRealVar * _cvPdf
Convolution variable in PDFxTruth event.
std::unique_ptr< RooArgSet > _modelVarsOwned
Owning version of modelVars ;.
void attach(const RooArgSet ¶ms) override
Attach given set of arguments to internal clones of pdf and resolution model.
std::unique_ptr< RooArgSet > _modelCloneSet
Owner of resModel clone.
RooRealVar * _cvOut
Convolution variable in output event.
RooRealVar * _cvModel
Convolution variable in resModel event.
void generateEvent(RooArgSet &theEvent, Int_t remaining) override
Generate a single event.
void initGenerator(const RooArgSet &theEvent) override
One-time initialization of generator context, attaches the context to the supplied event container.
std::unique_ptr< RooArgSet > _pdfVarsOwned
Owning version of pdfVars ;.
TString _convVarName
Name of convolution variable.
void printMultiline(std::ostream &os, Int_t content, bool verbose=false, TString indent="") const override
Print the details of this generator context.
std::unique_ptr< RooAbsGenContext > _pdfGen
Physics model generator context.
Container class to hold unbinned data.
const RooArgSet * get(Int_t index) const override
Return RooArgSet with coordinates of event 'index'.
static void softAbort()
Soft abort function that interrupts macro execution but doesn't kill ROOT.
PDF for the numerical (FFT) convolution of two PDFs.
Numeric 1-dimensional convolution operator PDF.
Variable that can be changed from the outside.
void removeMin(const char *name=nullptr)
Remove lower range limit for binning with given name. Empty name means default range.
void removeMax(const char *name=nullptr)
Remove upper range limit for binning with given name. Empty name means default range.
RooResolutionModel is the base class for PDFs that represent a resolution model that can be convolute...
Implements a RooResolution model that corresponds to a delta function.
const char * GetName() const override
Returns name of object.
TString & Append(const char *cs)