Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migration of unmigrated content due to installation of a new plugin

...

The slicPandora package currently has the following dependencies.

Package

Version

Get It

slicPandora

head

SLAC cvs

lcio

v01-51

SLAC cvs

PandoraPFANew

v00-05 trunk

Pandora SVN

ROOT

5.26 or greater

Download ROOT

PandoraMonitoring

v00-04

PandoraMonitoring SVN

ilcutil

head

ilcutil SVN

cmake

2.8.2 or greater

cmake.org

ilcutil

trunk

ilcutil SVN

lcio

v01-60

SLAC cvs

slicPandora

head

SLAC cvs

There are build instructions below that show all the steps necessary to build these packagesYou need to have an installation of ROOT, which is not covered here.

Build Instructions

These commands can be executed to produce a working slicPandora, using a shell such as bash.

Start by making a directory
where Pandora and its dependencies will be installed.

The following commands should then be executed in order from this working directory.

Quick Build

Build ilcutil.
No Format

svn co http://svnsrv.desy.de/public/ilctools/ilcutil/trunk ilcutil
cd ilcutil
cmake .
make install
export ILCUTIL_DIR=`pwd`
cd ..

...

This is just an example. Any directory with enough space will do.

No Format

mkdir /work/pandora_build
cd /work/pandora_build

The following commands should then be executed in order from this working directory to make the slicPandora binary. You should execute each new package build from your working dir.

ilcutil

No Format
svn co http://svnsrv.desy.de/public/PandoraPFANewilctools/PandoraPFANewilcutil/trunk PandoraPFANewilcutil
cd PandoraPFANewilcutil
mkdir build
cd build
cmake ..
make install
cd ..
export PandoraPFANewILCUTIL_DIR=`pwd`/PandoraPFANew

...

Pandora

No Format
cvssvn -dco :pserver:anonymous@cvs.freehep.org:/cvs/lcd co -r v01-51 lcio
cd lciohttp://svnsrv.desy.de/public/PandoraPFANew/PandoraPFANew/trunk PandoraPFANew
cd PandoraPFANew
mkdir build
cd build
cmake -DINSTALLDILCUTIL_DOCDIR=OFF$ILCUTIL_DIR -DBUILDDCMAKE_32BITSKIP_COMPATIBLERPATH=OFF1 ..
make install
cd ..
export LCIOPandoraPFANew_DIR=`pwd`
cd ..
Build slicPandora

LCIO

No Format
cvssvn -dco :pserver:anonymous@cvssvn://svn.freehep.org:/lcio/cvs/lcd co slicPandoratags/v02-01-01 lcio
cd slicPandoralcio
mkdir build
cd build
cmake -DCMAKEDINSTALL_MODULE_PATH=$ILCUTIL_DIR/cmakemodules -DLCIO_DIR=$LCIO_DIR -DPandoraPFANew_DIR=$PandoraPFANew_DIRDOC=OFF -DBUILD_32BIT_COMPATIBLE=OFF -DCMAKE_SKIP_RPATH=1 ..
make install

Old Build Instructions

...

titleDeprecated
cd ..
export LCIO_DIR=`pwd`

slicPandora

...

No Format
# ROOT
export ROOTSYS=/path/to/root/directory
export PATH=$ROOTSYS/bin:$PATH

# Build ilcutil
svn co http://svnsrv.desy.de/public/ilctools/ilcutil/trunk ilcutil
cd ilcutil
cmake .
make install
export ILCUTIL_DIR=`pwd`
# Back to work dir.
cd ..

#cvs -d :pserver:anonymous@cvs.freehep.org:/cvs/lcd co slicPandora
cd slicPandora
export SLICPANDORA_DIR=`pwd`
mkdir build
cd build
cmake -DILCUTIL_DIR=$ILCUTIL_DIR -DLCIO_DIR=$LCIO_DIR -DPandoraPFANew_DIR=$PandoraPFANew_DIR -DCMAKE_SKIP_RPATH=1 ..
make install

