Concepts in LArSoft

Liquid Argon (LAr) time projection chamber (TPC) detectors play a critical role in measuring the properties of neutrinos and their interactions with matter. (See Jonathan Asaadi’s  Liquid Argon Time Projection Chambers for more information.) The common features of LArTPCs enable sharing of algorithm code across detectors of very different size and configuration. Adopting a code sharing strategy across liquid argon experiments allows us to maximize physics output while  minimizing development cost.

LArSoft is a set of shared, detector-independent software tools for the simulation, reconstruction and analysis of data from liquid argon neutrino experiments. The software suite contains a wide selection of  algorithms and utilities for the reconstruction and simulation of LArTPC data, from raw waveforms to high-level reconstructed objects. LArSoft also integrates external LArTPC reconstruction frameworks, such as Pandora and Wire-cell, and can drive deep-learning based reconstruction. Algorithms for associated photo-detectors and other auxiliary detectors are included as well. 

Using the shared software within LArSoft requires partner experiments to provide experiment-specific geometry and configuration information, as well as certain algorithms pertaining to detector-specific details of the readout electronics. These software elements are developed and maintained by the experiments, and are not part of the LArSoft body of code.

The goal of this material to help LArSoft users understand the big picture of what is going on within LArSoft code. The aim is not to show specific code examples, but to lay the foundation for a conceptual understanding. Follow the heading links for more information on each of the topics. The source for the information is Erica Snider’s Introduction to LArSoft – source material and any other reference given below.

LArSoft Workflows

LArSoft workflow overview

LArSoft provides tools to carry out simulation, reconstruction and analysis of LArTPC data.

Simulation steps

The simulation is a chain or series of steps each modeling a specific physical process.

Reconstruction steps

Reconstruction extracts physical information provided by the wire output signals. The space coordinates and energy deposited by the different particles are used to build a picture of the event.

LArSoft Architecture and Design

Designing software in LArSoft

Best practices for how to design software for LArSoft.

Data Products

Data products are classes which can be saved into the art ROOT output file. They are the means by which a module can learn the result of other modules.

Algorithms

An algorithm is a class, with one or more instances managed by user code, that performs a task or part of it.  Based on Gianluca  Petrillo’s slides for algorithms and services from the LArSoft class and  LArSoft page on Writing LArSoft Algorithms.

Services

A LArSoft service is a class, with a single instance managed by the framework, that performs an operation. A service is used by LArSoft algorithms and art modules. Based on Gianluca  Petrillo’s slides for algorithms and services from the LArSoft class and  LArSoft Wiki on Writing LArSoft Services.

Geometry PreV10 | Geometry V10+

Detector-specific information is contained within the Geometry so other software doesn’t have to explicitly depend on which detector is being considered.

LArSoft Implementation

LArSoft code organization

How to code for LArSoft.

Contributing code

The process to introduce and integrate  into the core LArSoft code repositories both non-architectural features and architectural-affecting features.

Multi-threading in LArSoft

To make code thread-safe, it is important to know what objects are shared and know when they are shared. The difficulty depends on the context. Based on: Making Code Thread-Safe by Kyle Knoepfel and Introduction to multi-threading and vectorization by Matti Kortelainen.

Code analysis process

How LArSoft is doing code analysis. Based on LArSoft page on code analysis  and  Erica Snider’s  – LArSoft code analysis process presentation.

Configuration

LArSoft jobs obtain configuration information from the art event processing framework via user-written FHiCL configuration files. The configuration page contains information and links to recommendations on developing configurations and configuration-aware C++ code.

Testing in LArSoft

How to test LArsoft. Also based on Erica Snider’s Introduction to LArSoft CI System.)

Continuous Integration (CI) in LArSoft

The set of tools, applications and machines that allows users to specify and automate the execution of tests of LArSoft software. This material is based on Erica Snider’s Introduction to LArSoft CI System and the redmine wiki page on CI.