Skip to content
Snippets Groups Projects
Commit ea0fb9dd authored by Christopher Rob Jones's avatar Christopher Rob Jones
Browse files

DecodedDataFromMCRichHits: Add property to enable/disable spillover

parent 595710b3
No related branches found
No related tags found
1 merge request!4337Misc. improvements to support RICH 4D Reco
......@@ -98,33 +98,32 @@ namespace Rich::Future::MC {
for ( const auto mchit : mchits ) {
const auto id = mchit->sensDetID();
if ( id.isValid() ) {
// Apply all sorts MC based filtering here, e.g. signal only, timing windows etc.
// To be extended as needed
if ( m_rejectBackground && mchit->isBackground() ) {
_ri_verbo << id << " Rejected as background" << endmsg;
continue;
}
// finally save this id -> hit mapping
hitsPerPix[id].push_back( mchit );
} // hit is valid
} // mc hit loop
};
// Spillover locations
auto addSpilloverHits = [&]( auto const& mchits ) {
if ( mchits.exist() ) { addMCHits( *mchits.get() ); }
};
// add the hits
// add the main event hits
addMCHits( main_mchits );
addSpilloverHits( m_prevHits );
addSpilloverHits( m_prevPrevHits );
addSpilloverHits( m_nextHits );
addSpilloverHits( m_nextNextHits );
addSpilloverHits( m_lhcBkgHits );
// ... and if requested spillover hits
if ( m_enableSpillover ) {
auto addSpilloverHits = [&]( auto const& mchits ) {
if ( mchits.exist() ) { addMCHits( *mchits.get() ); }
};
addSpilloverHits( m_prevHits );
addSpilloverHits( m_prevPrevHits );
addSpilloverHits( m_nextHits );
addSpilloverHits( m_nextNextHits );
addSpilloverHits( m_lhcBkgHits );
}
// Form list of unique IDs
LHCb::RichSmartID::Vector ids;
......@@ -216,6 +215,9 @@ namespace Rich::Future::MC {
/// Reject background hits
Gaudi::Property<bool> m_rejectBackground{this, "RejectBackground", false};
/// Include spillover events
Gaudi::Property<bool> m_enableSpillover{this, "EnableSpillover", true};
};
// Declaration of the Algorithm Factory
......
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