Skip to content

Commit a01bddc

Browse files
committed
Move declaration of particle inventory so as not to cause issues when running on data
1 parent 8d7ec4c commit a01bddc

2 files changed

Lines changed: 1 addition & 1 deletion

File tree

sbndcode/CRT/CRTBackTracker/CRTBackTrackerAlg.cc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -578,6 +578,7 @@ namespace sbnd::crt {
578578

579579
void CRTBackTrackerAlg::TrueParticlePDGEnergyTime(const int trackID, int &pdg, double &energy, double &time)
580580
{
581+
art::ServiceHandle<cheat::ParticleInventoryService> particleInv;
581582
const simb::MCParticle* particle = particleInv->TrackIdToParticle_P(trackID);
582583

583584
pdg = particle == NULL ? -std::numeric_limits<int>::max() : particle->PdgCode();

sbndcode/CRT/CRTBackTracker/CRTBackTrackerAlg.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -229,7 +229,6 @@ namespace sbnd::crt {
229229
private:
230230

231231
CRTGeoAlg fCRTGeoAlg;
232-
art::ServiceHandle<cheat::ParticleInventoryService> particleInv;
233232

234233
art::InputTag fSimModuleLabel;
235234
art::InputTag fSimDepositModuleLabel;

0 commit comments

Comments
 (0)