Back to home page

EIC code displayed by LXR

 
 

    


Warning, /eic.github.io/_software/elspectro.md is written in an unsupported language. File is not indexed.

0001 ---
0002 title: elSpectro
0003 name: elspectro
0004 category: elspectro
0005 layout: default
0006 ---
0007 
0008 {% include layouts/title.md %}
0009 
0010 * TOC
0011 {:toc}
0012 
0013 
0014 #### About
0015 
0016 Event Generator framework for incorporating Spectroscopy into electro / photoproduction reactions.
0017 
0018 Currently hosted on [GitHub](https://github.com/dglazier/elSpectro),
0019 please refer to README there for the most up-to-date information.
0020 
0021 Contacts
0022 * [Derek Glazier](https://github.com/dglazier)
0023 
0024 #### Running
0025 To run the preinstalled package on cvmfs (natively at the labs
0026 or via [singularity](/software/eicsmear_generators_singularity.html)),
0027 first prepare the environment:
0028 ```
0029 setenv LD_LIBRARY_PATH ${EICDIRECTORY}/gcc-8.3/:${LD_LIBRARY_PATH}
0030 source /cvmfs/sphenix.sdcc.bnl.gov/gcc-8.3/opt/sphenix/core/gcc/8.3.0.1-0a5ad/x86_64-centos7/setup.csh
0031 source /cvmfs/sphenix.sdcc.bnl.gov/gcc-8.3/opt/sphenix/core/binutils/2.30-e5b21/x86_64-centos7/setup.csh
0032 source /cvmfs/sphenix.sdcc.bnl.gov/gcc-8.3/opt/sphenix/core/root-6.22.02/bin/thisroot.csh
0033 setenv $PATH $EICDIRECTORY/gcc-8.3/bin:${PATH}
0034 ```
0035 This step is necessary because elSpectro requires a newer gcc version than the
0036 CentOS7 / SL7 default.
0037 
0038 Then in an appropriate directory, for example do:
0039 ```
0040 cp $EICDIRECTORY/PACKAGES/elSpectro/examples/ComparePhaseSpaceto2.C .
0041 elspectro ComparePhaseSpaceto2.C
0042 ```
0043 
0044 #### More examples
0045 All are found in the ```examples``` sub-directory
0046 (```$EICDIRECTORY/PACKAGES/elSpectro/examples``` on cvmfs).
0047 
0048 
0049 ##### Examples comparing to simple weighting of TGenPhaseSpace
0050 
0051 1) Decay a rho meson to 2 pi
0052 ```
0053 elspectro ComparePhaseSpaceto2.C
0054 ```
0055 
0056 2) Decay g+p -> rho(pi+,pi-) p
0057 ```
0058 elspectro ComparePhaseSpaceto3Rho.C
0059 ```
0060 
0061 3) Decay g+p -> X(rho(pi+,pi-) , phi(K+,K-) ) p
0062 ```
0063 elspectro ComparePhaseSpaceto5RhoPhi.C
0064 ```
0065 
0066 ##### Examples of ElectroProduction
0067 
0068 1) EIC e + p -> e' rho(pi+,pi-) p
0069 ```
0070 elspectro RunRhoProton.C
0071 hW.Draw()
0072 hQ2.Draw()
0073 hRhoM.Draw()
0074 ```
0075 
0076 ##### Examples of ElectroProduction of Jpac amplitudes
0077 
0078 1) e + p -> e' X (Jpsi (e+e-)rho(pi+,pi-)) p
0079 ```
0080 elspectro 'EIC_JPAC_X3872.C("high",5,41,1E33,10)'
0081 ```
0082 
0083 Which will run with 5GeV e- energy, 41 GeV proton, Luminosity=10^33 for 10 days
0084 
0085 Or with diagnostic histgrams
0086 ```
0087 elspectro 'EIC_JPAC_X3872_Hists.C("high",5,41,1E33,10)'
0088 ```
0089 
0090 The first argument can be "high" or "low" giving different parameterisations.
0091 
0092 To set luminosity and days change last 2 arguments, e.g. for luminosity 10^33 and 25 days, e- energy 100 and p energy 100 with high energy paramterisation :
0093 ```
0094 elspectro 'EIC_JPAC_X3872.C("high",100,100,1E33,25)'
0095 ```
0096 
0097 To just run a fixed number of events leave last argument 0 and nLumi=number of events
0098 ```
0099 elspectro 'EIC_JPAC_X3872.C("high",100,100,1E4)'
0100 ```
0101 
0102 2) e + p -> e' Z(3900) (Jpsi (e+e-) pi+) n
0103 
0104 To run with luminosity 10^33 for 25 days
0105 ```
0106 elspectro 'EIC_JPAC_nZc_Hists.C("low",5,41,1E33,25)'
0107 ```
0108 
0109 or to just run 1000 events
0110 ```
0111 elspectro 'EIC_JPAC_nZc_Hists.C("low",5,41,1000)'
0112 ```
0113 
0114 ##### Examples of MesonEx Quasi-real PhotoProduction
0115 
0116 Note forward tagger acceptance can be included with lines like
0117 ```
0118 production->SetLimitTarRest_eThmin(1.5*TMath::DegToRad());
0119 production->SetLimitTarRest_eThmax(5.5*TMath::DegToRad());
0120 production->SetLimitTarRest_ePmin(0.4);
0121 production->SetLimitTarRest_ePmax(6);
0122 ```
0123 
0124 
0125 1) e + p -> e' X (pi+pi-) p
0126 ```
0127 elspectro MesonEx_p2pi.C
0128 ```
0129 
0130 2) e + p -> e' X (pi+pi+pi-) n
0131 ```
0132 elspectro MesonEx_n3pi.C
0133 ```
0134 
0135 3)  e + p -> e' P_c -> Jpsi(e+e-) p
0136 ```
0137 elspectro MesonEx_JpsiPenta.C
0138 ```
0139 
0140 Also just does phase space Jpsi, which does not need jpacPhoto, see code for details
0141 
0142 
0143 #### Installation from scratch
0144 
0145 ##### Prerequisites
0146 
0147 * ROOT 6 with Minuit2 support
0148 * We require jpacPhot but this is included as a submodule. You may link to your own version of you prefer.
0149 * c++ v5.0 or greater
0150 
0151 ##### Clone
0152 ```
0153 git clone --recurse-submodules https://github.com/dglazier/elSpectro
0154 cd elSpectro
0155 ```
0156 
0157 ##### Set Environment
0158 ```
0159 setenv ELSPECTRO /path/to/elSpectro (or $PWD)
0160 setenv PATH ${PATH}:${ELSPECTRO}/bin
0161 ```
0162 
0163 ##### Build with cmake
0164 ```
0165 mkdir build; cd build;
0166 cmake ../
0167 cmake --build . --target install
0168 ```
0169 
0170 In the first cmake step, you can specify installation locations with
0171 ```
0172 cmake -DCMAKE_INSTALL_BINDIR=/some/where/bin -DCMAKE_INSTALL_LIBDIR=/some/where/lib
0173 ```