#include "CSSHOWER++/Showers/Splitting_Function_Base.H" #include "CSSHOWER++/Tools/Parton.H" #include "MODEL/Main/Color_Function.H" #include "MODEL/Main/Single_Vertex.H" #include "ATOOLS/Phys/Cluster_Amplitude.H" #include "PDF/Main/PDF_Base.H" #include "ATOOLS/Math/Random.H" #include "ATOOLS/Org/Shell_Tools.H" #include "CSSHOWER++/Showers/Shower.H" #include using namespace CSSHOWER; using namespace MODEL; using namespace ATOOLS; Splitting_Function_Base::Splitting_Function_Base(): p_lf(NULL), p_cf(NULL), m_type(cstp::none), m_mth(0.0), m_on(1), m_qcd(-1), m_facscalefactor(1.0) { } void Splitting_Function_Base::SetEFac(Shower *const shower) { std::string id="S{"+ToString(p_lf->FlA())+"}{" +ToString(p_lf->FlB())+"}{"+ToString(p_lf->FlC())+"}"; m_efac=shower->EFac(id); if (m_efac!=1.0) msg_Info()<<"Enhance "< spins; for(const auto& fl : vertex.in) spins.push_back(fl.IntSpin()); std::sort(spins.begin(),spins.end()); SF_Lorentz* lf(NULL); if(spins[0]==0 && spins[1]==0 && spins[2]==2) lf = SFL_Getter::GetObject("SSV",sf_key); else if(spins[0]==0 && spins[1]==2 && spins[2]==2) lf = SFL_Getter::GetObject("HVV",sf_key); else if(spins[0]==1 && spins[1]==1 && spins[2]==2) lf = SFL_Getter::GetObject("FFV1",sf_key); else if(spins[0]==2 && spins[1]==2 && spins[2]==2) lf = SFL_Getter::GetObject("VVV",sf_key); return lf; } Splitting_Function_Base::Splitting_Function_Base(const SF_Key &key): p_lf(NULL), p_cf(NULL), m_type(key.m_type), m_symf(1.0), m_polfac(1.0), m_lpdf(1.0), m_efac(1.0), m_mth(0.0), m_on(1), m_qcd(-1), m_facscalefactor(1.0) { SF_Key ckey(key); ckey.p_cf=p_cf = SFC_Getter::GetObject(ckey.ID(0),ckey); if (p_cf==NULL) { ckey.p_cf=p_cf = SFC_Getter::GetObject(ckey.ID(1),ckey); if (p_cf==NULL) { m_on=-1; return; } } p_lf = InitLorentzCalc(*ckey.p_v, ckey); if (p_lf==NULL) { m_on=-1; return; } p_cf->SetLF(p_lf); p_lf->SetSF(this); m_qcd=p_lf->FlA().Strong()&&p_lf->FlB().Strong()&&p_lf->FlC().Strong(); m_on=PureQCD()&&(ckey.m_qcdmode&1);// so far only qcd evolution if (!m_on && (ckey.m_ewmode&1) && (p_lf->FlA().IsPhoton() || p_lf->FlB().IsPhoton() || p_lf->FlC().IsPhoton())) m_on=true; if (key.p_v->in[1].Mass()>10.0 && key.p_v->in[2].Mass()>10.0) m_on=0; if (key.p_v->in[1]==key.p_v->in[2] && (key.m_type==cstp::FF || key.m_type==cstp::FI)) m_symf=2.0; m_polfac=key.p_v->in[0].IntSpin()+1; if (key.p_v->in[0].IntSpin()==2 && IsZero(key.p_v->in[0].Mass())) m_polfac=2.0; msg_Debugging()<<"Init("<FlA()<<"->" <FlB()<<","<FlC() <<" => ("<FlA().Mass(true)FlA().Mass(true))>scale) return 0.0; if (p_lf->FlB().Mass(true)FlC().Mass(true)FlB().Mass(true)+ p_lf->FlC().Mass(true))>scale) return 0.0; } double lastint = p_lf->OverIntegrated(zmin,zmax,scale,xbj)/m_symf/m_polfac; if (!(IsBad(lastint)||lastint<0.0)) { if (m_efac!=1.0) lastint*=m_efac; m_lastint+=lastint; } else { msg_Error()<FlA()<<"->"<FlB()<FlC()<OverEstimated(z,y)/m_symf/m_polfac; } double Splitting_Function_Base::Z() { return p_lf->Z(); } double Splitting_Function_Base::RejectionWeight (const double z,const double y,const double eta, const double _scale,const double Q2) { double scale(_scale); if (scale>0.0) scale=p_lf->Scale(z,y,scale,Q2); m_lastacceptwgt = operator()(z,y,eta,scale,Q2)/Overestimated(z,y); #ifdef CHECK_rejection_weight if (m_lastacceptwgt > 1.0) { msg_Error()<FlA()<<"->"<FlB()<FlC() <<" at z = "<in[0].Bar())+"}{" +ToString(p_v->in[2])+"}{"+ToString(p_v->in[1])+"}"; return "{"+ToString(p_v->in[0].Bar())+"}{" +ToString(p_v->in[1])+"}{"+ToString(p_v->in[2])+"}"; } namespace CSSHOWER { std::ostream &operator<<(std::ostream &str,const SF_Key &k) { if (k.m_mode==0) return str<in[0].Bar()<<"->"<in[1]<<","<in[2]; return str<in[0].Bar()<<"->"<in[2]<<","<in[1]; } std::ostream& operator<<(std::ostream& str, const Splitting_Function_Base &base) { str<<" "< "<