SiguangTMC

Aus HERMESwiki
Version vom 12. Mai 2009, 23:18 Uhr von Rlamb (Diskussion _ Beiträge)
(Unterschied) ← Nächstältere Version _ Aktuelle Version (Unterschied) _ Nächstjüngere Version → (Unterschied)
Zur Navigation springen Zur Suche springen

Page maintainer: Alberto

Underconstruction.gif This page is not yet ready for use or review. It is assigned to Alberto. The page isn't being edited right this minute, so feel free to add any information you have about this subject.

Intro

Siguang TMC (sTMC) is a C++ code developed to correct the effect of the target magnetic field in the particle trajectories.

Installation

Getting ready to build

sTMC makes use of some of the configuration scripts included in the r25 release of the HERMES software. Please set the environment variable HERMES_ROOT to /hermes/r25 before you continue. In order to be compiled, sTMC needs in addition a working installation of ROOT. Just keep in that the ROOTSYS environment variable is properly defined, and ROOT executables and libraries added to the system's path.

For example:

$> export ROOTSYS=/opt/products/root/5.20.00
$> export PATH=$ROOTSYS/bin:$PATH
$> export LD_LIBRARY_PATH=$ROOTSYS/lib:$LD_LIBRARY_PATH

Finally, one should define the STMC to the desired installation path, e.g.:

$> export STMC=<some_path>/sTMC

Getting the sources

The sTMC sources are available via CVS on lebowski.desy.de. To check out the latest version do the following:

$> cd <some_path>
$> export CVSROOT=:pserver:cvs@lebowski.desy.de:/public
$> cvs login
(Logging in to cvs@lebowski.desy.de)
CVS password: cvs
$> cvs -z3 checkout -P sTMC
cvs checkout: Updating sTMC   
U sTMC/...
U ...

You can also download a tarball with the sources from http://www-hermes.desy.de/CODES/sTMC.

Compiling

To compile the base sTMC package just do:

$> cd $STMC
$> ./configure
$> make

IMPORTANT REMARK: In order to compile any code which makes use of sTMC libs and includes, the user must specify the proper path to them. Depending on the target magnet configuration sTMC uses a different set of sources. Just define your experimental setup selecting the year range:

  • For 2002 and 2003 Transverse Target:
$> export STMCYEAR=0203
  • For 2004 and 2005 Transverse Target:
$> export STMCYEAR=0405
  • For 2006 and 2007 Recoil Magnet On:
$> export STMCYEAR=0607

And then, add the right shared library to the the system libraries path:

$> export LD_LIBRARY_PATH=${STMC}/${STMCYEAR}:${STMC}/HParticle:$LD_LIBRARY_PATH

Structure

The Structure of sTMC is pretty simple, and the user only needs to control two classes:

  • SiguangTMC: The TMC manager. It is the main object to control the tracking magnetic corrections and to reconstruct decaying particles and interaction vertexes.
  • HParticle: The particle class. HParticle inherits from ROOT's TParticle. It is the basic particle handler used by sTMC to preform the magnetic transport and to manage the information.

Usage

To make use of the sTMC utilities, the user needs to create first the sTMC object. This is normally done at the beginning of the analysis program (in the user_init() of the Hanna program or in the Begin() method of the corresponding Hanna++ analyzer module). Then, all the sTMC methods can be invoked to correct the particle's trajectories, reconstruct decaying particles, interactions vertexes, etc.

sTMC needs basic information about the particles involved in the reconstruction: The particle ID and the momentum of the uncorrected track at some point of the target region. For HERMES data, this information is usually found in the g1Track and smTrack adamo tables present in uDST files. The particle information has to be converted first into HParticle format. This process is normally done at event level (in the user_event() of the Hanna program or in the Process() method of a Hanna++ analyzer module).

To go into details about the sTMC usage take a look to the examples.

Examples

  1. Toy example: It shows some basic functionality of sTMC. Go to the test directory in your sTMC installation path (${STMC}/test) to compile and run the example. Follow the instructions there in.

More Information

Related Pages

Further Reading