Skip to content

Commit 9a92161

Browse files
committed
Forward interaction rate to collision context
1 parent e4df51f commit 9a92161

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

Steer/src/CollisionContextTool.cxx

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -552,8 +552,16 @@ int main(int argc, char* argv[])
552552
}
553553
digicontext.setBunchFilling(bunchFillings[0]);
554554
std::vector<std::string> prefixes;
555+
// Signal interaction rate
556+
float sgnIRate = -1.;
555557
for (auto& p : ispecs) {
556558
prefixes.push_back(p.name);
559+
if(p.name == "sgn") {
560+
// Setting interaction rate in the digitizer context as provided by the O2DPG workflow
561+
LOG(debug) << "Setting signal interaction rate to " << p.interactionRate << " Hz in the digitization context.";
562+
sgnIRate = p.interactionRate;
563+
digicontext.setDigitizerInteractionRate(p.interactionRate);
564+
}
557565
}
558566
digicontext.setSimPrefixes(prefixes);
559567

@@ -691,6 +699,7 @@ int main(int argc, char* argv[])
691699

692700
std::stringstream str;
693701
str << path_prefix << tf_output_counter++ << "/collisioncontext.root";
702+
copy.setDigitizerInteractionRate(sgnIRate);
694703
copy.saveToFile(str.str());
695704
LOG(info) << "---- CollisionContext for timeframe " << tf_id << " -----";
696705
copy.printCollisionSummary();

0 commit comments

Comments
 (0)