Home | News | Documentation | Download

Non-Gauss Resolution Model Offsets and the Exponentially Modified Gaussian

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
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


indeed, it’s never been implemented in RooGExpModel. I’m trying to replace all occurences of x by x - mean.
Would you be able to test using one of ROOT’s nightlies when it’s implemented? You can find them here:

The reason that RooFomulaVar for x doesn’t work is that RooFormulaVar cannot tell its users how large the definition range of the observable is (that’s needed for integrating the model). Therefore, the constructor only accepts RooRealVars.

I’d be happy to test it.

RooTruthModel also needs the mean parameter.

Is RooFormulaVar the one and only way to accomplish observable adding/manipulation? I’m not sure how a mean parameter works on the backend, but is there a way to accomplish the same on the user-end? I can’t think of a reason that would be necessary, but I’m just curious how you’re able to define a range behind the scenes.

Excellent! I guess the RooTruthModel can also be taken care of if we get this to run.
We need to wait two nights for this to finish (one night to run the tests, another to get it into ROOT):

No, the RooLinearVar or the RooAddition will also do fine to add offsets to parameters.
In fact, the RooLinearVar could be a solution to the problem, since you can offset it and add a slope, but it also allows for assignment, integration ranges etc.
The constructor doesn’t accept RooLinearVars at the moment, but I guess (I didn’t check all the code) that I could make it accept these.

Sounds good, no rush.

Up to you, I feel mean will solve the issue at hand fine.

Changes look great, it might be nice to eventually have a constructor that had the scale factors default to 1, like RooGaussModel has.

That’s unfortunately not possible. It would clash with this constructor:

  RooGExpModel(const char *name, const char *title, RooRealVar& x,
          RooAbsReal& sigma, RooAbsReal& rlife,
          RooAbsReal& srSF,
          Bool_t nlo=kFALSE, Type type=Normal) ;

which takes three real-valued parameters after the observable. So it would break other people’s code if they used this constructor.

Hello @Spencer_Fretwell,

just checking in in case you are interested:

Wonderful! Thank you so much!

I will get to using that right away :slight_smile:

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.