If this step completes successfully without compilation or link errors, you should see a binary at slicPandora/bin/PandoraFrontend. You are basically done building slicPandora.

Pandora Settings (optional)

You should also check out the project that contains example config files for Pandora.

No Format

svn Checkout PandoraPFANew
# Head checkout.
#svn co http://svnsrv.desy.de/public/PandoraPFANew/PandoraPFANewSettings/trunk PandoraPFANew
# Use tag v00-05.
svn co http://svnsrv.desy.de/public/PandoraPFANew/PandoraPFANew/tags/v00-05 PandoraPFANew
export PandoraPFANew_DIR=`pwd`/PandoraPFANew

# Build PandoraMonitoring
#Head checkout.
#svn co http://svnsrv.desy.de/public/PandoraPFANew/PandoraMonitoring/trunk PandoraMonitoring
svn co http://svnsrv.desy.de/public/PandoraPFANew/PandoraMonitoring/tags/v00-04 PandoraMonitoring
cd PandoraMonitoring
mkdir build
cd build
cmake -DROOT_DIR=$ROOTSYS -DILCUTIL_DIR=$ILCUTIL_DIR -DPandoraPFANew_DIR=$PandoraPFANew_DIR ..
make install
cd ..
export PandoraMonitoring_DIR=`pwd`
cd ..

# Setup Java
export JAVA_HOME=/path/to/java/directory
export PATH=$JAVA_HOME/bin:$PATH

# Build LCIO
cvs -d :pserver:anonymous@cvs.freehep.org:/cvs/lcd co -r v01-51 lcio
cd lcio
mkdir build
cd build
cmake -DINSTALL_DOC=OFF -DBUILD_32BIT_COMPATIBLE=OFF ..
make install
cd ..
export LCIO_DIR=`pwd`
cd ..

# Build PandoraPFANew
cd PandoraPFANew
mkdir build
cd build
cmake -DILCUTIL_DIR=$ILCUTIL_DIR -DPandoraMonitoring_DIR=$PandoraMonitoring_DIR ..
make install
cd ../..

# Build slicPandora
cvs -d :pserver:anonymous@cvs.freehep.org:/cvs/lcd co slicPandora
cd slicPandora
mkdir build
cd build
cmake -DROOT_DIR=$ROOTSYS -DCMAKE_MODULE_PATH=$ILCUTIL_DIR/cmakemodules -DLCIO_DIR=$LCIO_DIR \
-DPandoraPFANew_DIR=$PandoraPFANew_DIR -DPandoraMonitoring_DIR=$PandoraMonitoring_DIR ..
make install

The slicPandora project should now be built successfully with the binary installed to slicPandora/bin/PandoraFrontend.

If compilation or linking errors occur, then check that the dependencies were installed successfully.

Build Instructions Without Monitoring

Warning
titleDeprecated

The build instructions below are out of date and don't work anymore.

The SlicPandora binary can also be built without monitoring, which removes the ROOT and PandoraMonitoring dependencies. This makes the executable more suitable for running in batch environments.

No Format

# Build ilcutil
svn co http://svnsrv.desy.de/public/ilctools/ilcutil/trunk ilcutil
cd ilcutil
cmake .
make install
export ILCUTIL_DIR=`pwd`
cd ..

# PandoraPFANew
svn co http://svnsrv.desy.de/public/PandoraPFANew/PandoraPFANew/trunk PandoraPFANew
cd PandoraPFANew
mkdir build
cd build
cmake -DILCUTIL_DIR=$ILCUTIL_DIR ..
make install
cd ..
export PandoraPFANew_DIR=`pwd`
cd ..

# Setup Java
export JAVA_HOME=/path/to/java/directory
export PATH=$JAVA_HOME/bin:$PATH

