Todo List
Member AnitaDataset::isKnownHiCalEvent (UInt_t eventNumber, Int_t anita=AnitaVersion::get())
implement this for ANITA-4
Member ChanTrigger::getRate ()
Refactor the class so that this function is either deprecated or "thisrate" is implemented differently.
Member ChanTrigger::GetThresholds (Settings *settings1, Anita *anita1, int ilayer, double thresholds[2][5])
Deprecate in favor of the more robust boost::multi_array or the more specialized PayloadArray class. Both have multi-index access to the same items.
Member ChanTrigger::rateToThreshold (double rate, int band)
The hard-coded values should be explained and the band dependence should be more explicit, because the actual bands can be modified elsewhere in the code and this function won't be changed unless the user specifically knows to.
Member GlobalTrigger::delay_align_antenna_waveforms (const vector< vector< vector< double > > > &waveforms, const vector< vector< unsigned int > > &delays, vector< vector< double > > &output)
Instead of accepting nested vectors, boost::multi_array/_views or PayloadArray objects should be passed in and out.
Member GlobalTrigger::FillInNadir (Anita *anita1, int *ant)
Deprecate this function in favor of PayloadArray or boost::multi_array objects which provide the ability to have multiple indexing schemes for a given collection of objects. For this case specifically PayloadArray was designed to have iterators and accessors which "OR" the values of the neighboring antennas, and are optionally read-only.
Member GlobalTrigger::FillInNadir (Settings *settings1, Anita *anita1, int ant)
Deprecate this function in favor of PayloadArray or boost::multi_array objects which provide the ability to have multiple indexing schemes for a given collection of objects. For this case specifically PayloadArray was designed to have iterators and accessors which "OR" the values of the neighboring antennas, and are optionally read-only.
Member GlobalTrigger::GetAnitaLayerPhiSector (Settings *settings1, int i, int j, int &whichlayer, int &whichphisector)
Deprecate this function in favor of PayloadArray or boost::multi_array objects which provide the ability to have multiple indexing schemes for a given collection of objects.
Member GlobalTrigger::GetPhiSector (Settings *settings1, int i, int j)
Deprecate this function in favor of PayloadArray or boost::multi_array objects which provide the ability to have multiple indexing schemes for a given collection of objects.
Member GlobalTrigger::L3Trigger (Settings *settings1, Anita *anita1, int loctrig[Anita::NPOL][Anita::NLAYERS_MAX][Anita::NPHI_MAX], int loctrig_nadironly[Anita::NPOL][Anita::NPHI_MAX], int discones_passing, int *l3trigy, int *thispasses)
The organization of this function needs to be changed so that a single variables turns on (or off) a single component of the trigger/simulation. The organization as it stands makes it difficult to know what features a particular trigger should be exhibiting.
Member GlobalTrigger::PassesTrigger (Settings *settings1, Anita *anita1, int discones_passing, int mode, int *l3trig, int l2trig[Anita::NPOL][Anita::NTRIGGERLAYERS_MAX], int l1trig[Anita::NPOL][Anita::NTRIGGERLAYERS_MAX], int antennaclump, int loctrig[Anita::NPOL][Anita::NLAYERS_MAX][Anita::NPHI_MAX], int loctrig_nadironly[Anita::NPOL][Anita::NPHI_MAX], int inu, int *thispasses, bool noiseOnly=false)
This function needs to be heavily refactored into either functions which perform some smaller part of every trigger, or some functions which perform one triggering system in its entirely, or a combination of the two.
Member GlobalTrigger::square_waveform_elements (const vector< double > &waveform, vector< double > &output)
This function should be deprecated because the same functionality is provided by the standard library:
Member GlobalTrigger::sum_aligned_waveforms (const vector< vector< double > > &waveforms, vector< double > &output)
This should not take nested vectors as a parameter but rather a boost::multi_array or boost::multi_array_view, or an instance of the PayloadArray class, which is a multi_array container modified to have circular indices. Also, the bounds of the for-loop should not be separately declared as it just adds another point of failure.
Member GlobalTrigger::summed_power_window (const vector< double > &waveform, unsigned int start_index, unsigned int length)
This function should be replaced as it is unnecessary – the same thing can be done more legibly with std::accumulate(...) :