Integration window

Dear all

There is something that I don’t understand when I use differents integration windows

For instance, this is what I get now:

[#1] INFO:Eval – RooRealVar::setRange(x) new range named ‘window’ created with bounds [2.92976,3.29569]
The signal event yield is 912.282
[#1] INFO:Eval – RooRealVar::setRange(x) new range named ‘window2’ created with bounds [2.74679,3.47865]
The signal event yield is 912.282

The mass windows are differents, so I expect different values as you can see on the attached plot.

Here is parts of my code:

[code]

RooFitResult *fr = model->fitTo(*data,Save());

Int_t nSigma = 2;

Double_t lowerBound = mean.getVal() - nSigmasigma.getVal();
Double_t upperBound = mean.getVal() + nSigma
sigma.getVal();

x.setRange(“window”,lowerBound,upperBound);
Double_t nsigWindow = nsig.getVal();
cout << "The signal event yield is " << nsigWindow << endl;

nSigma = 4;

lowerBound = mean.getVal() - nSigmasigma.getVal();
upperBound = mean.getVal() + nSigma
sigma.getVal();

x.setRange(“window2”,lowerBound,upperBound);
Double_t nsigWindow = nsig.getVal();
cout << "The signal event yield is " << nsigWindow << endl;[/code]