Skip to content
Snippets Groups Projects
  1. Jun 25, 2015
  2. Jun 23, 2015
  3. Jun 22, 2015
  4. Jun 21, 2015
  5. Jun 20, 2015
  6. Jun 19, 2015
    • Lorenzo Moneta's avatar
      RooHashTablke patch from Tim Adye: · 1122fcc5
      Lorenzo Moneta authored
       Restores the speed of RooLinkedList lookups (and some other operations) to that from
        ROOT 5.34.17 and before. The hash table was used previously, but this was disabled in
        ROOT 5.34.18+ because it gave incorrect results when list entries were renamed.
        This patch allows the hash table to be used without risk of failure, improving the
        speed of operations that make heavy use of RooFit lists, such as combining and
        importing (eg. factor 3 on an import).
      
        Details from Tim Adye:
      
        An update (26/06/2014) included in ROOT 5.34.18 fixed name lookups with RooLinkedList::findArg()
        when a list element had been renamed, by disabling the hash table optimisation.
        There was still an issue with find(name) and when removing or replacing renamed elements.
        This patch should mostly restore (or even slightly improve on) the speed we had before that update
        (eg. in 5.34.17), but with corrected find, remove, and replace operations.
      
        For all this to work, I had to make a few changes to how the name registry is used.
        RooLinkedList now has _useNptr enabled by default, but only uses the name registry when it
        is safe and efficient to do so. If a RooAbsArg is ever renamed, a flag is set in the name registry
        (actually a bit in the new TNamed) to indicate that a hash table lookup may give a false negative
        for that name. That will permanently (for this job) prevent a quick lookup for that name,
        but that's OK since renaming is relatively rare.
      
        To speed up the name registry (which is now used more often), I increased its static hash table size
        from 31 to 100000. That might seem like a drastic change, but since this is a singleton it only
        adds 781 kilobytes to the total memory usage.
      
        This patch also includes a few minor fixes to RooHashTable: fix when a replaced element had a
        different name (slot), fix for find(TObject*) which always failed (but wasn't used),
        and a small optimisation for RooHashTable::findLinkTo().
      1122fcc5
    • Lorenzo Moneta's avatar
      Apply patch from Tim Adye: · ce29aa86
      Lorenzo Moneta authored
        Several improvements to reduce the RooFit memory use, especially for the combined
        CMS Higgs coupling workspaces (eg. reduce the full CMS workspace requirements
        from 7.3 to 1.8 GB, with a more modest 5.3 to 4.6 GB improvement for an ATLAS workspace).
      
        Details from Wouter Verkerke:
      
        - For any RooSimultaneous component in which there is a pdf tagged with attribute
          "MAIN_MEASUREMENT", only that pdf is forwarded to the component calculator,
          thereby stripping of all subsidiary measurements (these are evaluated elsewhere anyway)
          This is already done automatically for ATLAS binned likelihood, where the BinnedLikelihood
          attribute has a similar effect.
          Since CMS attaches 2305 subsidiary measurements to each of their O(250) channels.
          this procedure avoids the replication of ~500,000 RooGaussians and 1.5 million associated RooRealVars.
       - The default buffer size allocation for TTree attached RooVectorDataStores is reduced from 4096 bytes per branch to 1024.
       - The initially reserved vector size of Roo(Obj)CacheManager for internally cached objects is reduced from 10 to 2.
       - The TNamed data member of RooLinkedList is removed (was only used in one very obscure place).
       - The chunk size for memory pools for RooLinkedListElems is reduced from 1M to 256K.
      
        To take advantage of this for the CMS workspace, the pdf terms should be tagged with the "MAIN_MEASUREMENT"
        attribute. If not already included, it can be added with the following code snippet.
      
        RooFIter iter = w->components().fwdIterator() ;
        RooAbsArg* arg ;
        while(arg=iter.next()) {
          if (arg->IsA()==RooAddPdf::Class() && TString(arg->GetName()).BeginsWith("pdf_")) {
            arg->setAttribute("MAIN_MEASUREMENT") ;
            cout << "component " << arg->GetName() << " is a cms main measurement" << endl ;
          }
        }
      ce29aa86
    • Lorenzo Moneta's avatar
      from Wouter: change components to return a RooArgList instead of a RooArgSet... · c055bb2e
      Lorenzo Moneta authored
      from Wouter: change components to return a RooArgList instead of a RooArgSet to not remove duplicates (e.g. RooProduct of x*x )
      c055bb2e
    • Lorenzo Moneta's avatar
    • Lorenzo Moneta's avatar
      - Add Hash method to RooLinkedList otherwise it cannot be used correctly in... · 0f0f90dd
      Lorenzo Moneta authored
      - Add Hash method to RooLinkedList otherwise it cannot be used correctly in THashList classes (e.g. when using it with PROOF)
      - Fix seeding of random numbers when using it with PROOF (use the worker number in the seeding) to be sure different seeds ar generated for each worker
      0f0f90dd
    • Lorenzo Moneta's avatar
    • Lorenzo Moneta's avatar
      Fix a compilation warning · 320472d4
      Lorenzo Moneta authored
      320472d4
    • Wouter Verkerke's avatar
      o RooSecondMoment · 8cbc1b88
      Wouter Verkerke authored
         - Introduce first moment as offset in calculation of second moment
           to promote numeric stability of calculation when first moment is large
      
       o RooCmdConfig
      
         - Increase length of string arguments allowed
      
       o RooCustomizer
      
         - When replace operations are executed with missing source or target expressions,
           ignore the offending operation with a warning message, rather than canceling the
           entire transaction
      8cbc1b88
    • Lorenzo Moneta's avatar
      Speed up RooWorkspace::import by using a has table for the internal Workspace... · 281557ca
      Lorenzo Moneta authored
      Speed up RooWorkspace::import by using a has table for the internal Workspace collection if size is > 1000 and by speeding up the removal of the set which is cloned in the import. We don’t delete the set which calls safeDeleteList. It is not needed, the set contains a list of all the nodes, so we simply delete just one by one.
      
      Signed-off-by: default avatarWouter Verkerke <verkerke@nikhef.nl>
      281557ca
    • Lorenzo Moneta's avatar
    • Lorenzo Moneta's avatar
Loading