Skip to content

Commit

Permalink
fix?
Browse files Browse the repository at this point in the history
  • Loading branch information
VanyaBelyaev committed Jan 8, 2025
1 parent 0781f3e commit d81048f
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 14 deletions.
2 changes: 1 addition & 1 deletion ReleaseNotes/release_notes.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
1. add better printout for SimFit and RooSimultaneous
1. better treatment of long titles for tables
1. add `silent=True` argument for `generate`-methods
1. add ptinout of gen-options for `generate`-methods
1. add printout of gen-options for `generate`-methods


## Backward incompatible1
Expand Down
19 changes: 13 additions & 6 deletions ostap/fitting/fithelpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -655,7 +655,8 @@ def binning ( self , axis , name = '' ) :
args_parallel = 'parallel' , 'parallelize' , 'parallelise'
args_recover = ( 'recover' , 'recoverfromundefined' ,
'recoverfromundefinedregion' ,
'recoverfromundefinedregions' )
'recoverfromundefinedregions' )
args_errorwall = 'evalerrorwal' , 'errorwall' , 'errorswall' , 'evalerrorswall'
args_maxcalls = 'maxcalls' , 'maxcall' , 'callmax' , 'callsmax'

# =============================================================================
Expand Down Expand Up @@ -923,13 +924,19 @@ def parse_args ( self , dataset = None , *args , **kwargs ) :

_args.append ( ROOT.RooFit.Parallelize ( *a ) )

elif key in args_recover and \
isinstance ( a , num_types ) and ( 6, 24 ) <= root_info :
elif key in args_recover and isinstance ( a , bool ) and ( 6, 24 ) <= root_info :

_args.append ( ROOT.RooFit.RecoverFromUndefinedRegions ( 1.0 * float ( a ) ) )
_args.append ( ROOT.RooFit.RecoverFromUndefinedRegions ( 10.0 if a else 0.0 ) )

elif key in args_maxcalls and \
isinstance ( a , integer_types ) and (6,27) <= root_info :
elif key in args_recover and isinstance ( a , num_types ) and ( 6, 24 ) <= root_info :

_args.append ( ROOT.RooFit.RecoverFromUndefinedRegions ( 1.0 * float ( a ) ) )

elif key in args_errorwall and isinstance ( a , bool ) and (6,22) <= root_info :

_args.append ( ROOT.RooFit.EvalErrorWall ( a ) )

elif key in args_maxcalls and isinstance ( a , integer_types ) and ( 6 , 27 ) <= root_info :

_args.append ( ROOT.RooFit.MaxCalls ( a ) )

Expand Down
2 changes: 1 addition & 1 deletion ostap/fitting/simfit.py
Original file line number Diff line number Diff line change
Expand Up @@ -932,8 +932,8 @@ def generate ( self ,
varset = vv ,
binning = binning ,
sample = sample ,
storage = storage ,
silent = silent ,
storage = storage ,
args = cargs )

if ds.isWeighted() :
Expand Down
10 changes: 4 additions & 6 deletions source/src/MoreRooFit.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1236,8 +1236,8 @@ Ostap::MoreRooFit::ProductPdf::ProductPdf
RooAbsPdf& pdf2 )
: RooAbsPdf ( name , title )
//
, m_pdf1 ( "pdf1" , "The first PDF" , this , pdf1 )
, m_pdf2 ( "pdf2" , "The second PDF" , this , pdf2 )
, m_pdf1 ( "!pdf1" , "The first PDF" , this , pdf1 )
, m_pdf2 ( "!pdf2" , "The second PDF" , this , pdf2 )
{}
// ============================================================================
// "copy" constructor
Expand All @@ -1247,8 +1247,8 @@ Ostap::MoreRooFit::ProductPdf::ProductPdf
const char* name )
: RooAbsPdf ( right , name )
//
, m_pdf1 ( "pdf1" , this , right.m_pdf1 )
, m_pdf2 ( "pdf2" , this , right.m_pdf2 )
, m_pdf1 ( "!pdf1" , this , right.m_pdf1 )
, m_pdf2 ( "!pdf2" , this , right.m_pdf2 )
{}
// ============================================================================
// destructor
Expand All @@ -1271,8 +1271,6 @@ Double_t Ostap::MoreRooFit::ProductPdf::evaluate () const
}
// ============================================================================



// ============================================================================
// constructor
// ============================================================================
Expand Down

0 comments on commit d81048f

Please sign in to comment.