File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -248,20 +248,26 @@ Bool_t
248248 LOG (error) << " Failed to generate loopers event" ;
249249 return kFALSE ;
250250 }
251- if (mTPCLoopersGen ->getNLoopers () == 0 ) {
251+ const auto nCandidates = mTPCLoopersGen ->getNLoopers ();
252+ if (nCandidates == 0 ) {
252253 LOG (warning) << " No loopers generated for this event" ;
253254 return kTRUE ;
254255 }
255256 const auto & looperParticles = mTPCLoopersGen ->importParticles ();
257+ const auto skippedLoopers = mTPCLoopersGen ->getNSkipped ();
256258 if (looperParticles.empty ()) {
259+ if (skippedLoopers == nCandidates) {
260+ // all candidate loopers were dropped by the geometrical protection
261+ LOG (debug) << " All " << skippedLoopers << " candidate loopers were outside the TPC active volume; none added for this event" ;
262+ return kTRUE ;
263+ }
257264 LOG (error) << " Failed to import loopers particles" ;
258265 return kFALSE ;
259266 }
260267 // Append the generated looper particles to the main particle list
261268 mParticles .insert (mParticles .end (), looperParticles.begin (), looperParticles.end ());
262269
263270 LOG (debug) << " Added " << looperParticles.size () << " looper particles" ;
264- const auto skippedLoopers = mTPCLoopersGen ->getNSkipped ();
265271 if (skippedLoopers > 0 ) {
266272 LOG (debug) << " Geometrical protection skipped " << skippedLoopers << " loopers outside the TPC active volume" ;
267273 }
You can’t perform that action at this time.
0 commit comments