@@ -27,13 +27,7 @@ void Reconstructor::process(o2::fdd::Digit const& digitBC, gsl::span<const o2::f
2727 std::vector<o2::fdd::RecPoint>& RecPoints, std::vector<o2::fdd::ChannelDataFloat>& outChData)
2828// gsl::span<o2::fdd::ChannelDataFloat> outChData)
2929{
30- // Compute charge weighted average time
31- Double_t timeFDA = 0 , timeFDC = 0 ;
32- Double_t weightFDA = 0.0 , weightFDC = 0.0 ;
33- Int_t nInTimeA = 0 , nInTimeC = 0 ;
34- int firstEntry = outChData.size ();
35- int nStored = 0 ;
36- int nch = inChData.size ();
30+ const int firstEntry = outChData.size ();
3731
3832 bool atLeastOneVertexChannel = false ;
3933 bool atLeastOneChannelInSwAmplitudeRange = false ;
@@ -81,19 +75,19 @@ void Reconstructor::process(o2::fdd::Digit const& digitBC, gsl::span<const o2::f
8175 }
8276
8377 constexpr float nsToPs = 1e3 ;
84- float meanTimeSideA = std::round ( float (timeSideA) * timePerTDC / float (entriesNumSideA) );
85- float meanTimeSideC = std::round ( float (timeSideC) * timePerTDC / float (entriesNumSideC) );
78+ float meanTimeSideA = float (timeSideA) * timePerTDC / float (entriesNumSideA);
79+ float meanTimeSideC = float (timeSideC) * timePerTDC / float (entriesNumSideC);
8680
8781 bool swVertexTrg = FDDRecoConfig::Instance ().SwTriggerEnabled ? calculateSwTrigger (meanTimeSideA, meanTimeSideC, swOrGateSideA, swOrGateSideC) : false ;
8882
8983 std::array<int , 2 > mCollisionTime = {o2::fdd::RecPoint::sDummyCollissionTime , o2::fdd::RecPoint::sDummyCollissionTime };
9084 if (entriesNumSideA > 0 ) {
91- mCollisionTime [o2::fdd::RecPoint::TimeA] = meanTimeSideA * nsToPs;
85+ mCollisionTime [o2::fdd::RecPoint::TimeA] = std::round ( meanTimeSideA * nsToPs) ;
9286 }
9387 if (entriesNumSideC > 0 ) {
94- mCollisionTime [o2::fdd::RecPoint::TimeC] = meanTimeSideC * nsToPs;
88+ mCollisionTime [o2::fdd::RecPoint::TimeC] = std::round ( meanTimeSideC * nsToPs) ;
9589 }
96- RecPoints.emplace_back (mCollisionTime , firstEntry, nStored , digitBC.getIntRecord (), digitBC.mTriggers , swVertexTrg);
90+ RecPoints.emplace_back (mCollisionTime , firstEntry, storedEntries , digitBC.getIntRecord (), digitBC.mTriggers , swVertexTrg);
9791}
9892// ________________________________________________________
9993void Reconstructor::finish ()
0 commit comments