AgML Library Status and Tuneup

Abstract:  In this blog we summarize the current status of the AgML library, validating it against the original AgSTAR library.  It will not be exhaustive... I'll look through the PDF files and try to identify the biggest issues, fix them, then iterate until done.  I will summarize each issue when found and record the solution.  Issues which are present in a later geometry are assumed to be present in earlier geometries as well.

General:

Issue 1: BBCM has ~2% material difference in cladding, plus edge effects.

Mixture BbcmGeo_Alkap Material BbcmGeo_Alkap last touched in block CLAD of module BbcmGeo   Aeff=12.8774 Zeff=6.45625 rho=1.432 radlen=27.7179 index=19
   Element #0 : C  Z=  6.00 A= 12.01 w= 0.625 natoms=5
   Element #1 : H  Z=  1.00 A=  1.01 w= 0.042 natoms=4
   Element #2 : O  Z=  8.00 A= 16.00 w= 0.333 natoms=2
   Element #3 : AL  Z= 13.00 A= 26.98 w=20.000 natoms=0

weight should be 0.3202 for Al, but natoms recast to (int) by ROOT and 
some funny business happens.  Simple fix... scale all weights by 10,000 
so that when ROOT recasts the weights to an integer, we still get the same 
result.

Issue 2: FTPC has issues with FSEN and FSEC.  These are sensitive volumes declared w/in (as) a division... need to verify that parameters are passed through the division properly.

Issue 3: BTOF has  issues

Issue 4: Minor problems with CALB volumes at edge of acceptance.  Minor problems with endcap SMD planes near edge of acceptance.

Punt.

y2011 Geometry:

Issue 1: SROD material difference.  Likely due to  the honeycomb sandwhich update a couple of months ago.

Needed to define SCON14 tag for support cone.
  Additionally implemented y2009d.

Issue 2: PHMD material difference.  Difference on edge of acceptance.  Appears to be some minor and some major positioning issues in the PHMD volumes.

sizeN(N) declared as a real lambda function in Mortran, but int in AgMl.

Issue 3: BTOF issues seem to be localized to three volumes BUND, BCOV, BWAT.  And BWAT is broken in AgSTAR... Why?  Could be due to some of the refactoring done to the XML.

y2010 Geometry:

Issue 1: PHMD material difference persists from y2011.

Issue 2: BTOF material differences on the order of a few %.  May be due to TPC radius correction of a few months ago.

              --> No.  TPC rmax=207.77 cm is the correct radius.

y2009 Geometry:

Issue: BTOF errors persist.

y2008 Geometry:

Issue 1: BTOF errors persist, suggesting that this is a configuration issue internal to the BTOF module, not due to the TPC radius.

Issue 2: Several subvolumes show small / large discrepancies around eta=2.0 in y2008a.  Gone in b, c.

y2007 Geometry:

Issue 1: Support cone is MIA.

Well... not missing so much as there appear to be two of them... one placed in the cave, the other placed in the SVT.  Suspect then overlap takes care of generating the material difference.
Suggests a config issue with the SVT perhaps?  No... 

The SCON02 flag should switch _off_ the support cone (set module="NONE").

Issue 2: SVT material distribution is screwy (possibly related to y2007).

Also possible this is related to issue 1.  Punt until next iteration.

Issue 3: ECAL configuration issues (5% material difference mainly due to LARGE difference at SMD depth... looks like wrong module in AgML)

The "Air ==> Iron" bug was fixed in pams/ back in August of 2009, and not propagated to StarDb/VmcGeometry/.  The AgML source is derived from the code in pams/, and so it has the fix.  The comparison is between the code in StarDb/ and the AgML geometry.

Issue 4: FPDM configuration issues.

y2007 geometry did not explicitly declare the FPDM03 flag, and inherited FPDM02 from y2006.

y2006 Geometry:

Issue 1: Beam pipe has 5% material difference.  Wrong version?

Issue 2: FPD configuration issues (different FPD from y2007).

Issue is with volume FLGF.  The density of the PbGlass is 3.61 g/cm^3 in AgSTAR and 3.86 in AgML.
  This may be similar to the issue with the EEMC... possible that StarDb/ doesn't reflect the
  current state of pams/geometry/.

Issue 3: IBEM, which also indicates the VPD material differences.

========================================================================================

Will start iterating on fixes at this point, and come back to the y2005 and y2004 geometries once the later ones are in shape.

========================================================================================

Summary

At this point I've gone through and identified a few issues with the AgML and a few issues with the current set of files in StarDb/VmcGeometry.  I will check in changes and run the next test against geometries exported from DEV using g2root, rather than the files which are in StarDb/VmcGeometry.