I can’t find a way to give certain analytical models an offset parameter, including RooDecay() (X) RooGExpModel()
. The RooGExpModel
class does not support a mean/offset parameter (contrary to the ROOFit manual and as also mentioned here), so I thought to try making a RooFormulaVar
object that’s my dependent minus the offset observable. Yet, maybe because RooFormulaVar
does not derive from RooRealVar
, this isn’t working. Interestingly, ROOFit has no problem interpreting a RooFormulaVar
in other contexts, it’s only as the dependent (x
) variable that the error is throwing. A MWE of RooFormulaVar
not working:
double r1=0, r2=900;
RooRealVar x("E", "Recoil Energy", r1, r2, "eV");
RooRealVar m_LG("m_LG", "#mu_{L--G}", 55, 60, "eV"); // L-G Location
RooRealVar off_s("off_s", "Shaking Offset", 0, 20, "eV"); // Shaking Offset
RooFormulaVar x_LGS("m_LGS", "#mu_{L--G--S}", "@0-@1-@2", // L-G-S Modified dvar b/c GExp doesn't have a location
RooArgSet(x, m_LG, off_s)
);
RooRealVar res("res", "Detector Resolution", 0, 10, "eV"); // Detector Resolution
RooFormulaVar sigma_d("sigma_d","#sigma_d","res/sqrt(2)", // Detector Response
RooArgSet(res)
);
RooRealVar tau_s("tau_s", "#tau_s", 0, 10, "eV"); // Shaking Offset
RooGExpModel l_g_s("l_g_s", "L--G Shaking EMG", x_LGS, sigma_d, tau_s, kFALSE, RooGExpModel::Flipped);
Is there another workaround, or am I missing a better way to use a resolution model as a PDF?
ROOT Version: 6.18/01
on Linux