AgML Status

Geometry Tune Up I

Identified and corrected AgML Library Status and Tuneup  in the AgML library and definition of geometry tags:

1) Identified issue with FTPC geometry
2) Support cone was improperly configured for some geometry tags, fixed.
3) The REAL function "sizen(n)" in PHMD was improperly registered as an INT in AgML.  Fixed.
4) Identified an operational issue:  The original ECALGEO was modified in August 2009 to correct the (now famous) Air-is-Iron issue. 
Several sources in StarDb/VmcGeometry/ are now out of sync with pams/geometry
This is not and will not be an issue for tracking
Decided to make all comparisons against pams/geometry instead of StarDb/VmcGeometry
5) Corrected configuration of FPDMGEO in y2007
 

Geometry Tune Up II

Identified AgML Library Status and Tuneup, II in the AgML library:

1) Mixtures should declare a component only once in AgML: corrected G10 in several geometry files
2) Switched to comparison with pams/geometry because of issue #4 above ("fixed" ECALGEO discrepancy)
3) MUTDGEO indexes an array out of bounds, and just happens to work in AgSTAR, but throws an exception in Array_t.
Consulted with Bill Llope.  Revision pending.
4) Corrected the precedence for obtaining SHAPE parameters.  AgML now reproduces a longstanding bug in BTOFGEO.
5) Corrected issue with FTPC geometry by changing the initialization of the IFLAGA and IFLAGB variables to an <Assign ... /> statement.
 
Modification to AgML support library

The AgML support library was not handling certain medium parameters properly:

Block BLAH is an example block
    Material Polystyrene
    Material MyPolystyrene isvol=1
    Shape Meh ...
EndBlock

In the above example, the medium parameter isvol=1 is ignored in AgML because it is specified by a Material declaration.  In order to fix, I modified the AgML exporter to emit code which modifies the default medium.  Note that a subsequent Medium declaration will overwrite anything declared on the material line.  This may require another round of modifications to the AgML sources.

After this fix, and some additional code to handle volumes whose creation we defer to position time, we now reproduce the AgSTAR rules for creating a new volume when either the shape or the medium parameters change.

Current Status of the y2011 Geometry: y2011

MTD has a few issues.  PMD has many issues, but the geometry itself may be ok (just difference in the geometry tree...)

TPC has a few minor issues... TOIG may have been solved already and not checked into CVS (issue with definition of N - gas).

Thoughts on AgML interface for VMC Application

Need to provide data structures in parallel with the ROOT geometry to (1) define hits, (2) define tracking cuts, (3) define other physics paramters (e.g. reflectivity, cerenkov production, etc...)

class StarGeoVolume:
      static vector<StarGeoVolume *> mVolumeTable # Map ROOT TGeoVolume to StarGeoVolume by unique vol ID
      StarGeoShape      *mShape       # Store shape parameters and ptr to concrete ROOT shape
      StarGeoMedium     *mMedium      # Medium with additional cuts, etc... and ptr to concrete ROOT medium
      StarGeoMaterial   *mMaterial    # 
      StarGeoInstrument *mInstrument  # Structure for holding Hit definitions
      StarGeoAttribute  *mAttribute   #