WDHCAL Simulation, Analysis and Reconstruction Code

Common SVN Repository

All the source code related to the WDHCAL analysis should be stored in the common SVN repository. You can check it out using

svn co svn+ssh://svn.cern.ch/reps/clicdet/trunk/DHCalAnalysis
It contains several sub-directories for the different software packages (see below).

Conversion of Raw Data

Detector Simulation (Mokka)

Digitization and Reconstruction (Marlin)

The event reconstruction is performed in Marlin. The processors for the WDHCAL analysis are in the common SVN repository under
svn co svn+ssh://svn.cern.ch/reps/clicdet/trunk/DHCalAnalysis/DHCalMarlin

First set up the environment, create a build directory, let CMake create the make file and run the compilation with make.

source env.sh
mkdir build
cmake -C ../calicebuild.cmake ..
make install
cd ..

In order to use those processors in Marlin the library (libCaliceDhcal.so) has to be part of the MARLIN_DLL environment variable. This is already set in the env.sh. You can now add the DHCAL processors to your Marlin steering file and run it with Marlin <steering.xml> Example steering files can be found in the steer directory of DHCalMarlin.

Running on the lxbatch

This is an example script to run a Marlin job on the CERN lxbatch farm.
#!/bin/bash
#BSUB -J singleParticles[1-399]
#BSUB -q 1nh
#BSUB -o /afs/cern.ch/user/j/jfstrube/work/public/DHCAL/stdout.%J_%I
#BSUB -e /afs/cern.ch/user/j/jfstrube/work/public/DHCAL/stderr.%J_%I
#BSUB -R "type==SLC5_64"

###### This top section contains instructions for the batch submission
###### (which environment, which queue (1nh), which name (399 jobs of name singleParticles))
###### obviously you need to change the path for the stdout and stderr

###### Now follows the actual job
###### First setup your environment
source /afs/cern.ch/eng/clic/software/x86_64-slc5-gcc41/Calice/devel/envCalice.sh
source /afs/cern.ch/sw/lcg/contrib/gcc/4.7.2/x86_64-slc5-gcc47-opt/setup.sh
export MARLIN_DLL=/afs/cern.ch/user/j/jfstrube/work/public/DHCAL/DHCalAnalysis/DHCalMarlin/lib/libCaliceDhcal.so:${MARLIN_DLL}

###### Now create your sandbox
mkdir LSB_${LSB_JOBID}_${LSB_JOBINDEX}
cd LSB_${LSB_JOBID}_${LSB_JOBINDEX}

###### This reads a file containing a list of runs
contents=($(cat /afs/cern.ch/user/j/jfstrube/work/public/DHCAL/DHCalAnalysis/DHCalMarlin/steer/filelist.txt))
###### The filename is one particular line in that file
###### LSB_JOBINDEX is the number of one particular job (between 1 and 399 in this case)
filename=${contents[${LSB_JOBINDEX} - 1]}

###### Copy the run from castor into the sandbox
xrdcp root://castorpublic.cern.ch//castor/cern.ch/grid/ilc/user/c/cgrefe/calice/dhcal/lcio/Conversion-2013_02_18/${filename} -OSstagerHost=castorpublic\&svcClass=ilcdata -s .
###### Copy the Marlin steering file into the sandbox
cp /afs/cern.ch/user/j/jfstrube/work/public/DHCAL/DHCalAnalysis/DHCalMarlin/steer/BoxFinding.xml .
###### And run Marlin on the run that was just copied
Marlin --global.LCIOInputFiles="${filename}" BoxFinding.xml
If you save the contents to a file name bsubScript.sh, you can submit the job using the bsub < bsubScript.sh

Run Marlin on the Grid using ILCDIRAC

Python & ROOT (Analysis, Plotting)

Event Display

Raw Data

The event display needs the package tinyxml, which does not exist on lxplus, so you have to find a machine where you can install that. First, set up your environment. Then, build the code.
cd online/lib
make
cd ..
bin/buildUser edisp 

The event display needs a run file as input. Unfortunately, it does not work with our LCIO data format.

LCIO Files

The preferred event display for LCIO files is DRUID which is part of ILCSOFT

Source the environment script:

source /afs/cern.ch/eng/clic/software/x86_64-slc5-gcc41/ILCSOFT/v01-16/init_ilcsoft.sh

Running the event display:

Druid <data.slcio> (<eventNumber>)
Druid <data.slcio> <geometry.root> (<eventNumber>)
Druid <geometry.root>
Note that the order of the arguments is important. The event number is optional.

Obtaining the geometry file:

  • The starting point is a GDML file which can be created by the simulation programs Mokka and SLIC
  • This has to be converted into a TGeo hierarchy using the following commands in ROOT:
TGeoManager::Import(”geometry.gdml”);
gGeoManager->GetTopVolume()->Draw(”ogl”);
TFile *f = new TFile(”geometry.root”,”recreate”);
gGeoManager->Write();
f->Close();

By default only collections of the type MCParticle and ReconstructedParticle are displayed. To enable drawing of all collections (including CalorimeterHits) press the right button in the second row of buttons in the "Options" tab. You can then toggle drawing of the different collections in the "Eve" tab under "Event".

Edit | Attach | Watch | Print version | History: r8 | r6 < r5 < r4 < r3 | Backlinks | Raw View | Raw edit | More topic actions...
Topic revision: r4 - 2013-07-01 - ChristianGrefe
 
    • Cern Search Icon Cern Search
    • TWiki Search Icon TWiki Search
    • Google Search Icon Google Search

    CLIC All webs login

This site is powered by the TWiki collaboration platform Powered by PerlCopyright &© 2008-2021 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
or Ideas, requests, problems regarding TWiki? use Discourse or Send feedback