pixel classes obviousness
This might be pedantic... but presuming you do something with a digitised pixel, the pixel x and y seem to be obscured by:
allpix_pixel.getPixel.X(); allpix_pixel.getPixel.Y();
starting already from "allpix_pixel", which is a PixelHit? Is there a reason
a) to not inherit all pixel objects from "pixel" ?
b) to not use pointers for the member variables (getPixel will again make a physical copy of the pixel, similarly for the local and global co-ordinates. This is not fast or efficient)
c) to not use smart pointers rather than raw pointers (const PixelCharge* getPixelCharge() const;)
d) in case of non-inheritance, to copy the indices directly to all "pixel-related" classes?