diff --git a/core/base/CbmMatchRecoToMC.cxx b/core/base/CbmMatchRecoToMC.cxx index 77308a5c9c6a741c65485da2895ba97aec981715..06cde85da1ee0e3ee38d452b341e05690a5c63ab 100644 --- a/core/base/CbmMatchRecoToMC.cxx +++ b/core/base/CbmMatchRecoToMC.cxx @@ -397,7 +397,23 @@ void CbmMatchRecoToMC::ReadAndCreateDataBranches() { // TOF fTofPoints = mcManager->InitBranch("TofPoint"); - fTofHitDigiMatches = (TClonesArray*) ioman->GetObject("TofHitDigiMatch"); + fTofHitDigiMatches = + static_cast<TClonesArray*>(ioman->GetObject("TofHitDigiMatch")); + + /// FIXME: Temporary fix to catch all versions of the TOF Hit to Digi Match + /// array. To be removed after a full review of the TOF reco + if (nullptr == fTofHitDigiMatches) { + fTofHitDigiMatches = + static_cast<TClonesArray*>(ioman->GetObject(" TofCalDigiMatch")); + if (nullptr == fTofHitDigiMatches) { + LOG(warning) << "CbmMatchRecoToMC::ReadAndCreateDataBranches()" + << " no TOF Hit to Digi array found!"; + } // if (nullptr == fTofHitDigiMatches) + else { + LOG(info) + << "CbmMatchRecoToMC: Using alternative TOF Hit to Digi match array!"; + } // else of if (nullptr == fTofHitDigiMatches) + } // if (nullptr == fTofHitDigiMatches) fTofHits = static_cast<TClonesArray*>(ioman->GetObject("TofHit")); if (nullptr != fTofHits) {