forked from cms-analysis/HiggsAnalysis-CombinedLimit
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Avoid invalid proxy constructor calls in HMuMuRooPdfs (cms-analysis#893)
In the `HMuMuRooPdfs`, there was a classic dangerous RooFit mistake. There were constructor calls like: ```c++ RooRealProxy m("m", "m", this, 91.2); ``` However, this is not doing what one would naively expect, which is having proxy to a constant. Instead, it will hit this constructor by converting the `double` to `bool`, which is used as the `valueServer` parameter: https://root.cern/doc/v626/classRooTemplateProxy.html#a9a550633b5336561b48eb313994a68e8 So it will create a proxy to nothing! In this particular case, this was not a problem because in `evaluate()`, there is a fallback for empty proxies. But ROOT 6.30 makes some compile-time checks to prevent these mistakes, so this commit is necessary to compile with newer ROOT versions. See https://root.cern/doc/v626/classRooTemplateProxy.html.
- Loading branch information
1 parent
147a3a9
commit 0a7c86f
Showing
1 changed file
with
21 additions
and
21 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters