Bug #15126

PhotonBackTracker and BackTracker compete for use of resources

Added by Steven Gardiner over 3 years ago. Updated almost 2 years ago.

Target version:
Start date:
Due date:
% Done:


Estimated time:
Occurs In:


In the Rebuild(const art::Event &evt) method of both the BackTracker and the PhotonBackTracker services, the member variable fParticleList is used to adopt a new sim::EmEveIdCalculator:

void cheat::PhotonBackTracker::Rebuild ( const art::Event & evt)
  fParticleList.AdoptEveIdCalculator(new sim::EmEveIdCalculator);

Calling this function resets sim::eveIdCalculator, which is a static std::unique_ptr<sim::EveIdCalculator> that is accessible by both services. Having both services adopt a sim::EveIdCalculator results in a race condition, where one service "stomps" on the other's calculator. Although there are no known problems that this race condition causes for the end user, this code is fragile and should be rewritten.


#1 Updated by Jason Stock over 3 years ago

  • Status changed from New to Assigned

#2 Updated by Jason Stock almost 3 years ago

A full redesign and refactoring of the Backtracker and PhotonBacktracker is being done now to fix this competition for resources and to improve efficiency of running either BT or PBT. This redesign will address this bug as part of the refactoring of the modules to remove the particle list control from BT and PBT to a new ParticleInventory service.

#3 Updated by Jason Stock almost 3 years ago

ParticleInventoryService is now available on a feature branch JStock_ParticleInventory.

I am also marking this issue as related to #17177, and they will both be fixed in the redesign of BackTracker/PhotonBackTracker.

#4 Updated by Jason Stock almost 3 years ago

The redesigned BackTrackerService is ready, that ParticleInventoryService needed to fix this bug is ready. The only thing left is to redesign the PhotonBackTracker to use the ParticleInventoryService.

Due to the limited time I am at FNAL, I have not managed to implement all 3 at once. THe resource conflict will persist after the roll out of the new backtracker, but we are much closer to resolving it.

#5 Updated by Jason Stock over 2 years ago

The PhotonBackTracker redesign is done (I have also added fhicl validation and compliance with the service/serviceprovider model). I am running CI on it now and testing it with the code from each experiment that currently uses the PhotonBackTracker.

#6 Updated by Jason Stock over 2 years ago

  • Status changed from Assigned to Resolved

This work has been merged into LArSoft with v06_75_00. I am marking this issue as resolved.

#7 Updated by Jason Stock almost 2 years ago

  • Status changed from Resolved to Closed

This is old, and has been resolved for some time. Closing.

Also available in: Atom PDF