29 gsl::span<const o2::fv0::ChannelData> inChData,
30 std::vector<o2::fv0::ChannelDataFloat>& outChData)
32 LOG(
debug) <<
"Running reconstruction on new event";
35 Int_t ndigitsASelected = 0;
38 Float_t sideAtimeAvgSelected = 0;
44 int nch = inChData.size();
45 for (
int ich = 0; ich < nch; ich++) {
46 LOG(
debug) <<
" channel " << ich <<
" / " << nch;
47 if (mDeadChannelMap && !mDeadChannelMap->
isChannelAlive(inChData[ich].ChId)) {
48 LOG(
debug) <<
"Channel " << ich <<
" is dead - discarding data";
51 int offsetChannel =
getOffset(
int(inChData[ich].ChId));
54 (
float)inChData[ich].QTCAmpl,
55 inChData[ich].ChainQTC});
56 const auto& currentOutCh = outChData.back();
60 sideAtimeFirst = std::min(
static_cast<Double_t
>(sideAtimeFirst), currentOutCh.time);
61 if (inChData[ich].areAllFlagsGood()) {
63 sideAtimeAvg += currentOutCh.time;
67 sideAtimeAvgSelected += currentOutCh.time;
73 const int nsToPs = 1e3;
77 mCollisionTime[RP::TimeSelectedMean] = (ndigitsASelected > 0) ? round(sideAtimeAvgSelected * nsToPs /
Float_t(ndigitsASelected)) :
RP::sDummyCollissionTime;