Hi wouter. I still need your help.

In the attachment , you will see 4 histograms. The first histogram comprises of other three histograms. I expect to get the fraction and

the number of events.

First of all, I make three RooDataPdfs like this:

```
TFile *ff2 = new TFile("h2.root");
TH1 *hh2 = (TH1*) gDirectory->Get("h1");
RooRealVar x2("x2" , "x2" , 0, 1200);
RooDataHist data2("data2", "dataset with x ", x2 ,hh2);
RooRealVar xx2("xx2" , "xx2" , 0, 1200);
[b]RooHistPdf [/b]h2Pdf("xx2","xx2" ,RooArgList(x2),data2);
```

secondly, I construct the model like this:

RooRealVar c1(“c1”,“c1”,1000,-1000000,10000000);

RooRealVar c2(“c2”,“c2”,2000,-1000000,10000000);

RooRealVar c3(“c3”,“c3”,5920,-1000000,10000000);

RooAddPdf model(“model”,“model”,RooArgList (h2Pdf,h9Pdf,h1Pdf),RooArgList(c1,c2, c3));

I have used extended likelihood method

RooRealVar xd0(“xd0” , “xd0” , 0, 1200);

RooDataHist datad0(“datad0”, "dataset with xd0 ", xd0 ,hhd0);

model.fitTo(datad0,“e”);

finally, I get the result:

============== VARIABLE6 IS AT ITS LOWER ALLOWED LIMIT.

FCN=-15929.8 FROM MINOS STATUS=FAILURE 536 CALLS 2783 TOTAL

EDM=4.29675e+07 STRATEGY= 1 ERROR MATRIX UNCERTAINTY 100.0 per cent

EXT PARAMETER PARABOLIC MINOS ERRORS

NO. NAME VALUE ERROR NEGATIVE POSITIVE

1 c1 -1.44069e+03 2.69927e-04

2 c2 -4.28306e+03 2.69833e-04

3 c3 5.72480e+03 2.70157e-04

I expect c1+c2 = c3. But I failed.

look forward to your help.[/img]