Warning, /eic.github.io/_software/rapgap.md is written in an unsupported language. File is not indexed.
0001 ---
0002 title: RAPGAP
0003 name: rapgap
0004 category: rapgap
0005 layout: default
0006 ---
0007
0008 {% include layouts/title.md %}
0009
0010 * TOC
0011 {:toc}
0012
0013
0014 #### About
0015
0016 RAPGAP is a Monte Carlo generator which can be used to generate both DIS and Diffractive e+p events.
0017
0018 Currently hosted on [GitLab](https://gitlab.com/eic/mceg/RAPGAP-3.302)
0019
0020 Contact (for this version)
0021 * Kolja Kauder <kkauder@bnl.gov>
0022
0023
0024 #### Available Documentation
0025
0026 * Manual: [rapgap.pdf](http://projects.hepforge.org/rapgap/rapgap.pdf)
0027 * www-page: [http://projects.hepforge.org/rapgap/]
0028 * RAPGAP has radiative corrections included. The program used is HERACLES. Info can be found [here](http://www.desy.de/~hspiesb/heracles.html)
0029 * [Here](https://wiki.bnl.gov/eic/index.php/RAPGAP_compile) are some notes how to compile rapgap-32 for 32-bit and 64bit on the racf-cluster.
0030 * <span style="color:red">Warning:</span> Prior to version 3.1, Rapgap had a known bug; to calculate t from the incoming and outgoing proton did not work. However, the current version is 3.3.
0031
0032 #### Running RAPGAP
0033
0034 An installation of RAPGAP can be found in the EIC cmvfs region at
0035 ```sh
0036 $EICDIRECTORY/PACKAGES/RAPGAP-3.302
0037 ```
0038
0039 When you run RAPGAP, you will create large text files as output.
0040 Therefore, you should do so from an appropriate DATA directory.
0041 Inside this directory, you should create a soft link to the rapgap executable code:
0042 ```sh
0043 ln -s $EICDIRECTORY/bin/rapgap33
0044 ```
0045
0046 Now, you need to copy a steer file from the RAPGAP directory to your own directory,
0047 so you can edit it and run what you wish. For example:
0048 ```sh
0049 cp $EICDIRECTORY/PACKAGES/RAPGAP-3.302/data/steer-ep steer
0050 ```
0051
0052 Once this is done, you are ready to run. Once you have edited the file, then you run with the command:
0053 ```sh
0054 ./rapgap33 < steer > rapgap.log
0055 ```
0056
0057 This creates a text file named `rapgap.txt` with the raw rapgap output. At this point, you are ready to create a ROOT tree and analyze your data.
0058
0059
0060 #### Output file structure
0061 The ascii output, `rapgap.txt`, has the following structure:
0062
0063 * 1st line: RAPGAP EVENT FILE
0064 * 2nd line: "============================================"
0065 * 3rd line: Information on event wise variables stored in the file
0066
0067 | I: | 0 \(line index\) |
0068 |---------------------------------------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------|
0069 | ievent: | eventnumber running from 1 to XXX |
0070 | genevent: | trials to generate this event |
0071 | subprocess: | generated subprocess, for details see page in the rapgap\-manual |
0072 | idir: | select type of events to be generated |
0073 | | = 1 standard inelastic scattering |
0074 | | = 0 diffractive and pion exchange processes |
0075 | idisdif: | mixing of standard inelastic scattering, diffractive and pion exchange processes according to cross section |
0076 | | 0 generates only the processes selected by IDIR\. |
0077 | | 1 mixing of standard inelastic and diffractive processes\. |
0078 | | 2 mixing of standard inelastic, diffractive and pion exchange processes |
0079 | cross section: | integrated cross section |
0080 | error on cross section: | standard deviation of integrated cross section |
0081 | s: | total center of mass energy |
0082 | Q2, y: | in lepto\-production: actual Q2 of γ; energy fraction lost by incident electron |
0083 | | If radiative corrections are turned on they are different from what is calculated from the scattered lepton\. |
0084 | | If radiative corrections are turned off they are the same as what is calculated from the scattered lepton |
0085 | xgam: | energy fraction of parton on electron side |
0086 | xpr: | energy fraction of parton on proton side |
0087 | pt\_hat: | phat\_⊥ \[GeV/c\] of parton in hard subprocess cm system |
0088 | pt2\_hat: | phat^2\_⊥ \[GeV2/c2\] of parton in hard subprocess cm system |
0089 | s\_hat: | invariant mass ˆs \[GeV2\] of hard subprocess |
0090 | t\_hat: | for diffractive processes T2GKI = t \[GeV2\] |
0091 | x\_pom: | for diffractive processes XFGKI = xIP |
0092 | s\_hat: | shat of hard subprocess |
0093 | z: | z = p\_i\*p\_f/p\_i\*q = ZQGKI |
0094 | x: | xp = Q2/2p\_i\*q = XPGKI |
0095 | phi: | φ = PHIGKI azimuthal angle |
0096 | nrTracks: | number of tracks in this event, includes also virtual particles |
0097 {:.table-bordered}
0098 {:.table-striped}
0099 <br />
0100
0101 * 4th line: "============================================"
0102 * 5th line: Information on track wise variables stored in the file
0103
0104 | I: | line index, runs from 1 to number of particles |
0105 | ------- | -------------------------------------------------------------------------------------------------------- |
0106 | K(I,1): | status code KS (1: stable particles 11: particles which decay 55; radiative photon) |
0107 | K(I,2): | particle KF code (211: pion, 2112:n, ....) |
0108 | K(I,3): | line number of parent particle |
0109 | K(I,4): | normally the line number of the first daughter; it is 0 for an undecayed particle or unfragmented parton |
0110 | K(I,5): | normally the line number of the last daughter; it is 0 for an undecayed particle or unfragmented parton. |
0111 | P(I,1): | px of particle |
0112 | P(I,2): | py of particle |
0113 | P(I,3): | pz of particle |
0114 | P(I,4): | Energy of particle |
0115 | P(I,5): | mass of particle |
0116 | V(I,1): | x vertex information |
0117 | V(I,2): | y vertex information |
0118 | V(I,3): | z vertex information |
0119 {:.table-bordered}
0120 {:.table-striped}
0121 <br />
0122
0123 * 6th line: "============================================"
0124 * 7th line: event information for first event
0125 * 8th line: "============================================"
0126 * 9th to X-1 line: track-wise info of 1st event
0127 * Xth line "=============== Event finished ==============="
0128
0129 **The information from line 7 to X-1 repeats for each event.**
0130
0131 #### How to analyze events
0132 Create a ROOT tree using the [eic-smear](eicsmear.html#tree-generation) package.
0133
0134 #### Additional Information
0135
0136 * We recommend against using version 3.303. The changes made to support LHAPDF6
0137 seem to make using LHAPDF5 impossible
0138
0139 * A number of completed RAPGAP data files for various e+p energies are stored on RCF
0140 and can be [made available](../resources/storage.html) upon request.
0141
0142 <br />
0143 <br />
0144 <br />