CbmRoot
|
#include <CbmSeedFinderSlidingWindow.h>
Public Member Functions | |
CbmSeedFinderSlidingWindow (std::vector< double > *vSeedTimes, int32_t minDigis, double dWindDur, double dDeadT) | |
Create the CbmSeedFinderSlidingWindow object. | |
CbmSeedFinderSlidingWindow ()=delete | |
CbmSeedFinderSlidingWindow (const CbmSeedFinderSlidingWindow &)=delete | |
CbmSeedFinderSlidingWindow | operator= (const CbmSeedFinderSlidingWindow &)=delete |
void | SetQa (bool doQA=true) |
Enable or disable the generation of QA information. | |
void | OutputQa () |
Output QA Information. | |
~CbmSeedFinderSlidingWindow () | |
Destructor. | |
template<class inType > | |
void | FillSeedTimes (const std::vector< inType > *vIn, const std::vector< CbmMatch > *vDigiMatch=nullptr) |
Function which builds event seeds @params Vector of input data (either digis or digi times). @params Optional vector of digi matches (should match input data to MC events, used for QA). | |
void | FillSeedTimes () |
Function which builds event seeds without digi input. Can only be used in ideal mode. | |
void | SetOffset (double offset) |
Sets a global constant offset which is applied to each trigger time @params Value of offset. | |
void | SetIdealMode (const int32_t fileId=-1) |
Switches to `‘ideal mode’' in which event times from MC data are used as triggers (no algorithm is run in this case) | |
bool | IsIdealMode () |
Is `‘ideal mode’' switched on? | |
size_t | GetNofSeeds () |
Returns number of seed times currently stored in buffer. | |
void | Init () |
Initializes QA object if set. | |
template<> | |
double | GetTime (const std::vector< double > *vIn, int32_t i) |
template<> | |
double | GetTime (const std::vector< double > *vIn, int32_t i) |
Private Member Functions | |
template<class inType > | |
double | GetTime (const std::vector< inType > *vIn, int32_t i) |
Fetches time at position i of either a digi vector or vector of times. | |
Private Attributes | |
CbmSeedFinderQa * | fQa = nullptr |
Processes QA info. | |
std::vector< double > * | fvSeedTimes = nullptr |
Output of the algorithm. Stores seed times for current time slice. | |
int32_t | fminDigis = 0 |
Minimum number of digis which must be found in the seed window. | |
double | fdWindDur = 0. |
Size of sliding window. | |
double | fdDeadT = 0. |
`‘Dead time’' i.e. time interval which is discarded after a seed is found. | |
double | fdOffset = 0. |
Global time offset which is applied to each trigger time. | |
bool | fbIdealMode = false |
`‘ideal mode’' uses MC truth as trigger times. | |
int32_t | fIdealModeFileId = -1 |
If only a single file is to be used in `‘ideal mode’' (-1 = all files). | |
CbmMCEventList * | fEventList = nullptr |
To access MC truth in `‘ideal mode’'. | |
Definition at line 32 of file CbmSeedFinderSlidingWindow.h.
|
inline |
Create the CbmSeedFinderSlidingWindow object.
vSeedTimes | Output vector for the constructed seed times |
minDigis | Minimum number of digis which must be found in the seed window |
dWindDur | Size of sliding window |
dDeadT | `‘Dead time’' i.e. time interval which is discarded after a seed is found |
Definition at line 41 of file CbmSeedFinderSlidingWindow.h.
|
delete |
|
delete |
CbmSeedFinderSlidingWindow::~CbmSeedFinderSlidingWindow | ( | ) |
void CbmSeedFinderSlidingWindow::FillSeedTimes | ( | ) |
Function which builds event seeds without digi input. Can only be used in ideal mode.
Definition at line 151 of file CbmSeedFinderSlidingWindow.cxx.
References fbIdealMode, and FillSeedTimes().
Referenced by FillSeedTimes().
void CbmSeedFinderSlidingWindow::FillSeedTimes | ( | const std::vector< inType > * | vIn, |
const std::vector< CbmMatch > * | vDigiMatch = nullptr ) |
Function which builds event seeds @params Vector of input data (either digis or digi times). @params Optional vector of digi matches (should match input data to MC events, used for QA).
Definition at line 34 of file CbmSeedFinderSlidingWindow.cxx.
References CbmMatch::AddLink(), fbIdealMode, fdDeadT, fdOffset, fdWindDur, fEventList, fIdealModeFileId, CbmSeedFinderQa::FillQaMCInfo(), CbmSeedFinderQa::FillQaSeedInfo(), fminDigis, fQa, fvSeedTimes, CbmMCEventList::GetEventIdByIndex(), CbmMCEventList::GetEventTimeByIndex(), CbmMCEventList::GetFileIdByIndex(), CbmMCEventList::GetNofEvents(), GetTime(), and CbmSeedFinderQa::ResetPerTsStorage().
Referenced by CbmTaskBuildRawEvents::FillSeedTimesFromSlidingWindow(), and CbmTaskBuildRawEvents::FillSeedTimesFromSlidingWindow().
|
inline |
Returns number of seed times currently stored in buffer.
Definition at line 88 of file CbmSeedFinderSlidingWindow.h.
References fvSeedTimes.
Referenced by CbmTaskBuildRawEvents::Exec().
double CbmSeedFinderSlidingWindow::GetTime | ( | const std::vector< double > * | vIn, |
int32_t | i ) |
double CbmSeedFinderSlidingWindow::GetTime | ( | const std::vector< double > * | vIn, |
int32_t | i ) |
Definition at line 173 of file CbmSeedFinderSlidingWindow.cxx.
|
private |
Fetches time at position i of either a digi vector or vector of times.
Definition at line 162 of file CbmSeedFinderSlidingWindow.cxx.
Referenced by FillSeedTimes().
void CbmSeedFinderSlidingWindow::Init | ( | ) |
Initializes QA object if set.
Definition at line 192 of file CbmSeedFinderSlidingWindow.cxx.
References fbIdealMode, fEventList, fQa, and CbmSeedFinderQa::Init().
Referenced by CbmTaskBuildRawEvents::Init().
|
inline |
Is `‘ideal mode’' switched on?
Definition at line 85 of file CbmSeedFinderSlidingWindow.h.
References fbIdealMode.
Referenced by CbmTaskBuildRawEvents::FillSeedTimesFromSlidingWindow().
|
delete |
void CbmSeedFinderSlidingWindow::OutputQa | ( | ) |
Output QA Information.
Definition at line 207 of file CbmSeedFinderSlidingWindow.cxx.
References fQa, and CbmSeedFinderQa::OutputQa().
Referenced by CbmTaskBuildRawEvents::Finish().
|
inline |
Switches to `‘ideal mode’' in which event times from MC data are used as triggers (no algorithm is run in this case)
Definition at line 78 of file CbmSeedFinderSlidingWindow.h.
References fbIdealMode, and fIdealModeFileId.
Referenced by CbmTaskBuildRawEvents::SetIdealSeedFinder().
|
inline |
Sets a global constant offset which is applied to each trigger time @params Value of offset.
Definition at line 73 of file CbmSeedFinderSlidingWindow.h.
References fdOffset.
Referenced by CbmTaskBuildRawEvents::SetSlidingWindowSeedFinder().
void CbmSeedFinderSlidingWindow::SetQa | ( | bool | doQA = true | ) |
Enable or disable the generation of QA information.
Definition at line 178 of file CbmSeedFinderSlidingWindow.cxx.
References fQa.
Referenced by CbmTaskBuildRawEvents::SetSeedFinderQa().
|
private |
`‘ideal mode’' uses MC truth as trigger times.
Definition at line 111 of file CbmSeedFinderSlidingWindow.h.
Referenced by FillSeedTimes(), FillSeedTimes(), Init(), IsIdealMode(), and SetIdealMode().
|
private |
`‘Dead time’' i.e. time interval which is discarded after a seed is found.
Definition at line 105 of file CbmSeedFinderSlidingWindow.h.
Referenced by FillSeedTimes().
|
private |
Global time offset which is applied to each trigger time.
Definition at line 108 of file CbmSeedFinderSlidingWindow.h.
Referenced by FillSeedTimes(), and SetOffset().
|
private |
Size of sliding window.
Definition at line 103 of file CbmSeedFinderSlidingWindow.h.
Referenced by FillSeedTimes().
|
private |
To access MC truth in `‘ideal mode’'.
Definition at line 117 of file CbmSeedFinderSlidingWindow.h.
Referenced by FillSeedTimes(), and Init().
|
private |
If only a single file is to be used in `‘ideal mode’' (-1 = all files).
Definition at line 114 of file CbmSeedFinderSlidingWindow.h.
Referenced by FillSeedTimes(), and SetIdealMode().
|
private |
Minimum number of digis which must be found in the seed window.
Definition at line 101 of file CbmSeedFinderSlidingWindow.h.
Referenced by FillSeedTimes().
|
private |
Processes QA info.
Definition at line 95 of file CbmSeedFinderSlidingWindow.h.
Referenced by FillSeedTimes(), Init(), OutputQa(), SetQa(), and ~CbmSeedFinderSlidingWindow().
|
private |
Output of the algorithm. Stores seed times for current time slice.
Definition at line 98 of file CbmSeedFinderSlidingWindow.h.
Referenced by FillSeedTimes(), and GetNofSeeds().