GithubHelp home page GithubHelp logo

sphenix-collaboration / macros Goto Github PK

View Code? Open in Web Editor NEW
9.0 17.0 130.0 2.98 MB

Official macros to run sPHENIX coresoftware. Welcome to fork and to edit for your own studies.

Home Page: https://wiki.bnl.gov/sPHENIX/index.php/Software

C 93.81% Shell 6.08% C++ 0.12%
core tutorial

macros's Introduction

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.

Build Status Doxygen Singularity

Open Issues Open Pull Request Monthly Commits Last Commit

Get started

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.

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/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.

Try an event display

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

Run more events

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

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:

macros's People

Contributors

adfrawley avatar ahodges21 avatar bi-ran avatar bkimelman avatar blackcathj avatar bogui56 avatar bseidlit avatar cdean-github avatar david-stewart avatar devloom avatar dvperepelitsa avatar eumaka avatar gmitsuka avatar hrjheng avatar hupereir avatar jdosbo avatar johnlajoie avatar jtaou avatar mccumbermike avatar mchiu-bnl avatar nfeege avatar nukazuka avatar osbornjd avatar pinkenburg avatar ruse-traveler avatar shuonli avatar shura95 avatar sunxuhit avatar timothyrinn avatar vbailey2 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

macros's Issues

getting applied Driftvelocity in Fun4AllG4_sPHENIX.C macro bound to fail

Getting the applied drift velocity from the registered module via:
double TPCDriftVelocity = dr->get_double_param("drift_velocity");
is bound to go wrong. This will only return the default value which is set in the compiled module. If this velocity is changed in the macro or read from a DST (or DB or file) this will only be applied during the BeginRun() and you end up using the wrong drift velocity in this macro

Shall we keep a macro only repository?

This repository seems only contain some macros.

Shall we move it to be part of the coresoftware repository, as an official macro directory to drive the core simulation. A good place could be
coresoftware/simulation/g4simulation/macro/

Tracking macros deviate in branches

The latest commits basically broke the tracking macros. Tony's change for the mvtx charge diffusion went into the master branch rendering the root6 capable G4_Tracking.C macro which so far resides on the branch ModularizedTrackReco broken. The fix for the intt went into ModularizedTrackReco branch probably leaving the macros on the master branch broken. This setup really impacts our productivity, not sure why we thought this is a good idea doing this for more than a few days

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.