Skip to content
Merged
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
10 changes: 8 additions & 2 deletions Generators/src/Generator.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -248,20 +248,26 @@ Bool_t
LOG(error) << "Failed to generate loopers event";
return kFALSE;
}
if (mTPCLoopersGen->getNLoopers() == 0) {
const auto nCandidates = mTPCLoopersGen->getNLoopers();
if (nCandidates == 0) {
LOG(warning) << "No loopers generated for this event";
return kTRUE;
}
const auto& looperParticles = mTPCLoopersGen->importParticles();
const auto skippedLoopers = mTPCLoopersGen->getNSkipped();
if (looperParticles.empty()) {
if (skippedLoopers == nCandidates) {
// all candidate loopers were dropped by the geometrical protection
LOG(debug) << "All " << skippedLoopers << " candidate loopers were outside the TPC active volume; none added for this event";
return kTRUE;
}
LOG(error) << "Failed to import loopers particles";
return kFALSE;
}
// Append the generated looper particles to the main particle list
mParticles.insert(mParticles.end(), looperParticles.begin(), looperParticles.end());

LOG(debug) << "Added " << looperParticles.size() << " looper particles";
const auto skippedLoopers = mTPCLoopersGen->getNSkipped();
if (skippedLoopers > 0) {
LOG(debug) << "Geometrical protection skipped " << skippedLoopers << " loopers outside the TPC active volume";
}
Expand Down