52 double depe = thisStep->GetTotalEnergyDeposit();
54 if (digitization_routine->decisionToSkipHit(depe, thisStep)) {
return true; }
57 if (gHitsCollection ==
nullptr) {
log->error(
ERR_NOCOLLECTION,
"No hit collection found"); }
61 std::vector<std::shared_ptr<GTouchable>> thisStepProcessedTouchables =
62 digitization_routine->processTouchable(getGTouchable(thisStep), thisStep);
64 auto hcsize = gHitsCollection->GetSize();
67 " with ", std::to_string(thisStepProcessedTouchables.size()),
" touchable(s), edep: ",
68 std::to_string(depe),
", Hit collection size: ", hcsize);
70 for (
auto thisGTouchable : thisStepProcessedTouchables) {
72 thisGTouchable->assignTrackId(thisStep->GetTrack()->GetTrackID());
73 thisGTouchable->assignPId(thisStep->GetTrack()->GetDefinition()->GetPDGEncoding());
77 auto [it, isNewCell] = hitsByCellKey.try_emplace(thisGTouchable->cellKey(),
nullptr);
79 log->info(2,
" ✅ new GTouchable for ", GetName(),
": ", thisGTouchable->getIdentityString());
80 it->second =
new GHit(thisGTouchable, thisStep);
81 gHitsCollection->insert(it->second);
84 log->info(2,
" ❌ existing GTouchable for ", GetName(),
": ", thisGTouchable->getIdentityString());
85 it->second->addHitInfos(thisStep);