Table of Contents |
---|
Warning | ||
---|---|---|
| ||
On this wiki page.
In slicPandora CVS Project.
|
Overview
This tutorial will show you how to process SLIC output files with the Pandora PFA New package, currently the best performing PFA algorithm, in order to produce Particle Flow Objects (PFOs) (also called ReconstructedParticles) for analysis. It covers building and installing a slic-specific frontend called slicPandora and all its dependencies. Then it will go through the steps for processing slic output using LCSim in order to prepare it for Pandora. Finally, it shows how to run slicPandora using these events. There is also a note on how to generate Pandora detector XML files from compact descriptions.
Quick Setup Instructions
These commands can be executed to produce a working slicPandora without monitoring enabled, using a shell such as bash.
No Format |
---|
Wiki Markup |
{toc} {warning:title=TODO} On this wiki page. * remove slicPandora Make commands (use cmake instead) * make a brief section that shows how to compile slicPandora without monitoring with all build commands in order * normalize build variables to use PROJECT_HOME as CMake expects them and remove references to old variables In slicPandora CVS Project. * remove slicPandora's Makefile from CVS * add optional PandoraMonitoring dep in slicPandora's CMakeLists.txt {warning} h2. Overview This tutorial will show you how to process [SLIC] output files with the [Pandora PFA New|https://svnsrv.desy.de/viewvc/PandoraPFANew/] package, currently the best performing PFA algorithm, in order to produce Particle Flow Objects (PFOs) (also called ReconstructedParticles) for analysis. It covers building and installing a slic-specific frontend called slicPandora and all its dependencies. Then it will go through the steps for processing slic output using LCSim in order to prepare it for Pandora. Finally, it shows how to run slicPandora using these events. There is also a note on how to generate Pandora detector XML files from compact descriptions. h2. Quick Setup Instructions These commands can be executed to produce a working slicPandora without monitoring enabled, using a shell such as bash. {noformat} cd /my/work/dir svn co https://svnsrv.desy.de/public/ilctools/CMakeModules/trunk/ CMakeModules export CMAKE_MODULE_PATH=`pwd`/CMakeModules cvs -d :pserver:anonymous@cvs.freehep.org:/cvs/lcd co lcio cd lcio cmake . make export LCIO_HOME=`pwd` cd .. svn co https://svnsrv.desy.de/public/PandoraPFANew/PandoraPFANew/trunk PandoraPFANew cd PandoraPFANew cmake -DCMAKE_MODULE_PATH=$CMAKE_MODULE_PATH . make export PandoraPFANew_HOME=`pwd cd .. cvs -d :pserver:anonymous@cvs.freehep.org:/cvs/lcd co slicPandora cd slicPandora cmake -DROOT_HOME=$ROOTSYS -DCMAKE_MODULE_PATH=$CMAKE_MODULE_PATH -DPandoraPFANew_HOME=$PandoraPFANew_HOME . make {noformat} |
You
...
need
...
to
...
have
...
a
...
preexisting
...
installation
...
of
...
...
,
...
which
...
is
...
not
...
covered
...
here.
...
More
...
detailed
...
instructions
...
are
...
listed
...
below.
...
Detailed
...
Setup
...
Instructions
...
Preliminaries
A Linux or Unix platform is assumed and the bash shell is used for all command-line instructions. The actual setup procedures have been tested on Redhat Enterprise Linux 5.5 (Tikanga).
The cmake tool must be installed for building several of the packages.
You will need the standard GNU tools installed, e.g. Make, gcc/g++,
...
etc.
...
The
...
cvs
...
and
...
svn
...
command-line
...
tools
...
are
...
also
...
required
...
for
...
obtaining
...
project
...
source
...
codes.
Dependencies
The slicPandora package currently has the following dependencies.
Package | Version | Get It |
---|---|---|
slicPandora | head | SLAC cvs |
lcio | head | SLAC cvs |
PandoraPFANew | head | |
ROOT | 5.26 or greater | |
PandoraMonitoring | head | |
CMakeModules | head |
Installing Packages
LCIO
Checkout the LCIO project from cvs.
No Format |
---|
h3. Dependencies The slicPandora package currently has the following dependencies. ||Package||Version||Get It|| |slicPandora|head|SLAC cvs| |lcio|head|SLAC cvs| |PandoraPFANew|head|[Pandora SVN|https://svnsrv.desy.de/viewvc/PandoraPFANew/PandoraPFANew/tags/]| |ROOT|5.26 or greater|[Download ROOT|http://root.cern.ch/drupal/content/downloading-root]| |PandoraMonitoring|head|[PandoraMonitoring SVN|https://svnsrv.desy.de/viewvc/PandoraPFANew/PandoraMonitoring/tags/]| |CMakeModules|head|[CMakeModules SVN|https://svnsrv.desy.de/viewvc/ilctools/CMakeModules/tags/?sortby=date]| h2. Installing Packages h3. LCIO Checkout the LCIO project from cvs. {noformat} cd /workdir cvs -d :pserver:anonymous@cvs.freehep.org:/cvs/lcd co lcio {noformat} |
Building
...
this
...
project
...
requires
...
the CMake tool,
...
the
...
installation
...
of
...
which
...
is
...
not
...
covered
...
here.
...
It
...
additionally
...
requires
...
command-line
...
GNU
...
Make.
No Format |
---|
} cd lcio cmake . make {noformat} |
The
...
cvs
...
head
...
or
...
last
...
release
...
tag
...
should
...
both
...
work.
...
Set
...
the
...
LCIO
...
environment
...
variable.
No Format |
---|
} export LCIO=`pwd` {noformat} |
This
...
variable
...
will
...
be
...
used
...
by
...
subsequent
...
packages
...
to
...
locate
...
LCIO
...
and
...
make
...
a
...
setup
...
script.
CMakeModules
Checkout the head of CMakeModules, required by PandoraPFANew.
No Format |
---|
h3. CMakeModules Checkout the head of CMakeModules, required by PandoraPFANew. {noformat} svn co https://svnsrv.desy.de/public/ilctools/CMakeModules/trunk/ CMakeModules {noformat} |
Make
...
an
...
environment
...
variable
...
that
...
will
...
be
...
referenced
...
later.
No Format |
---|
} cd CMakeModules export CMAKE_MODULE_PATH=`pwd` {noformat} |
This
...
package
...
does
...
not
...
need
...
to
...
be
...
compiled.
...
It
...
just
...
provides
...
some
...
CMake
...
macros.
PandoraPFANew
Check out the version of Pandora that will be used. The example below shows how to checkout the head version.
No Format |
---|
h3. PandoraPFANew Check out the version of Pandora that will be used. The example below shows how to checkout the head version. {noformat} svn co https://svnsrv.desy.de/public/PandoraPFANew/PandoraPFANew/trunk PandoraPFANew {noformat} {warning:title=Pandora Version} Old versions of PandoraPFANew will _not_ work, due to changes and additions to its API. It is recommended to use the last tagged version or the CVS head. {warning} Now we need to build another package before configuring Pandora. h3. PandoraMonitoring Checkout the head version of PandoraMonitoring. {noformat} |
Warning | ||
---|---|---|
| ||
Old versions of PandoraPFANew will not work, due to changes and additions to its API. It is recommended to use the last tagged version or the CVS head. |
Now we need to build another package before configuring Pandora.
PandoraMonitoring
Checkout the head version of PandoraMonitoring.
No Format |
---|
svn co https://svnsrv.desy.de/public/PandoraPFANew/PandoraMonitoring/trunk PandoraMonitoring {noformat} Now configure the build using cmake. {noformat}PandoraMonitoring |
Now configure the build using cmake.
No Format |
---|
cmake -DROOT_HOME=/path/to/root -DCMAKE_MODULE_PATH=$CMAKE_MODULE_PATH -DPandoraPFANew_HOME=/path/to/pandora .
{noformat}
|
Set
...
the
...
environment
...
variable.
No Format |
---|
} export PANDORAMONITORING=`pwd` {noformat} |
Technically,
...
the
...
monitoring
...
package
...
is
...
optional,
...
though
...
it
...
is
...
quite
...
useful
...
for
...
event
...
and
...
detector
...
visualization.
...
PandoraPFANew
...
Continued
...
Since
...
Pandora
...
has
...
minimal
...
external
...
dependencies,
...
it
...
is
...
straightforward
...
to
...
build.
...
Only
...
the
...
CMakeModules
...
must
...
be
...
located
...
for
...
the
...
build
...
and
...
PandoraMonitoring,
...
and
...
the
...
latter
...
is
...
optional.
No Format |
---|
} cd PandoraPFANew cmake -DCMAKE_MODULE_PATH=$CMAKE_MODULE_PATH -DPandoraMonitoring_Home=/path/to/PandoraMonitoring . make {noformat} |
If
...
monitoring
...
is
...
not
...
being
...
used,
...
this
...
CMake
...
command
...
can
...
be
...
used
...
instead.
No Format |
---|
} cmake -DCMAKE_MODULE_PATH=$CMAKE_MODULE_PATH -DCMAKE_INSTALL_PREFIX=`pwd` BUILD_SHARED_LIBS=on . {noformat} |
Also,
...
the
...
Framework
...
library
...
needs
...
to
...
be
...
built.
No Format |
---|
} cd PandoraPFANew/Framework cmake . make {noformat} |
Set
...
the
...
environment
...
variable.
No Format |
---|
} cd PandoraPFANew export PandoraPFANew_HOME=`pwd` {noformat} |
This
...
will
...
be
...
referenced
...
in
...
the
...
build
...
of
...
the
...
next
...
package.
...
If
...
the
...
release
...
compiles
...
successfully,
...
you're
...
now
...
ready
...
to
...
setup
...
the
...
project
...
that
...
interfaces
...
SLIC
...
to
...
Pandora.
slicPandora
Checkout the slicPandora project from cvs.
No Format |
---|
h3. slicPandora Checkout the slicPandora project from cvs. {noformat} cd /workdir cvs -d :pserver:anonymous@cvs.freehep.org:/cvs/lcd co slicPandora cd slicPandora {noformat} |
The
...
following
...
should
...
generate
...
a
...
setup
...
script
...
called
...
mysetup.sh
...
for
...
setting
...
up
...
your
...
runtime
...
and
...
compilation
...
environment
...
later.
No Format |
---|
} ./make_setup_script.sh {noformat} |
This
...
setup
...
script
...
looks
...
for
...
the
...
following
...
environment
...
variables
...
to
...
determine
...
your
...
Pandora
...
setup.
package | variable | optional? |
---|---|---|
PandoraPFANew | PANDORAPFA | no |
LCIO | LCIO | no |
ROOT | ROOTSYS | yes |
PandoraMonitoring | PANDORAMONITORING | yes |
If ROOTSYS and PANDORAMONITORING are not defined in the environment, then visualization will be disabled.
Source the new setup script that was generated.
No Format |
---|
||package||variable||optional?|| |PandoraPFANew|PANDORAPFA|no| |LCIO|LCIO|no| |ROOT|ROOTSYS|yes| |PandoraMonitoring|PANDORAMONITORING|yes| If ROOTSYS and PANDORAMONITORING are not defined in the environment, then visualization will be disabled. Source the new setup script that was generated. {noformat} . mysetup.sh {noformat} |
Alternately,
...
a
...
Makefile
...
can
...
be
...
generated
...
with
...
CMake,
...
using
...
the
...
following
...
command.
No Format |
---|
} cmake -DPandoraPFANew_HOME=$PandoraPFANew_HOME -DLCIO_HOME=$LCIO_HOME CMAKE_MODULE_PATH=$CMAKE_MODULE_PATH -DROOT_HOME=$ROOTSYS {noformat} |
Now
...
build
...
the
...
slicPandora
...
project.
No Format |
---|
} make {noformat} |
The
...
slicPandora
...
project
...
should
...
now
...
be
...
built
...
successfully,
...
if
...
its
...
dependencies
...
are
...
present
...
and
...
setup
...
correctly.
...
If
...
compilation
...
or
...
linking
...
errors
...
occur,
...
then
...
check
...
that
...
LCIO
...
and
...
Pandora
...
were
...
both
...
installed
...
successfully
...
and
...
that
...
the
...
setup
...
script
...
is
...
pointing
...
to
...
the
...
correct
...
locations
...
of
...
these
...
packages.
...
If
...
monitoring
...
has
...
been
...
enabled,
...
check
...
that
...
ROOT
...
and
...
PandoraMonitoring
...
are
...
configured
...
and
...
built
...
successfully
...
and
...
that
...
their
...
environment
...
variables
...
are
...
set.
...
Running
...
Events
Steps
The essential steps to generating slicPandora events are as follows.
1) Use SLIC to generate LCIO simulation data.
2) Add tracks to the event by running a tracking package such as LCSim's SeedTracker.
3) Add the TrackState collections so slicPandora knows the Track momenta. (can be combined with #2 into one LCSim job)
4) Run slicPandora with the LCSim output, a Pandora XML geometry generated by GeomConverter, and a Pandora settings XML file.
These steps are covered in more detail below.
Generating Tracks Using LCSim
Before the simulated LCIO events can be run through Pandora, the LCSim tracking needs to run in order to add a collection of tracks.
If you don't know how LCSim batch mode works, then review the LCSim XML instructions.
Tracking Steering File
Below is an example XML steering file for LCSim to generate the Tracks and TrackStates for the sidloi3 detector.
No Format |
---|
h3. Steps The essential steps to generating slicPandora events are as follows. 1) Use SLIC to generate LCIO simulation data. 2) Add tracks to the event by running a tracking package such as LCSim's SeedTracker. 3) Add the TrackState collections so slicPandora knows the Track momenta. (can be combined with #2 into one LCSim job) 4) Run slicPandora with the LCSim output, a Pandora XML geometry generated by GeomConverter, and a Pandora settings XML file. These steps are covered in more detail below. h3. Generating Tracks Using LCSim Before the simulated LCIO events can be run through Pandora, the LCSim tracking needs to run in order to add a collection of tracks. If you don't know how LCSim batch mode works, then review the [LCSim XML instructions|lcsim xml]. h4. Tracking Steering File Below is an example XML steering file for LCSim to generate the Tracks and TrackStates for the sidloi3 detector. {noformat} <lcsim xmlns:xs="http://www.w3.org/2001/XMLSchema-instance" xs:noNamespaceSchemaLocation="http://www.lcsim.org/schemas/lcsim/1.0/lcsim.xsd"> <inputFiles> <file>./pi_Theta90_10GeV-0-1000_SLIC-v2r8p3_geant4-v9r3p1_QGSP_BERT_sidloi3.slcio</file> </inputFiles> <control> <numberOfEvents>1000</numberOfEvents> <verbose>true</verbose> <printSystemProperties>false</printSystemProperties> </control> <execute> <driver name="EventMarkerDriver"/> <driver name="CalInfoDriver"/> <driver name="MainTrackingDriver"/> <driver name="TrackStateDriver"/> <driver name="Writer"/> </execute> <drivers> <driver name="CalInfoDriver" type="org.lcsim.recon.util.CalInfoDriver"/> <driver name="MainTrackingDriver" type="org.lcsim.recon.tracking.seedtracker.trackingdrivers.sidloi2.MainTrackingDriver"/> <driver name="EventMarkerDriver" type="org.lcsim.job.EventMarkerDriver"> <eventInterval>10</eventInterval> </driver> <driver name="TrackStateDriver" type="org.lcsim.recon.tracking.seedtracker.SeedTrackerTrackStateDriver"/> <driver name="Writer" type="org.lcsim.util.loop.LCIODriver"> <outputFilePath>./pi_Theta90_10GeV-0-1000_SLIC-v2r8p3_geant4-v9r3p1_QGSP_BERT_sidloi3_lcsimTracking.slcio</outputFilePath> </driver> </drivers> </lcsim> {noformat} |
The
...
input
...
files
...
section
...
needs
...
to
...
be
...
changed
...
to
...
point
...
to
...
your
...
local
...
simulated
...
SLIC
...
events,
...
and
...
the
...
outputFilePath
...
would
...
also
...
be
...
changed
...
to
...
have
...
a
...
name
...
based
...
on
...
the
...
input
...
file.
...
You
...
can
...
easily
...
make
...
a
...
script
...
to
...
automate
...
this.
...
More
...
LCSim
...
Tracking
...
Details
...
The
...
LCSim
...
job
...
must
...
accomplish
...
three
...
tasks
...
before
...
the
...
events
...
can
...
be
...
read
...
into
...
Pandora,
...
in
...
this
...
order.
...
- Generation
...
- of
...
- a
...
- Tracks
...
- collection
...
- using
...
- an
...
- appropriate
...
- Seed
...
- Tracker
...
- Driver.
...
- Adding
...
- TrackState
...
- collections
...
- using
...
- the
...
- SeedTrackerTrackState
...
- Driver.
...
- Writing
...
- out
...
- the
...
- necessary
...
- LCIO
...
- collections
...
- to
...
- a
...
- data
...
- file
...
- to
...
- be
...
- read
...
- into
...
- Pandora.
...
To
...
generate
...
the
...
Tracks,
...
a
...
top-level
...
Driver
...
should
...
be
...
run
...
that
...
covers
...
subdetector
...
setup,
...
digitization,
...
and
...
track
...
finding
...
and
...
fitting.
...
This
...
top-level
...
Driver
...
will
...
likely
...
be
...
specific
...
to
...
a
...
certain
...
detector
...
design.
...
For
...
instance,
...
this
...
simple
...
Driver
...
definition
...
is
...
sufficient
...
to
...
generate
...
tracks
...
in
...
the
...
sidloi3
...
detector.
No Format |
---|
} <driver name="MainTrackingDriver" type="org.lcsim.recon.tracking.seedtracker.trackingdrivers.sidloi3.MainTrackingDriver"/> {noformat} |
Three
...
TrackState
...
collections
...
need
...
to
...
be
...
added
...
to
...
the
...
LCIO
...
output
...
to
...
provide
...
Pandora
...
with
...
track
...
information
...
at
...
the
...
track
...
origins,
...
the
...
ECal,
...
and
...
the
...
end
...
point.
...
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.
No Format |
---|
{noformat} <driver name="CalInfoDriver" type="org.lcsim.recon.util.CalInfoDriver"/> <driver name="TrackStateDriver" type="org.lcsim.recon.tracking.seedtracker.SeedTrackerTrackStateDriver"/> {noformat} |
Finally,
...
an
...
LCIODriver
...
should
...
be
...
added
...
to
...
the
...
end
...
of
...
the
...
event
...
processing
...
to
...
output
...
the
...
appropriate
...
collections.
No Format |
---|
} <driver name="Writer" type="org.lcsim.util.loop.LCIODriver"> <outputFilePath>OUTPUT_FILE</outputFilePath> </driver> {noformat} The _ |
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> {noformat} |
Now
...
that
...
tracks
...
and
...
track
...
states
...
have
...
been
...
added
...
to
...
the
...
events,
...
we
...
are
...
ready
...
to
...
use
...
Pandora
...
itself.
PandoraFrontend
The PandoraFrontend binary provides a simple frontend to slicPandora.
The syntax of this command is the following.
No Format |
---|
h3. PandoraFrontend The PandoraFrontend binary provides a simple frontend to slicPandora. The syntax of this command is the following. {noformat} ./bin/PandoraFrontend geometry.xml pandoraSettings.xml inputEvents.slcio reconOutput.slcio [nevents] {noformat} 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. {noformat} |
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{noformat}
|
The
...
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.
...
Using
...
GeomConverter
...
to
...
Output
...
the
...
Pandora
...
Geometry
...
Format
...
The
...
...
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 {noformat} |
This
...
will
...
write
...
out
...
a
...
Pandora
...
XML
...
file
...
to
...
"myPandoraGeom.xml"
...
from
...
the
...
compact
...
description
...
in
...
"myCompactDetector.xml".