Large number of Logical Volumes

Hi all!

I have a pixel detector with a large number of pixels (1024x512).
So I Replicate pixel volume along the plane to create a lot of pixel logical volumes.

And I would like to readout info of activated cells using Sensitive Detector assigned to the pixel logical volume.

But my computer’s RAM perhaps cannot comprehend so many Logical volumes…

Are there any better way of simulating tiny granularity detectors without requiring tons of RAM? Or this is the only standart way which you also would use?

best regards,

If the pixels are all identical, then you should have just one single LV defining it, and then either a large number of placements (separately instantiated PVs) or better, a replicated or parametrized volume for all the pixels. Since the SD is attached to the LV, that shouldn’t fill up memory.

A different approach, if your detector is one large chunk of material where the pixels are electronically driven (individual pads or some such), then you could treat it in G4 as one single volume, with one single SD. In your SD code, you could use the hit coordinates to compute a pixel index, or even do more complex things like share the hit energy between multiple pixels.