Skip to content
Snippets Groups Projects
Commit b908bfa7 authored by Andrii Verbytskyi's avatar Andrii Verbytskyi Committed by Julien Maurer
Browse files

Should fix the HepMC2 build problems with BunchCrossingTime

Should fix the HepMC2 build problems with BunchCrossingTime
parent 1e057d72
No related branches found
No related tags found
2 merge requests!641532023-07-05: Daily sweep of 23.0 into main,!64100Should fix the HepMC2 build problems with BunchCrossingTime
......@@ -181,6 +181,7 @@ namespace xAODMaker {
bool isSignalProcess(false);
if (cntr==0) {
isSignalProcess=true;
#ifdef HEPMC3
auto bunchCrossingTime = genEvt->attribute<HepMC3::IntAttribute>("BunchCrossingTime");
if (bunchCrossingTime) {
newAttributesPresent = true;
......@@ -189,11 +190,15 @@ namespace xAODMaker {
else {
ATH_MSG_VERBOSE("New attributes missing.");
}
#else
ATH_MSG_VERBOSE("New attributes missing.");
#endif
}
if (cntr>0) {
// Handle pile-up events
if (!m_doInTimePileUp && !m_doAllPileUp) break;
isSignalProcess=false;
#ifdef HEPMC3
auto bunchCrossingTime = genEvt->attribute<HepMC3::IntAttribute>("BunchCrossingTime");
if (bunchCrossingTime) {
// New approach based on checking the bunch crossing
......@@ -220,6 +225,17 @@ namespace xAODMaker {
break;
}
}
#else
// Old approach based on McEventCollection structure. If
// in-time pileup only is requested, loop stops when the
// separator GenEvent between out-of-time and in-time is
// reached
if (m_doInTimePileUp && isSeparatorGenEvent(genEvt)) {
// Old structure - stop at the first separator
// GenEvent.
break;
}
#endif
}
xAOD::TruthEvent* xTruthEvent = new xAOD::TruthEvent();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment