### RooFit

- Assorted small bug fixes have been applied. No major new features have been introduced since 5.26
- Normalization of
- RooRealSumPdf
changed from sum of coefficents to sum of coefficients*integrals of input functions.
- New PDF `RooNonCentralChiSquare` which is useful for asymptotic analysis of likelihood ratio tests -- like expected significance and error bands.
- Ability to "seal" data in RooNLLVar, so that an experiment can publish likleihood functions without exposing the data necessary to evaluate the likelihood function.

### HistFactory

- The ROOT release ships with a script `prepareHistFactory` and a binary `hist2workspace` in the $ROOTSYS/bin directories.
- `prepareHistFactory` prepares a working area. It creates a results/, data/, and config/ directory. It also copies the `HistFactorySchema.dtd` and example XML files into the config/ directory. Additionally, it copies a root file into the data/ directory for use with the examples.
- Usage: `hist2workspace input.xml`
- `HistFactorySchema.dtd`: This file is located in $ROOTSYS/etc/ specifies the XML schema. It is typically placed in the config/ direc-tory of a working area together with the top-level XML file and the individual channel XML files. The user should not modify this file. The `HistFactorySchema.dtd` is commented to specify exactly the meaning of the various options.

#### Top-Level XML File

- see for example $ROOTSYS/tutorials/histfactory/example.xml
- This file is edited by the user. It specifies
  - A top level 'Combination' that is composed of:
    - several 'Channels', which are described in separate XML files.
    - several 'Measurements' (corresponding to a full fit of the model) each of which specifies
      - a name for this measurement to be used in tables and files
      - what is the luminosity associated to the measurement in picobarns
      - which bins of the histogram should be used
      - what is the relative uncertainty on the luminosity
      - what is (are) the parameter(s) of interest that will be measured
      - which parameters should be fixed/floating (eg. nuisance parameters)
      - which type of constriants are desired
        - Gaussian by default
        - Gamma, LogNormal, and Uniform are also supported
      - if the tool should export the model only and skip the default fit

#### Channel XML Files

- see for example $ROOTSYS/tutorials/histfactory/example_channel.xml
- This file is edited by the user. It specifies for each channel

- observed data (if absent the tool will use the expectation, which is useful for expected sensitivity)
- several 'Samples' (eg. signal, bkg1, bkg2, ...), each of which has:
  - a name
  - if the sample is normalized by theory (eg N = L*sigma) or not (eg. data driven)
  - a nominal expectation histogram
  - a named 'Normalization Factor' (which can be fixed or allowed to float in a fit)
  - several 'Overall Systematics' in normalization with:
    - a name
    - +/- 1 sigma variations (eg. 1.05 and 0.95 for a 5% uncertainty)
  - several 'Histogram Systematics' in shape with:
    - a name (which can be shared with the OverallSyst if correlated)
    - +/- 1 sigma variational histograms

### RooStats

#### ModelConfig

