Fork me on GitHub

Version 10 (modified by Pavel Demin, 12 years ago) ( diff )

--

Here is a wishlist for a common FastSim framework:

(points 3-8 has been found to be indispensable to implement prototype of the modular Delphes library)

  1. (optional, lowest priority) ROOT Independence (for example, using some classes from CLHEP and Boost.Python for factories, config. file, etc)
  1. (optional) config. file independence (specifying only in-memory representation and access methods)
  1. Module factory that creates modules instances at run-time by name

With ROOT it's just gROOT->GetClass(moduleClassName)->New()

http://root.cern.ch/root/html/TClass.html

The simplest solution without ROOT would be

  BaseModuleClass* moduleFactory(string const &name)
  {
    if(name == "Module1")
    {
      return new Module1;
    }
    else if(name == "Module2")
    {
      return new Module2;
    }
    return NULL;
  }
  1. Memory manager that minimizes the amount of memory allocations and that creates/destroys/clears all data collections used by other services and modules (see ROOT TClonesArray, ExRootFactory). It also clears all data collections produced by other services and modules between events in the event loop.

http://root.cern.ch/root/html/TClonesArray.html

https://server06.fynu.ucl.ac.be/projects/ExRootAnalysis/browser/trunk/ExRootAnalysis/ExRootFactory.h

http://gameprogrammingpatterns.com/object-pool.html

  1. Central configuration manager that stores all parameters for all modules and that provides access by name to these parameters (getDouble(name, defaultValue), getDouble("JetFinder/MinPT", 10.0)). It also should provide access to hierarchical structures with variable dimensions for each entry (like for example map< double, set< double > >)
    CaloBins (
               ( ( etaEdge1 etaEdge2 )
                   ( phiEdge1 phiEdge2 phiEdge3 )
               )
               ( etaEdge3 
                  ( phiEdge4 phiEdge5 phiEdge6 phiEdge7 phiEdge8 )
               )
             )
    
  1. Data manager that provides access by name to all data collections created by other services and modules (see fwlite::Handle<T>::getByLabel(event, label) in CMSSW or TFolder in ROOT)

https://twiki.cern.ch/twiki/bin/view/CMSPublic/WorkBookFWLiteEventLoop

http://cmssdt.cern.ch/SDT/doxygen/CMSSW_5_3_2/doc/html/d1/dd2/classfwlite_1_1Handle.html

http://root.cern.ch/download/doc/ROOTUsersGuideHTML/ch10.html

http://root.cern.ch/root/html/TFolder.html

  1. Universal object that could represent all physics objects (particles, tracks, calorimeter towers, jets) with possibility to add user defined information (see FastJet PseudoJet & UserInfoBase classes, CMS PAT UserData, ExRootCandidate)

With ROOT, user defined information can be implemented quite easily

  class ExRootCandidate
  {
  ...
  private:
    map< const TClass*, TObject* > fInfoMap
  };
  
   //------------------------------------------------------------------------------

  TObject *ExRootCandidate::GetInfo(const TClass *cl)
  {
    map<const TClass *, TObject *>::const_iterator it = fInfoMap.find(cl);

    return (it != fInfoMap.end() ? it->second : 0);
  }

  //------------------------------------------------------------------------------

  void ExRootCandidate::SetInfo(TObject *info)
  {
    fInfoMap[info->IsA()] = info;
  }

https://twiki.cern.ch/twiki/bin/view/CMSPublic/SWGuidePATUserData

http://fastjet.fr/repo/doxygen-3.0.2/classfastjet_1_1PseudoJet.html

http://fastjet.fr/repo/doxygen-3.0.2/classfastjet_1_1PseudoJet_1_1UserInfoBase.html

https://server06.fynu.ucl.ac.be/projects/ExRootAnalysis/browser/trunk/ExRootAnalysis/ExRootCandidate.h

  1. Modules that consume and produce collections of universal objects (see ROOT TTask & TFolder)

http://root.cern.ch/download/doc/ROOTUsersGuideHTML/ch10.html

http://root.cern.ch/root/html/TTask.html

http://root.cern.ch/root/html/TFolder.html

Note: See TracWiki for help on using the wiki.