#include "PHASIC++/Selectors/Fastjet_Selector_Base.H" namespace PHASIC { class Fastjet_Finder : public Fastjet_Selector_Base { int m_nb, m_nb2; public: Fastjet_Finder(Process_Base* const proc, ATOOLS::Scoped_Settings s, int nb, int nb2); bool Trigger(ATOOLS::Selector_List&); void BuildCuts(Cut_Data*) {} }; } #include "PHASIC++/Main/Process_Integrator.H" #include "ATOOLS/Org/Run_Parameter.H" using namespace PHASIC; using namespace ATOOLS; /*--------------------------------------------------------------------- General form - flavours etc are unknown, will operate on a Particle_List. --------------------------------------------------------------------- */ Fastjet_Finder::Fastjet_Finder(Process_Base* const proc, Scoped_Settings s, int nb, int nb2): Fastjet_Selector_Base("FastjetFinder", proc, s), m_nb(nb), m_nb2(nb2) {} bool Fastjet_Finder::Trigger(Selector_List &sl) { if (m_nj<1) return true; DEBUG_FUNC((p_proc?p_proc->Flavours():Flavour_Vector())); std::vector p(sl.size()); for (size_t i(0);igen.Beam2().IsHadron()) { msg_Debugging()<gen.PBeam(1)), qq(p[0]-p[2]); Poincare cms(pp+qq); double Q2(-qq.Abs2()), x(Q2/(2.0*pp*qq)), E(sqrt(Q2)/(2.0*x)); Vec4D P(sqrt(E*E+pp.Abs2()),0.0,0.0,-E); Vec4D q(0.0,0.0,0.0,2.0*x*E); cms.Boost(pp); cms.Boost(qq); Poincare zrot(pp,-Vec4D::ZVEC); zrot.Rotate(pp); zrot.Rotate(qq); Poincare breit(P+q); breit.BoostBack(pp); breit.BoostBack(qq); if (!IsEqual(pp,P,1.0e-3) || !IsEqual(qq,q,1.0e-3)) msg_Error()< "< input,jets; for (size_t i(m_nin);i0 || m_nb2>0))) { input.push_back(MakePseudoJet(sl[i].Flavour(), p[i])); } } fjcore::ClusterSequence cs(input,*p_jdef); jets=fjcore::sorted_by_pt(cs.inclusive_jets()); msg_Debugging()<<"njets(ini)="<sqr(m_ptmin)) ++n; return (1-m_sel_log->Hit(1-(n>=m_nj))); } int n(0), nb(0), nb2(0); for (size_t i(0);iHit(1-trigger)); } DECLARE_GETTER(Fastjet_Finder,"FastjetFinder",Selector_Base,Selector_Key); Selector_Base *ATOOLS::Getter:: operator()(const Selector_Key &key) const { auto s = key.m_settings["FastjetFinder"]; // b tagging const auto nb = s["Nb"] .SetDefault(-1).Get(); const auto nb2 = s["Nb2"].SetDefault(-1).Get(); return new Fastjet_Finder(key.p_proc, s, nb, nb2); } void ATOOLS::Getter:: PrintInfo(std::ostream &str,const size_t width) const { str<<"FastjetFinder:\n"; Fastjet_Selector_Base::PrintCommonInfoLines(str, width); str<