Skip to content

Commit c7ebae2

Browse files
authored
fix sor calculation issue spec MC tags, also consider special cases
1 parent ca01776 commit c7ebae2

1 file changed

Lines changed: 7 additions & 1 deletion

File tree

‎DataFormats/Parameters/src/AggregatedRunInfo.cxx‎

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
#include "DataFormatsParameters/GRPLHCIFData.h"
1919
#include "CommonConstants/LHCConstants.h"
2020
#include "Framework/Logger.h"
21+
#include <cmath>
2122
#include <map>
2223

2324
using namespace o2::parameters;
@@ -188,9 +189,14 @@ void AggregatedRunInfo::adjust_from_MC(o2::ccdb::CCDBManagerInstance& ccdb,
188189
int nOrbitsCorrection = 4; // a shift (number of orbits for correction) if orbitsPerTF=32 or 8
189190
if (orbitsPerTF == 6) {
190191
nOrbitsCorrection = 2; // correction if orbitsPerTF=6, e.g. Pb-Pb MC LHC26h3
192+
} else if (orbitsPerTF == 128) {
193+
nOrbitsCorrection = 36; // correction if orbitsPerTF=128, e.g. MB gap trigger PbPb 2024 apass3 LHC26a7
194+
}
195+
if (lpm_prod_tag == "LHC26j17") {
196+
nOrbitsCorrection = 30; // special case: ITS ramp-up time of 90 s instead of 5 s (for orbitsPerTF=32)
191197
}
192198
orbitSOR += nOrbitsCorrection;
193-
sor += nOrbitsCorrection * o2::constants::lhc::LHCOrbitMUS * 1000;
199+
sor += std::llround(nOrbitsCorrection * o2::constants::lhc::LHCOrbitMUS / 1000.);
194200
LOG(warn) << "AggregatedRunInfo.adjust_from_MC(): Applying SOR adjustment by " << nOrbitsCorrection << " orbits for MC production " << lpm_prod_tag << " and run number " << run_number;
195201
}
196202
}

0 commit comments

Comments
 (0)