5 #include "boost/algorithm/string.hpp"
16 m_trigdec(
"Trig::TrigDecisionTool/TrigDecisionTool"),
17 m_matchTool(
"Trig::TrigEgammaMatchingToolMT/TrigEgammaMatchingToolMT")
51 return StatusCode::SUCCESS;
57 const std::string& trigger,
bool &
valid)
const
63 if(
tool->chain() == trigger )
66 if(!
match(roi, input))
return acceptData;
70 ATH_MSG_WARNING(
"Its not possible to find all trigger features for this RoI. Skip emulation.");
75 return tool->emulate(input);
108 if(output.signature ==
"electron"){
119 if( !vec_el_linkInfo.empty() ){
125 for(
auto&featLinkInfo : vec_el_linkInfo)
127 if(!featLinkInfo.isValid())
continue;
128 auto el = *featLinkInfo.link;
129 output.electrons.push_back(
el);
136 for(
auto& featLinkInfo : vec_feat){
137 if(!featLinkInfo.isValid())
continue;
138 output.clusters.push_back(*featLinkInfo.link);
145 for (
auto& featLinkInfo : vec_feat ){
146 if(!featLinkInfo.isValid())
continue;
147 output.trig_electrons.push_back(*featLinkInfo.link);
154 output.rings =
match()->getRingsFeature(roi);
156 output.emCluster = output.rings->emCluster();
165 output.l1 =
match()->getL1Feature(roi);
167 if(featLinkInfo.isValid()){
168 output.roi = *featLinkInfo.link;
174 ATH_MSG_DEBUG(
"L2 Cluster = " << (output.emCluster?
"Yes":
"No"));
176 ATH_MSG_DEBUG(
"L2 Electrons = " << (output.trig_electrons.size()));
188 }
else if (output.signature ==
"photon"){
194 if( !vec_ph_linkInfo.empty() ){
201 for(
auto&featLinkInfo : vec_ph_linkInfo){
202 if(!featLinkInfo.isValid())
continue;
203 output.photons.push_back(*featLinkInfo.link);
210 for(
auto& featLinkInfo : vec_feat){
211 if(!featLinkInfo.isValid())
continue;
212 output.clusters.push_back(*featLinkInfo.link);
219 if(featLinkInfo.isValid()){
220 output.emCluster = *featLinkInfo.link;
223 output.rings =
match()->getRingsFeature(roi);
230 output.l1 =
match()->getL1Feature(roi);
232 if(featLinkInfo.isValid()){
233 output.roi = *featLinkInfo.link;
239 ATH_MSG_DEBUG(
"L2 Cluster = " << (output.emCluster?
"Yes":
"No"));
241 ATH_MSG_DEBUG(
"L2 Photon = " << (output.trig_photon?
"Yes":
"No"));
247 if(output.isValid())
return true;
278 this->
rings =
nullptr;
288 }
else if (this->
signature ==
"electron"){
298 if (pidname==
"tight"){
300 }
else if (pidname==
"medium"){
302 }
else if (pidname==
"loose"){
311 if (pidname==
"lhtight"){
313 }
else if (pidname==
"lhmedium"){
315 }
else if (pidname==
"lhloose"){
317 }
else if (pidname==
"lhvloose"){
319 }
else if (pidname==
"dnntight"){
321 }
else if (pidname==
"dnnmedium"){
323 }
else if (pidname==
"dnnloose"){
325 }
else if (pidname==
"dnnvloose"){
327 }
else if (pidname==
"tight"){
329 }
else if (pidname==
"medium"){
331 }
else if (pidname==
"loose"){
341 if (pidname==
"tight"){
343 return (
bool)this->
ringerTools[0]->accept(cl, output, avgmu);
344 }
else if (pidname==
"medium"){
346 return (
bool)this->
ringerTools[1]->accept(cl, output, avgmu);
347 }
else if (pidname==
"loose"){
349 return (
bool)this->
ringerTools[2]->accept(cl, output, avgmu);
350 }
else if (pidname==
"vloose"){
352 return (
bool)this->
ringerTools[3]->accept(cl, output, avgmu);