I am trying to do a simultaneous fit in different ranges of a variable for each index category. In the manual, I found how to define different fit ranges in a simultaneous fit. But I can’t get the fitter to use these ranges for normalization.
Let me explain what I am doing:
I have three decay modes of same particle and I want to measure their branching fractions simultaneously. They have similar kinematics and final state particles, so they can be easily reconstructed as each other. I need to get the number of events in both correct mode and in the other modes (they are highly correlated)
Here is a piece of my code related to my problem:
RooThresholdCategory mode("mode","mode",ch,"D2",2); mode.addThreshold(100,"D0",0); mode.addThreshold(200,"D1",1); //ch is 0-100 for D0, 100-200 for D1, 200-300 for D2 RooCategory *MyfitCat = (RooCategory*) dataset->addColumn(mode); sim_pdf=new RooSimultaneous("sim_pdf","sim_pdf",*MyfitCat); sim_pdf->addPdf(*c_pdf ,"D0" ); sim_pdf->addPdf(*c_pdf ,"D1" ); sim_pdf->addPdf(*c_pdf ,"D2"); //c_pdf is a RooAddPdf x.setRange("fitRange_D0", -0.3 , 0.1 ) x.setRange("fitRange_D1", -0.3 , 0.1 ); x.setRange("fitRange_D2", -0.2 , 0.1 ); RooFitResult *fitres= sim_pdf->fitTo(*dataset,Range("fitRange"),SplitRange(kTRUE),Extended(kTRUE)); //in my dataset, I cut the events outside these ranges. I mean there is no D2 events below -0.2, and no D0 or D1 events below -0.3
When I run this code, it works but I see the following message:
RooRealVar::setRange(x) new range named ‘NormalizationRangeForfitRange_D2’ created with bounds [-0.3,0.1]
(similar messages for other two modes also)
The range of variable x is [-0.3, 0.1], so the fitter creates normalization ranges with default values for all three components. When I change the default range, I get completely different results.
Is it possible to define different normalization ranges in a simultaneous fit? There is one argument related to normalization (SumCoefRange(const char* name) ), but it takes only one range name. I tried to fix the range of each component by c_pdf->fixCoefRange(“fitRange_D2”), it didn’t worked.
Thanks in advance.