DUNE / dune-tms

DUNE ND Temporary Muon Spectrometer
0 stars 1 forks source link

DUNE TMS

This is the project for studying the Temporary Muon Spectrometer as a part of the DUNE Near Detector system.

It uses edep-sim output, which are stored at:

For more informatinon on running a production, see the DUNE ND Production repo.

Building the code

The repo is designed for minimal external dependencies. We use ROOT for some convenience classes, and input/output. There's dependency on edep-sim for the event and hit structure, and toml for config files.

Setup and dependencies

The framework depends on edep-sim, ROOT, CLHEP, and toml. An example setup using mostly ups products at FNAL is provided in setup.sh: once the edep-sim ups product is set up, ROOT and CLHEP will also be appropriately set up.

Building

With Make

Once you have set your environment up, run make, which will get toml11, make the src directory and build the shared object (library) to lib, move onto the applications in app and build them into bin.

With CMake (currentlty experimental)

To build with CMake, directories for the build and installation must be chosen. A basic example is provided here. Inside dune-tms/ create a directory for the build mkdir -p build; cd build, then run cmake -DCMAKE_INSTALL_PREFIX=../Linux ../. This should detect the dependencies for the build and generate the build files. You can now make && make install, and the software will be installed into dune-tms/Linux/{bin,lib}. If cmake is run without setting the install prefix, the installation location will default to /usr/local, which will require sudo or equivalent permissions to write to.

toml submodule dependency

We read parameter settings using toml. I particularly like ToruNiina's repo, so have included it as a submodule here. The submodule setup is included in the default make recipe, so you shouldn't have to do anything else. If you for some reason want to run it on your own, do git submodule init && git submodule update to get the submodule.

The repo has a good readme, with fast and simple implementation, feel free to check it out and implement accordingly in the TMS_Manager class.

Running the code

So far all the reconstruction happens through the app/ConvertToTMSTree.cpp driver application. In a nutshell, it takes edep-sim events, converts it into TMS formats, queries the geometry, runs reconstruction, and so on. There is a TMS_TreeWriter class which drives the TTree writing to file, and a TMS_EventViewer class which shows simple 2D event displays. The output ROOT file should contain (at least) two branches: one with reconstructed information and one with truth information. As of right October 2021, no hit level information is saved.

In the app directory you can also find some test executables for the reconstruction.

Configuration options

All run-time configuration happens through config/TMS_Default_Config.toml. At time of writing, you can control reconstruction parameters (e.g. how many points do you need to form a "cluster" in DBSCAN, or what is the track reconstruction method), and application parameters (e.g. do we save detailed truth information, do we draw PDFs of hits) here. Have a look around and feel free to play!

Directory structure

Contact

nd_muon_spectrometer and #nd_muon_spectrometer_code on DUNE slack