==== PRIMASOFT Installation ==== **Docker installation**\\ The PRIMA software for analysis, simulation, etc. is inside a Docker container. In case you are not running primasoft in any of EMP's pc's, then first you will need to install Docker. Check how to do it here: * [[https://docs.docker.com/engine/install/ubuntu/#install_docker_ubuntu|Install Docker Engine for Ubuntu]] * [[https://docs.docker.com/desktop/setup/install/windows-install/#install_docker_windows|Install Docker Desktop for Windows]] * [[https://docs.docker.com/desktop/setup/install/mac-install/#instal_docker_macos|Install Docker Desktop for Mac]] * [[https://www.youtube.com/watch?v=tjqd1Fxo6HQ/#youtube_installubuntu_video|Youtube video concerning Ubuntu Installation]]\ **Git clone the image**\\ Now you need to pull the Docker image from the EMP GitLab repository. Open a new terminal, and do: git clone https://gitlab.rlp.net/emp/primasoft.git **Start the container**\\ Before starting the proper docker container, you need to add your personal user into the docker group. For that, do: usermod -a -G docker After that, you will need to 're-enter' into your user session to make sure your user is now inside the docker group. For doing this, you can always restart the computer, or type in a terminal su and then write groups Once you type that, you should be able to see all groups your user is in, so the ''docker'' name should appear there. **Starting the container and testing the simulation**\\ Now you need to start the container so you can run the full primasoft. Write: $ cd primasoft $ ./start_run.sh A new container with the name primaSoft-dev should be created. After running ./start_run.sh The output should look like this: ./start_run.sh The default directory for G4WORKDIR is /home/foski/geant4_workdir. You can change it by adding -DG4WORKDIR=${Your_Host_Dir} to run this script. access control disabled, clients can connect from any host starting new container with name primaSoft-dev... Unable to find image 'registry.gitlab.rlp.net/emp/docker_image_test/prima_soft_nonsu:2501' locally 2501: Pulling from emp/docker_image_test/prima_soft_nonsu 54609b48ebc1: Pull complete 37577e941a51: Pull complete e8d35fa376e8: Pull complete 279d4a417a51: Pull complete ae2ad9eaf997: Pull complete acacd230c1e4: Pull complete 17d4bdcfb566: Pull complete 45ec860a2ac8: Pull complete 4f4fb700ef54: Pull complete Digest: sha256:e4ebe8a28daf2f3a94d323882e54773d6ee072a71ecd740e38d1065f285618ca Status: Downloaded newer image for registry.gitlab.rlp.net/emp/docker_image_test/prima_soft_nonsu:2501 ec6f1e35929d0f6f8720fc46ec303b2d4993dd43aa61526b0f61b523f6fcd35d new container started with id ec6f1e35929d G4VMCDIR set to /opt/g4vmc/6.6p1_install ubuntu@oskar:~/primasoft$ The last line means your are already inside the container under the ''ubuntu'' username. == Set the environment == source ./setenv.sh cd utils/ make cd ~/primasoft/analysis mkdir lib make == Compile geant4 simulation == cd ~/primasoft/geant4 make == Execute geant4 simulation == geant4$ primag4sim primag4sim.conf **Rootmacros** \\ In order to execute rootmacros, the include paths need to be set.\\ This can be done automatically with a ''rootlogon.C'' file.\\ Create the rootlogon.C file: $ cd ~/ $ mkdir .rootlogon $ geany .rootlogon/rootlogon.C Enter the following lines to your rootlogon.C file: // This is the file rootlogon.C { printf("\n Beginning new ROOT session\n"); gROOT->ProcessLine(".include your_path/primasoft/geant4"); gSystem->Load("/tmp/Linux-g++/primag4sim/libprimadict.so"); } Here, ''your_path'' is the path to the primasoft git repository and the '''' can be found out by ''$ echo $G4WORKDIR''.\\ Now root needs to know where to find the rootlogon.C file. Therefore in ''$FAIRSOFT_BUILD_DIR'/share/root/etc/system.rootrc' change the line: Rint.Logon: rootlogon.C to: Rint.Logon: ~/.rootlogon/rootlogon.C Now you can execute the rootmacro: /geant4$ root -l rootmacros/test.C+