Re: [ROOT] TGeoArb8::Safety

From: Andrei Gheata (Andrei.Gheata@cern.ch)
Date: Mon Dec 01 2003 - 14:34:39 MET


Hi Sue,

Your observations related to TGeoArb8::Safety() are correct. It is in 
fact the last shape-related navigation algorithm missing. A fast 
algorithm computing the safety in an accurate way for this shape is hard 
to implement, but I will provide very soon a workarround underestimating 
it. Not having this was not critical so far since TGeoArb8 is quite an 
unusual shape not used by anyone yet.

  A fast workarround in order to have the distance to such a shape 
computed is to call TGeoManager::FindNextBoundary() with no argument (no 
proposed step). This will properly return the distance, but I fully 
agree that you cannot use this in the context of VMC.

As for geant4_vmc, this is currently not using any of the TGeo shapes, 
but builds only G4 native shapes through g3tog4 interface. Having G4 
working direcly with TGeo will still take some time.

  Anyway I reccommend you to take the latest CVS version of TGeo since 
it includes several fixes related to navigation.

I will let you know as soon as I will implement the algorithm.

Best regards,
Andrei

Sue Kasahara wrote:
> Hi roottalk,
> I've noticed that the TGeoArb8::Safety() has a dummy implementation:
> //_____________________________________________________________________________
> Double_t TGeoArb8::Safety(Double_t * /*point*/, Bool_t /*in*/) const
> {
> // computes the closest distance from given point to this shape, according
> // to option. The matching point on the shape is stored in spoint.
>    return kBig;
> }
> 
> I have a TGeoCompositeShape built from 3 TGeoArb8 shapes connected
> together using the bool union (+) operator.
> When using a TGeoManager geometry created from volumes using this
> TGeoCompositeShape with the geant3 vmc implementation, I am finding that
> the TGeoManager::FindNextBoundary method incorrectly calculates the
> distance to the TGeoCompositeShape volume boundary.  This is because
> TGeoUnion::Safety depends on being able to call the Safety method of the simple
> shapes that make up the composite shape.
>   On the other hand, TGeoManager::RandomRays correctly marks the
> boundaries of the TGeoCompositeShape volumes because it only calls
> DistToIn and not Safety of the simple shapes that make up the composite
> shape.
>   Do you have plans to implement TGeoArb8::Safety soon?  Do you
> recommend a work around in the meantime?
>   Also, I notice that the geant4_vmc implementation does not yet support
> TGeoCompositeShapes.
>   I am using root from cvs last updated Nov. 8.
> Thanks,
> -Sue
> 
> 
> 



This archive was generated by hypermail 2b29 : Thu Jan 01 2004 - 17:50:17 MET