Open tomeichlersmith opened 1 year ago
@tomeichlersmith Still planning to fix this? For some systematic studies we still want to have local copies of the magnetic field map.
It's still on my to-do list, but if its not a big performance hit I can take it off.
(I would still leave this issue open for future developers to know that there is this area of improvement available.)
Similar to other geometry things, a BField only needs to be created once and then a single object can be passed between the processors who need it to (for example) propagate or fit tracks.
Currently, the different processors are just loading their own copies of the magnetic field. For example,
https://github.com/LDMX-Software/ldmx-sw/blob/69f01ee406fa60518c9d0cf1e2ba551040aace8c/Tracking/src/Tracking/Reco/VertexProcessor.cxx#L35-L39
The utility functions in the global namespace can probably be isolated into this condition as well
https://github.com/LDMX-Software/ldmx-sw/blob/69f01ee406fa60518c9d0cf1e2ba551040aace8c/Tracking/include/Tracking/Sim/BFieldXYZUtils.h#L277-L294
https://github.com/LDMX-Software/ldmx-sw/blob/69f01ee406fa60518c9d0cf1e2ba551040aace8c/Tracking/include/Tracking/Sim/BFieldXYZUtils.h#L218-L255