Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Setup the Grid Session

This setup needs to be performed anytime you want to do any work with DIRAC.

Start by sourcing the setup script for your local copy of DIRAC.

No Format

source /nfs/slac/g/lcd/mc/prj/sw/x86_64/dirac/bashrc

The DIRAC installation location is site dependent. The above will work if you have access to SLAC NFS.

Now obtain a proxy.

No Format

dirac-proxy-init

The default user should be ilc_user which should work fine.

Now check that your proxy is valid.

No Format

dirac-proxy-info

Configuring the Working Directory

The following setup will need to be done just once.

Create some directory where you will work with user jobs.

No Format

mkdir ~/dirac_jobs
cd ~/dirac_jobs

Scripts from AFS will be used to launch the user jobs. Symlink to these in order to use the master copies.

No Format

ln -s /afs/cern.ch/work/c/cgrefe/public/jobSubmission/SiDChainJob.py
ln -s /afs/cern.ch/work/c/cgrefe/public/jobSubmission/bannedSites.py

Or you may copy them to your local directory.

No Format

cp /afs/cern.ch/work/c/cgrefe/public/jobSubmission/SiDChainJob.py .
cp /afs/cern.ch/work/c/cgrefe/public/jobSubmission/bannedSites.py .

These scripts will expect a few directories to exist so create these now.

No Format

mkdir repositoryFiles lcsimSteeringFiles trackingStrategies

You'll want a copy of the tracking strategies to be used by lcsim. This may not be used but the script expects it to exist.

No Format

cvs co lcsim # or use a local up to date copy
cp lcsim/resources/org/lcsim/recon/tracking/seedtracker/strategies/sidloi3_trackingStrategies_default.xml ./trackingStrategies

Finally, you will need an LCSim steering file to specify the drivers used in your user job. This is covered in the next section.

LCSim Steering File

This is best understood by an example.

The following is a very simple test steering file.

No Format

<lcsim xmlns:xs="http://www.w3.org/2001/XMLSchema-instance"
        xs:noNamespaceSchemaLocation="http://www.lcsim.org/schemas/lcsim/1.0/lcsim.xsd">
    <inputFiles>
        <file>${inputFile}</file>
    </inputFiles>
    <control>
        <numberOfEvents>-1</numberOfEvents>
    </control>
    <classpath>
        <jarUrl>http://www.lcsim.org/maven2/org/lcsim/lcsim-analysis/1.0-SNAPSHOT/lcsim-analysis-1.0-20130426.224545-1.jar</jarUrl>
    </classpath>
    <execute>
        <driver name="EventMarkerDriver"/>
        <driver name="AidaSaveDriver"/>
        <driver name="SimpleTrackAnalysis" />
    </execute>
    <drivers>
        <driver name="EventMarkerDriver" type="org.lcsim.job.EventMarkerDriver">
            <eventInterval>10</eventInterval>
        </driver>
        <driver name="AidaSaveDriver" type="org.lcsim.job.AidaSaveDriver">
            <outputFileName>${outputAidaFile}</outputFileName>
        </driver>
        <driver name="SimpleTrackAnalysis" type="org.lcsim.analysis.SimpleTrackAnalysis" />
    </drivers>
</lcsim>

The jarUrl should point to the jar file containing your analysis code. In this example, I have pointed to a deployed copy of the lcsim-analysis project, a module from SLAC CVS containing lcsim-based analysis code. The URL here can in theory be any jar file that is publically accessible via HTTP, though it is good to use unique, deployed versions on lcsim.org when possible.

There are three drivers that are run by this analysis.

EventMarkerDriver - prints event numbers
AidaSaveDriver - saves AIDA to an output file
SimpleTrackAnalysis - a very basic test analysis that plots track momenta

Any Driver can be included here, as long as its implementation is present in lcsim or the jars listed in the classpath section.

The

No Format
${outputAidaFile}

is a special variable that the job script uses to insert the name of the AIDA output from your analysis. The name is automatically generated from the input files and your job information.

Running the Jobs