Back to home page

EIC code displayed by LXR

 
 

    


Warning, /SR_event_generator/README.md is written in an unsupported language. File is not indexed.

0001 # Synchrotron-radiation event generator from Synrad+ table
0002 
0003 authors: Reynier Cruz-Torres^, Benjamen Sterwerf^^
0004 
0005 -^ Lawrence Berkeley National Laboratory
0006 
0007 -^^ University of California, Berkeley
0008 
0009 -----
0010 
0011 1. Download csv file stored [here](https://drive.google.com/file/d/1XX78_qeuoMK8xhuOB5QgbUyye7Lv_xPg/view?usp=sharing). You can get this file following one of the two methods below:
0012 
0013 ```bash
0014 wget -O combined_data.csv 'https://drive.google.com/uc?export=download&id=1XX78_qeuoMK8xhuOB5QgbUyye7Lv_xPg&confirm=no_antivirus'
0015 ```
0016 
0017 or
0018 
0019 ```bash
0020 curl -L 'https://drive.google.com/uc?export=download&id=1XX78_qeuoMK8xhuOB5QgbUyye7Lv_xPg&confirm=no_antivirus' > combined_data.csv
0021 ```
0022 
0023 2. Create a yaml configuration file (e.g. ```config.yaml```) with the following information:
0024 
0025         - ```input_single_photons```: path to csv file downloaded in step 1.
0026         - ```n_events```: number of events to be generated.
0027         - ```integration_window```: time window that will define one event.
0028         - ```seed```: random seed for reproducibility. Set to 0 to leave the seed unconstrained.
0029 
0030 3. Run the generator as: 
0031 
0032 ```bash
0033 python3 sr_generator.py --configFile config.yaml
0034 ```
0035 
0036 -----
0037 
0038 Libraries needed to run this notebook: ```pyyaml```, ```numpy```, ```matplotlib```, ```pandas```, ```pyhepmc```, ```ROOT```, ```os```, ```argparse``` and ```time```.
0039 
0040 If you have trouble getting pyroot to work, [this](https://root-forum.cern.ch/t/cannot-import-root-6-22-in-python-3-9-1-could-not-load-cppyy-backend-library/43764/8) may be useful.
0041 
0042 
0043 
0044 
0045 
0046 
0047 
0048 
0049 
0050 
0051 
0052 
0053