You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 51 Next »

Overview

The SLIC simulation package produces simulated physics events in the LCIO data format. This tutorial shows how to read these events into the Pandora PFA New project to create output Particle Flow Objects (PFOs) for analysis.

Setup

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.

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

ROOT

5.26 or greater

Download ROOT

PandoraMonitoring

head

PandoraMonitoring SVN

CMakeModules

head

CMakeModules SVN

LCIO Installation

Checkout the LCIO project from cvs.

cd /workdir
cvs -d :pserver:anonymous@cvs.freehep.org:/cvs/lcd co lcio

Building this project requires the CMake tool, the installation of which is not covered here. It additionally requires command-line GNU Make.

cd lcio
cmake .
make

The cvs head or last release tag should both work.

CMakeModules

Checkout the head of CMakeModules, required by PandoraPFANew.

svn co https://svnsrv.desy.de/public/ilctools/CMakeModules/trunk/ CMakeModules

Make an environment variable that will be referenced by PandoraPFANew build.

cd CMakeModules
export CMAKE_MODULE_PATH=`pwd`

This package does not need to be compiled. It provides CMake macros.

Pandora PFA New Installation

Check out the version of Pandora that will be used. The example below shows how to checkout the head version.

svn co https://svnsrv.desy.de/public/PandoraPFANew/PandoraPFANew/trunk PandoraPFANew

Save it to your local computer, in this case to a pandora subdirectory within the work area. A subdirectory for pandora is created in case different PandoraPFANew versions will eventually be used.

cd PandoraPFANew
cmake -DCMAKE_MODULE_PATH=$CMAKE_MODULE_PATH .
make

If the release compiles successfully, you're now ready to setup the project that interfaces SLIC to Pandora.

Set the environment variable for PandoraPFANew.

cd PandoraPFANew
export PandoraPFANew_HOME=`pwd`

This will be referenced in the build of the next package.

PandoraMonitoring Installation

Checkout the head version of PandoraMonitoring.

svn co https://svnsrv.desy.de/public/PandoraPFANew/PandoraMonitoring/trunk PandoraMonitoring

Build with cmake.

cmake -DROOT_HOME=$ROOT_HOME -DCMAKE_MODULE_PATH=$CMAKE_MODULE_PATH -DPandoraPFANew_HOME=$PandoraPFANew_HOME .

slicPandora Installation

Checkout the slicPandora project from cvs.

cd /workdir
cvs -d :pserver:anonymous@cvs.freehep.org:/cvs/lcd co slicPandora
cd slicPandora

As long as the above variables for LCIO and PandoraPFANew have been left in the environment, the following should generate a setup script called mysetup.sh for setting up your runtime and compilation environment later.

./make_setup_script.sh

Source the new setup script.

. mysetup.sh

Build the slicPandora project.

make

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.

Running Events

Overview

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.

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.

<lcsim xmlns:xs="http://www.w3.org/2001/XMLSchema-instance"
        xs:noNamespaceSchemaLocation="http://www.lcsim.org/schemas/lcsim/1.0/lcsim.xsd">
    <inputFiles>
        <file>/u/ey/jeremym/work/jobs/2010-04-09_slicPandora_single_particles/lcio/slic/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>/u/ey/jeremym/work/jobs/2010-04-09_slicPandora_single_particles/lcio/lcsimTracking/pi_Theta90_10GeV-0-1000_SLIC-v2r8p3_geant4-v9r3p1_QGSP_BERT_sidloi3_lcsimTracking.slcio</outputFilePath>
        </driver>
    </drivers>
</lcsim>

The input files section needs to be changed to point to your local simulated SLIC events.

More LCSim Tracking Details

The LCSim job must accomplish three tasks before the events can be read into Pandora, in this order.

  1. Generation of a Tracks collection using an appropriate Seed Tracker Driver.
  2. Adding TrackState collections using the SeedTrackerTrackState Driver.
  3. 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.

 <driver name="MainTrackingDriver"
         type="org.lcsim.recon.tracking.seedtracker.trackingdrivers.sidloi3.MainTrackingDriver"/>

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.

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

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

<driver name="Writer"
        type="org.lcsim.util.loop.LCIODriver">
            <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.

<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.

PandoraFrontend

The PandoraFrontend binary provides a simple frontend to slicPandora.

The syntax of this command is the following.

./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.

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

The above command requires that the input events were generated in the sidloi2 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 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.

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

This will write out a Pandora XML file to "myPandoraGeom.xml" from the compact description in "myCompactDetector.xml".

  • No labels