# Build LCIO
cvs -d :pserver:anonymous@cvs.freehep.org:/cvs/lcd co -r v01-51 lcio
cd lcio
mkdir build
cd build
cmake -DINSTALL_DOC=OFF -DBUILD_32BIT_COMPATIBLE=OFF ..
make install
cd ..
export LCIO_DIR=`pwd`
cd ..

# Build slicPandora
cvs -d :pserver:anonymous@cvs.freehep.org:/cvs/lcd co slicPandora
cd slicPandora
mkdir build
cd build
cmake -DCMAKE_MODULE_PATH=$ILCUTIL_DIR/cmakemodules -DLCIO_DIR=$LCIO_DIR -DPandoraPFANew_DIR=$PandoraPFANew_DIR ..
make install

PandoraFrontend

The PandoraFrontend binary provides a simple frontend to slicPandora.

The syntax of this command is the following.

No Format

./bin/PandoraFrontend geometry.xml pandoraSettings.xml inputEvents.slcio reconOutput.slcio [nevents]

The nevents command is optional, but all other arguments are required and must be supplied in order.

For example, to repeat the results of the JobManagerTest using PandoraFrontend, execute this command.

No Format

./bin/PandoraFrontend ./examples/sidloi3_pandora.xml ./examples/PandoraSettingsRelease.xml ./input.slcio ./pandoraRecon.slcio 2
PandoraSettings

LCDetectors (optional)

There are some slicPandora geometry xml files here. (This is a rather big cvs module so might take some time to checkout.)

No Format

cvs -d :pserver:anonymous@cvs.freehep.org:/cvs/lcd co LCDetectors

For example, see LCDetectors/detectors/sidloi3/sidloi3_pandora.xml and its compact detector description.

Setting the LD_LIBRARY_PATH

The shared library locations need to be specified in the LD_LIBRARY_PATH for slicPandora to run. The variable needs to be defined as follows, based on environment settings from the build.

No Format

export LD_LIBRARY_PATH=$SLICPANDORA_DIR/lib:$LCIO_DIR/lib:$PandoraPFANew_DIR/lib

If these variables are not set in the environment, then using the full, explicit path to the library directories will work fine.

Checking the Build

Now you should be able to run this command to load slicPandora.

No Format

./slicPandora/bin/PandoraFrontend

The help message should show for slicPandora. If there are errors about missing libraries, set the LD_LIBRARY_PATH variable accordingly.

PandoraFrontend

The PandoraFrontend binary provides a simple frontend to slicPandora. It uses GNU style command line switches for user input.

The following table explains the function of each of these switches.

switch

argument

-g

Geometry XML file

-c

Pandora settings XML file

-i

LCIO input events

-l

Custom LCIO input collections XML file (optional)

-o

LCIO output file with PFOs appended

-r

number of events to run (optional)

-s

number of events to skip (optional)

-f

force existing collections to be overwritten (optional)

The geometry file is in an XML format. It can be created from a compact detector description using GeomConverter with the option "-o pandora". You are required to provide some additional parameters related to sampling fractions (see LCDetectors/detectors/sidloi3 for example).

The Pandora settings XML file contains settings to configure the Pandora PFA algorithm. Example configuration files can be found in the Pandora Settings SVN project (see building instructions above) (see PandoraSettings/PandoraSettingsBasic.xml).

The LCIO input events should contain collections of LCIO CalorimeterHits named according to their subdetectors, plus a collection of LCIO Track objects called "Tracks." There also needs to be a collection called "TrackStates" containing momentum measurements at various points along the Track (see below for details of generating these files).

The LCIO output file will contain the contents of the input file plus the PFO collections created by Pandora, as well as some intermediate collections of hit objects. This file is generated by slicPandora.

The number of events to run should be a positive integer. If slicPandora runs out of events, it will print and warning but should not crash.

The number of events to skip should be a positive integer. These events are read in and discarded before event processing begins.

