I am trying to write a class derived TGeoShape representing shape of the <> calorimeter tile: this is just a box with many cylindrical holes. Of course, one can use TGeoCompisiteShape, but this realization is quite slow (I have one).
I derived my class from TGeoBBox (to have correct bounding box), wrote implementation for Contains, DistFromInside, DistFromOutside, Safety and Capacity methods. At this point I have tried to transport some electrons using Geant3 with this GeoShape. I have realized that my shape performs exactly as TGeoBBox without any holes. I tried to check are any methods wrote by me are called during transport. And find no calls.
Can you suggest how to make it works?
Obviously there are problems with your implementation of the navigation methods for this shape (which may not be trivial…). During transportation (with GEANT3 or other) only the virtual methodes of the base shape class are called, so… There are several tools at the level of TGeoManager/TGeoVolume to check this. Try TGeoVolume::Raytrace(), TGeoManager::RandomPoints/Rays(), and the others in the context menu of TGeoManager. Of course you will have to implement the visualization methods also…
If your shape is just a box with holes, people generally make a box volume with some material and put the cylinders (holes) inside as daughter volumes filled with air. Then putting something in the holes is obvious. You will profit then at max of optimisations at volume level. Why sooting a fly with a gun ???