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 " +
61 std::to_string(combination.size()));
64 for (
auto el: combination){
68 selected_electrons.push_back(electronLink);
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);
#define ATH_CHECK
Evaluate an expression and check for errors.
Group of local monitoring quantities and retain correlation when filling histograms
Declare a monitored scalar variable.
This module defines the arguments passed from the BATCH driver to the BATCH worker.
const std::string & featureString()
LinkInfo< T > findLink(const Decision *start, const std::string &linkName, const bool suppressMultipleLinksWarning=false)
Perform a recursive search for ElementLinks of type T and name 'linkName', starting from Decision obj...