ModelConfig: Why check if Parameter of Interest is fundamental?

Dear experts,

I’ve been poking around in HistFactory to implement the possibility of blinding a parameter of interest, but I find that the sticking point is now the fact that a RooAbsHiddenReal is not “fundamental”. Specifically, let’s say I wanted to blind some parameter with RooUnblindPrecision, which inherits from RooAbsHiddenReal. The fact that RooAbsHiddenReal then returns isFundamental==False keeps the ModelConfig object from being written, even though this would act the same as a RooRealVar in the fit. So I have to wonder, is there some good reason for having a check for ModelConfig that I’m not thinking of?

Thanks in advance.

Cheers,

Adam

Hi,
I understand your problem, but this check is needed in ModelConfig to be sure that only RooRealVar objects are used as parameter of interest.
I think a similar thing happening in the fit should be done. Do you have an example of using these
blinding tools for performing a simple fit ?

Cheers

Lorenzo

Hi Lorenzo,

I have a standalone python script which uses RooUnblindUniform as a place holder for a RooRealVar. This is a simple fit of a D0->Kpi toy with a double gaussian atop a linear background. The important lines are

totPDF = RooAddPdf('totPDF','',RooArgList(sig,bkg1),RooArgList(nsig2,nbkg))
totPDF_blind = RooAddPdf('totPDF','',RooArgList(sig,bkg1),RooArgList(nsig_unblind,nbkg))

The thought was that, after looking at the HistFactory manual, one should in principle be able to replace the RooRealVar by the RooUnblind* variable in a similar fashion.

Cheers,

Adam

test_blinding_rooblindtools.py (3.6 KB)

Hi,

Looking at your script I see that when doing a blind fit the parameters are the same. I guess the ModelConfig should contain not the unblind function, but the parameter on which it is based.
The model should be built adding this extra function, but the parameter of interests must remain the
RooRealVar objects

Since you are using the HIstFactory I am not sure how to insert a RooUnblindUniform function there. Probably you need to Edit the workspace by hand and add this. However, this should not affect the ModelConfig parameters

Lorenzo

Hi Lorenzo,

I actually already did the digging on how to make this work in HistoToWorkspaceFactoryFast, and it is essentially changing the line which is passed to workspace->factory. I modified the Measurement class to have a parameter “isBlind” and the blinding method as a string, which can then be configured. The change in HistoToWorkspaceFactoryFast, line 550:

 if( proto->obj(varname.c_str()) == NULL) {
          cout << "making normFactor: " << norm.GetName() << endl;
          // remove "doRatio" and name can be changed when ws gets imported to the combined model.                                                                                                                                                                   


          if(fPOIsToBlind[norm.GetName()]!=""){
            proto->factory((fPOIsToBlind[norm.GetName()] +"::"+
                                       varname+"('"+fBlindingString+"',100,0.2,"+
                                       varname +"_unblind"+ range.str() +
                            ",isBlind[Blind=1,Unblind=0])").c_str());
            proto->cat("isBlind")->setLabel("Blind");
          }
          else{
            proto->factory((varname + range.str()).c_str());
          }

        }

modulo some changes to the default constructor which need to be ironed out. The rest is simply type-checking.

NB: The only other things I did was add a map between the POIs and the Blinding Method, should one choose it:
in the .h file:

std::map<std::string, std::string> fPOIsToBlind;

and the constructor

for(auto POI: measurement.GetPOIList()){
      if( measurement.isBlind(POI) ){
        cout << "Setting up blinding for POI: "<<POI<<". Method: "<<measurement.GetBlindMethod(POI) << endl;
        fPOIsToBlind[POI] = measurement.GetBlindMethod(POI);
        fBlindingString = measurement.GetBlindingString();
      }
    }

I suppose you’re right that it is much easier instead to list the POI as the variable you want, then simply build the blinding on top. Let me go digging then…

Cheers,

Adam

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