Warning, /DEMPgen/src/eic_evgen/README.md is written in an unsupported language. File is not indexed.
0001 # eic_evgen
0002 This is an event generator for deep exclusive electro pion production at EIC.
0003
0004 First make two directories:
0005
0006 mkdir LundFiles
0007 mkdir RootFiles
0008
0009 This generator uses ROOT libraries. To compile please use following command:
0010
0011 g++ -o eic eic.cxx `root-config --cflags --glibs`
0012
0013 This generator is valid for:
0014 5.0 < Qsq < 35 GeV^2
0015 2.0 < w < 10 GeV
0016 0 < -t < 1.3 GeV^2
0017
0018 It can generates a root file, a txt file and a dat file. Generation of Root
0019 file is turned off. dat file is written in lund format to use in eic_gemc
0020
0021 The last line in txt file "Number of lund events" shows how many events
0022 are successfully generated. Use this number in gcard of eic_gemc
0023
0024 Follwing is the format of dat file:
0025
0026 ppiOut << "3"
0027 << " \t " << fPhi // var 1
0028 << " \t " << fPhiS // var 2
0029 << " \t " << fx // var 3
0030 << " \t " << "1"
0031 << " \t " << fQsq_GeV // var 4
0032 << " \t " << fT_GeV // var 5
0033 << " \t " << fW_GeV // var 6
0034 << " \t " << fEpsilon // var 7
0035 << " \t " << fEventWeight // var 8
0036 << endl;
0037
0038 // Pion -
0039 ppiOut << setw(10) << "1"
0040 << setw(10) << "1"
0041 << setw(10) << "1"
0042 << setw(10) << "211"
0043 << setw(10) << "0"
0044 << setw(10) << "0"
0045 << setw(16) << lpiong.X()
0046 << setw(16) << lpiong.Y()
0047 << setw(16) << lpiong.Z()
0048 << setw(16) << lpiong.E()
0049 << setw(16) << fPion_Mass_GeV
0050 << setw(16) << fVertex_X
0051 << setw(16) << fVertex_Y
0052 << setw(16) << fVertex_Z
0053 << endl;
0054
0055 // Electron
0056 ppiOut << setw(10) << "2"
0057 << setw(10) << "-1"
0058 << setw(10) << "1"
0059 << setw(10) << "11"
0060 << setw(10) << "0"
0061 << setw(10) << "0"
0062 << setw(16) << lscatelecg.X()
0063 << setw(16) << lscatelecg.Y()
0064 << setw(16) << lscatelecg.Z()
0065 << setw(16) << lscatelecg.E()
0066 << setw(16) << fElectron_Mass_GeV
0067 << setw(16) << fVertex_X
0068 << setw(16) << fVertex_Y
0069 << setw(16) << fVertex_Z
0070 << endl;
0071
0072 // Neutron
0073 ppiOut << setw(10) << "3"
0074 << setw(10) << "1"
0075 << setw(10) << "1"
0076 << setw(10) << "2112"
0077 << setw(10) << "0"
0078 << setw(10) << "0"
0079 << setw(16) << lneutrong.X()
0080 << setw(16) << lneutrong.Y()
0081 << setw(16) << lneutrong.Z()
0082 << setw(16) << lneutrong.E()
0083 << setw(16) << fNeutron_Mass_GeV
0084 << setw(16) << fVertex_X
0085 << setw(16) << fVertex_Y
0086 << setw(16) << fVertex_Z
0087 << endl;
0088
0089
0090 Please note that event weight of a single evevnt is normalized to total
0091 events tried so you dont need to know the ratio of events generated to
0092 events tried, just use the "fEventWeight" for each event
0093
0094 For a quick check just run the follwing command in c-shell
0095
0096 source ./runEIC.csh
0097
0098 Note 1:
0099 fEventWeight is a negative number because of the phase space of scattered
0100 electron.
0101
0102 Note 2:
0103 Lets say you generate "N" dat files and then generate "N" root files using
0104 eic_gemc. When you combine these eic_gemc generated "N" files using hadd
0105 command of root (or using your own script) then in your analysis code you
0106 must divide the eighth variable of header tree(which contains the event
0107 event weight) by "N"
0108
0109 header->SetBranchAddress("var8",&var8);
0110
0111 weight = -var8->at(0)/300.0;