From fcca5775b8321b23aa482e2353b6787f61d3e221 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=80=9CArvind?= Date: Tue, 10 Jan 2023 17:14:09 +0100 Subject: [PATCH] [FDD] Now propagate avg time for all the BCs in Rec (Requested by Evgeny for the background study) --- .../FDD/reconstruction/src/Reconstructor.cxx | 20 ++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) diff --git a/Detectors/FIT/FDD/reconstruction/src/Reconstructor.cxx b/Detectors/FIT/FDD/reconstruction/src/Reconstructor.cxx index fc34eba7ac43a..3a87a11046a77 100644 --- a/Detectors/FIT/FDD/reconstruction/src/Reconstructor.cxx +++ b/Detectors/FIT/FDD/reconstruction/src/Reconstructor.cxx @@ -37,7 +37,7 @@ void Reconstructor::process(o2::fdd::Digit const& digitBC, gsl::span 3) { - timeErr = 1 / adc; + timeErr = 1. / adc; } - if (outChData[ich].mPMNumber < 8) { + if ((int)inChData[ich].mPMNumber < 8) { nInTimeC += inTime; timeFDC += time / (timeErr * timeErr); weightFDC += 1. / (timeErr * timeErr); @@ -63,18 +63,24 @@ void Reconstructor::process(o2::fdd::Digit const& digitBC, gsl::span mCollisionTime = {o2::fdd::RecPoint::sDummyCollissionTime, o2::fdd::RecPoint::sDummyCollissionTime}; - /// Avg time for each side, only if one channel satisfy the TVDC condition + /// Avg time for each side, only if one channel satisfy the TVDC condition (if not, also avg time is propagated for background study using AO2D) if (nInTimeA > 0) { mCollisionTime[o2::fdd::RecPoint::TimeA] = (weightFDA > 1) ? round(timeFDA / weightFDA * nsToPs) : o2::fdd::RecPoint::sDummyCollissionTime; + } else { + if (weightFDA > 0) { + mCollisionTime[o2::fdd::RecPoint::TimeA] = round(timeFDA / weightFDA * nsToPs); + } } if (nInTimeC > 0) { mCollisionTime[o2::fdd::RecPoint::TimeC] = (weightFDC > 1) ? round(timeFDC / weightFDC * nsToPs) : o2::fdd::RecPoint::sDummyCollissionTime; + } else { + if (weightFDC > 0) { + mCollisionTime[o2::fdd::RecPoint::TimeC] = round(timeFDC / weightFDC * nsToPs); + } } - if (nStored != 0) { - RecPoints.emplace_back(mCollisionTime, firstEntry, nStored, digitBC.getIntRecord(), digitBC.mTriggers); - } + RecPoints.emplace_back(mCollisionTime, firstEntry, nStored, digitBC.getIntRecord(), digitBC.mTriggers); } //________________________________________________________ void Reconstructor::finish()