本文整理汇总了C++中Flavour::IsQuark方法的典型用法代码示例。如果您正苦于以下问题:C++ Flavour::IsQuark方法的具体用法?C++ Flavour::IsQuark怎么用?C++ Flavour::IsQuark使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Flavour
的用法示例。
在下文中一共展示了Flavour::IsQuark方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: FinalColours
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";
}
}
}
示例2: abort
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);
}