[Clas_offline] problem with spheres in GSIM

Cole Smith lcs1h at imap.phys.virginia.edu
Thu Oct 7 10:24:31 EDT 2010


The SPHE volume will only display correctly with DCUT but
only with some non-intuitive choices of polar and azimuthal
starting,ending angles.  Since it seems buggy I use PCON for
targets and approximate arcs with segments.  I've attached
some code that produces a cylindrical cell with spherical
downstream end cap, LH2 + Al walls.

Cole


On Thu, 7 Oct 2010, Silvia Niccolai wrote:

> Hello,
> while working on implementing the eg1-dcs polarized target geometry in
> GSIM, I found out that interactive GSIM doesn't display spherical volumes.
> After discussing with some collegues and looking through the old GSIM
> mailing list, I figured that this problem was known since the year 1999,
> is due to a bug in GEANT3 and it doesn't affect only the visualization of
> the spherical volumes, but also the stepping of particles through it
> (message from Franz Klein of the 30th of July 1999).
> Still, I need to put a spherical shell into my pol. target geometry...
> Has anyone found a workaround/fix for this problem?
> Thank you and best regards,
> Silvia
>
> _______________________________________________
> Clas_offline mailing list
> Clas_offline at jlab.org
> https://mailman.jlab.org/mailman/listinfo/clas_offline
>
-------------- next part --------------
      rcel       = celld/2.*2.54 ! radius of internal volume
      wall_cellA = 5./1000.*2.54 ! target wall 5 mil Al

c Target Cell (AL 7075)

      prohr(1)   = 0.
      prohr(2)   = 360.
      prohr(3)   = 15.0

      prohr(4)   = -(cell_length-rcel)/2.-wall_cellA
      prohr(5)   = 0.
      prohr(6)   = rcel+wall_cellA

      prohr(7)   = -(cell_length-rcel)/2.
      prohr(8)   = 0.
      prohr(9)   = rcel+wall_cellA 

      prohr(10)  = -(cell_length-rcel)/2.
      prohr(11)  = rcel
      prohr(12)  = rcel+wall_cellA

      prohr(13)   =  (cell_length-rcel)/2.
      prohr(14)   = rcel
      prohr(15)   = rcel+wall_cellA

      i2         = prohr(3)-6      !planes for downstream hemisphere
      dangle     = acos(0.)/(i2+1) !angular steps wrt. z-axis 

      do i =1,i2                   !no of planes in hemisphere
        rinc          = rcel*sin(i*dangle)
        prohr(i*3+13) = prohr(13)+rinc
        prohr(i*3+14) = rcel*cos(i*dangle)
        dangleprime   = asin(rinc/(rcel+wall_cellA))
        prohr(i*3+15) = (rcel+wall_cellA)*cos(dangleprime)
      enddo

      npprohr=prohr(3)*3+3

      prohr(npprohr-5) = (cell_length+rcel)/2. 
      prohr(npprohr-4) = 0.
      dangleprime      = asin(rcel/(rcel+wall_cellA))
      prohr(npprohr-3) = (rcel+wall_cellA)*cos(dangleprime) 

      prohr(npprohr-2) = (cell_length+rcel)/2.+wall_cellA
      prohr(npprohr-1) = 0.
      prohr(npprohr)   = 0.

      call gsvolu('CEL1','PCON',29, prohr, npprohr, ivolu)  ! AL 7075
      call gspos('CEL1',1,'TAR1',0.,0.,-rcel/2.,0,'ONLY')  

c Target Volume (LH2)

      prohr(1)   = 0.
      prohr(2)   = 360.
      prohr(3)   = 12.0

      prohr(4)   = -(cell_length-rcel)/2. 
      prohr(5)   = 0.
      prohr(6)   = rcel 

      prohr(7)   =  (cell_length-rcel)/2.
      prohr(8)   = 0.
      prohr(9)   = rcel 

      i2         = prohr(3)-3      !planes for downstream hemisphere
      dangle     = acos(0.)/(i2+1) !angular steps wrt. z-axis 

      do i =1,i2                   !no of planes in hemisphere
        rinc          = rcel*sin(i*dangle)
        prohr(i*3+7) = prohr(7)+rinc
        prohr(i*3+8) = 0.
        dangleprime  = asin(rinc/rcel)
        prohr(i*3+9) = rcel*cos(dangleprime)
      enddo

      npprohr=prohr(3)*3+3

      prohr(npprohr-2) = (cell_length+rcel)/2. 
      prohr(npprohr-1) = 0.
      prohr(npprohr  ) = 0.

      call gsvolu('TARG','PCON',1, prohr, npprohr, ivolu)  ! LH2
      call gspos('TARG',1,'TAR1',0.,0.,-rcel/2,0,'MANY')  


More information about the Clas_offline mailing list