Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -281,7 +281,7 @@ struct InteractionRecord {
return tmp;
}

#ifndef GPUCA_ALIGPUCODE
#if !defined(GPUCA_GPUCODE) && !defined(GPUCA_STANDALONE)
void print() const;
std::string asString() const;
friend std::ostream& operator<<(std::ostream& stream, InteractionRecord const& ir);
Expand Down Expand Up @@ -359,7 +359,7 @@ struct InteractionTimeRecord : public InteractionRecord {
return !((*this) > other);
}

#ifndef GPUCA_ALIGPUCODE
#if !defined(GPUCA_GPUCODE) && !defined(GPUCA_STANDALONE)
void print() const;
std::string asString() const;
friend std::ostream& operator<<(std::ostream& stream, InteractionTimeRecord const& ir);
Expand Down
6 changes: 3 additions & 3 deletions GPU/GPUTracking/Base/GPUReconstructionCPU.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ inline void GPUReconstructionCPU::runKernelBackend(const krnlSetupTime& _xyz, co
int32_t nThreads = getNKernelHostThreads(false);
if (nThreads > 1) {
if (GetProcessingSettings().debugLevel >= 5) {
printf("Running %d Threads\n", mThreading->activeThreads->max_concurrency());
GPUInfo("Running %d Threads", mThreading->activeThreads->max_concurrency());
}
tbb::this_task_arena::isolate([&] {
mThreading->activeThreads->execute([&] {
Expand Down Expand Up @@ -227,7 +227,7 @@ int32_t GPUReconstructionCPU::RunChains()
mNEventsProcessed++;

if (GetProcessingSettings().debugLevel >= 3 || GetProcessingSettings().allocDebugLevel) {
printf("Allocated memory when starting processing %34s", "");
GPUInfo("Allocated memory when starting processing %34s", "");
PrintMemoryOverview();
}
mTimerTotal.Start();
Expand All @@ -254,7 +254,7 @@ int32_t GPUReconstructionCPU::RunChains()
mTimerTotal.Stop();
mStatCPUTime += (double)(std::clock() - cpuTimerStart) / CLOCKS_PER_SEC;
if (GetProcessingSettings().debugLevel >= 3 || GetProcessingSettings().allocDebugLevel) {
printf("Allocated memory when ending processing %36s", "");
GPUInfo("Allocated memory when ending processing %36s", "");
PrintMemoryOverview();
}

Expand Down
3 changes: 3 additions & 0 deletions GPU/GPUTracking/display/render/GPUDisplayDraw.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -539,6 +539,9 @@ void GPUDisplay::DrawFinal(int32_t iSector, int32_t /*iCol*/, const GPUTPCGMProp
if (mc.pid < 0) {
break;
}
if (mc.t0 == -100.f) {
break;
}

alphaOrg = mParam->Alpha(iSector);
float c = cosf(alphaOrg);
Expand Down
32 changes: 25 additions & 7 deletions GPU/GPUTracking/qa/GPUQA.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -673,7 +673,27 @@ void GPUQA::InitO2MCData(GPUTrackingInOutPointers* updateIOPtr)
std::vector<int32_t> refId;

auto dc = o2::steer::DigitizationContext::loadFromFile("collisioncontext.root");
auto evrec = dc->getEventRecords();
const auto& evrec = dc->getEventRecords();
const auto& evparts = dc->getEventParts();
std::vector<std::vector<float>> evTimeBins(mcReader.getNSources());
for (uint32_t i = 0; i < evTimeBins.size(); i++) {
evTimeBins[i].resize(mcReader.getNEvents(i), -100.f);
}
for (uint32_t i = 0; i < evrec.size(); i++) {
const auto& ir = evrec[i];
for (uint32_t j = 0; j < evparts[i].size(); j++) {
const int iSim = evparts[i][j].sourceID;
const int iEv = evparts[i][j].entryID;
if (iSim == o2::steer::QEDSOURCEID || ir.differenceInBC(o2::raw::HBFUtils::Instance().getFirstIR()) >= 0) {
auto ir0 = o2::raw::HBFUtils::Instance().getFirstIRofTF(ir);
float timebin = (float)ir.differenceInBC(ir0) / o2::tpc::constants::LHCBCPERTIMEBIN;
if (evTimeBins[iSim][iEv] >= 0) {
throw std::runtime_error("Multiple time bins for same MC collision found");
}
evTimeBins[iSim][iEv] = timebin;
}
}
}

uint32_t nSimSources = mcReader.getNSources();
mMCEventOffset.resize(nSimSources);
Expand All @@ -686,13 +706,8 @@ void GPUQA::InitO2MCData(GPUTrackingInOutPointers* updateIOPtr)

mMCInfosCol.resize(nSimTotalEvents);
for (int32_t iSim = 0; iSim < mcReader.getNSources(); iSim++) {
if (iSim == o2::steer::QEDSOURCEID) {
continue;
}
for (int32_t i = 0; i < mcReader.getNEvents(iSim); i++) {
auto ir = evrec[i];
auto ir0 = o2::raw::HBFUtils::Instance().getFirstIRofTF(ir);
float timebin = (float)ir.differenceInBC(ir0) / o2::tpc::constants::LHCBCPERTIMEBIN;
const float timebin = evTimeBins[iSim][i];

const std::vector<o2::MCTrack>& tracks = mcReader.getTracks(iSim, i);
const std::vector<o2::TrackReference>& trackRefs = mcReader.getTrackRefsByEvent(iSim, i);
Expand Down Expand Up @@ -1298,6 +1313,9 @@ void GPUQA::RunQA(bool matchOnly, const std::vector<o2::tpc::TrackTPC>* tracksEx
if (mc1.pid < 0) {
continue;
}
if (mc1.t0 == -100.f) {
continue;
}
if (mConfig.filterCharge && mc1.charge * mConfig.filterCharge < 0) {
continue;
}
Expand Down