Skip to content

Commit 41a9eab

Browse files
authored
MatchGlobalFwd fix: do not throw on empty bunch filling (unused) (#9383)
Apparently setting of BunchFilling was copy/pasted from other matchers, although currently it is not used. Substituted exception by error message in case empty BunchFilling is provided Co-authored-by: shahoian <ruben.shahoyan@cern.ch>
1 parent acfaf5a commit 41a9eab

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

Detectors/GlobalTracking/src/MatchGlobalFwd.cxx

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -645,7 +645,8 @@ void MatchGlobalFwd::setBunchFilling(const o2::BunchFilling& bf)
645645
// find closest (from above) filled bunch
646646
int minBC = bf.getFirstFilledBC(), maxBC = bf.getLastFilledBC();
647647
if (minBC < 0) {
648-
throw std::runtime_error("Bunch filling is not set in MatchGlobalFwd");
648+
LOG(error) << "Empty bunch filling is provided to MatchGlobalFwd, checks using it should be ignored";
649+
return;
649650
}
650651
int bcAbove = minBC;
651652
for (int i = o2::constants::lhc::LHCMaxBunches; i--;) {
@@ -751,9 +752,9 @@ o2::dataformats::GlobalFwdTrack MatchGlobalFwd::MCHtoFwd(const o2::mch::TrackPar
751752
//_________________________________________________________________________________________________
752753
MatchGlobalFwd::MatchGlobalFwd()
753754
{
755+
mClosestBunchAbove[0] = mClosestBunchAbove[0] = -1;
754756

755757
// Define built-in matching functions
756-
757758
//________________________________________________________________________________
758759
mMatchingFunctionMap["matchALL"] = [](const GlobalFwdTrack& mchTrack, const TrackParCovFwd& mftTrack) -> double {
759760
// Match two tracks evaluating all parameters: X,Y, phi, tanl & q/pt

0 commit comments

Comments
 (0)