Offline Software


Getting started with plots for the FGT

(some old documentation on how to read MuDSTs:
Prepare your libraries
If you're brand new or starting fresh directory for FGT, you'll need to check out some files... This is a list of all the offline FGT software you're likely to need for whatever it is you're working on...
> mkdir mydir
> cd mydir
> cvs co StRoot/RTS
> cvs co StRoot/St_base
> cvs co StRoot/StEvent
> cvs co StRoot/StFgtA2CMaker
> cvs co StRoot/StFgtClusterMaker
> cvs co StRoot/StFgtDbMaker
> cvs co StRoot/StFgtPool
> cvs co StRoot/StFgtRawMaker
> cvs co offline/StFgtDevel/StRoot/StMuDSTMaker

> ln -s offline/StFgtDevel/StRoot/StFgtMuDSTMaker/ StRoot/StFgtMuDSTMaker

The last step is necessary since StFgtMuDSTMaker is not yet in devel.
Make sure you are in the proper STAR version (you want "development") and compile...
> starver dev
> cons

Pick your data
After your libraries installed correctly, pick a daq file for your FGT studies... (If you're using MuDST files this will be different..)
> ls /star/data03/daq/2012/xxx/13xxxyyy
where 13xxxyyy is the run number you want. (If the run number you want isn't there, restore the daq files yourself or ask somebody to do it.)
Before running over data, make sure to run klog to ensure you get a token to communicate with the database..
> klog

>For MuDSTFiles the corresponding #define directive in StFgtPool/StFgtClusterTools/StFgtGeneralBase.h has to be set.

Run over the data
To fill all the plots you want, you'll need to run this command (when sitting in mydir)...
> cd mydir
> root4star -b -q StRoot/StFgtPool/StFgtClusterTools/macros/agvEffs.C'("/star/data03/daq/2012/131/13173068p_rf/st_physics_13173068_raw_202001.root",10,10000,2)' > & output.txt
The above command will attempt to run over 10,000 events from the example daq file, using disc 2 as the disc that is removed for efficiency calculations. Piping the output to file is necessary in order to cut down on running time. On average, 10,000 events takes ~45 minutes as long as you use an output file.

Look at the plots
The agvEffs.C macro will output some .root files...
-clusterPics.root contains visual "pictures" of the first 1000 clusters found in the daq file.
-pulses.root counts pulses in the electronics etc
-signalShapes.root contains a whole heck of a lot of plots... To see exactly all that is put into signalShapes.root, take a look at StFgtClusterTools/StFgtGenAVEMaker.cxx
There are some friendly macros to help you pull out the plots you want in an organized way. Run these guys to output a whole ton of .png files. A few examples are...
> root4star -b -q StRoot/StFgtPool/StFgtClusterTools/macros/saveSignalChar.C'("signalShapes.root")' //this will output histograms per quadrant
> root4star -b -q StRoot/StFgtPool/StFgtClusterTools/macros/saveSignalCharAPV.C'("signalShapes.root")' //this will output histograms per APV
> root4star -b -q StRoot/StFgtPool/StFgtClusterTools/macros/saveClusterSizes.C'("signalShapes.root")' //this will output cluster size histograms per quadrant
For now it's been most convenient to just dump the .png files into your protected directory but hopefully something a little more elegant is on its way very soon...

Streamlining the process
Right now we have a shell script that pulls daq files name from a list and then runs over them one after the other, dumping the output .root files into a directory. Look around for things like "" and "l13173068.list" if you want to have a go at that.
> ./ > & output.txt
Coming soon: pre-written xml job for STAR scheduler.

Available data sets
Most recent runs are located in
Coming soon: plots better organized into a scroll-friendly format.