Back to home page

sPhenix code displayed by LXR

 
 

    


Warning, /macros/README.md is written in an unsupported language. File is not indexed.

0001 
0002 # Welcome
0003 
0004 This is the standard macros respository for [sPHENIX collaboration](https://www.sphenix.bnl.gov/). Following is the 10-min tutorial on using the sPHENIX macros from [this wiki link](https://wiki.bnl.gov/sPHENIX/index.php/Tutorial/sPHENIX_simulation).
0005 
0006 [![Build Status](https://web.sdcc.bnl.gov/jenkins-sphenix/buildStatus/icon?job=sPHENIX/sPHENIX_CoreSoftware_MasterBranch)](https://web.sdcc.bnl.gov/jenkins-sphenix/job/sPHENIX/job/sPHENIX_CoreSoftware_MasterBranch/)
0007 [![Doxygen](https://img.shields.io/badge/code%20reference-Doxygen-green.svg)](https://www.phenix.bnl.gov/WWW/sPHENIX/doxygen/html/)
0008 [![Singularity](https://img.shields.io/badge/container-Singularity%20via%20CVMFS-green.svg)](https://github.com/sPHENIX-Collaboration/Singularity)
0009 
0010 [![Open Issues](https://img.shields.io/github/issues/sPHENIX-Collaboration/macros.svg)](https://github.com/sPHENIX-Collaboration/macros/issues)
0011 [![Open Pull Request](https://img.shields.io/github/issues-pr/sPHENIX-Collaboration/macros.svg)](https://github.com/sPHENIX-Collaboration/macros/pulls)
0012 [![Monthly Commits](https://img.shields.io/github/commit-activity/m/sPHENIX-Collaboration/macros.svg)](https://github.com/sPHENIX-Collaboration/macros/commits/master)
0013 [![Last Commit](https://img.shields.io/github/last-commit/sPHENIX-Collaboration/macros.svg)](https://github.com/sPHENIX-Collaboration/macros/commits/master)
0014 
0015 # Get started
0016 
0017 Please follow [SPHENIX software day-1 checklist](https://wiki.bnl.gov/sPHENIX/index.php/SPHENIX_software_day-1_checklist) to get started on [RHIC computing facility at BNL](https://www.racf.bnl.gov/), or follow the [sPHENIX container setup](https://github.com/sPHENIX-Collaboration/Singularity) for your own computing environment.
0018 
0019 # Check out macro repository
0020 
0021 Download the newest macro repository from GitHub:
0022 
0023 ```
0024 [jinhuang@rcas2073 test]$ git clone https://github.com/sPHENIX-Collaboration/macros.git
0025 Cloning into 'macros'...
0026 remote: Counting objects: 1125, done.
0027 remote: Total 1125 (delta 0), reused 0 (delta 0), pack-reused 1125
0028 Receiving objects: 100% (1125/1125), 181.75 KiB | 0 bytes/s, done.
0029 Resolving deltas: 100% (471/471), done.
0030 Checking connectivity... done.
0031 [jinhuang@rcas2073 test]$ cd macros/detectors
0032 [jinhuang@rcas2073 detectors]$ # here are all the subdirectories with macros to run sPHENIX, fsPHENIX and EIC detector simulations
0033 ```
0034 
0035 The default sPHENIX simulation + reconstruction macro is Fun4All_G4_sPHENIX.C, which is self-explanatory. It is not a black box!. You are welcome to open/edit it to work for your purpose of study.
0036 
0037 # Try an event display
0038 
0039 Then let's see what is implemented by firing up one event:
0040 ```
0041 [jinhuang@rcas2072 sPHENIX]$ source /opt/sphenix/core/bin/sphenix_setup.csh -n   # setup sPHENIX environment if not already done so
0042 # Note, for bash users, please use /opt/sphenix/core/bin/sphenix_setup.sh instead
0043 [jinhuang@rcas2072 sPHENIX]$ root
0044 root [] .x Fun4All_G4_sPHENIX.C(-1) // here negative value in event number start an event display of one event
0045 root [] .L DisplayOn.C 
0046 root [] PHG4Reco* g4 = DisplayOn()
0047 root [] Fun4AllServer *se = Fun4AllServer::instance();
0048 root [] se->run(1)
0049 root [] displaycmd() # this one show more Geant4 command we can run from the ROOT prompt
0050 ```
0051 
0052 
0053 # Run more events
0054 
0055 This is simpler, just run with first parameter as the intended number of event:
0056 ```
0057 [jinhuang@rcas2072 sPHENIX]$ source /opt/sphenix/core/bin/sphenix_setup.csh -n   # setup sPHENIX environment if not already done so
0058 [jinhuang@rcas2072 sPHENIX]$ root
0059 root [] .x Fun4All_G4_sPHENIX.C(10) // run 10 events
0060 ```
0061 
0062 # What next?
0063 
0064 Now you are able to run the whole sPHENIX simulation + reconstruction chain. Many next-step topics are listed in the [software](https://wiki.bnl.gov/sPHENIX/index.php/Software) page. And specifically, to use the simulation for your study, a few thing you might want to try:
0065 
0066 * Checkout the [evaluator Ntuples](https://wiki.bnl.gov/sPHENIX/index.php/Tracking) output from your 10 events for a generic look of the reconstructed data.
0067 * Run [sPHENIX software tutorials](https://github.com/sPHENIX-Collaboration/tutorials).
0068 * [Write your analysis module for more dedicated analysis](https://wiki.bnl.gov/sPHENIX/index.php/Example_of_using_DST_nodes), for which the module produced the evaluator NTuple ([CaloEvaluator](https://sphenix-collaboration.github.io/doxygen/dd/d59/classCaloEvaluator.html), [JetEvaluator](https://sphenix-collaboration.github.io/doxygen/dd/d59/classCaloEvaluator.html), [SvtxEvaluator](https://sphenix-collaboration.github.io/doxygen/d6/d11/classSvtxEvaluator.html)) can usually serve as good examples.