Skip to content

Commit

Permalink
Rename GetNHits to GetNPEs, add new GetNHits for event
Browse files Browse the repository at this point in the history
  • Loading branch information
JamesJieranShen committed Jan 24, 2025
1 parent 5bbdd3f commit 036b472
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/fit/include/RAT/FitterInputHandler.hh
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,11 @@ class FitterInputHandler {
return hitPMTChannels;
}

size_t GetNHits() {
if (!ev) Log::Die("FitterInputHandler: Trying to acccess event info without registering the event.");
return hitPMTChannels.size();
}

/**
* @brief Get the charge of a pmt.
* In the case where a waveoform analyzer created multiple hits on the PMT (multi-PE), this method only returns
Expand Down Expand Up @@ -184,7 +189,7 @@ class FitterInputHandler {
*
* @param id PMT ID.
*/
unsigned int GetNhits(Int_t id) {
unsigned int GetNPEs(Int_t id) {
if (!ev) Log::Die("FitterInputHandler: Trying to acccess event info without registering the event.");
if (!std::binary_search(hitPMTChannels.begin(), hitPMTChannels.end(), id))
Log::Die("FitterInputHandler: Trying to access a channel with no hit registered!");
Expand Down

0 comments on commit 036b472

Please sign in to comment.