Skip to content
Snippets Groups Projects
Commit c31d8dbd authored by Felix Weiglhofer's avatar Felix Weiglhofer
Browse files

sts::Hitfinder: Fix Hit copying.

parent 5c7893f5
No related branches found
No related tags found
1 merge request!1510sts::Hitfinder: Fix Hit copying.
Pipeline #25745 passed
......@@ -788,7 +788,7 @@ XPU_D void sts::Hitfinder::CreateHit(int iModule, float xLocal, float yLocal, fl
.fX = globalX,
.fY = globalY,
.fZ = globalZ,
.fTime = static_cast<uint32_t>(hitTime),
.fTime = static_cast<u32>(hitTime),
.fDx = errX,
.fDy = errY,
.fDz = errZ,
......@@ -808,7 +808,7 @@ XPU_D void sts::Hitfinder::CreateHit(int iModule, float xLocal, float yLocal, fl
return;
}
hitsPerModule[iModule * maxHitsPerModule + idx] = hit;
hitsPerModule[iModule * hitsAllocatedPerModule + idx] = hit;
}
XPU_D float sts::Hitfinder::LandauWidth(float charge) const
......
......
......@@ -303,7 +303,7 @@ void sts::HitfinderChain::AllocateStatic()
gpuPars.lorentzF = module.lorentzF;
gpuPars.lorentzB = module.lorentzB;
}
xpu::copy(fHitfinder.sensorPars, xpu::h2d);
q.copy(fHitfinder.sensorPars, xpu::h2d);
// Time errors
fHitfinder.maxClusterTimeErrorByModuleSide.reset(nModuleSides, xpu::buf_device);
......@@ -565,6 +565,7 @@ PartitionedSpan<sts::Hit> sts::HitfinderChain::FlattenHits(xpu::queue queue)
// Could do this more efficiently, cache addresses once in the beginning, ...
// doesn't really matter overhead wise
fHitOffsets.clear();
// nModules + 1 entries, first entry is always 0, last entry is total number of hits (required by PartitionedSpan)
fHitOffsets.push_back(0);
for (int m = 0; m < hfc.nModules; m++)
fHitOffsets.push_back(fHitOffsets.back() + GetNHits(nHits, m));
......
......
......@@ -121,7 +121,7 @@ void Server::CreateHistos()
CreateFolder("/sts/hits", "Hits");
CreateHisto(fHStsHitsX, "/sts/hits", "hStsHitsX", "Sts Hits X", 100, -10, 10);
CreateHisto(fHStsHitsY, "/sts/hits", "hStsHitsY", "Sts Hits Y", 100, -10, 10);
CreateHisto(fHStsHitsZ, "/sts/hits", "hStsHitsZ", "Sts Hits Z", 100, -10, 10);
CreateHisto(fHStsHitsZ, "/sts/hits", "hStsHitsZ", "Sts Hits Z", 100, 0, 50);
CreateHisto(fHStsHitsTime, "/sts/hits", "hStsHitsTime", "Sts Hits Time", 1000, 0, 128000000);
CreateHisto(fHStsHitsDx, "/sts/hits", "hStsHitsDx", "Sts Hits Dx", 100, 0, 0.1);
CreateHisto(fHStsHitsDy, "/sts/hits", "hStsHitsDy", "Sts Hits Dy", 100, 0, 0.1);
......
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment