This MR adds little functionality to map maker algorithm so it can encode correct geometry in the output file. In addition I have added the patch from @brosser for endcap layer indices.
@kazhang @jahreda