Mu2e / Offline

Offline software for the Mu2e experiment
Apache License 2.0
8 stars 81 forks source link

Utilize art::PtrRemapper when mixing StrawDigiMCs #1297

Closed edcallaghan closed 3 months ago

edcallaghan commented 3 months ago

This PR improves the mixing of StrawDigiMCs by remapping internal art::Ptr<> data members thereof. Provisions for mixing tracker-related digi data products were introduced in https://github.com/Mu2e/Offline/pull/1245. When following up about the propagation of MC truth info in https://github.com/Mu2e/Offline/pull/1291, it was realized that the mixed StrawDigiMCs contained invalid art::Ptr<>s, which is solved by the functionality implemented here.

Changes to existing functionality: -Mu2eProductMixer::mixStrawDigiMCs: A loop over the mixed StrawDigiMCs is introduced, which utilizes art::PtrRemapper to update internal art::Ptr<StrawGasStep> fields to point into the newly-inserted (as of mixing) StrawGasStepCollection data product.

Changes to existing data products: -StrawDigiMC: A non-const method StrawDigiMC::strawGasSteps() is introduced, which effectively returns a non-const reference to the relevant art::Ptr<>s. A mechanism for updating the StrawDigiMC::_sgspa field in-place must be made; the implementation of a non-const reference return is meant to mirror the analogous functionality when remapping internal art::Ptr<>s of SimParticles during mixing.

FNALbuild commented 3 months ago

Hi @edcallaghan, You have proposed changes to files in these packages:

which require these tests: build.

@Mu2e/fnalbuild-users, @Mu2e/write have access to CI actions on main.

:hourglass: The following tests have been triggered for 1a7a2dd5346774e56d64921cc8ff225e26d963f2: build (Build queue has 3 jobs)

About FNALbuild. Code review on Mu2e/Offline.

FNALbuild commented 3 months ago

:sunny: The build tests passed at 1a7a2dd5346774e56d64921cc8ff225e26d963f2.

Test Result Details
test with :white_check_mark: Command did not list any other PRs to include
merge :white_check_mark: Merged 1a7a2dd5346774e56d64921cc8ff225e26d963f2 at 34a99ea6066fb93399884490327f0e179f5daecd
build (prof) :white_check_mark: Log file. Build time: 04 min 10 sec
ceSimReco :white_check_mark: Log file.
g4test_03MT :white_check_mark: Log file.
transportOnly :white_check_mark: Log file.
POT :white_check_mark: Log file.
g4study :white_check_mark: Log file.
cosmicSimReco :white_check_mark: Log file.
cosmicOffSpill :white_check_mark: Log file.
ceSteps :white_check_mark: Log file.
ceDigi :white_check_mark: Log file.
muDauSteps :white_check_mark: Log file.
ceMix :white_check_mark: Log file.
rootOverlaps :white_check_mark: Log file.
g4surfaceCheck :white_check_mark: Log file.
FIXME, TODO :white_check_mark: TODO (0) FIXME (0) in 3 files
clang-tidy :large_orange_diamond: 0 errors 38 warnings
whitespace check :white_check_mark: no whitespace errors found

N.B. These results were obtained from a build of this Pull Request at 1a7a2dd5346774e56d64921cc8ff225e26d963f2 after being merged into the base branch at 34a99ea6066fb93399884490327f0e179f5daecd.

For more information, please check the job page here. Build artifacts are deleted after 5 days. If this is not desired, select Keep this build forever on the job page.