Skip to content

johnlajoie/macros

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 

Repository files navigation

Welcome

This is the standard macros respository for sPHENIX collaboration. Following is the 10-min tutorial on using the sPHENIX macros from this wiki link.

Get started

Please follow SPHENIX software day-1 checklist to get started.

Check out macro repository

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/macros/g4simulations/
[jinhuang@rcas2073 g4simulations]$ # here is all the macros to run fsPHENIX and sPHENIX 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.

Try an event display

Then let's see what is implemented by firing up one event:

[jinhuang@rcas2072 macros]$ 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 macros]$ 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

Run more events

This is simpler, just run with first parameter as the intended number of event:

[jinhuang@rcas2072 macros]$ source /opt/sphenix/core/bin/sphenix_setup.csh -n   # setup sPHENIX environment if not already done so
[jinhuang@rcas2072 macros]$ root
root [] .x Fun4All_G4_sPHENIX.C(10) // run 10 events

What next?

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:

About

Official macros to run sPHENIX coresoftware

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages

  • C 99.6%
  • C++ 0.4%