FairSoft: https://github.com/FairRootGroup/FairSoft
FairRoot: https://github.com/FairRootGroup/FairRoot
FairMUonE: https://gitlab.cern.ch/mgoncerz/fairmuone
Instructions to install on MacBook (warning: installation is 30GB): https://hep.ph.liv.ac.uk/twiki/Main/FairMUonE
cp /hepstore/scharity/Containers/muone_ubuntu_2004.sif /path/to/your/container/muone_ubuntu_2004.sifDownload the setup script from here:
cp
to your chosen area on Liverpool machines e.g. $HOME/MUonE/.
Edit the top lines of the setup script to set your chosen paths to singularity file and install directory
# Location of your chosen .sif file export MUONE_SING_IMG=/hepstore/scharity/Containers/muone_ubuntu_2004.sif # Name of your chosen install folder - script will create $HOME/$DIRNAME and # install the repositories there DIRNAME=MUonE # Number of cores to use for build - default is 2 NCORES=2
source setup_muone.shThe first time you run this, you should do the following:
singularity shell /path/to/your/container/muone_ubuntu_2004.sifThis only needs to be run once, the first time you want to compile FairSoft. On subsequent times you don't need to do this step. Just source the setup_muone.sh script above each time you start a new shell. To compile FairSoft, do:
source $FAIRSOFTBASE/bootstrap-cmake.sh cmake-install
exit
fairsoft_buildThis will take around one hour. Highly recommended to run this on one of phi, iota etc, otherwise build time is much longer. If the load is light you can increase the number of cores in the setup, but the limiting factor on the speed of compilation is the install of ROOT and GEANT4. Once this script has completed you can now build FairROOT. The MUonE directory has already been moved to the correct place within FairROOT by the setup script. To build FairRoot, do:
fairroot_buildAt this point, you might see errors like this:
[ 25%] Building CXX object MUonE/MUonEDetector/Configuration/CMakeFiles/MUonEDetectorConfiguration.dir/MUonEDetectorCalorimeterConfiguration.cxx.o /user/scharity/MUonE/FairRoot/MUonE/MUonEDetector/Configuration/MUonEDetectorCalorimeterConfiguration.cxx:3:10: fatal error: FairLogger.h: No such file or directory 3 | #include "FairLogger.h" | ^~~~~~~~~~~~~~or
-- Configuring done CMake Error at MUonE/MUonEGeantConfiguration/CMakeLists.txt:34 (target_link_libraries): Target "MUonEGeantConfiguration" links to: FairRoot::FairTools but the target was not found. Possible reasons include: * There is a typo in the target name. * A find_package call is missing for an IMPORTED target. * An ALIAS target is missing.In this case you can use the following function:
update_muone_cmakelistswhich will add/correct the problematic CMakeLists.txt. Then try
fairroot_buildagain. This takes around 20 minutes or so the first time you compile it.
cd /path/to/your/MUonE source setup_muone.sh cd $FAIRROOTINSTALL/share/MUonE/macros singularity shell /path/to/your/container/muone_ubuntu_2004.sif source $FAIRROOTINSTALL/bin/FairRootConfig.shAt this point you should see the following output:
Singularity> source $FAIRROOTINSTALL/bin/FairRootConfig.sh bash: lsb_release: command not found System during compilation: x86_64 System now : x86_64If you don't and instead you see an error message complaining that the code was compiled with a different operating system than you are currently in, stop and check which singularity image file (.sif) you are using. Assuming that worked you can now try and run the test macros:
cd $FAIRROOTINSTALL/share/MUonE/macros root -l 'runProductionJob.C+("exampleProductionJob")'If this is successful you'll see the following output:
>>> Event 9 Time of this run: User=0.180000s Real=0.190755s Sys=0.010000s Number of events processed: 10 [INFO] Reconstructed events filter: 0 events out of 10 passed. Filter efficiency: 0 [INFO] Combined results of event filters: 0 events out of 10 passed. Filter efficiency: 0 [INFO] [INFO] Run complete. ======================================================================== N generated events = 8 N weights = 8 N negative weights = 0 N weights above Wmax = 0 True Max weight = 2.091 Cross section = 1888.145 +/- 648.482 Cross section (negative) = 0.000 +/- 0.000 Cross section (above max) = 0.000 +/- 0.000 ========================================================================Note about a bug: there appears to be a bug in the runProductionJob.C macro. To fix it, change line 45:
//tmp_run->SetSimulationConfig(geant_config); tmp_run->SetSimulationConfig(std::unique_ptr<FairGenericVMCConfig>(geant_config));
I | Attachment | Action | Size | Date | Who | Comment |
---|---|---|---|---|---|---|
sh | setup_muone.sh | manage | 3 K | 17 Feb 2023 - 16:15 | SaskiaCharity | Setup script for MUonE FairSoft installation |