VLines(), DrawOption("F") strange behavior

Dear experts,

I’m having troubles in using VLines() and DrawOption(“F”) in plotOn function as shown below:
( ROOT Version: 6.24/00 )

RooPlot* mDsframe = m_Ds.frame(Bins(50));
sum.plotOn(mDsframe, Range("signal"), RooFit::LineStyle(kDashed), FillStyle(3001), FillColor(kRed), VLines(), DrawOption("F"));   
sum.paramOn(mDsframe, Parameters(RooArgList(sigmean, sigwidth)), Format("NEU", AutoPrecision(1)), Layout(0.54, 0.99, .95));

TCanvas* c00 = new TCanvas("c00", "test00", 1000, 500);
c00->Divide(2, 1);



  • “m_Ds” is:
    RooRealVar m_Ds(“m_Ds”, “m(K^{+} K^{-} #pi^{+}) [MeV/c^{2}]”, 1900., 2040.);

  • “sum” is the PDF sum of gaussian PDF and the background" PDF (convolution of a polynomial and a gaussian PDF)

However, I obtain the following plots in which the filled area is not the total area under the PDF “sum” in the “signal” range:

What am I doing wrong?

Thank you a lot for your help!!

It is a Rooplot issue. May be @moneta has an answer.
Do you have a script we can run ?

Thank you for the quick reply!

This is the script I am using:
Fit_Ds_mass_final_MDU_2011_12_shared.C (4.8 KB)

This is the .root data:

How should we execute your script ? I get:

% root Fit_Ds_mass_final_MDU_2011_12_shared.C
  | Welcome to ROOT 6.27/01                        https://root.cern |
  | (c) 1995-2021, The ROOT Team; conception: R. Brun, F. Rademakers |
  | Built for macosx64 on Feb 17 2022, 07:49:49                      |
  | From heads/master@v6-25-02-553-g21fb792ac7                       |
  | With Apple clang version 13.0.0 (clang-1300.0.29.30)             |
  | Try '.help', '.demo', '.license', '.credits', '.quit'/'.q'       |

root [0] 
Processing Fit_Ds_mass_final_MDU_2011_12_shared.C...
warning: Failed to call `Fit_Ds_mass_final_MDU_2011_12_shared()` to execute the macro.
Add this function or rename the macro. Falling back to `.L`.
root [1] 

I’m sorry I forgot to say I use to do:

root[]: .L Fit_Ds_mass_final_MDU_2011_12_shared.C
root[]: Fit_Ds_mass_final_MVA_methods()

Your macro give this:

Which ROOT version are you using ? on which machine ?

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