Skip to content
Snippets Groups Projects
Commit 1d9ba4a0 authored by Volker Friese's avatar Volker Friese
Browse files

Fix a bug in the TRD cluster finder; the index of registering TRD hits to...

Fix a bug in the TRD cluster finder; the index of registering TRD hits to events was wrong, leading to one missing TRD hit. Refs #2112.
parent d98d11bd
No related branches found
Tags dev_2021_21
No related merge requests found
......@@ -372,9 +372,10 @@ Int_t CbmTrdClusterFinder::AddClusters(TClonesArray* clusters, CbmEvent* event,
cls->SetNCols(cols.CountBits());
cls->SetNRows(rows.CountBits());
}
clsSave = new ((*fClusters)[ncl++]) CbmTrdCluster(*cls); // TODO implement copy constructor
clsSave = new ((*fClusters)[ncl]) CbmTrdCluster(*cls); // TODO implement copy constructor
// In case we have an event branch and we did only use digis from within the event, add the cluster to the event. This allows the hit producer to identify wether or not to add the corresponding hit to the event.
if (event) event->AddData(ECbmDataType::kTrdCluster, ncl);
ncl++;
clsSave->SetTrianglePads(cls->HasTrianglePads());
if (cls->GetMatch() != NULL)
delete cls; //only the matches have pointers to allocated memory, so otherwise the clear does the trick
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment