void Colour_Generator::FinalColours() { // msg_Out()<<METHOD<<":\n"; size_t flow(0),col(0); Particle * part; Flavour flav; for (size_t beam=0;beam<2;beam++) { size_t length(m_hadrons[1-beam]->Size()); /* msg_Out()<<" Trips["<<beam<<"]:"; for (set<int>::iterator cit=m_col[beam][0].begin(); cit!=m_col[beam][0].end();cit++) msg_Out()<<" "<<(*cit); msg_Out()<<"\n"; msg_Out()<<" Antis["<<beam<<"]:"; for (set<int>::iterator cit=m_col[beam][1].begin(); cit!=m_col[beam][1].end();cit++) msg_Out()<<" "<<(*cit); msg_Out()<<"\n";*/ for (size_t i=length-2;i<length;i++) { part = m_hadrons[1-beam]->GetParticle(i); flav = part->Flav(); if (flav.IsQuark() || flav.IsDiQuark()) { if ((flav.IsQuark() && !flav.IsAnti()) || (flav.IsDiQuark() && flav.IsAnti())) flow=0; if ((flav.IsQuark() && flav.IsAnti()) || (flav.IsDiQuark() && !flav.IsAnti())) flow=1; if (m_col[beam][flow].size()>0) { col = (*m_col[beam][flow].begin()); part->SetFlow(flow+1,col); m_col[beam][flow].erase(m_col[beam][flow].begin()); } else { part->SetFlow(flow+1,-1); m_col[beam][1-flow].insert(part->GetFlow(flow+1)); } } else if (flav.IsGluon()) { for (flow=0;flow<2;flow++) { if (m_col[beam][flow].size()>0) { col = (*m_col[beam][flow].begin()); part->SetFlow(flow+1,col); m_col[beam][flow].erase(m_col[beam][flow].begin()); } else { part->SetFlow(flow+1,-1); m_col[beam][1-flow].insert(part->GetFlow(flow+1)); } } } // msg_Out()<<(*part)<<"\n"; } } }
double Continued_PDF::XPDF(const Flavour & flav,const bool & defmax) { if (flav.IsDiQuark()) { if (m_bunch==Flavour(kf_p_plus) && !flav.IsAnti()) { return XPDF(Flavour(kf_u)); } if (m_bunch==Flavour(kf_p_plus).Bar() && flav.IsAnti()) { return XPDF(Flavour(kf_u).Bar()); } return 0.; } if (m_x<m_xmin) return 0.; if (m_Q2>m_Q02) return p_pdf->GetXPDF(flav); double seapart(0.), valpart(0.); if (m_bunch==Flavour(kf_p_plus)) { if (flav==Flavour(kf_u) || flav==Flavour(kf_d)) { seapart = p_pdf->GetXPDF(flav.Bar())*(m_Q2/m_Q02); valpart = p_pdf->GetXPDF(flav)-p_pdf->GetXPDF(flav.Bar()); } else if (flav==Flavour(kf_gluon)) { seapart = p_pdf->GetXPDF(flav)*(m_Q2/m_Q02); valpart = 1./m_gnorm * pow(1.-m_x,m_geta) * pow(m_x,m_glambda) * m_Snorm * (1.-m_Q2/m_Q02); /* ((p_pdf->GetXPDF(Flavour(kf_u))-p_pdf->GetXPDF(Flavour(kf_u).Bar()) + p_pdf->GetXPDF(Flavour(kf_d))-p_pdf->GetXPDF(Flavour(kf_d).Bar()))/ m_Vnorm) * */ } else seapart = p_pdf->GetXPDF(flav)*(m_Q2/m_Q02); } else if (m_bunch==Flavour(kf_p_plus).Bar()) { if (flav==Flavour(kf_u).Bar() || flav==Flavour(kf_d).Bar()) { seapart = p_pdf->GetXPDF(flav.Bar())*(m_Q2/m_Q02); valpart = p_pdf->GetXPDF(flav)-p_pdf->GetXPDF(flav.Bar()); } else if (flav==Flavour(kf_gluon)) { seapart = p_pdf->GetXPDF(flav)*(m_Q2/m_Q02); valpart = (p_pdf->GetXPDF(Flavour(kf_u).Bar())-p_pdf->GetXPDF(Flavour(kf_u)) + p_pdf->GetXPDF(Flavour(kf_d).Bar())-p_pdf->GetXPDF(Flavour(kf_d))) * m_Snorm/m_Vnorm * (1.-m_Q2/m_Q02); } else seapart = p_pdf->GetXPDF(flav)*(m_Q2/m_Q02); } double total = seapart+valpart; if (defmax && total>m_xpdfmax[flav]) { m_xmaxpdf[flav] = m_x; m_xpdfmax[flav] = total; } return total; }
Proto_Particle:: Proto_Particle(Flavour flav,Vec4D mom,char info) : m_flav(flav), m_mom(mom), m_info(info), m_mass(hadpars->GetConstituents()->Mass(flav)), m_kt2max(0.), p_partner(NULL) { if (!flav.IsGluon() && !flav.IsDiQuark()) { if (flav.IsQuark() && flav.Kfcode()>5) { std::cerr<<"Error in Proto_Particle::Proto_Particle():\n" <<" Tried to form a cluster particle from a "<<flav<<".\n" <<" Please make sure that heavy coloured objects decay " <<"before they enter hadronization.\n" <<" Will exit the run.\n"; abort(); } } control::s_AHAprotoparticles++; s_actives.push_back(this); }