Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Possible to mask channels in NLL evaluation #294

Merged
merged 2 commits into from
Apr 22, 2016

Conversation

ajgilbert
Copy link
Collaborator

  • CachingSimNLL can now be given a list of RooAbsReals (one for each
    component pdf) which cause the corresponding channel to be skipped in
    the NLL evaluation when the value is != 0.
  • RooSimultaneousOpt can also hold on to this RooArgList, and will hand
    it over to the CachingSimNLL in the createNLL step
  • These parameters can be defined by the user in the PhysicsModel via
    the new method getChannelMask(bin). By default a RooRealVar named
    mask_[CHANNEL] will be created with a value of zero and set
    constant.
  • The RooArgList is created and passed to RooSimultaneousOpt after the
    latter is created in ShapeTools.py
  • It is then possible to mask a channel at runtime with
    --setPhysicsModelParameters mask_CHANNEL1=1,mask_CHANNEL2=1,...

Only done basic testing of this so far with single fits in MultDimFit, but seems to work as intended: masking all but one channel gives identical results to just fitting a datacard with only that channel. But should check a wider range of cases to make sure there's no odd behaviour.

 - CachingSimNLL can now be given a list of RooAbsReals (one for each
   component pdf) which cause the corresponding channel to be skipped in
   the NLL evaluation when the value is != 0.
 - RooSimultaneousOpt can also hold on to this RooArgList, and will hand
   it over to the CachingSimNLL in the createNLL step
 - These parameters can be defined by the user in the PhysicsModel via
   the new method getChannelMask(bin). By default a RooRealVar named
   'mask_[CHANNEL]' will be created with a value of zero and set
   constant.
 - The RooArgList is created and passed to RooSimultaneousOpt after the
   latter is created in ShapeTools.py
 - It is then possible to mask a channel at runtime with
   --setPhysicsModelParameters mask_CHANNEL1=1,mask_CHANNEL2=1,...
@adavidzh
Copy link
Member

This looks useful. I think it is just missing some verbosity. I would say that in case a mask is set, then it could dump all the masked/unmasked channels at -v 3 or so.

It also seems that it will silently fail in case a non-existent channel name is passed. Is that right?

…masks. Combine.cc also prints the list of masks with verbose >= 2
@ajgilbert
Copy link
Collaborator Author

Getting back to this... decided to make it off by default for now, can be enabled with text2workspace.py --channel-masks.... A list of all the mask vars and their values is now printed with -v >= 2. It will indeed fail with a non-existent channel name, however since it's all going via --setPhysicsModelParameters the usual Warning: Did not find a parameter with name blah does get printed.

@nucleosynthesis nucleosynthesis merged commit 65027fa into cms-analysis:slc6-root5.34.17 Apr 22, 2016
@ajgilbert ajgilbert deleted the channel-mask branch November 14, 2022 13:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants