Skip to content
Snippets Groups Projects
Commit 024997d9 authored by Michael Deveaux's avatar Michael Deveaux Committed by Florian Uhlig
Browse files

CbmMvdPixelCharge->DigestCharge accepts time information

parent 0001828c
No related branches found
No related tags found
1 merge request!1125Restructure MVD code
......@@ -51,7 +51,7 @@ CbmMvdPixelCharge::CbmMvdPixelCharge(Float_t charge, Int_t channelNrX, Int_t cha
// all segments of a track). Checks if a new track contributed charge to the pixel
// Checks if the new track is dominant
void CbmMvdPixelCharge::DigestCharge(Float_t pointX, Float_t pointY, Int_t pointId, Int_t trackId)
void CbmMvdPixelCharge::DigestCharge(Float_t pointX, Float_t pointY, Double_t time, Int_t pointId, Int_t trackId)
{
Float_t chargeContr = fTrackCharge;
......@@ -67,6 +67,7 @@ void CbmMvdPixelCharge::DigestCharge(Float_t pointX, Float_t pointY, Int_t point
fPointWeight.push_back(chargeContr);
fPointX.push_back(pointX);
fPointY.push_back(pointY);
fTime.push_back(time);
// fTime.push_back(time);
// fLink.push_back(); // TODO: pass link
......
......@@ -31,7 +31,7 @@ public:
Bool_t TestXY(Int_t channelNrX, Int_t channelNrY);
void DigestCharge(Float_t pointX, Float_t pointY, Int_t PointId, Int_t trackId); // TODO: add time here
void DigestCharge(Float_t pointX, Float_t pointY, Double_t time, Int_t PointId, Int_t trackId); // TODO: add time here
void AddCharge(Float_t charge) { fTrackCharge = fTrackCharge + charge; };
......
......@@ -948,7 +948,7 @@ void CbmMvdSensorDigitizerTask::ProducePixelCharge(CbmMvdPoint* point)
CbmMvdPixelCharge* pixelCharge = fPixelChargeShort.at(f);
if (pixelCharge) {
pixelCharge->DigestCharge(((float) (point->GetX() + point->GetXOut()) / 2),
((float) (point->GetY() + point->GetYOut()) / 2), point->GetPointId(),
((float) (point->GetY() + point->GetYOut()) / 2), fEventTime + point->GetTime(),point->GetPointId(),
point->GetTrackID());
}
else {
......@@ -1001,13 +1001,13 @@ void CbmMvdSensorDigitizerTask::ProduceNoise()
if (fChargeMapIt == fChargeMap.end()) {
pixel = new ((*fPixelCharge)[fPixelCharge->GetEntriesFast()])
CbmMvdPixelCharge(1000, xPix, yPix, 0, -4, Current[0], Current[1]); // TODO: Add time
pixel->DigestCharge(Current[0], Current[1], 0, -4);
pixel->DigestCharge(Current[0], Current[1],fEventTime, 0, -4);
fChargeMap[thispoint] = pixel;
}
else {
pixel = fChargeMapIt->second;
pixel->AddCharge(1000); // TODO: Add time
pixel->DigestCharge(Current[0], Current[1], 0, -4);
pixel->DigestCharge(Current[0], Current[1], fEventTime, 0, -4);
}
}
}
......
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