diff --git a/include/RHEJ/qqx.hh b/include/RHEJ/qqx.hh index faa3955..a353ee2 100644 --- a/include/RHEJ/qqx.hh +++ b/include/RHEJ/qqx.hh @@ -1,121 +1,125 @@ /** \file qqx.hh * \brief Functions for determining if event is a qqx event. */ #pragma once #include "RHEJ/utility.hh" #include "RHEJ/PDG_codes.hh" namespace RHEJ{ //! Check if an event has a backwards extremal qqx /** * @param incoming Incoming particles in ascending pz * @param outgoing Outgoing particles in ascending rapidity * @returns true iff the the most backwards incoming particle is a * gluon and the corresponding outgoing particle is a quark. * * If the incoming and outgoing particles are ordered such that HEJ resummation * is possible, this function can help to distinguish between FKL and backwards qqx * events. Allows emission of A/W/Z boson unordered past qqx pair. */ inline bool has_Ex_qqxb( std::array const & incoming, std::vector const & outgoing ){ if (incoming.front().type!=pid::gluon) return false; if (is_AWZ_boson(outgoing.front().type)){ return (is_quark(outgoing[1]) && is_antiquark(outgoing[2])) || (is_quark(outgoing[2]) && is_antiquark(outgoing[1])); } - else{ - return (is_quark(outgoing.front()) && is_antiquark(outgoing[1])) - || (is_quark(outgoing[1]) && is_antiquark(outgoing.front())); + if (abs(outgoing[1].type) == pid::Wp){ + return (is_quark(outgoing.front()) && is_antiquark(outgoing[2])) + || (is_quark(outgoing[2]) && is_antiquark(outgoing.front())); } + return (is_quark(outgoing.front()) && is_antiquark(outgoing[1])) + || (is_quark(outgoing[1]) && is_antiquark(outgoing.front())); } //! Check if an event has an extremal forward qqx /** * @param incoming Incoming particles in ascending pz * @param outgoing Outgoing particles in ascending rapidity * @returns true iff the the most forwards incoming particle is a * gluon and the corresponding outgoing particle is a quark. * * If the incoming and outgoing particles are ordered such that HEJ resummation * is possible, this function can help to distinguish between FKL and forwards qqx * events. Allows emission of A/W/Z boson unordered beyond qqx pair. */ inline bool has_Ex_qqxf( std::array const & incoming, std::vector const & outgoing ){ if (incoming.back().type!=pid::gluon) return false; if (is_AWZ_boson(outgoing.back().type)){ return (is_quark(outgoing.rbegin()[1]) && is_antiquark(outgoing.rbegin()[2])) || (is_quark(outgoing.rbegin()[2]) && is_antiquark(outgoing.rbegin()[1])); } - else{ - return (is_quark(outgoing.back()) && is_antiquark(outgoing.rbegin()[1])) - || (is_quark(outgoing.rbegin()[1]) && is_antiquark(outgoing.back())); + if (abs(outgoing.rbegin()[1].type) == pid::Wp){ + return (is_quark(outgoing.back()) && is_antiquark(outgoing.rbegin()[2])) + || (is_quark(outgoing.rbegin()[2]) && is_antiquark(outgoing.back())); } + return (is_quark(outgoing.back()) && is_antiquark(outgoing.rbegin()[1])) + || (is_quark(outgoing.rbegin()[1]) && is_antiquark(outgoing.back())); } //! Check if an event has an Extremal qqx /** * @see has_Ex_qqxb, has_Ex_qqxf */ inline bool has_Ex_qqx( std::array const & incoming, std::vector const & outgoing ){ return has_Ex_qqxb(incoming, outgoing) || has_Ex_qqxf(incoming, outgoing); } // Note that this changes the outgoing range! template bool has_mid_qqx( Iterator begin_outgoing, Iterator end_outgoing ){ assert(std::distance(begin_outgoing, end_outgoing) >= 2); // One photon, W, H, Z in the final state is allowed. // Remove it for remaining tests, end_outgoing = std::remove_if( begin_outgoing, end_outgoing, [](Particle const & p){return is_AWZH_boson(p);} ); if(std::distance(begin_outgoing, end_outgoing) < 4){ return false; } const auto quark = std::find_if( //Find a quark begin_outgoing+1, end_outgoing-1, [](Particle const & s){ return (is_quark(s));} ); if (quark == begin_outgoing+1) return (is_antiquark((begin_outgoing+2)->type)); else if(quark == end_outgoing-1) return (is_antiquark((end_outgoing-2)->type)); else return (is_antiquark((quark-1)->type)) || (is_antiquark((quark+1)->type)); } //! Check if an event has a central qqx pair /** * @param outgoing Outgoing particles in ascending rapidity * @returns true iff the the most forwards incoming particle is a * gluon and the corresponding outgoing particle is a quark. * * If the incoming and outgoing particles are ordered such that HEJ resummation * is possible, this function can help to distinguish between FKL and central qqx * events. Allows emission of one A/W/Z/H boson anywhere in the final state. */ inline bool has_mid_qqx( std::vector outgoing ){ return has_mid_qqx( begin(outgoing), end(outgoing) ); } }