17 :
AthAlgTool(
t,
n,
p), m_dlf(
"DerivationFramework::DiLepFilters/DiLepFilters"),
20 declareInterface<DerivationFramework::ISkimmingTool>(
this);
28 CHECK(m_dlf.retrieve());
30 m_filter =
static_cast<Filters>(m_filter_prop);
34 return StatusCode::FAILURE;
41 return StatusCode::SUCCESS;
48 if(!m_dlf->GetTriggers(passFlags))
return false;
53 msg(MSG::WARNING) <<
"No Jet container found, will skip this event" <<
endmsg;
58 msg(MSG::WARNING) <<
"No Muon container found, will skip this event" <<
endmsg;
63 msg(MSG::WARNING) <<
"No Photon container found, will skip this event" <<
endmsg;
68 if(m_filter == Filters::SiEl)
72 if(m_dlf->PassSiEl(passFlags, *
el))
return true;
75 else if(m_filter == Filters::SiPhX)
77 for(
auto ph1 = phc->
cbegin(); ph1 != phc->
cend(); ph1++)
81 if(m_dlf->PassSiPhX(passFlags, **ph1, *
el))
return true;
83 for(
auto ph2 = ph1+1; ph2 != phc->
cend(); ph2++)
85 if(m_dlf->PassSiPhX(passFlags, **ph1, **ph2))
return true;
89 if(m_dlf->PassSiPhX(passFlags, **ph1, *
mu))
return true;
93 else if(m_filter == Filters::SiMu)
97 if(m_dlf->PassSiMu(passFlags, *
mu))
return true;
100 else if(m_filter == Filters::SiMuBa)
104 if(m_dlf->PassSiMuBa(passFlags, *
mu))
return true;
107 else if(m_filter == Filters::DiEl)
109 for(
auto el1 = elc->
cbegin(); el1 != elc->
cend(); el1++)
111 for(
auto el2 = el1+1; el2 != elc->
cend(); el2++)
113 if(m_dlf->PassDiEl(passFlags, **el1, **el2))
return true;
117 else if(m_filter == Filters::DiPh)
119 for(
auto ph1 = phc->
cbegin(); ph1 != phc->
cend(); ph1++)
121 for(
auto ph2 = ph1+1; ph2 != phc->
cend(); ph2++)
123 if(m_dlf->PassDiPh(passFlags, **ph1, **ph2))
return true;
127 else if(m_filter == Filters::DiElPh)
133 if(m_dlf->PassDiElPh(passFlags, *
el, *ph))
return true;
137 else if(m_filter == Filters::DiLoElPh)
143 if(m_dlf->PassDiLoElPh(passFlags, *
el, *ph))
return true;