Skip to content

Commit 0389ea9

Browse files
njacazioBenedikt Volkel
authored andcommitted
Update store MC collision time
(cherry picked from commit 356ba3d)
1 parent b64ca47 commit 0389ea9

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

Detectors/AOD/src/AODProducerWorkflowSpec.cxx

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1923,9 +1923,9 @@ void AODProducerWorkflowDPL::run(ProcessingContext& pc)
19231923
mcCollisionsCursor.reserve(totalNParts);
19241924

19251925
for (int iCol = 0; iCol < nMCCollisions; iCol++) {
1926-
auto time = mcRecords[iCol].getTimeNS();
1927-
auto globalBC = mcRecords[iCol].toLong();
1928-
auto item = bcsMap.find(globalBC);
1926+
const auto time = mcRecords[iCol].getTimeOffsetWrtBC();
1927+
const auto globalBC = mcRecords[iCol].toLong();
1928+
const auto item = bcsMap.find(globalBC);
19291929
int bcID = -1;
19301930
if (item != bcsMap.end()) {
19311931
bcID = item->second;
@@ -1934,17 +1934,17 @@ void AODProducerWorkflowDPL::run(ProcessingContext& pc)
19341934
<< "for MC collision; BC = " << globalBC
19351935
<< ", mc collision = " << iCol;
19361936
}
1937-
auto& colParts = mcParts[iCol];
1938-
auto nParts = colParts.size();
1939-
for (auto colPart : colParts) {
1940-
auto eventID = colPart.entryID;
1941-
auto sourceID = colPart.sourceID;
1937+
const auto& colParts = mcParts[iCol];
1938+
const auto nParts = colParts.size();
1939+
for (const auto colPart : colParts) {
1940+
const auto eventID = colPart.entryID;
1941+
const auto sourceID = colPart.sourceID;
19421942
// enable embedding: if several colParts exist, then they are
19431943
// saved as one collision
19441944
if (nParts == 1 || sourceID == 0) {
19451945
// FIXME:
19461946
// use generators' names for generatorIDs (?)
1947-
auto& header = mcReader->getMCEventHeader(sourceID, eventID);
1947+
const auto& header = mcReader->getMCEventHeader(sourceID, eventID);
19481948
updateMCHeader(mcCollisionsCursor.cursor,
19491949
hepmcXSectionsCursor.cursor,
19501950
hepmcPdfInfosCursor.cursor,

0 commit comments

Comments
 (0)