Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion Common/DataModel/PIDResponseTOF.h
Original file line number Diff line number Diff line change
Expand Up @@ -254,12 +254,18 @@ namespace pidtofsignal
DECLARE_SOA_COLUMN(TOFSignal, tofSignal, float); //! TOF signal from track time
DECLARE_SOA_DYNAMIC_COLUMN(EventCollisionTime, eventCollisionTime, //! Event collision time used for the track. Needs the TOF
[](float signal, float tMinusTexp, float texp) -> float { return texp + tMinusTexp - signal; });
DECLARE_SOA_DYNAMIC_COLUMN(TOFSignalInAnotherBC, tofSignalInAnotherBC, //! TOF signal but computed in another Bunch Crossing. Needs the original globalBC and the new globalBC to compute the delta time to apply to the signal.
[](float signal, int64_t originalGlobalBC, int64_t newGlobalBC) -> float {
const int64_t deltaBcPos = originalGlobalBC - newGlobalBC;
return signal + o2::constants::lhc::LHCBunchSpacingNS * deltaBcPos * 1000.0f;
});

} // namespace pidtofsignal

DECLARE_SOA_TABLE(TOFSignal, "AOD", "TOFSignal", //! Table of the TOF signal
pidtofsignal::TOFSignal,
pidtofsignal::EventCollisionTime<pidtofsignal::TOFSignal>);
pidtofsignal::EventCollisionTime<pidtofsignal::TOFSignal>,
pidtofsignal::TOFSignalInAnotherBC<pidtofsignal::TOFSignal>);

namespace pidtofevtime
{
Expand Down
Loading