Ticket #124 (closed: fixed)

Opened 12 years ago

Last modified 5 years ago

Add Solid angle calculations to geometry surface objects

Reported by: Nick Draper Owned by: Ronald Fowler
Priority: major Milestone: Iteration 10
Component: Keywords:
Cc: Blocked By:
Blocking: Tester:

Description (last modified by Nick Draper) (diff)

We need to be able to calculate solid angles, primarily between the sample and the detectors, but also for other geometric objects.

I suggest we need the following function added to the surface base class.

virtual double solidAngle(const V3D point) const

We can for now assume that the solid angle for a point is close enough to the solid angle for the samples surface as they will generally be sufficiently far away.

I suspect that for many of the simple objects such as sphere and cone there will be simpler and more efficient derivations than a generalised one for a surface. In these cases these classes should inherhit and overload the method.

Change History

comment:1 Changed 12 years ago by Nick Draper

  • Description modified (diff)

comment:2 Changed 12 years ago by Nick Draper

  • Owner set to Lakshmi Sastry

comment:3 Changed 12 years ago by Nick Draper

  • Milestone changed from Iteration 8 to Iteration 9

comment:4 Changed 12 years ago by Ronald Fowler

(In [1111]) Updates to calculate approximate solid angle using crude numerical integration. Method is not fast. Only checked with spheres. Does not work for capped cylinder due to issue with interceptSurface for tracks not hitting object. Re #124

comment:5 Changed 12 years ago by Nick Draper

(In [1138]) re #124 Bug in intercept surface when the tack misses an object with an infinite surface has been fixed. The issue was when one of the surface was crossed, but no a part of the surface that makes up part of the object. Additional tests for track misses added. Also fixed a bug that the number returned by intercept surface could be wrong.

It should be possible to complete the Cylinder solid angle tests now.

comment:6 Changed 12 years ago by Ronald Fowler

(In [1146]) Updated solid angle calculation, should now work for all objects. Tests for cube added and values of capped cylinder now checked. Re #124

comment:7 Changed 12 years ago by Nick Draper

  • Owner changed from Lakshmi Sastry to Ronald Fowler
  • Milestone changed from Iteration 9 to Iteration 10

comment:8 Changed 12 years ago by Ronald Fowler

(In [1171]) Changes to add basic getPointInObject method to Object.cpp and to add tests for this. Small update to solidAngle as check on direction no longer required. Re #124

comment:9 Changed 12 years ago by Ronald Fowler

(In [1175]) Extended getPointInObject to use getBoundingBox to help find point in Object. Re #124

comment:10 Changed 12 years ago by Ronald Fowler

(In [1180]) Added use of Bounding Box to solid angle calculation with fast test of does line intercept Bounding Box. This improves speed of solid angle calculation, if a good bounding box can be found (axes aligned objects at present). Re #124

comment:11 Changed 12 years ago by Ronald Fowler

(In [1203]) Improved solid angle calculation by starting integration on point that lies within the object. If a valid bounding box exists this is used to limit the domain of integration. If one does not exist the integration starts from a point in object and terminates when beyond object. If default resolution mainly misses the object, try again with finer mesh. Re #124

comment:12 Changed 12 years ago by Russell Taylor

(In [1207]) Fix linux buildserver compilation error. Re #124.

comment:13 Changed 12 years ago by Ronald Fowler

(In [1211]) Changes to resolve Linux build unit test error and warnings. Re #124

comment:14 Changed 12 years ago by Ronald Fowler

(In [1224]) Minor addition to tests for getPointInObject Re #124

comment:15 Changed 12 years ago by Ronald Fowler

(In [1237]) Passing getPointInObject through ObjComponent class and adding tests to ObjComponentTest.h Re #124

comment:16 Changed 12 years ago by Nick Draper

  • Status changed from new to closed
  • Resolution set to fixed

comment:17 Changed 5 years ago by Stuart Campbell

This ticket has been transferred to github issue 972

Note: See TracTickets for help on using tickets.