CombineHarvester April Updates
ajgilbert
released this
10 Apr 11:09
·
214 commits
to master
since this release
Interface-breaking changes
- Switch to simplified set-generating methods (7a7c716)
- The CombineHarvester methods GenerateSetFromProcs, GenerateSetFromObs and GenerateSetFromSysts have been removed and replaced by SetFromProcs, SetFromObs and SetFromSysts
- A new method SetFromAll has been added that acts on all Observation, Process and Systematic Objects
- As for the old methods, the argument is a function or callable accepting a pointer of the appropriate type
- Unlike the old methods, there is no need to specify a template parameter for the type of the returned set - this is now deduced automatically as the return type of the supplied function
New features
- ch::CardWriter class for creating LIMITS directory structure more easily (4235e3b)
- Can be tested in SMLegacyExample.cpp by uncommenting code at the end
- Available in the python interface (f838968)
- ch::FnTimer class for tracking number of function calls and measuring performance (4b821cb)
- see example usage in CardWriter::Compile, enabled by compiling with make EXTRAFLAGS='-DTIME_FUNCTIONS'
- New SetFrom.. methods above now available in the python interface (0fb9949)
- git version information is now written as a comment at the top of the text datacards (8d9331b, b21cc2c)
- The ch::SetStandardBinNames utility function function now has an optional second argument for a pattern string that should be used to build the new bin names (ae5dda7)
- This accepts standard patterns of the form $ANALYSIS_$CHANNEL_$BINID_$ERA etc.
- New ch::ValsFromRange utility function can be used to generate ranges of values that include negative values (i.e. which would cause ch::MassesFromRange to fail) (995b5fc)
- Note the different syntax: MassesFromRange("110-145:5"), ValsFromRange("110:145|5")
Bug fixes
- When writing datacards in which the observation has been replaced by an asimov dataset the yields will be non-integer, and we have to write the rate into the text datacard with more precision, otherwise text2workspace.py complains about a mismatch. Such a case is now detected and more precision is written if necessary (7ed1564)