We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 2e6efa2 commit 0bbc1baCopy full SHA for 0bbc1ba
1 file changed
DataFormats/common/include/CommonDataFormat/InteractionRecord.h
@@ -71,9 +71,9 @@ struct InteractionRecord {
71
72
static int ns2bc(double ns, unsigned int& orb)
73
{
74
- orb = ns > 0 ? ns / o2::constants::lhc::LHCOrbitNS : 0;
75
- ns -= orb * o2::constants::lhc::LHCOrbitNS;
76
- return std::round(ns / o2::constants::lhc::LHCBunchSpacingNS);
+ long nb = std::round(ns / o2::constants::lhc::LHCBunchSpacingNS);
+ orb = nb / o2::constants::lhc::LHCMaxBunches;
+ return nb % o2::constants::lhc::LHCMaxBunches;
77
}
78
79
double bc2ns() const
0 commit comments