- This class is now used extensively by the calculator tools. It encapsulates the configuration of a model to define a particular hypothesis.
- Various fixes by and improvements to make it usable with all the existing calculator.
- `ModelConfig` contains now always a reference to an external workspace who manages all the objects being part of the model (pdf's and parameter sets). The user needs then to set always a workspace pointer before setting the various objects.

#### General Improvements

- ModelConfig is now used extensively by the calculator tools. It encapsulates the configuration of a model to define a particular hypothesis.
- ProfileLikelihood::GetInterval now returns LikleihoodInterval in the interface to avoid unnecessary casting
- FeldmanCousins::GetInterval now returns PointSetInterval in the interface to avoid unnecessary casting

#### Profile Likelihood

- When running `ProfileLikelihoodCalculator::GetHypoTest` the user does not need anymore to clone the null parameter set. It is done now inside the calculator
- `LikelihoodInterval::LowerLimit` (and UpperLimit) returns now a boolean flag with the status of the limit search. In case of a failure in finding the upper/lower limit a value of zero is returned instead of the min/max of the variable range
- `LikelihoodIntervalPlot` fix drawing of horizontal green line when limits are outside the variable range

#### HybridCalculator

- New re-written class based on the `TestStatSampler` and `TestStatistic` interfaces. The new class is designed to provide consistent use of a ModelConfig, specifying the Pdf and Prior. The old class remains, but with a new name: `HybridCalculatorOriginal`.
- The tutorial `rs201b_hybridcalculator` shows the usage of the new class.
- Note that the new class can be constructed only from a `ModelConfig`
- One can specify a `TestStatSampler` in the constructor (which implies a choice of a `TestStatistic`, or by default the tool will use the ToyMCSampler and the `RatioOfProfiledLikelihoods`
- The interface of the new HybridCalculator class is now more uniform with the other calculator tools, which is different from the original HybridCalculator's interface. Users wishing to run their old macro are advised to use ModelConfig, but if that is too time consuming one can just change the name of the class from `HybridCalculator` to `HybridCalculatorOriginal`
- Note also that with the new class no `HybridResult` is returned but directly the base class `HypoTestResult` which has been improved for this release.
- The plot class, `HybridPlot` is not returned, but the user can create an `HypoTestPlot` object from the `HypoTestResult`.
- The classes `HybridResult` and `HybridPlot` work only with the `HybridCalculatorOriginal` and remain for maintaining a backward compatibility.
- Given a ModelConfig, the tool will attempt to form the posterior pdf for the nuisance parameters based on the prior and the constraint terms in the pdf. However, this is not yet implemented. In order to keep logical consistency with other tools, the distribution being used to smear the nuisance parameters should NOT be considered the prior in the model config. Instead, one should use HybridCalculator's `ForcePriorNuisanceNull` and `ForcePriorNuisanceAlt`.

#### HybridCalculatorOriginal

- Apply a fix for test statistic = 3 (profile likelihood)
- Apply a fix for using non-extended pdf

#### TestStatSampler and TestStatistics

- Cleanup of the interfaces.
- TestStatistics now have a method `PValueIsRightTail` to specify the sign conventions for the test statistic. This is used when making plots and calculating p-values.
- make clear that `TestStatistic::Evaluate` should take data and values of the parameters that defien the null.
- Add method `TestStatSampler::SetParametersForTestStat` that allows for greater control of parameters used for generating toy data and parameters used for evaluating the test statistic.
- ProfileLikelihoodTestStat
Using the raw profile likelihood while reviewing the old algorithm used to provide robustness in situations with local minima.
- New test statistic classes:
  - `SimpleLikelihoodRatioTestStat` : log L_1 / L_0
  - `RatioOfProfiledLikelihoodsTestStat`: log L(mu_1, hat(nu_1))/L(mu_0,hat(nu_0))
  - `MaxLikelihoodEstiamteTestStat`: the MLE of a specified parameter

#### ToyMCSampler

- New version of `ToyMCSampler` which can smear the nuisance parameters according to their distributions for use with HybridCalculator
- Updated class structure: ToyMCSampler is a particular implementation of a `TestStatSampler` and runs with any `TestStatistic`. It returns the result in an instance of `SamplingDistribution`.
- Supports Importance Sampling: Improves sampling the tails of a distribution by generating toys from a user supplied importance density and a reweighing procedure of the result.
- Supports Adaptive Sampling: extends the run until a given number of toys is reached in the tail(s).
- Parallelization using PROOF(-Lite) is supported. It is enabled by supplying a `ProofConfig` instance.

#### BayesianCalculator

- Improve the way the class performs the numerical integration to find the interval and/or the posterior function.
- In case of complex numerical calculation add the method `SetScanOfPosterior(nbins)` for scanning the posterior function in a givn number of nbins
- Add possibility to compute lower/upper limits using the method `SetLeftSideTailFraction(fraction)`
- Add possibility to compute shortest interval using `SetShortestInterval`

#### MCMCCalculator

- Various improvements including possibility to compute lower/central/upper limits using `SetLeftSideTailFraction(fraction)`

#### New Tutorials

- New Demos that take name for file, workspace, modelconfig, and data, then use the corresponding calculator tool. If the file is not specified it will read an file produced from running the HistFactory tutorial example.
  - StandardProfileLikelihoodDemo.C:
  - StandardFeldmanCousinsDemo.C:
  - StandardBayesianMCMCDemo.C:
  - StandardBayesianNumericalDemo.C:
  - StandardProfileInspectorDemo.C:
- Demonstrate some new PDFs
  - TestNonCentral.C: demonstrates non central chi-square
  - JeffreysPriorDemo.C: demonstrates Jeffreys Prior
- Instructional Examples
  - IntervalExamples.C: Standard Gaussian with known answer using 4 techniques
  - FourBinInstructional.C: Example of a standard data-driven approach for estimating backgrounds. A lot of discussion.
  - HybridInstructional.C: Example of protoype on/off problem with a data-driven background estimate. A lot of discussion
  - HybridStandardForm.C: Variant on above in 'standard form'
  - MultivariateGaussianTest.C: A validation example with an N-D multivariate Gaussian