This is the standard macros respository for sPHENIX collaboration. Following is the 10-min tutorial on using the sPHENIX macros from this wiki link.
Please follow SPHENIX software day-1 checklist to get started on RHIC computing facility at BNL, or follow the sPHENIX container setup for your own computing environment.
Download the newest macro repository from GitHub:
[jinhuang@rcas2073 test]$ git clone https://github.com/sPHENIX-Collaboration/macros.git
Cloning into 'macros'...
remote: Counting objects: 1125, done.
remote: Total 1125 (delta 0), reused 0 (delta 0), pack-reused 1125
Receiving objects: 100% (1125/1125), 181.75 KiB | 0 bytes/s, done.
Resolving deltas: 100% (471/471), done.
Checking connectivity... done.
[jinhuang@rcas2073 test]$ cd macros/detectors
[jinhuang@rcas2073 detectors]$ # here are all the subdirectories with macros to run sPHENIX, fsPHENIX and EIC detector simulations
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.
Then let's see what is implemented by firing up one event:
[jinhuang@rcas2072 sPHENIX]$ source /opt/sphenix/core/bin/sphenix_setup.csh -n # setup sPHENIX environment if not already done so
# Note, for bash users, please use /opt/sphenix/core/bin/sphenix_setup.sh instead
[jinhuang@rcas2072 sPHENIX]$ root
root [] .x Fun4All_G4_sPHENIX.C(-1) // here negative value in event number start an event display of one event
root [] .L DisplayOn.C
root [] PHG4Reco* g4 = DisplayOn()
root [] Fun4AllServer *se = Fun4AllServer::instance();
root [] se->run(1)
root [] displaycmd() # this one show more Geant4 command we can run from the ROOT prompt
This is simpler, just run with first parameter as the intended number of event:
[jinhuang@rcas2072 sPHENIX]$ source /opt/sphenix/core/bin/sphenix_setup.csh -n # setup sPHENIX environment if not already done so
[jinhuang@rcas2072 sPHENIX]$ root
root [] .x Fun4All_G4_sPHENIX.C(10) // run 10 events
Now you are able to run the whole sPHENIX simulation + reconstruction chain. Many next-step topics are listed in the software page. And specifically, to use the simulation for your study, a few thing you might want to try:
- Checkout the evaluator Ntuples output from your 10 events for a generic look of the reconstructed data.
- Run sPHENIX software tutorials.
- Write your analysis module for more dedicated analysis, for which the module produced the evaluator NTuple (CaloEvaluator, JetEvaluator, SvtxEvaluator) can usually serve as good examples.