[root] / trunk / roofit / histfactory / src / PiecewiseInterpolation.cxx Repository:
ViewVC logotype

Log of /trunk/roofit/histfactory/src/PiecewiseInterpolation.cxx

Parent Directory Parent Directory


Links to HEAD: (view) (download) (as text) (annotate)
Sticky Revision:

Revision 44507 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Mon Jun 4 12:30:41 2012 UTC (2 years, 7 months ago) by axel
File length: 21501 byte(s)
Diff to previous 44428
Remove
  using namespace std;
from Riostream.h, which has huge consequences for all of ROOT.
Riostream.h is now a simple wrapper for fstream, iostream, iomanip for backward compatibility; Riosfwd.h simply wraps iosfwd.

Because of templates and their inline functions, Riostream.h needed to be included in headers, too (e.g. TParameter.h), which violated the assumption that Riostream.h is not exposing its using namespace std to headers.
ROOT now requires R__ANSISTREAM, R__SSTREAM, which does not change the set of supported compilers.

Without "using namespace std", several identifiers are now prefixed by std::; e.g. roofit/* source files now have a using namespace std to keep their coding style.
TFile::MakeProject() now generates "using namespace std" to convert the CINT-style class names into C++ ones.

Revision 44428 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Fri Jun 1 08:08:39 2012 UTC (2 years, 7 months ago) by moneta
File length: 21479 byte(s)
Diff to previous 44353
apply patch provided by Tim Adye: 


1) Save fit errors in detailed outputs' RooRealVars, rather than as separate
variables. If withErrorsAndPulls is specified, the asymmetric errors are also
saved. Work round bug #94908 by using RooTreeDataStore in
DetailedOutputAggregator and ToyMCImportanceSampler (can be removed when #94908
is fixed).

2) Fix detailed output dataset name and variable order (dsname_TS0 should be
first variable). Previously SamplingDistributions from importance sampling were
wrong (taken from the first global observable!).

3) Make detailed output for data available via
HypoTestResult::GetAllTestStatisticsData().

4) Don't save detailed output in HypoTestResult if it was not requested.

5) Rationalised the saving and restoring of parameters in ToyMCSampler. The POI
value in the workspace is not overwritten before calling the test stat (restores
behaviour from 5.32).

6) Remove unnecessary dataset copy in ToyMCImportanceSampler.

7) Fix ToyMCImportanceSampler double->int compiler warnings.

8) Fix minor memory leaks in HypoTestCalculatorGeneric, ToyMCSampler, and
ProfileLikelihoodTestStat.

9) Update streamer so PiecewiseInterpolation::setAllInterpCodes works for
objects created with ROOT 5.30.

Revision 44353 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Wed May 30 08:53:25 2012 UTC (2 years, 7 months ago) by moneta
File length: 21407 byte(s)
Diff to previous 44159
merge from roostats dev branch fixes 44206, 44345, 44346 from George Lewis

Revision 44159 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Mon May 7 17:16:40 2012 UTC (2 years, 8 months ago) by moneta
File length: 21271 byte(s)
Diff to previous 42959
merge changes in the histfactory from roostats development branches: 

  from 43442 to 43445 committed by  G. Lewis: 
 
-  Removed Warning in RooStats HistFactory ConfigParser.cxx
- Updated HistFactory xml Parser, Added support for scripting, added various helper classes

from 43455 through r44158  by G. Lewis and Kyle Cranmer

new shape interpolation option

Updated histfactory: Streamline HistoToWorkspaceFactoryFast, MakeMeasurementAndModel, return workspace pointer

Revision 42959 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Fri Feb 10 15:03:45 2012 UTC (2 years, 11 months ago) by moneta
File length: 19520 byte(s)
Diff to previous 42233
merge from 5.32 patches changes applied in the histfactory from 
42180 to current HEAD (42958)

Revision 42233 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Thu Nov 24 23:35:45 2011 UTC (3 years, 2 months ago) by wouter
File length: 19521 byte(s)
Diff to previous 42172
  o PiecewiseInterpolation, RooProdPdf, RooRealSumPdf, RooProduct, RooAddPdf, 
    RooAddition, RooHistPdf, RooHistFunc
 
    -  Implement isBinnedDistribution


  o RooSimSplitGenContext

    - New implementation of RooAbsGenContext for simultaneous pdf.
      The difference with the existing RooSimGenContext is that
      the logic is implemented at the generate() level rather than
      the generateEvent() level, which allows to perform mixed
      binned/unnbinned generation


  o RooBinnedGenContext

    - New implementation of RooAbsGenContext that performs binned
      generation, with an unbinned weighted dataset as output.
      This new context implements the algorithm of 
      the now deprecated method RooAbsPdf::generatedWeightedUnbinned()


  o RooSimultaneous

    - Implement method autoGenContext() that selects a split context
      can case (partially) binned generation is requested

    - Deprecate generateMixed() - now absorbed in generate() 
  

  o RooAbsGenContext

    - Make generate() virtual

    - Implement processing of extend mode here too


  o RooCompositeDataStore

    - Fix compiler shadowing warnings


  o RooAbsPdf

    - Add method binnedGenContext() to return a generator context
      for binned generation

    - Add method autoGenContex() that can return either a binned
      or unbinned context depending on the input and circumstances

    - Add support for ExpectedData(),GenBinned(),AllBinned() and AutoBinned()
      in generate()

    - Deprecate generateWeightedUnbinned() - now absorbed in generate()


  o RooLinkedList, RooLinkedListElem

    - Adjust memory management of chain elements to avoid slow heap growth 

   
  o RooGlobalFunc

    - Add GenBinned(),AllBinned() and AutoBinned()


  o Module.mk

    - Add RooSimSplitGenContext, RooBinnedGenContext

Revision 42172 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Tue Nov 22 16:41:22 2011 UTC (3 years, 2 months ago) by moneta
File length: 19108 byte(s)
Diff to previous 41862
merge from 5.32 patches changes from 42124 to 42170

-Adding StatError and ShapeFactor additions for HistFactory
-Changes to use RooBinIntegrator

Revision 41862 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Thu Nov 10 09:44:32 2011 UTC (3 years, 2 months ago) by wouter
File length: 14731 byte(s)
Diff to previous 41711
   o PiecewiseInterpolation, RooAbsCachedReal, RooAbsCachedPdf

     - Follow adjustment in RooCacheManager


   o RooConvCoefVar, RooEffProd, RooResolutionModel, RooErrorVar, RooProjectedPdf, RooAbsHiddenReal

     - Migrate to getValV


   o RooProdPdf

     - Follow adjustment in RooCacheManager     
     - Migrate to getValV


   o RooVectorDataStore

     - Various small fixes

     - Allow storage of non-constant 'track-and-change' cache entries.
       These are cached PDF nodes that are not constant, but need
       to be recalculated when selected parameters change. A 
       RooChangeTracker data member is added to the vectors to
       do this dependency checking, and recalculation (as needed)
       is performed in method recalculateCache() to be called from
       the test stat before looping of the data.
       

   o RooAbsReal

     - Introduce new non-virtual inline getVal() methods that handles
       clean-cache state cases and delegates all other cases to a 
       virtual method getValV() that corresponds to the original
       getVal() method


     - Add 'ignore' more to eval error logging protocal


   o RooAddPdf

     - Follow adjustment in RooCacheManager 
     - Optimize control structure in evaluate() to be more efficient
       (move conditional outside loop)

   o RooAbsTestStatistic

     - Add extra argument to constOptimizeTestStatistic to control
       activation of track-and-change optimization

   o RooRealMPFE

     - Migrate to getValV()

     - Add support for new track-and-change option argument in 
       transmission of const optimization request to servers
       

   o RooRealVar

     - Exploit new _fast flag of RooAbsReal to choose non-virtual
       handling of getVal()

     - Migrate to getValV() [ but still dummy ]

     - Small fix in attachToVStore()


   o RooNLLVar

      - Add data member tracking first use

      - After first use, trigger wiring of all caches in RooCacheManagers
        to speed up trivial cache selection decisions (i.e those where
        only a single cache entry exists)

      - Add call to RooAbsDataStore::recalculateCache() to implement
        track-and-change update prior to likelihood loop


   o RooConstVar

      - Migrate to getValV()


   o RooAbsArg

     - Eliminate flipACLean() protocol since no longer used

     - Simplify method opermode() now that flipAClean is abandoned.

     - In findConstantNodes() add support for change tracking
       and include nodes with "ChangeTracking" atttribute in
       list of constants. Mark all truly constant expressions
       with attribute "ConstantExpression"

     - Add extra argument to constOptimizeTestStatistic to control
       activation of track-and-change optimization  

     - In printCompactTree() also print valueDirty state when in Auto mode


     - Add method wireAllCaches() which propagates cache wiring request
       to all registered cache nodes on all branches nodes

     - Add transient data member with namereg pointer to string with
       current object name. Overload SetName() and SetName() and title
       to clear pointer whenever name changes.


   o RooAbsPdf

     - Migrate to getValV(). Eliminate handling of clean-cache cases
       as this is now done in RooAbsReal::getVal()

     - Disable use of RooAbsPdf::raiseEvalError() protocol as this
       is now communicated through RooAbsReal::logEvalError()


   o RooRealIntegral

     - Migrate to getValV()

     - Use setInhibitDirty() instead of flipAClean() in evaluate()
       when performing numeric integrations


   o RooTreeDataStore

     - In cachArgs() add code to select only cache items with
       label "ConstantExpression" as tree store is unable to
       cache track-and-change items

   o RooAbsCategory

     - When printing also show index associated to label


   o RooAbsOptTestStatistic

     - Add extra argument to constOptimizeTestStatistic to control
       activation of track-and-change optimization

     - In optimizeConstantTerms() when trackChanges option is active
       request change tracking for all component nodes of RooAddPdf
       and RooRealSumPdf, unless these components are RooProdPdf/RooProducts
       respectively in which case the components of these products are tracked
       
   o RooRealProxy

     - Use _fast attribute of RooAbsArg to directly return value cache
       of RooAbsReals if that is allowed


   o RooAbsCache

     - Add virtual method wireCache()


   o RooCacheManager

     - Add new method getObj() that takes isetRangeName as 'const char*'
       instead of 'const TNamed *' to be able to eliminate the conversion
       when in wired mode

     - Implement cache wiring - If at moment of the request only a single
       cached entry exists - always return that one from here one.


   o RooAbsDataStore

     - Implement virtual method calculateCache()

Revision 41711 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Wed Nov 2 12:25:02 2011 UTC (3 years, 2 months ago) by wouter
File length: 14733 byte(s)
Diff to previous 41701
   PiecewiseInterpolation

    - Add protection for use of _interpCode for legacy
      classes read from a workspace (will crash otherwise)

Revision 41701 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Tue Nov 1 21:55:02 2011 UTC (3 years, 2 months ago) by moneta
File length: 14709 byte(s)
Diff to previous 41676
merge fix 41700 from Kyle in Histfactory

Revision 41676 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Tue Nov 1 15:44:30 2011 UTC (3 years, 2 months ago) by wouter
File length: 13939 byte(s)
Diff to previous 41018
   *** Miscellaneous speed improvements ***
  
    o PiecewiseInterpolation

      - Import changes from Max baak (new interpolation options)

      - Deploy fast iterators


    o RooGaussian

      - Bug fix in analytical integral over 'mean' parameter (Lorenzo Moneta)


    o RooBernstein

      - Deploy fast iterators


    o RooProdPdf

      - Reorganize code for improved speed


    o RooDataHist

      - Add support for vector-based data storage


    o RooGenContext

      - Improve generation speed by putting internal pdf clone to ADirty mode


    o RooRealBinding

      - Minimize number of calls to min() and max() for efficiency reasons


    o RooAbsRealLValue

      - In randomize() Minimize number of calls to min() and max() for efficiency reasons


    o RooDataSet

      - Make addFast() even faster by disable state propagation


    o RooAbsGenContext

      - Disable state propagation in output dataset for efficiency reasons
      - Call initGenerator() only on the first generation sequence

 
    o RooVectorDataStore

      - Add support for native vs current buffers, to support the functioning
        of addColumn(s)() and cacheArgs() when the datastore is attached
        to a pdf in RooAbsOptTestStatistics

   
    o RooAbsCategoryLValue

      - Support change in RooAbsCategory to operate nominally by index rather than by label


    o RooXYChi2Var

      - Change code to support new pdf/data attachment scheme in RooAbsOptTestStatistics
        where only the store buffers are reattached and the variable objects themselves


    o RooFFTConvPdf

      - Bug fix in getActualObservables() - functionality of setCacheObs() is now restored


    o RooAbsReal

      - Small adjustments in getVal() to make it faster in most cases


    o RooAbsCollection

      - Add datamember to keep track contents is exclusively RooRealVars. For those that
        do implement a faster version of assignFast()


    o RooAbsData

      - Add methods attachBuffers() and resetBuffers() - forwarded to datastore - that
        facilite new 'fast-attach' methods used in RooAbsOptTestStatistic


    o RooCompositeDataStore

      - Fix copy constructors so that they clone and own the subsidiary datasets

      - Operate index by value rather than by string label for efficiency reasons


    o RooRealVar

      - Bug fix in attachToVStore() to properly handle RRVs with StoreError tags


    o RooAbsPdf

      - Adjustments in getVal() to make it faster for most cases
      - Modify generate(GenSpec*) to initialize specInit flag that
        triggers one-time call of initGenerator()
      - Modify generate() to not repeatedly call initGenerator() for the same gencontext

 
    o RooAbsArg

      - Deploy fast iterators in more places
      - Add various new inline methods performing multiple ops (e.g retrieving and
        clearing one or more dirty flags) for improbed RooAbsReal/RooAbsPdf::getVal()
        operations
   

    o RooBanner

      - Increment version tag to 3.48


    o RooRealIntegral

      - Add overloaded getVal() method that also checks for shapeDirty flag,
        which was removed from RooAbsReal::getVal() as it is not needed for
        any class other than RooRealIntegral


    o RooAddGenContext

      - Disable state propagation in output dataset for efficiency reasons
      - Replace ROOT container classes with STL versions for efficiency reasons


    o RooMultiCatIter

      - Adjust code to new RooCatType behaviour that by default only tracks the
        integer representation of type


    o RooProdGenContext

      - Replace ROOT container classes with STL versions for efficiency reasons


    o RooTreeDataStore

      - Adjust code so that it works with the new fast-attach mechanism used
        in RooAbsOptTestStatistic


    o RooRealProxy

      - In lvptr() remove explicit check for lvalue


    o RooSimGenContext

      - Disable state propagation in output dataset for efficiency reasons
      - Replace ROOT container classes with STL versions for efficiency reasons
      - In createDataSet() create a prototype dataset in the first call, and
        clone that for subsequent calls rather than calling the expensive named
        argument constructor each time


    o RooTrace

      - Add (dummy) method callgrind_zero() and callgrind_dump() as hook functions
        to facilitate improved callgrind profiling


    o RooAbsCategory

      - Adjust class so that it works with the integer representation of types only
        and lookup associated string label on the fly, whenever it is requested


    o RooFormular

      - Eliminate overloaded getVal() as its functionality is now provided in 
        RooAbsReal::getVal()


    o RooAbsOptTestStatistic

      - Implement new fast-attach mechanisms for pdf and datasets: only readjust the
        buffer pointers of the dataset to the pdf observables, rather than reattaching
        the pdf to the dataset observables. This results in a _much_ faster 
        operation of setData() and no longer entangles the test statistics with observables
        of datasets that may be deleted during the lifetime of the test statistic

 
    o RooSimultaneous
 
       - Overload fillDataHist() with new version with correct normalization (from Scott Snyder)


    o RooCategory

       - Adjust getLabel() so that it retries labels associated with the current index on the fly


    o RooCatType

       - Make label contents 'transient', i.e. it is not copied on assignment for faster 
         category operations. RooAbsCategory will load the associated labels on demand from now on.

Revision 41018 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Tue Sep 27 08:48:28 2011 UTC (3 years, 3 months ago) by moneta
File length: 9898 byte(s)
Diff to previous 41017
fix a compilation warning

Revision 41017 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Tue Sep 27 08:40:16 2011 UTC (3 years, 3 months ago) by moneta
File length: 9920 byte(s)
Diff to previous 38599
apply fixes for Coverity (resource leak, unsed variables, uninitialized variable in ctor)

Revision 38599 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Thu Mar 24 08:37:05 2011 UTC (3 years, 10 months ago) by moneta
File length: 9872 byte(s)
Diff to previous 37144
merge from roostats development branch the fix 38597 
(The changes were done originally in the v5-28-00-patches branch    
and they are : 


RooFit
    Added protectNegativeMean(bool) optional to gracefully handel cases when expectation is negative
    Added setNoRounding(bool) option to switch between rounding number of events
    Incremented version number for schema evolution

RooFitCore
     Added handeling of a special case in analytic integral for RooRealSumPdf

RooStats
    Fixed printout in number of toy MC used in FeldmanCousins and NeymanConstruction 
    Added SetOneSided(bool) option to ProfileLiklihoodTestStat for one-sided upper limits
    Added SetPOIPointsToTest(RooAbsData) method to FeldmanCousins tool, so that user can have control over which points in the parameter of interest to test (still using "profile construction" for nuisance parameters).  Additionally, added SetParameterPointsToTest, that has the same functionality as NeymanConstruction::SetParameterPointsToTest. 

HistFactory
   Fixed header definition in PiecewiseInterpolation
  Added analytic integration in PiecewiseInterpolation
  Added HistoToWorkspaceFactoryFast and MakeModelAndMeasurementsFast which implement the equivalent model produced by the original HistFactory, but in "standard form" instead of "number counting form".  Instead of splitting the histogram into bins and having a RooPoisson for each bin, this makes an extended Pdf with that interpolates between RooHistFuncs.  For situations with many bins, this is 5-15x faster and uses much less memory.  This model also works better with tools that require toy Monte Carlo.  This new model is the new default in hist2workspace.  The old model is still available with hist2workspace -number_counting_form input.xml.
 Fix dictionary on Fedora (r38188, issue #78554).

Revision 37144 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Wed Dec 1 11:00:45 2010 UTC (4 years, 1 month ago) by moneta
File length: 6227 byte(s)
Diff to previous 36863
Copy new module histfactory from roostats development branch
The HistFactory is a new package for creating RooFit workspaces from histograms

Revision 36863 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Tue Nov 23 09:26:56 2010 UTC (4 years, 2 months ago) by moneta
Original Path: branches/dev/roostats/roofit/histfactory/src/PiecewiseInterpolation.cxx
File length: 6227 byte(s)
Diff to previous 36861
- rename the namespace TemplateFactory to HistFactory
- add HistFactory module and correct dependency in Makefile.depend

Revision 36861 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Tue Nov 23 08:26:41 2010 UTC (4 years, 2 months ago) by moneta
Original Path: branches/dev/roostats/roofit/histfactory/src/PiecewiseInterpolation.cxx
File length: 6231 byte(s)
Diff to previous 36846
copy templatefactory from old vranch to histfactory in new branch

Revision 36846 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Mon Nov 22 15:57:31 2010 UTC (4 years, 2 months ago) by moneta
Original Path: branches/dev/roostatsOld/roofit/templatefactory/src/PiecewiseInterpolation.cxx
File length: 6231 byte(s)
Diff to previous 36830
rename current roostats branch to roostatsOld

Revision 36830 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Mon Nov 22 08:50:47 2010 UTC (4 years, 2 months ago) by moneta
Original Path: branches/dev/roostats/roofit/templatefactory/src/PiecewiseInterpolation.cxx
File length: 6231 byte(s)
Diff to previous 33720
move templatefactory to roofit/templatefactory

Revision 33720 - (view) (download) (as text) (annotate) - [select for diffs]
Added Wed Jun 2 14:50:16 2010 UTC (4 years, 7 months ago) by cranmer
Original Path: branches/dev/roostats/roofit/roostats/templatefactory/src/PiecewiseInterpolation.cxx
File length: 6231 byte(s)
adding templatefactory with working Module.mk, means new main Makefile for ROOT, optimization for RooPoisson, fix to likelihood plot and calculator, fix to modelconfig

This form allows you to request diffs between any two revisions of this file. For each of the two "sides" of the diff, enter a numeric revision.

  Diffs between and
  Type of Diff should be a

Sort log by:

Subversion Admin
ViewVC Help
Powered by ViewVC 1.0.9