Hi,

I’m trying to integrate a PDF over a range to get the fraction of the PDF within that range, but I always get 1. My script is something like

```
//Observables
RooRealVar jpsi_m("jpsi_m","M_{J/#psi}",3036,3156, "MeV");
RooRealVar phi_m("phi_m","M_{#phi}",1005,1035, "MeV");
//1D PDF's
RooCrystalBall signal_jp_cb("signal_jp_cb", "signal_jp_cb PDF", jpsi_m, <CrystallBall parameters>);
RooBreitWigner signal_p_bw("signal_p", "signal_p PDF", phi_m, ,BreitWigner parameters>);
//2D PDF's
RooProdPdf signal_cb_bw("signal_cb_bw", "signal PDF CBxBW", signal_jp_cb, signal_p_bw);
RooUniform bg("bg", "bg PDF", RooArgSet(jpsi_m, phi_m));
//Model
RooAddPdf model_cb_bw("model_cb_bw", "model CBxBW+U", RooArgList(signal_cb_bw, bg), RooArgList(nsig, nbg));
//Get integral
jpsi_m.setRange("mass_window", 3036, 3156);
phi_m.setRange("mass_window", 1005, 1035);
RooAbsReal *integrated_model_jpsi_phi = signal_cb_bw.createIntegral(RooArgSet(jpsi_m, phi_m), NormSet(RooArgSet(jpsi_m, phi_m)), Range("mass_window"));
Double_t integral = integrated_model_jpsi_phi->getVal();
```

I’d expect `integral`

to be something between 0 and 1, but it’s always 1. It seems that the integrand normalization is performed using only the range defined in the `RooRealVar`

constructors. How can I correctly normalize the integrand (such that it is 1 only when integrated over `(-inf, +inf)`

)?

Thank you in advance,

Lucas