Skip to content

Commit

Permalink
add some comments
Browse files Browse the repository at this point in the history
  • Loading branch information
lobis committed May 7, 2024
1 parent 1ad2366 commit 19cb9dd
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/TRestDetectorHitsReadoutAnalysisProcess.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ TRestEvent* TRestDetectorHitsReadoutAnalysisProcess::ProcessEvent(TRestEvent* in
const auto channelType = fReadout->GetTypeForChannelDaqId(daqId);
const bool isValidHit = channelType == fChannelType;

// we need to add all hits to preserve the input event
fOutputHitsEvent->AddHit(position, energy, time, type);

if (!isValidHit) {
Expand All @@ -55,6 +56,7 @@ TRestEvent* TRestDetectorHitsReadoutAnalysisProcess::ProcessEvent(TRestEvent* in
const double readoutEnergy = accumulate(hitEnergy.begin(), hitEnergy.end(), 0.0);

if (fRemoveZeroEnergyEvents && readoutEnergy <= 0) {
// events not depositing any energy in the readout are removed
return nullptr;
}

Expand Down

0 comments on commit 19cb9dd

Please sign in to comment.