28 , m_useANDFilter(
true)
33 declareProperty(
"UseAndFilter", m_useANDFilter,
"Use an AND Filter over all the Volumes, if false use an OR filter");
34 declareProperty(
"VolumeNames", m_VolumeNames,
"List of Volumes to use for filtering");
35 declareProperty(
"PDG_ID", m_magicID,
"If this is non-zero then more detailed checks will be made, requiring this particle to be present.");
51 return StatusCode::SUCCESS;
59 ATH_MSG_INFO(
"Processed "<< m_ntot <<
" events, "<< m_npass<<
" events passed filter ");
61 return StatusCode::SUCCESS;
70 if (m_VolumeNames.empty()) { ++m_npass;
return true;}
71 bool evtPassesFilter(m_useANDFilter);
72 auto trackRecordCollectionHandles = m_VolumeNames.makeHandles();
73 for(
auto& coll : trackRecordCollectionHandles) {
76 ATH_MSG_DEBUG(
"Cannot retrieve TrackRecordCollection " << coll.key());
80 if (m_magicID!=0 || m_ptMin>0 || m_ptMax>0)
82 const unsigned int ntracks(coll->size());
85 if (m_magicID!=0 && m_magicID != std::fabs(coll->operator[](
track).GetPDGCode())) {
continue; }
86 if (m_ptMin>0 && m_ptMin > coll->operator[](
track).GetMomentum().perp() ) {
continue; }
87 if (m_ptMax>0 && m_ptMax < coll->
operator[](
track).GetMomentum().
perp() ) {
continue; }
117 return evtPassesFilter;