Project

General

Profile

Pandora development

Presentations:

  • ND Software integration (09/07/2020): Link

How to install GArSoft with PandoraPFA

First, make sure to run the dune source script and set up your test area.

source /cvmfs/dune.opensciencegrid.org/products/dune/setup_dune.sh
export MY_TEST_AREA=`pwd`

Next, make sure you have mrb set up where you're working. You can set one up from scratch like this.

export MRB_PROJECT=garsoft
mrb newDev -v develop -q e19:prof -f
source localProducts*/setup
mrbsetenv
mrbsetenv
mrbslp

Before compiling GArSoft, one needs the LCContent package. PandoraSDK and PandoraMonitoring are available on cvmfs and can be setup with the command:

setup pandora v03_15_00 -q e19:prof

LC Content is now available as part of SciSoft, no need to compile it

Compile LCContent standalone

The LCContent package is available on Github https://github.com/PandoraPFA/LCContent. Just follow the commands below:

git clone https://github.com/PandoraPFA/LCContent.git
cd LCContent
mkdir build 
cd build
cmake -DCMAKE_MODULE_PATH=$PANDORA_FQ_DIR/pandora-v03-15-00/PandoraPFA-v03-15-00/cmakemodules/ -DPANDORA_MONITORING=1 ..
make -j4

To be able to compile the Pandora interface in GArSoft, it needs to know where is the LCContent library. Add the following variables to your terminal environment:

cd $MY_TEST_AREA
export LCPANDORACONTENT=<path/to/LCContent>
export LCPANDORACONTENT_INC=${LCPANDORACONTENT}/include
export LCPANDORACONTENT_LIB=${LCPANDORACONTENT}/build/lib
export LD_LIBRARY_PATH=${LCPANDORACONTENT_LIB}:${LD_LIBRARY_PATH}
mrbsetenv
mrbsetenv
mrbslp

Compile GArSoft

One can follow the installation guide for GArSoft here.

cd localProducts_garsoft_develop_e19_prof
mrb i -jX

How to run GArSoft with PandoraPFA

An example of fhicl file is already available in GArSoft. Also an xml configuration is provided in GArSoft in the xml folder.
To be able to use the provided xml folder, one needs to do the command mrbslp in the terminal, otherwise art will not be able to find the xml configuration.
Pandora can be run on reconstructed file using the command

art -c run_pandora.fcl <RecoRootfile> -o Pandora.root

So an example run command would be:

art -c run_pandora.fcl Electron_Reco.root -o pandora.root -n 10

Run the Pandora event display within GArSoft

The fhicl file needs to be modified to include the service

RootGraphicsEnablingService: {}

This will make sure that a TApplication is initialized before running the TEve event display.
One can configure the event display by adding the algorithm <algorithm type = "VisualMonitoring"/> in the xml file. The configuration of the algorithm is available here.
Here is a possible configuration:
  <algorithm type = "VisualMonitoring">
    <ShowCurrentMCParticles> true </ShowCurrentMCParticles>
    <ShowCurrentCaloHits> true </ShowCurrentCaloHits>
    <ShowCurrentTracks> true </ShowCurrentTracks>
    <ShowCurrentPfos> true </ShowCurrentPfos>
    <ShowCurrentClusters> true </ShowCurrentClusters>
    <ShowPfoVertices> false </ShowPfoVertices>
    <ShowPfoHierarchy> false </ShowPfoHierarchy>
    <HitColors> energy </HitColors>
  </algorithm>

Here is an example of a 1 GeV photon shot in the ECAL Barrel.

Pandora_evd_gamma

Tips

If in doubt, try more mrbsetenv.
Remember to set up your environment with each new terminal.