sandreco

Installation

Currently, there are only two supported building and development environments:

FNAL machines

FNAL machines are Almalinux9 and the supported package manager is Spack. Documentation can be found here.

Installation

To build and install sandreco using spack, download the installation file and run it.

curl -O https://raw.githubusercontent.com/wiki/DUNE/sandreco/files/install-sandreco-with-spack.sh
source install-sandreco-with-spack.sh <spack installation folder>

When the script ends to run, you are ready to use sandreco.

Development

To develop sandreco, first install edepsim downloading the installation file and run it.

curl -O https://raw.githubusercontent.com/wiki/DUNE/sandreco/files/install-edepsim-with-spack.sh
source install-edepsim-with-spack.sh <spack installation folder>

Then, build edep-reader using the following commands:

cd <edepreader installation path>
git clone https://baltig.infn.it/vpia/edep-reader.git

in file <edep-reader installation folder>/edep-reader/CMakeList.txt: change set(CMAKE_CXX_STANDARD 14) into set(CMAKE_CXX_STANDARD 17), then use the following commands:

cd edep-reader
mkdir build
mkdir install
cd build
spack load geant4@10.6.1
spack load geant4-data@10.6.1
spack load root@6.28.06
spack load cmake@3.27.7
cmake -DCMAKE_INSTALL_PREFIX=./../install ./.. -DEDepSim_DIR=$(dirname $(find $(spack location -i edepsim@3.2.0) -name "EDepSimConfig.cmake"))
make -j8 
make install
source ../install/setup.sh

Then, build sandreco using the following commands:

cd <sandreco installation path>
git clone https://github.com/DUNE/sandreco.git
mkdir build && cd build
spack load gcc@12.2.0
spack load root@6.28.12
spack load edepsim@3.2.0
cmake ../sandreco/ -DCMAKE_INSTALL_PREFIX=.. \
-DCMAKE_INSTALL_RPATH="$(spack find --paths edepsim@3.2.0 | grep "edepsim@3.2.0" | awk -F' ' '{print $2}')/lib:$(spack find --paths root@6.28.12 | grep "root@6.28.12" | awk -F' ' '{print $2}')/lib/root:${PWD}/../lib"
make -j8
make install

CNAF machine

On the CNAF machine run, CMake is used to build sandreco.

Currently, sandreco depends on the EDEPReader library. Thus, it is necessary to install and source it before installing sandreco. To install EDEPReader, use the following commands:

mkdir <EDEPReader installation path>
cd <EDEPReader installation path>
git clone https://baltig.infn.it/dune/edep-reader
mkdir install
mkdir build && cd build
source /opt/exp_software/neutrino/al9/env.sh
cmake -DCMAKE_INSTALL_PREFIX=../install
make -j8
make install
source ../install/setup.sh

If everything went well, you can now install sandreco using the following commands:

mkdir <sandreco installation path>
cd <sandreco installation path>
git clone https://github.com/DUNE/sandreco.git
mkdir build && cd build
source /opt/exp_software/neutrino/al9/env.sh
cmake ../sandreco/ -DCMAKE_INSTALL_PREFIX=..
make -j8
make install
source ../setup.sh

Installation with ups [DEPRECATED]

$ VERSION="v01_00_00"
$ QUAL="e20:prof"
$ source /cvmfs/dune.opensciencegrid.org/products/dune/setup_dune.sh
$ mrb newDev -v $VERSION -q $QUAL
$ source localProducts_larsoft_*/setup
$ mrb g sandreco
$ cd $MRB_BUILDDIR
$ mrbsetenv
$ mrb b -j8
$ mrb i

for a specific tag or branch do mrb g -t $TAG sandreco or mrb g -b $BRANCH sandreco

sandreco

The sandreco project provides six executables:

The executables exploit two libraries:

Run

Digitize

$ Digitize <MC file> <digit file>

SANDECALClustering

$ SANDECALClustering -d <digit file>

Description

SANDECALClustering takes as input the digitized photodetector signals in <digit file> and produces clusters of reconstructed cells in the ECAL. The output <cluster file> has the following structure:

TTree tCluster

cluster
cluster.tid
cluster.x (y, z) 
cluster.t
cluster.e
cluster.ax (ay, az) #apex
cluster.sx (sy, sz) #direction
cluster.varx (vay, varz) #variance
cluster.reco_cells 

Each reco_cell object has the following structure:

int id;
double z;
double y;
double x;
double l;
int mod;
int lay;
double e;
double t; 
dg_ps ps1; #photodetector 1 digitized photo-signal
dg_ps ps2; #photodetector 2 digitized photo-signal

Reconstruct

$ Reconstruct <MC file> <digiti file> <reco file>

Analyze

$ Analyze <MC file> <reco file>

FastCheck

$ FastCheck <root file> <pdf file>

Display

$ Display <event number> <MC file> <input file> [show trajectories] [show fits] [show digits]

Data format

The description of the data format can be found here

Contribute

Support

For any communication, please refer to DUNE-ND-SAND-SOFTWARE@fnal.gov

BUILD AND TEST SANDRECO