Skip to content
Snippets Groups Projects
Commit 5f494124 authored by Sergey Gorbunov's avatar Sergey Gorbunov
Browse files

L1: bugfix in CbmL1PFFitter: protection for non-existing MVD hit array

parent 59ccf451
No related branches found
No related tags found
1 merge request!1128L1: bugfix in CbmL1PFFitter: protection for non-existing MVD hit array
Pipeline #21872 passed
......@@ -450,13 +450,17 @@ void CbmL1PFFitter::Fit(vector<CbmStsTrack>& Tracks, const vector<int>& pidHypo)
std::vector<CbmMvdHit> vMvdHits;
std::vector<CbmStsHit> vStsHits;
for (int ih = 0; ih < mvdHitArray->GetEntriesFast(); ih++) {
CbmMvdHit hit = *dynamic_cast<const CbmMvdHit*>(mvdHitArray->At(ih));
vMvdHits.push_back(hit);
if (mvdHitArray) {
for (int ih = 0; ih < mvdHitArray->GetEntriesFast(); ih++) {
CbmMvdHit hit = *dynamic_cast<const CbmMvdHit*>(mvdHitArray->At(ih));
vMvdHits.push_back(hit);
}
}
for (int ih = 0; ih < stsHitArray->GetEntriesFast(); ih++) {
vStsHits.push_back(*dynamic_cast<const CbmStsHit*>(stsHitArray->At(ih)));
if (stsHitArray) {
for (int ih = 0; ih < stsHitArray->GetEntriesFast(); ih++) {
vStsHits.push_back(*dynamic_cast<const CbmStsHit*>(stsHitArray->At(ih)));
}
}
Fit(Tracks, vMvdHits, vStsHits, pidHypo);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment