Back to home page

EIC code displayed by LXR

 
 

    


Warning, /snippets/Tracking/BackgroundStudy/README.md is written in an unsupported language. File is not indexed.

0001 # Example scripts for tracking performance study with beam background
0002 * See https://indico.bnl.gov/event/29753/
0003 * contact: Shujie Li, shujieli@lbl.gov
0004 ### Note to general physics analysis:
0005 only use tracks with at least 4 hits, e.g.  __CentralCKFTrajectories.nMeaurements>3__ 
0006 
0007 ## run_merger.sh: 
0008 This is an example script to generate small sample of background mixed hepmc file locally.
0009 
0010 Pleae always use background files from the simulation campaign data (https://eic.github.io/epic-prod/) when possible 
0011 
0012 ### pre-requists:
0013    1.  install SignalBackgroundMerger from https://github.com/eic/HEPMC_Merger
0014    2.  recommend to run within eic-shell to use the xrdfs command
0015 
0016  run as: ./run_merger.sh, then follow the options.
0017 
0018 * Mixing frequencies can be found on [ePIC background Wiki](https://wiki.bnl.gov/EPIC/index.php?title=Background)
0019 * Explanations on [mixing scheme](https://github.com/eic/eic.github.io/blob/master/_resources/background_mixed_samples.md)
0020 
0021 * For SR and electron beam gas, please also read README files under JLab ifarm (contact: Andrii Natochii):
0022     SynRad: /volatile/eic/andrii/SynradG4_HepMC_Files_SR_on_IP6
0023     ESR beam losses: /volatile/eic/andrii/Xsuite_HepMC_Files_ESR_BeamLoss_on_ePIC
0024 
0025 * 1000 merged events at 18GeV takes about 2 hours for dd4hep+eicrecon. The 5 and 10 GeV mixed events will be 10x slower due to higher SR freq. Use the simulation campaign file if you can. 
0026 
0027 * You need then run npsim with the generated hepmc file and corresponding flags.
0028 
0029 
0030 ## epic_analysis-ak_example.ipynb
0031 example python script to pull out background particle distributions, hit rate per detector area, and track efficiency and purity etc.  It uses uproot (>2.7), seaborn, particle, and a few other python modules. You may need to pip install them. 
0032 
0033 Please navigate the jupyter notebook with section titles. One should be able to convert relevant code to plain python script, or ROOT/C easily with chatgpt. 
0034 
0035 * The ___inspect...___ section does not depend on podio
0036    1. plot mcparticle generator status (signal or backgrounds)
0037    2. plot number of detector hit on a given Silicon tracker surface per ms per unit area, see [this talk](https://indico.bnl.gov/event/29602/contributions/112847/attachments/64502/110757/background_rate_09022025.pdf)
0038 * to run the ___hit-based analysis___ section:
0039    1. in eic-shell, type jupyer-lab to start the server (may take a minute)
0040    2. copy the localhost link to your browser or editor to open the notebook
0041    3. select the kernel provided by eic-shell to use podio modules
0042 
0043    key functions: get_traj_hits, get_part_hits. Most interesting plots are under subsection "efficiency" and "track purity"
0044 
0045     
0046