Skip to content
Snippets Groups Projects
Commit 26861e5e authored by Administrator's avatar Administrator
Browse files

Fix mvd digi links

The mvd digitizer distributes the MC points into several new arrays which are
used for the different sensors. This distribution does not allow to use any
longer the index in the array to link the proper MC information.
To vercome the problem the index in the original array is added as a data
member to the MC point.

Correctly store information about contributing MC points in MvdPixelCharge.
parent 7c81dfa1
No related branches found
No related tags found
1 merge request!1288Fix mvd digi links
Pipeline #23691 passed
......@@ -403,6 +403,15 @@ void CbmMvdDigitizer::BuildEvent()
// ----- First treat standard input file
nOrig = fInputPoints->GetEntriesFast();
// Since the points are distributed to several sensor tasks which creates
// several new arrays, the array index can't be used to link the proper
// MC information in the tasks to be used inside the task to link the
// correct MC information
// Add the index in the original array to to the point itself
for (int iPoint = 0; iPoint < nOrig; iPoint++) {
point = static_cast<CbmMvdPoint*>(fInputPoints->At(iPoint));
point->SetPointId(iPoint);
}
// ----- Then treat event pileup
if (fNPileup > 0) {
......
......@@ -28,14 +28,6 @@ CbmMvdPixelCharge::CbmMvdPixelCharge(Float_t charge, Int_t channelNrX, Int_t cha
, fTrackCharge(charge)
, fPixelTime(time)
{
fTrackId.push_back(trackId);
fPointId.push_back(pointId);
fPointWeight.push_back(charge);
fPointX.push_back(pointPosX);
fPointY.push_back(pointPosY);
fTime.push_back(time);
// fLink.push_back(); // TODO: pass link
fDominatorIndex = fPointWeight.size();
}
// ------- DigestCharge ----------------------------------------------------#
......@@ -61,9 +53,7 @@ void CbmMvdPixelCharge::DigestCharge(Float_t pointX, Float_t pointY, Double_t ti
fPointX.push_back(pointX);
fPointY.push_back(pointY);
fTime.push_back(time);
// fTime.push_back(time);
// fLink.push_back(); // TODO: pass link
fContributors++;
if (chargeContr > fMaxChargeContribution) {
fDominatorIndex = fPointWeight.size();
......
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