You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// hits array of TOF hits for a given simulated event
95
98
// digits passed from external to be filled, in continuous readout mode we will push it on mDigitsPerTimeFrame vector of vectors of digits
96
99
97
100
// printf("process event time = %f with %ld hits\n",mEventTime.getTimeNS(),hits->size());
98
101
99
-
uint64_t readoutwindow = uint64_t((mEventTime.getTimeNS() - Geo::BC_TIME * (Geo::OVERLAP_IN_BC + 2)) * Geo::READOUTWINDOW_INV); // event time shifted by 2 BC as safe margin before to change current readout window to account for decalibration
if (mContinuous && readoutwindow > mReadoutWindowCurrent) { // if we are moving in future readout windows flush previous ones (only for continuous readout mode)
102
112
digits->clear();
@@ -110,9 +120,18 @@ int Digitizer::process(const std::vector<HitType>* hits, std::vector<Digit>* dig
110
120
for (auto& hit : *hits) {
111
121
// TODO: put readout window counting/selection
112
122
// neglect very slow particles (low energy neutrons)
113
-
if (hit.GetTime() > 1000) { // 1 mus
123
+
if (hit.GetTime() > max_hit_time) { // 1 mus
124
+
continue;
125
+
}
126
+
127
+
// discard hits arriving before the minimum readout window
128
+
auto hit_ro_window = getReadoutWindow(double(hit.GetTime()) + mEventTime.getTimeNS() /*+ Geo::LATENCYWINDOW*/);
0 commit comments