I want to create a RooHistPdf from an observable in a dataset. The twist is that I don’t want to use the observable as it is, but apply a formula to it, but I can’t seem to do this since a RooFormulaVar isn’t of “fundamental” type. This code snippet reproduces my problem:
using namespace RooFitShortHand;
RooLandau sigma_dist(“sigma_dist”,“sigma_dist”,sigma, C(0.05),C(0.01));
RooDataSet *datasigma = sigma_dist.generate(RooArgSet(sigma),5000);
which gives me the error
RooAbsSet::initialize(h1): Data set cannot contain non-fundamental types, ignoring d1
Does anyone know what I am doing wrong here? Is there another way to do this?