ldmx-sw icon indicating copy to clipboard operation
ldmx-sw copied to clipboard

Put BField into Conditions

Open tomeichlersmith opened this issue 2 years ago • 2 comments

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

tomeichlersmith avatar Sep 25 '23 14:09 tomeichlersmith

@tomeichlersmith Still planning to fix this? For some systematic studies we still want to have local copies of the magnetic field map.

pbutti avatar Jan 29 '24 17:01 pbutti

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.)

tomeichlersmith avatar Jan 29 '24 17:01 tomeichlersmith