Skip to content

PixelGeoModel: Cache DBM volume calculation.

Cache the volume calculated in DBM_Telescope::Build(). It's always the same, and finding the volume of a subtracted shape is very expensive --- GeoModel does it by doing a MC integration within the bounding box with a hardcoded number of sample points of 1e6. This is particularly slow in a debug build, as we have to do a bunch of eigen calculations for each MC point.

This reduces the initialization time in debug builds by several minutes.

(Would be even better of course to do this calculation analytically!)

Merge request reports