The edep-sim ROOT files will usually keep a copy of the GDML geometry in the form of a TGeoManager called EDepSimGeometry. This can be used downstream (e.g., in larnd-sim) as it is a record of the geometry used for making the edep-sim file. One example of this is a larnd-sim PR for getting the TPC offsets from the EDepSimGeometry (https://github.com/DUNE/larnd-sim/pull/153).
However, currently the TGeoManager is not retained after the spill building step, so it cannot be used downstream. The TGeoManager is present in both the rock and nu individual files and the hadd'ed files. I attached two images below taken from a ROOT TBrowser showing the TGeoManager. It should be noted that in the hadd'ed files, it looks like there are 10 copies of the TGeoManager (I think because there are 10 files hadd'ed together). I'm wondering if this is artificially inflating the size of these files, as we only need one. Anyway, I digress.
But after the spill building step, there is no TGeoManager in the file:
I suggest that we retain a copy of the TGeoManager in the spill built file, so that we can keep a record of the geometry in each file. It will also allow the larnd-sim PR#153 to work on new 2x2 files. It looks to me like this can be accomplished by modifying this script to open and save a copy of the TGeoManager: https://github.com/DUNE/2x2_sim/blob/main/run-spill-build/overlaySinglesIntoSpills.C
The edep-sim ROOT files will usually keep a copy of the GDML geometry in the form of a TGeoManager called EDepSimGeometry. This can be used downstream (e.g., in larnd-sim) as it is a record of the geometry used for making the edep-sim file. One example of this is a larnd-sim PR for getting the TPC offsets from the EDepSimGeometry (https://github.com/DUNE/larnd-sim/pull/153).
However, currently the TGeoManager is not retained after the spill building step, so it cannot be used downstream. The TGeoManager is present in both the rock and nu individual files and the hadd'ed files. I attached two images below taken from a ROOT TBrowser showing the TGeoManager. It should be noted that in the hadd'ed files, it looks like there are 10 copies of the TGeoManager (I think because there are 10 files hadd'ed together). I'm wondering if this is artificially inflating the size of these files, as we only need one. Anyway, I digress.
But after the spill building step, there is no TGeoManager in the file:
I suggest that we retain a copy of the TGeoManager in the spill built file, so that we can keep a record of the geometry in each file. It will also allow the larnd-sim PR#153 to work on new 2x2 files. It looks to me like this can be accomplished by modifying this script to open and save a copy of the TGeoManager: https://github.com/DUNE/2x2_sim/blob/main/run-spill-build/overlaySinglesIntoSpills.C