

\subsubsection*{Overview}

Gear is a geometry description toolkit for I\-L\-C reconstruction software. It is easy to use and lightweight. Gear defines an abstract interface for the description of an I\-L\-C detector as needed for the development of particle flow algorithms. This description is somewhat different from the geometry description needed for the detailed simulation of the detector response, though of course related. For the simualtion one needs very detailed knowledge of the material distribution in space whereas for the reconstruction mostly a higher level description of the subdetector's charcteristics is needed. Depending on the particular reconstruction algorithm a hand full of parameters might suffice to describe a full subdetector, e.\-g. the main calorimeters -\/ certainly a lot less than waht is needed for the computation of the detailed detector response with geant4. The aim of Gear is now to provide the interface this recosntruction view of the detector geometry.

A first implementation uses X\-M\-L files for the definition of the subdetector's geometry parameters. Currently under development is an implementation for the abstract interface to generic material properties in space, like the material's density at a given point or the integrated B-\/field along a (straight) path between two points.

\subsubsection*{Code Structure}

At the core of the geometry description in gear is the class \doxyref{gear\-::\-Gear\-Mgr}{p.}{classgear_1_1GearMgr}. An instance of that class provides the user with available implementations of the various sub-\/interfaces, e.\-g. an instance of \doxyref{gear\-::\-T\-P\-C\-Parameters}{p.}{classgear_1_1TPCParameters}. All subdetector interfaces inherit from \doxyref{gear\-::\-Gear\-Parameters}{p.}{classgear_1_1GearParameters} -\/ this allows to store arbitrary named parameters of simple types and vectors of such types within any subdetector parameter interface. Also generic named parameter sections can be used through this interface, e.\-g in case a particular subdetector type has not yet been implemented in gear. 

In the current implementation X\-M\-L-\/files are used to provide the subdetector parameters to Gear. The user code however only applies the abstract interface and is thus independent from the X\-M\-L-\/file implementation. 

\subsubsection*{Installation}

Download instructions for gear can be found {\tt here}

To build gear from source you need to have {\tt C\-Make} installed on your system

build instructions (with cmake)\-:

\$ mkdir build \par
 \$ cd build \par
 \$ cmake .. \par
 \$ make install \par


To build the gear tests type\-:\par
 \$ make tests

\subsubsection*{Example code}

The file {\bfseries ./src/test/testgear.cc} serves as a simple test and example program. Also the {\itshape print}-\/methods in {\bfseries ./src/gearimpl/\-Util.cc} are a good starting point for learning how to access the information in Gear. 

Here is an {\tt example X\-M\-L-\/file} with a detector description in gear.

\subsubsection*{Merging X\-M\-L files}

Existing X\-M\-L files with detector geometry definitions can be extended by a new tool that merges two X\-M\-L files\-:\par
 {\bfseries ./bin/merge\-X\-M\-L}\par
 This is particullarly useful if the detector description has been automatically created, e.\-g. by Mokka\-Gear but is lacking some (user) specific information.

\subsubsection*{Release Notes}

Gear is under development and there are frequent releases. Please check the {\tt ./release.notes}



 

If you have any questions or proposals for new features please contact the author\-:

{\tt frank.\-gaede@desy.\-de} 