Warning, /HEPMC_Merger/README.md is written in an unsupported language. File is not indexed.
0001 # EPIC HEPMC MERGER
0002 ## Original author: Benjamen Sterwerf, UC Berkeley (bsterwerf@berkeley.edu)
0003 ## Maintainer of the C++ implementation: Kolja Kauder (kkauder@bn=l.gov)
0004 This code is used to combine HEPMC files. You can run this code as:
0005
0006 ```bash
0007 ./SignalBackgroundMerger --signalFile dis.hepmc --signalFreq 0 \
0008 --bg1File hgas.hepmc --bg1Freq 31.9 \
0009 --bg2File egas.hepmc --bg2Freq 3177.25 \
0010 --bg3File sr.hepmc
0011 ```
0012
0013 Without input flags, `./SignalBackgroundMerger` will create 10k time frames of 2 nanosecond legths streaming in input files from XrootD and uses frequencies from https://wiki.bnl.gov/EPIC/index.php?title=Background
0014
0015 For more information run:
0016
0017 ```bash
0018 ./SignalBackgroundMerger --help
0019 ```
0020
0021 ## Software:
0022 - Standalone framework independent C++ code
0023 - Supports all HepMC input and output formats such as `hepmc3.tree.root`
0024 - Supports streaming I/O via XrootD
0025 - Supports weighted inputs such as coming from legacy SR data (though this is currenbtly not recommended. Instead use newer SR input once available)
0026 - A legacy python version exists in the python subdirectory. It is known to treat weighted input slightly wrong.
0027
0028 ## Installation
0029 Prerequisites: ROOT, HepMC
0030 Includes the header Argument Parser library argparse by Pranav Srinivas Kumar under the MIT license
0031
0032 ```bash
0033 git clone https://github.com/eic/HEPMC_Merger.git
0034 mkdir -p HEPMC_Merger/build
0035 cd HEPMC_Merger/build
0036 cmake ..
0037 make
0038 ```
0039
0040
0041 <!-- Preinstalled versions are available in [ATHENA containers](https://doc.athena-eic.org/en/latest/overview/containers.html). -->
0042
0043
0044 ## Logic:
0045 For a given time frame, the number of signal and background events to place is drawn from a Poisson distribution corresponding to its frequency. Events are then distributed uniformly within the frame.
0046
0047 If the signal frequency is set to 0, exactly one signal event will be placed in the slice.
0048
0049 If a background frequency is set to 0, events are instead drawn from a weighted distribution that must be provided by the weights in the input file. This functionality should not be needed much longer since Synchrotron radiation files will in the future be provided in the same format as all other input files.
0050
0051 Note: When the end of a background file is reached, it cycles back to the beginning.
0052
0053