STAR   Computing Tutorials main page
Grid Collector Tutorial
Offline computing tutorial Maintained by John Wu

This is a short tutorial explaining the key steps to use Grid Collector (GC) software for STAR offline analysis. If you are using computers at RCF (BNL) or PDSF (NERSC), this should get you started. To go further, you might want to look at the longer version. Feel free to contact the maintainer of Grid Collector with your questions or comments.

ATTENTION: The GridCollector rely on both tags and a bitmap index to be build. If it is not in place, this tool will not work.

  1. A brief introduction
    Grid Collector provides an extension to the existing STAR analysis framework. It enables users to specify events of interest as conditions on tags. This allows the analysis code to read only the events of interest and speedups the analysis process. The word 'collector' in the name refers to this capability of 'collecting' events of interest for analyses. It is also a 'Grid' software because it is able to transfer files over the Grid on demand. This eliminate the need for the user to explicitly retrieve the files from HPSS or other storage sites.

  2. An example
    Here is an example of using doEvents.C with GC:
    root4star -b -q doEvents.C'(25,"select MuDst where Production=P04ie \
    and trgSetupName=production62GeV and magScale=ReversedFullField \
    and chargedMultiplicity>3300 and NV0>200", "gc,dbon")'
    
    It selects and analyzes 25 out of 1.2K events in two MuDst data files. Its output message is saved in P04ie_GC.log which may be helpful in understanding how GC works.

    The basic syntax of a Grid Collector command is

    [SELECT fileTypes [additional options]] WHERE condtions 
    The statment is not case sensitive. As usual, the content inside square brackets '[]' is optional. If the select clause is ommited, "SELECT event" is assumed. For more explanation of the syntax of the select statement used above, please refer to the long tutorial. In addition to 'production', 'trgSetupName' and 'magScale', the names appeared in tags.root files can also be used. Tags from different productions are different, here is a list of names available in a recent production named P05ia.

  3. How to write analysis macros
    StIOMaker is required!

    Analysis macros that use StIOMaker typically define a StFileI* variable, for example,

    StFileI* setFiles = new StFile("files");
    To use GC, simply initialize the same variable with StGridCollector::Create() as follows,
    StFileI* setFiles = StGridCollector::Create("select ...");
    The variable setFiles can be used in the creation of StIOMaker as usual.

  4. Where to find the examples
    They can be checked out from CVS. Please find StAnalysisMaker and StMuAnalysisMaker in $STAR/StRoot/ and doEvents.C in $STAR/StRoot/macros/analysis/

  5. Support
    If you have questions about GC and its application, please contact
    John Wu (John.Wu@nersc.gov)
    Jerome Lauret (jeromel@bnl.gov)
    Wei-Ming Zhang (zhang@hpacq.kent.edu)