SubSamples are time ordered in most use cases, so instead of having
/// Stores the trigger readout windows each hit is associated with
std::vector<std::vector<int> > m_trigger_readout_windows;
/// Is each hit masked from future trigger decisions?
std::vector<bool> m_masked;
And having to loop over the entire SubSample to find hits to use in reconstruction, hits to write out, hits that are masked from triggers etc, we could instead have
/// Stores the first and last hit number associated with a trigger readout window
std::vector<std::pair<int, int> > m_trigger_readout_window_ids;
/// Something similar for masking
So we can focus our loops on the interesting hits.
m_first_unique made me think of this improvement. So that is a starting point. But it's not as simple as for that case because in DataOut we need to make sure hits are not associated with more than 1 trigger
SubSamples are time ordered in most use cases, so instead of having
And having to loop over the entire SubSample to find hits to use in reconstruction, hits to write out, hits that are masked from triggers etc, we could instead have
So we can focus our loops on the interesting hits.
m_first_unique
made me think of this improvement. So that is a starting point. But it's not as simple as for that case because in DataOut we need to make sure hits are not associated with more than 1 trigger