StarSpinLibraries on OS X

Update 2007-07-19

StGammaEvent libraries are also available through this same project.  After building all targets you can do

gSystem->Load("StGammaEvent")
or just load StarSpinAnalyses, which will load StGammaEvent on-the-fly.  Everything not ending in "Maker" should be accessible, i.e. StGammaCandidates, StGammaFitterResults, etc.



One of the goals of the common Spin PWG analysis trees was that they should be readable without the full STAR framework.  The trees are certainly accessible in a plain interactive session, but some of the features are only really available if the class definitions have been loaded.  This page shows how to build those class libraries on a Mac with only ROOT installed.  Here's what we're going to do:
  1. Check out the Xcode project.  See SVN Repository Access if you don't have a Subversion client installed
  2. Set up the installation directory for the dynamic libraries and tell ROOT to look there
  3. Build the dynamic libraries and install them
  4. Test it out
The code for the first three steps is just

svn co http://deltag5.lns.mit.edu:8080/svn/StarSpinLibraries
cd StarSpinLibraries
./setup.sh
xcodebuild -alltargets

Then you can test it out by opening a ROOT session and doing

gSystem->Load("StarClassLibrary")
gSystem->Load("StMiniMcEvent")
gSystem->Load("StarSpinAnalyses")
gSystem->Load("StJets")

What's Included?

You've just installed four dynamic libraries in /usr/local/lib/star.  The StarClassLibrary and StMiniMcEvent targets build exact copies of the respective libraries from the StRoot framework.  StarSpinAnalyses includes
  • StJetSkimEvent
  • StJet
  • StChargedPionTrack
  • TPi0Candidate
  • StSpinTreeReader
  • FastAsymmetryMaker
  • StTamuRelLum
In other words, everything needed to read the current version of the common Spin PWG trees.  The StJets library includes the StJets and TrackToJetIndex class definitions.  You'll need it to read the raw jet trees.  Note that the StJetReader class is not yet included (planned for the future when I get a moment).

These libraries are installed and ready to use on deltag5, provided you modify your .rootrc to look in /usr/local/lib/star (setup.sh does this for you automatically if you're building from scratch).  Mike Betancourt was my lone beta tester and while we worked out a handful of glitches, I imagine there are use cases I haven't thought of yet.  In particular, the Xcode project assumes ROOT is installed in /sw. You'll need to edit some Project-level settings if that's not the case.  Feel free to contact me if you run into any problems.