Adding a New Detector to STAR


The STAR Geometry Model

The STAR Geometry is implented in geant 3, which provides the geometry description to STAR's Monte Carlo application, starsim.   The geant3 model is
implemented using the Advanced Geometry Interface for GSTAR language.   AGI provides a flexible and robust framework in which detector
geometries can be quickly implemented.  STAR is currently migrating from the AGI language to a related framework called AgML.  AgML stands for
"Another Geometry Modelling Language."  It is based on XML, and is the preferred language in which new geomtries should be implemented.   AgML
provides backwards compatability with the AGI language, in order to continue supporting the starsim application as we transition to a new STAR virtual
Monte Carlo application. 

Geometry Definition

Users wishing to develop and integrate new detector models into the STAR framework will be intersted in the following links:

Tracking Interface (Stv)

Exporting detector hits

  1. Implement a hit class based on StEvent/StHit
  2. Implement a hit collection
  3. Implement an iterator over your hit collection based on StEventUtilities/StHitIter
  4. Add your hit iterator to the StEventUtitlies/StEventHitIter


Implementing a custom seed finder

ID Truth

ID truth is an ID which enables us to determine which simulated particle was principally responsible for the creation of a hit in a detector, and eventually the physics objects (clusters, points, tracks) which are formed from them.  The StHit class has a member function which takes two arguements:

  • idTru -- the primary key of the simulated particle, i.e. "track_p" in the g2t hit structure
  • qaTru -- the quality of the truth value, defined as the dominant contributor to the hit, cluster, point or track.
Implementation of ID truth begins in the slow simulator.  Here, every hit which is created should have an ID truth value assigned. 

When hits are built up into clusters, the clustering algorithm should set the idtruth value for the cluster based on the dominant contributor of the hits which make up the cluster.

When clusters are associated into space points, the point finding algorithm should set the idtruth value for the point.  In the event that two clusters are combined with two different idTruth values, you should set idTruth = 0.

Interface to Starsim

The interface between starsim and reconstruction is briefly outlined here

  • You do not have access to view this node 

Information about geometries used in production and which geometries to use in simulations may be found in the following links:

  • Existing Geometry Tags used in Production
  • The STAR Geometry in simulation & reconstruction contains useful information on the detector configurations associated with a unique geometry tag.  Production geometry tags state the year for which the tag is valid, and a letter indicating the revision level of the geometry.  For example, "y2009c" indicates the third revision of the 2009 configuration of the STAR detector.  Users wishing to run starsim in their private areas are encouraged to use the most recent revision for the year in which they want to compare to data.

Comparisons between the original AgSTAR model and the new AgML model of the detector may be found here:

AgML Project Overview and Readiness for 2012

HOWTO Use Geometries defined in AgML in STARSIM
AgML geometries are available for use in simulation using the "eval" libraries. 
$ starver eval
The geometries themselves are available in a special library, which is setup for backwards compatability with starsim.  To use the geometries you load the "" library in a starsim session, either interactively or in a macro:
starsim> detp geom y2012

starsim> gexe $STAR_LIB/
starsim> gclos all
HOWTO Use Geometries defined in AgML in the Big Full Chain
AgML geometries may also be used in reconstruction.  To access them, the "agml" flag should be provided in the chain being run:
root [0] .L bfc.C
root [1] bfc(nevents,"y2012 agml ...", inputFile);


Geometry in Preparation: y2012

Major changes:

1. Support cone, ftpc, ssd, pmd removed.
2. Inner Detector Support Module (IDSM) added                                                                  
3. Forward GEM Tracker (FGTD) added
Use of AgML geometries within starsim:
$ starver eval
$ starsim
starsim> detp geom y2012
starsim> gexe $STAR_LIB/
starsim> gclos all
Use of AgML geometries within the big full chain:
$ root4star
root [0] .L bfc.C
root [1] bfc(0,"y2012 agml ...",inputFile);

Current (10/24/2011) configuration of the IDSM with FGT inside --



Page maintained by Jason Webb <>