Here is a contrived example using all input parameters.

No Format

./bin/PandoraFrontend -g myGeometry.xml -c PandoraSettings.xml -i inputEvents.slcio -l myCollections.xml -o myOutput.slcio -r 1000 -s 10

These are example arguments only. Actual usage will require files in the correct input data formats, namely the geometry XML, the Pandora settings file, and the XML specifying which LCIO input collections to use, if different from the defaults.

Using GeomConverter to Output the Pandora Geometry Format

The GeomConverter package can convert from compact detector descriptions to various output formats, including one for input to slicPandora.

For example, to generate the Pandora settings for the sidloi3 detector.

No Format

cvs -d :pserver:anonymous@co LCDetectors
cd LCDetectors/detectors/sidloi3
java -jar ~/.m2/repository/org/lcsim/GeomConverter/1.13-SNAPSHOT/GeomConverter-1.13-SNAPSHOT-bin.jar -o pandora compact.xml sidloi3_pandora.xml

This will create the file sidloi3_pandora.xml that can be used as input to slicPandora.

FIXME: Need to document the conditions used to set sampling fractionsThe above command requires that the input events were generated in the sidloi3 detector and that a symlink has been setup pointing from "input.slcio" to your input event file.

Running Events in SlicPandora

...

The following Driver in the Seed Tracker package will add these necessary TrackState collections. This Driver also requires that another Driver be run beforehand to cache Calorimeter subdetector data.collections. This Driver also requires that another Driver be run beforehand to cache Calorimeter subdetector data.

No Format
No Format

<driver name="CalInfoDriver"
        type="org.lcsim.recon.util.CalInfoDriver"/>
<driver name="TrackStateDriverCalInfoDriver"
        type="org.lcsim.recon.trackingutil.seedtracker.SeedTrackerTrackStateDriver"/>

Finally, an LCIODriver should be added to the end of the event processing to output the appropriate collections.

No Format
CalInfoDriver"/>
<driver name="WriterTrackStateDriver"
        type="org.lcsim.recon.utiltracking.loopseedtracker.LCIODriverSeedTrackerTrackStateDriver"/>
            <outputFilePath>OUTPUT_FILE</outputFilePath>
</driver>

The OUTPUT_FILE argument needs to be replaced with the actual name of the LCIO output file to be fed to Pandora.

Once these Drivers are defined in the <driver> section of your LCSim XML file, the execution order should look like the following.

Finally, an LCIODriver should be added to the end of the event processing to output the appropriate collections.

No Format

No Format

<execute>
    <driver name="CalInfoDriverWriter"/>
      <driver name="MainTrackingDriver"/  type="org.lcsim.util.loop.LCIODriver">
    <driver name="TrackStateDriver"/>
       <driver name="Writer"/>
</execute>

Now that tracks and track states have been added to the events, we are ready to use Pandora itself.

Using GeomConverter to Output the Pandora Geometry Format

The GeomConverter package can convert from compact detector descriptions to various output formats, including one for input to slicPandora. (Installation of GeomConverter is not covered here.)

Use this command from your GeomConverter root directory to generate a Pandora geometry file from a compact detector description.

No Format

java -jar ./target/GeomConverter-1.10-SNAPSHOT-bin.jar -o pandora ./myCompactDetector.xml ./myPandoraGeom.xml

...

 <outputFilePath>OUTPUT_FILE</outputFilePath>
</driver>

The OUTPUT_FILE argument needs to be replaced with the actual name of the LCIO output file to be fed to Pandora.

Once these Drivers are defined in the <driver> section of your LCSim XML file, the execution order should look like the following.

No Format

<execute>
    <driver name="CalInfoDriver"/>
    <driver name="MainTrackingDriver"/>
    <driver name="TrackStateDriver"/>
    <driver name="Writer"/>
</execute>

Now that tracks and track states have been added to the events, we are ready to use Pandora itself.