You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit aeaece1
Browse filesBrowse the repository at this point in the historyBrowse files
Align MC timeframes using FirstOrbitMC from MCProdInfo
This replaces the hardcoded list of MC productions in AggregatedRunInfo::adjust_from_MC by a per-run value from CCDB.
- The correction now uses the key FirstOrbitMC of the MCProdInfo object of each run.
- The shift is (FirstOrbitMC - orbitSOR) mod orbitsPerTF, so it holds for any TF length, anchor time and software version.
- Without the key, no correction is applied.
- The shift is computed by AggregatedRunInfo::tfAlignmentShift, covered by a unit test; an invalid orbitsPerTF disables it.
- MCProdInfo is read without a not-after limit, so corrections published later stay visible.
- New productions record FirstOrbitMC themselves (O2DPG). Existing ones are fixed with O2DPG's MC/prodinfo/mcprodinfo_firstorbit.py.
- Publishing needs the aliprod role. If a production needs fixing, please open an O2 JIRA ticket and ask Sandro Wenzel.
Recipe to fix a production:
mcprodinfo_firstorbit.py scan --tag <TAG> -o <TAG>.json
mcprodinfo_firstorbit.py rerun <TAG>.json --crosscheck 3
mcprodinfo_firstorbit.py apply <TAG>.json --comment "FirstOrbitMC added because of O2-XXXX" --yes
scan reads the first orbit of each run from its GRID job logs, rerun fills runs without logs and cross-checks a sample (needs CVMFS), apply publishes (dry run without --yes).
https://its.cern.ch/jira/browse/O2-7335
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
LOG(warn) << "AggregatedRunInfo.adjust_from_MC(): Shifting orbitSOR by " << shift << " orbits to align with the TFs of MC production " << lpm_prod_tag << " (run " << run_number << ", FirstOrbitMC " << firstOrbitMC << ")";
149
+
orbitSOR += shift;
150
+
sor += std::llround(shift * o2::constants::lhc::LHCOrbitMUS / 1000.);
197
151
}
198
-
orbitSOR += nOrbitsCorrection;
199
-
sor += std::llround(nOrbitsCorrection * o2::constants::lhc::LHCOrbitMUS / 1000.);
200
-
LOG(warn) << "AggregatedRunInfo.adjust_from_MC(): Applying SOR adjustment by " << nOrbitsCorrection << " orbits for MC production " << lpm_prod_tag << " and run number " << run_number;
0 commit comments