Skip to content
Daniel Brandenburg edited this page Jan 22, 2025 · 18 revisions

Welcome to the fwd-software wiki!

Weekly meetings

When: Wednesdays, 11am EST

ZOOM connection:
https://osu.zoom.us/j/92668696344?pwd=UVpzV2FmeU8ycGtaUzVtQ3FTNjJzdz09

Meeting notes / Presentations

  • January 22, 2025:
    • Discussion of the FWD software updates since ~October 2024 (mostly clean up and move of test cases out of FwdTrackMaker)
    • Request for some feedback on the Pythia sample (1M events in StEvent, MuDst, Pico) - need confidence for full production
    • Presentation from Xihe on Alignment:
    • David K: Update typo and det for the EPD location
    • Manny:
      • check fstFastSim BFC opt

TODO

  • Add scripts / directions to Wiki for running Pythia with FWD codes
  • We need a calendar of the data to see when we have data that works for various
  • Pico Dst Integration
  • [o] J/psi analysis
    • Prediction of events needed for a J/psi peak
    • J/psi analysis on data, basic QA

Accessing up-to-date code

Up-to-date private codes (not yet in STAR StRoot) can be found at https://github.com/jdbrice/star-sw-1

The dev branch has all of the new codes for FWD development:

git clone --no-checkout https://github.com/jdbrice/star-sw-1 star-sw-fwd
cd star-sw-fwd

git config core.sparseCheckout true
echo "StRoot/StFwd*" > .git/info/sparse-checkout
echo "StRoot/StFtt*" >> .git/info/sparse-checkout
echo "StRoot/StFst*" >> .git/info/sparse-checkout
echo "StRoot/StFcs*" >> .git/info/sparse-checkout
echo "StRoot/StMu*" >> .git/info/sparse-checkout
echo "StRoot/StEvent*" >> .git/info/sparse-checkout
echo "StRoot/StPico*" >> .git/info/sparse-checkout

git checkout dev

Note: The main branch is kept in sync with the star-bnl repo.

Environment on RCF / SDCC

The standard dev environment should work for all fwd macros:

starver dev

Note: In the docker container the environment is already initialized (in fact starver does not exist in the container)

Running single particle gun

ln -s StRoot/StFwdTrackMaker/macros/sim/ .
./sim/gen <nEvents> <pid>

this will generate a sim.fzd file

Ideal tracking (use truth info)

The scripts below will run sim.fzd in the project root directory. You can then run the ideal tracking (MC track finding + MC momentum as fit seed) with:

./sim/ideal-sim-ftt-seed <nEvents>

OR for FST seed finding:

./sim/ideal-sim-fst-seed <nEvents>

Realistic tracking on simulation

Realistic tracking does not use any truth information. It performs CA track finding from FST or FTT hits (per config). It performs track fitting using the seed points with a circle fit to determine initial momentum for the fit. The scripts below will run sim.fzd in the project root directory.

./sim/real-sim-ftt-seed <nEvents>

OR for FST seed finding

./sim/real-sim-fst-seed <nEvents>

Simulating J/psi

./sim/jpsi <nEvents>

This script can simulate $J/\psi \rightarrow e^+e^-$ or $J/\psi \rightarrow \mu^+\mu^-$ (change the decayToElectrons parameter. Then you can run tracking and analysis (StFwdJPSiMaker) with:

root4star -b -q -l 'sim/jpsi_ana.C(<nEvents>, "Output_JPSI.root", false, true, false )' >& LOG.log

Running Pythia (WIP)

How to run Pythia for the FWD tracking...

Running locally (using docker)

First, install and configure docker. Then run this from within the code directory (star-sw-fwd):

docker run --rm -ti -v `pwd`:/work/ --name fwd ghcr.io/star-bnl/star-sw:SL24a_0-root5-gcc11

The first time this will pull and extract the ghcr.io/star-bnl/star-sw:SL23f_0-root5-gcc11 image. If for some reason this image no longer works, you can find pre-built images at: https://github.com/star-bnl/star-sw/pkgs/container/star-sw just update the tag (e.g. SL23f_0-root5-gcc11 above) with some recent tag from the webpage.

inside the container:

cd /work/
export LD_LIBRARY_PATH=".sl79_gcc11/LIB:$LD_LIBRARY_PATH"
cons

root4star -b -q -l ...

Note: the LD_LIBRARY_PATH must be updated as above or the local code will not be seen by running scripts. If you use a different image, check the local build cache and update it (if different from .sl79_gcc11 as above).

Productions and locations

  • DAQ files on disk: /gpfs01/star/pwg_tasks/FwdCalib/DAQ
  • PicoDst productions: /gpfs01/star/pwg_tasks/FwdCalib/PROD/Pico
  • MuDst productions:
    • Small Low-lumi Zero Field production (private with Fwd) : /gpfs01/star/pwg_tasks/FwdCalib/PROD/ZeroField-10-05-2023-32bit
  • Standard productions:
  • Production of Run22 p+p (without fwd tracking) : get_file_list.pl -delim / -keys path,filename -cond production=P23if,trgsetupname=production_pp500_2022,filetype=daq_reco_mudst,storage=NFS -limit 100

2024 Production of st_fwd stream with no TPC and no tracking

  • Details
    • Production Tag: P24ia
    • Chain Options: "B2022a,BAna,ppOpt,trgd,ZDCvtx,fcs,fst,ftt,fstMuRawHit,-ITTF,-TpcIT,-iTpcIT,-tpx,-tpcx,-TpcHitMover,BEmcChkStat,-EventQA,-picoWrite"
    • All runs after and including 22359013
    • How to "get file list" of data on distributed disk get_file_list.pl -keys path,filename -cond 'trgsetupname=production_pp500_2022,filetype=daq_reco_mudst,production=P24ia,sname2=st_fwd' -distinct -delim '/' -limit 10
  • Sample files:
    • /star/data102/reco/production_pp500_2022/ReversedFullField/P24ia/2021/359/22359013/st_fwd_22359013_raw_1000039.MuDst.root
    • /star/data106/reco/production_pp500_2022/ReversedFullField/P24ia/2021/359/22359013/st_fwd_22359013_raw_1000040.MuDst.root

Valgrind check on RCF:

valgrind --leak-check=yes root4star -b -q -l 'sim/sim.C( 10000, "StFwdTrackMaker_ideal_sim_fst_seed.root", true, true, false )' >& valgrind_check.txt