I’m trying to fit a reflected landau onto some output from a Geant4 simulation. My issue is that when I try to reflect the fit by setting the scale parameter to -1, the fit disappears entirely (but can be seen as a black line on the x-axis).
When the scale parameter is set to 1, a landau distribution fits over the dataset as expected. I have included my code below.
TCanvas* c1 = new TCanvas("c1", "", 20, 20, 1000, 1000);
TTree *B4 = (TTree*)f.Get("B4");
_ROOT Version: 6.26
Platform: Fedora Linux
Welcome to the ROOT forum.
I do not see such scaling in your code. Your code does not seem complete.
Also, note you should not use
gROOT->Reset() that’s not recommended anymore.
If by the “scale parameter” you mean the parameter “
”, then it MUST be a positive value.
You can try a “mirrored” version (“long tail” on the left side):
TF1 f1("f1", " * TMath::Landau( - x, 0., )", 300., 530.);
My aplogies for the incomplete code, I accidentally copied the wrong version of the code.
My issue is now resolved, but I was wondering what is recommended instead of
When I remove the line of code, my mean changes, and the bins appear as crosses rather than rectangles.
This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.