Skip to content

Commit

Permalink
Merge pull request #185 from DUNE/kleykamp_fix_ped_sup
Browse files Browse the repository at this point in the history
Detector effects like pedestal subtraction weren't being applied for non-nersc files
  • Loading branch information
jdkio authored Dec 16, 2024
2 parents bbbaf0e + 8260447 commit b4ead59
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 1 deletion.
3 changes: 3 additions & 0 deletions app/ConvertToTMSTree.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -164,6 +164,9 @@ bool ConvertToTMSTree(std::string filename, std::string output_filename) {
// ... and make this event the combined spill called "last_event"
tms_event = last_event;
}

// Apply detector effects and connect truth and reco info
tms_event.FinalizeEvent();

// Dump information
//tms_event.Print();
Expand Down
4 changes: 3 additions & 1 deletion src/TMS_Event.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1004,7 +1004,9 @@ void TMS_Event::AddEvent(TMS_Event &Other_Event) {

void TMS_Event::OverlayEvents(std::vector<TMS_Event>& overlay_events) {
for (auto &event : overlay_events) AddEvent(event);

}

void TMS_Event::FinalizeEvent() {
// Apply the det sim now, after overlaying events
// The timing and optical model were moved to the initial event creation
ApplyReconstructionEffects();
Expand Down
1 change: 1 addition & 0 deletions src/TMS_Event.h
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ class TMS_Event {

void AddEvent(TMS_Event &);
void OverlayEvents(std::vector<TMS_Event>& overlay_events);
void FinalizeEvent();

// The getters once the class is completed
const std::vector<TMS_Hit> GetHits(int slice = -1, bool include_ped_sup = false);
Expand Down

0 comments on commit b4ead59

Please sign in to comment.