ToolDAQFramework
|
#include <SubSample.h>
Public Member Functions | |
SubSample () | |
SubSample (std::vector< int > PMTid, std::vector< TimeDelta::short_time_t > time, std::vector< float > charge=std::vector< float >(), TimeDelta timestamp=0) | |
Deprecated constructor, use empty constructor and Append instead. More... | |
TimeDelta | AbsoluteDigitTime (int index) const |
Return the absolute time (timestamp + digit time) of a digit. More... | |
bool | Append (const SubSample &sub) |
bool | Append (const std::vector< int > PMTid, const std::vector< TimeDelta::short_time_t > time, const std::vector< float > charge, const TimeDelta timestamp) |
bool | IsSortedByTime () const |
Check whether all hits are in time order. More... | |
void | SortByTime () |
Sort all digits in the SubSample by their time. More... | |
std::vector< SubSample > | Split (TimeDelta target_width, TimeDelta target_overlap) const |
void | TellMeAboutTheTriggers (const TriggerInfo &triggers, const int verbose) |
Public Attributes | |
std::vector< float > | m_charge |
Vector of charges for all hits in SubSample. Unit: photoelectrons (MC), calibrated photoelectrons (data) More... | |
unsigned int | m_first_unique |
Position of the first hit that isn't overlapping with the previous SubSample. More... | |
std::vector< bool > | m_masked |
Is each hit masked from future trigger decisions? More... | |
std::vector< int > | m_PMTid |
Vector of PMT IDs for all hits in SubSample. More... | |
std::vector < TimeDelta::short_time_t > | m_time |
Vector of hit times relative to timestamp for all hits in SubSample. Unit: ns. More... | |
TimeDelta | m_timestamp |
Timestamp of the whole SubSample. More... | |
std::vector< std::vector< int > > | m_trigger_readout_windows |
Stores the trigger readout windows each hit is associated with. More... | |
Private Attributes | |
int | m_start_trigger |
Which trigger are we starting from in TellMeAboutTheTriggers()? More... | |
Definition at line 11 of file SubSample.h.
SubSample::SubSample | ( | ) |
Definition at line 6 of file SubSample.cpp.
SubSample::SubSample | ( | std::vector< int > | PMTid, |
std::vector< TimeDelta::short_time_t > | time, | ||
std::vector< float > | charge = std::vector<float>() , |
||
TimeDelta | timestamp = 0 |
||
) |
Deprecated constructor, use empty constructor and Append instead.
Definition at line 13 of file SubSample.cpp.
TimeDelta SubSample::AbsoluteDigitTime | ( | int | index | ) | const |
Return the absolute time (timestamp + digit time) of a digit.
Definition at line 150 of file SubSample.cpp.
bool SubSample::Append | ( | const SubSample & | sub | ) |
Append the hits in a different SubSample to this one
Returns true
if successful.
Definition at line 154 of file SubSample.cpp.
bool SubSample::Append | ( | const std::vector< int > | PMTid, |
const std::vector< TimeDelta::short_time_t > | time, | ||
const std::vector< float > | charge, | ||
const TimeDelta | timestamp | ||
) |
Append the hits in a different SubSample to this one
Returns true
if successful.
Definition at line 159 of file SubSample.cpp.
bool SubSample::IsSortedByTime | ( | ) | const |
Check whether all hits are in time order.
Definition at line 62 of file SubSample.cpp.
void SubSample::SortByTime | ( | ) |
Sort all digits in the SubSample by their time.
Definition at line 31 of file SubSample.cpp.
std::vector< SubSample > SubSample::Split | ( | TimeDelta | target_width, |
TimeDelta | target_overlap | ||
) | const |
Split SubSample into multiple overlapping ones
The SubSample needs to be sorted by time for this to work! Otherwise it will return an empty vector.
Definition at line 72 of file SubSample.cpp.
void SubSample::TellMeAboutTheTriggers | ( | const TriggerInfo & | triggers, |
const int | verbose | ||
) |
Picks up the trigger readout and mask windows from the input, and sets digit m_trigger_readout_windows and m_masked appropriately
Definition at line 191 of file SubSample.cpp.
std::vector<float> SubSample::m_charge |
Vector of charges for all hits in SubSample. Unit: photoelectrons (MC), calibrated photoelectrons (data)
Definition at line 44 of file SubSample.h.
unsigned int SubSample::m_first_unique |
Position of the first hit that isn't overlapping with the previous SubSample.
Definition at line 53 of file SubSample.h.
std::vector<bool> SubSample::m_masked |
Is each hit masked from future trigger decisions?
Definition at line 50 of file SubSample.h.
std::vector<int> SubSample::m_PMTid |
Vector of PMT IDs for all hits in SubSample.
Definition at line 40 of file SubSample.h.
|
private |
Which trigger are we starting from in TellMeAboutTheTriggers()?
Definition at line 76 of file SubSample.h.
std::vector<TimeDelta::short_time_t> SubSample::m_time |
Vector of hit times relative to timestamp for all hits in SubSample. Unit: ns.
Definition at line 42 of file SubSample.h.
TimeDelta SubSample::m_timestamp |
Timestamp of the whole SubSample.
Definition at line 27 of file SubSample.h.
std::vector<std::vector<int> > SubSample::m_trigger_readout_windows |
Stores the trigger readout windows each hit is associated with.
Definition at line 48 of file SubSample.h.