11#define BOOST_TEST_MODULE Test EMCAL Reconstruction
12#define BOOST_TEST_MAIN
13#define BOOST_TEST_DYN_LINK
14#include <boost/test/unit_test.hpp>
58 for (
int iiter = 0; iiter < 100; iiter++) {
60 std::map<uint8_t, uint8_t> patchtimes;
62 while (patchtimes.size() < npatches_expect) {
64 if (patchtimes.find(patchindex) == patchtimes.end()) {
65 auto patchtime =
static_cast<int>(gRandom->Gaus(8, 1));
66 if (patchtime >= 12) {
69 patchtimes[patchindex] = patchtime;
73 iterhandler.
setFired(npatches_expect > 0);
74 for (
auto [patchindex, patchtime] : patchtimes) {
75 iterhandler.
setPatch(patchindex, patchtime);
81 auto hasPatch = patchtimes.find(ipatch) != patchtimes.end();
Timeframe settings Average distance in cm of events merged into Randomize distance around average distance of merged events Simulate correct bunch interactions instead of placing only the average number of events A value[n] sets TFlen for[n] collisions in Number of bunches per trainsort Number of bunch trains Instantaneous interaction rate Do not simulate border Total number of collisions to be placed in the interior of all time Do not select random but walk over array of events in stride steps h Event generator settings h configStandalone Use CPU for GPU Force usage of the specified GPU device no CPU fallback Continue processing after an error First event to Number of events to Number of iterations to Number of iterations to Number of initial iterations excluded from const char e
Handler of errors related to invalid trigger patch IDs.
Helper class to handle decoded TRU data during the reconstruction.
bool hasPatch(unsigned int index) const
Check whehther the patch at the given index has fired.
uint8_t getPatchTime(unsigned int index) const
Get the trigger time of the trigger patch at a given index.
void setPatch(unsigned int index, unsigned int time)
Set reconstructed trigger patch.
bool isFired() const
Check whether the TRU was fired (at least one patch above threshold)
void setFired(bool fired)
Mark TRU as fired (containing at least one patch above threshold)
bool hasAnyPatch() const
Check whether the TRU has any patch fired.
void reset()
Reset handler.
static constexpr unsigned int PATCHESINTRU
BOOST_AUTO_TEST_CASE(asynch_schedule_test)
a couple of static helper functions to create timestamp values for CCDB queries or override obsolete ...
BOOST_CHECK_EQUAL(triggersD.size(), triggers.size())