41 return StatusCode::SUCCESS;
51 std::vector<ElementLink<xAOD::IParticleContainer>> selected_electrons;
55 if(combination.size() != 2){
57 "Expecting to combine exactly two electrons/photons, but instead found "
58 << combination.size() <<
". Will throw a runtime error");
59 throw std::runtime_error(
60 "Expecting to combine exactly two electrons/photons, but instead found " +
64 for (
auto el: combination){
70 auto electronLink1=selected_electrons[0];
71 auto electronLink2=selected_electrons[1];
72 TLorentzVector hlv1 = (*electronLink1)->p4();
73 TLorentzVector hlv2 = (*electronLink2)->p4();
74 massOfProcessed = (hlv1+hlv2).M();
75 dphiOfProcessed = hlv1.DeltaPhi(hlv2);
77 ATH_MSG_DEBUG(
"Found two Electrons/Photons with deltaPhi " <<dphiOfProcessed);
79 ATH_MSG_DEBUG(
"Found two Electrons/Photons with mass " <<massOfProcessed);
95 massOfAccepted = (hlv1+hlv2).M();
106 dphiOfAccepted = hlv1.DeltaPhi(hlv2);