Back to home page

EIC code displayed by LXR

 
 

    


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

0001 ---
0002 title: Eic-smear and Generators with Singularity
0003 name: eicsmear_generators_singularity
0004 category: singularity
0005 layout: default
0006 ---
0007 
0008 {% include layouts/title.md %}
0009 
0010 The simplest way to use eic-smear and a wide range of HERA generators
0011 is to take advantage of cvmfs and singularity to be placed directly
0012 into the  environment that's running natively at BNL. This combination
0013 is widely available at national labs, CERN, and many other facilities,
0014 as long as $CVMFS_REPOSITORIES contains "eic.opensciencegrid.org". But
0015 simple instructions for any system can be found below.
0016 Sometimes it may be necessary to activate singularity:
0017 ```sh
0018 %  module load singularity
0019 ```
0020 
0021 
0022 In all cases, a single line
0023 ```
0024 %  singularity shell --writable -B /cvmfs:/cvmfs /cvmfs/eic.opensciencegrid.org/singularity/rhic_sl7_ext
0025 ```
0026 and one setup script
0027 ```
0028 % export EIC_LEVEL=dev
0029 % source /cvmfs/eic.opensciencegrid.org/x8664_sl7/MCEG/releases/etc/eic_bash.sh
0030 ```
0031 will place you in the same environment where the libraries are
0032 installed natively. All libraries and executables are in your $PATH
0033 and $LD_LIBRARY_PATH, and the full packages can be found under
0034 $EICDIRECTORY. That means you can directly copy and paste instructions
0035 from [here](https://eic.github.io/software/eicsmear.html) and from the README's of [MCEG packages](https://gitlab.com/eic/mceg).
0036 
0037 For example
0038 ```
0039 % cp -r $EICDIRECTORY/PACKAGES/eic-smear/tests .
0040 % cp $EICDIRECTORY/PACKAGES/eic-smear/scripts/smearHandBook.cxx .
0041 % pythiaeRHIC < tests/input.data.ep_hiQ2.20x250.small.eic
0042 ```
0043 will create pythia e+P output.
0044 ```
0045 % root -l
0046 root[] gSystem->Load("libeicsmear");
0047 root[] BuildTree ("tests/ep_hiQ2.20x250.small.txt");
0048 root[] .L smearHandBook.cxx
0049 root[] SmearTree(BuildHandBookDetector(), "ep_hiQ2.20x250.small.root")
0050 ```
0051 will smear the result. The [documentation](https://eic.github.io/software/eicsmear.html)
0052 contains instructions on how to work with the result, and files in $EICDIRECTORY/PACKAGES/eic-smear/tests
0053 provide practical examples. 
0054 
0055 Also in the $EICDIRECTORY/PACKAGES and $EICDIRECTORY/bin are the generators BeAGLE, Milou, DJANGOH, RAPGAP, and PEPSI.
0056 
0057 Of course, eic-smear and many MCEGs are also part of the
0058 [escalate package](https://eic.gitlab.io/documents/quickstart/).
0059 Instructions and examples on how to use it in conjunction with
0060 PYTHIA8, how to write your own eJana plugins, how to perform analyses
0061 within JupyterLab or on the command line and much more are part of the
0062 included tutorial, and the recording of the recent tutorial is (soon)
0063 in our [YouTube channel](https://www.youtube.com/channel/UCXc9WfDKdlLXoZMGrotkf7w).
0064 
0065 #### Singularity+cvmfs at JLAB:
0066 On your computer
0067 ```  
0068 ssh login.jlab.org
0069 ```
0070 On login.jlab.org
0071 ```
0072 ssh ifarm1802
0073 ```
0074 ifarm1802.jlab.org
0075 ```  
0076 module load /apps/modulefiles/singularity/3.4.0
0077 ```
0078 
0079 #### Singularity+cvmfs anywhere
0080 You can also use the software on any computer that can run [VirtualBox]( https://www.virtualbox.org/)
0081 (i.e., Windows, OSX, Linux, even Solaris).
0082 
0083 A ready-made image can be downloaded at
0084 [https://www.phenix.bnl.gov/WWW/publish/phnxbld/sPHENIX/Singularity/Fun4AllSingularityDistribution.ova].
0085 Some more instructions at
0086 [https://github.com/eic/Singularity/blob/master/VirtualBox.md].
0087 
0088 Note: All that's needed is cvmfs, singularity, and
0089 eic.opensciencegrid.org in CVMFS_REPOSITORIES.
0090 The image just has this already done for you.
0091 
0092 #### At BNL
0093 No need for containers, just add
0094 ```  
0095 setenv EIC_LEVEL dev
0096 source /cvmfs/eic.opensciencegrid.org/x8664_sl7/MCEG/releases/etc/eic_cshrc.csh
0097 ```  
0098 to your ~/.cshrc.
0099 
0100 ( Note that ```source /afs/rhic.bnl.gov/eic/restructured/etc/eic_cshrc.csh``` also works. But in the future we will probably switch completely to using the cvmfs mirror as the new standard location).
0101 
0102 For more information on singularity, see Wouter's [excellent introduction])(https://eic.github.io/software/escalate_singularity_1.html).