[Halld-offline] reading SC geometry

David Lawrence davidl at jlab.org
Thu Nov 5 17:03:17 EST 2009


Hi Craig,

    Yes, this is a current limitation in JANA's geometry feature. Since 
there are several polyplane elements in the XML with no way to specify  
one (other than using the numbers you're trying to extract!)  you 
cannot  get  this information. What needs to be done is a method needs 
to be added to the JGeometry class to allow one to ask for all elements 
that satisfy a given xpath. I'll put this on the list for the next JANA 
release. In the mean time, you should probably just hardcode the numbers 
and defer the XML extraction part until later.

Regards,
-David

Craig Bookwalter wrote:
> Hi folks,
>     I'm trying to write a couple of routines that match hits in the SC 
> to tracks in the FDC and CDC, and I am stuck on getting the geometry out 
> from HDDS. Using jgeomread, I see a tempting section:
>
> [snip]
> /HDDS/StartCntr_s/section/pgon[@comment='start counter scintillator' and 
> @materi
> al='Scintillator' and @name='STRC' and @profile='-4.500000 9.000000' and 
> @segmen
> ts='1' and @sensitive='true']
> /HDDS/StartCntr_s/section/pgon/polyplane[@Rio_Z='7.322573 7.623501 
> 0.000000']
> /HDDS/StartCntr_s/section/pgon/polyplane[@Rio_Z='7.322573 7.623501 
> 50.000000']
> /HDDS/StartCntr_s/section/pgon/polyplane[@Rio_Z='7.322011 7.623501 
> 50.009194']
> /HDDS/StartCntr_s/section/pgon/polyplane[@Rio_Z='7.292758 7.594248 
> 50.487477']
> /HDDS/StartCntr_s/section/pgon/polyplane[@Rio_Z='7.285948 7.592000 
> 50.524220']
> /HDDS/StartCntr_s/section/pgon/polyplane[@Rio_Z='7.203756 7.509808 
> 50.967688']
> /HDDS/StartCntr_s/section/pgon/polyplane[@Rio_Z='7.180759 7.496290 
> 51.040625']
> /HDDS/StartCntr_s/section/pgon/polyplane[@Rio_Z='7.056895 7.372426 
> 51.433472']
> /HDDS/StartCntr_s/section/pgon/polyplane[@Rio_Z='7.007656 7.338360 
> 51.541516']
> /HDDS/StartCntr_s/section/pgon/polyplane[@Rio_Z='6.854363 7.185067 
> 51.877886']
> /HDDS/StartCntr_s/section/pgon/polyplane[@Rio_Z='6.767627 7.120563 
> 52.019427']
> /HDDS/StartCntr_s/section/pgon/polyplane[@Rio_Z='6.599181 6.952118 
> 52.294306']
> /HDDS/StartCntr_s/section/pgon/polyplane[@Rio_Z='6.483595 6.850960 
> 52.459379']
> /HDDS/StartCntr_s/section/pgon/polyplane[@Rio_Z='2.010570 2.377935 
> 58.847522']
> /HDDS/StartCntr_s/section/pgon/polyplane[@Rio_Z='2.257075 2.257075 
> 59.020127']
> [end snip]
>
> But I don't know how to read this out from the examples on the wiki, 
> since these polyplanes have no attribute names like `paddle1' or 
> something. I suppose I could do something like:
>
> Get("//StartCntr_s/section/pgon/polyplane[@Rio_Z='7.322573 7.623501 
> 0.000000']", sc_planes_vec)
>
> but it seems lame to have to hard-code the positions. Also, I noticed 
> that the TOF and FDC read their geometry from a "composition" section 
> rather than a polyplane -- perhaps I shouldn't even be reading out the 
> polyplanes, but I don't see a similarly tempting composition section for 
> the start counter. All I really want is a point in the plane and a 
> normal vector for each start counter paddle, so I can follow Dave's 
> recipe with the DMagneticFieldStepper, so any guidance in that direction 
> would be greatly appreciated. Thanks in advance!
>
> --cb
>
>
>   

-- 

------------------------------------------------------------------------
 David Lawrence Ph.D.
 Staff Scientist                 Office: (757)269-5567   [[[  [   [ [       
 Jefferson Lab                   Pager:  (757)584-5567   [  [ [ [ [ [   
 http://www.jlab.org/~davidl     davidl at jlab.org         [[[  [[ [[ [[[
------------------------------------------------------------------------





More information about the Halld-offline mailing list