Skip to content

Geometry description in DD4hep format for the LUXE experiment

License

Notifications You must be signed in to change notification settings

shan-yamabuki/luxegeo

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

26 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

luxegeo

key4hep

Implementation of the detector geometry of the LUXE experiment using DD4hep.

Requirements

luxegeo needs to be built against DD4hep with Geant4 enabled and a c++ compiler supporting c++17. It is tested regularly in a continuous integration (CI) workflow against Key4hep.

Download and Installation

Download

To get the latest version of luxegeo simply clone this repository

git clone https://github.com/LUXESoftware/luxegeo

or download and unpack a release tarball from github (see Releases).

Setting up the dependencies

There are several ways of setting up the necessary dependencies for building and installing luxegeo, the main is to use a Key4hep software stack, which requires a /cvmfs/ mount and CentOS7.

Using a Key4hep software stack

A Key4hep software stack comes with all dependencies fulfilled. Hence, sourcing the setup script is enough, e.g.

source /cvmfs/sw.hsf.org/key4hep/setup.sh

Replacing sw.hsf.org by sw-nightlies.hsf.org will setup the bleeding edge version of the Key4hep stack that is built nightly. This setup is less stable, but might offer some fixes that have not yet landed in the proper releases on sw.hsf.org.

Instructions for other options

Using an LCG software stack

Similar to the Key4hep stack it is possible to use an LCG software stack that also comes with all depenencies fulfilled. These releases are available or different linux flavors and compilers, and again sourcing the approriate setup script is enough, e.g.

source /cvmfs/sft.cern.ch/lcg/views/LCG_102/x86_64-centos7-gcc11-opt/setup.sh

Using an existing DD4hep installation

If you have an existing installation of DD4hep on your system, it should be enough to initialize that via

source </path/to/dd4hep/installation>/bin/thisdd4hep.sh

Building and installing luxegeo

luxegeo is a CMake project, so building it follows the usual steps

cd luxegeo
mkdir build && cd build
cmake -DCMAKE_CXX_STANDARD=17 \
  -DCMAKE_INSTALL_PREFIX=../install \
  ..
make install

luxegeo comes with a few tests to verify that the build and installation process has been successful, they can be run via (in the build folder)

ctest --output-on-failure

Running a simple example using a particle gun

After luxegeo has been installed, it is possible to run a simple simulation. In the following we assume that you are in the luxegeo base directory, and that the build artifacts are installed to install (this is what you get from following the build instructions) The first step is to setup luxegeo.

source install/bin/thisluxegeo.sh
export luxegeo_DIR=$(pwd)/install/share/luxegeo/compact

We then use ddsim to run a simulation using the LUXE tracker. The example uses a particle gun to shoot 100 positrons in one shot and produces an output in EDM4hep format. (Note, that you need DD4hep that has been built with EDM4hep enabled)

ddsim --compactFile ${luxegeo_DIR}/LUXETracker.xml \
  --numberOfEvents 1 \
  --enableGun \
  --gun.multiplicity 100 \
  --gun.particle e+ \
  --outputFile positrons_tracker_edm4hep.root

About

Geometry description in DD4hep format for the LUXE experiment

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C++ 73.3%
  • CMake 26.7%