本文整理汇总了C++中Flavour::SetStable方法的典型用法代码示例。如果您正苦于以下问题:C++ Flavour::SetStable方法的具体用法?C++ Flavour::SetStable怎么用?C++ Flavour::SetStable使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Flavour
的用法示例。
在下文中一共展示了Flavour::SetStable方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: InitialiseGenerator
void InitialiseGenerator(int argc, char *argv[])
{
if(argc<2) {
cout<<"Usage: ./SingleDecay <PDG_CODE>"<<endl;
THROW(normal_exit,"you didn't specify the decaying particle by PDG code.");
}
small_sherpa_init(argc, argv);
hadrons = new SHERPA::Hadron_Decay_Handler(".", "Fragmentation.dat");
mother_flav = Flavour( (kf_code) abs(ToType<int>(argv[1])) );
mother_flav.SetStable(false);
if(ToType<int>(argv[1])<0) mother_flav=mother_flav.Bar();
if(hadrons->DecayMap()->FindDecay(mother_flav)==NULL)
THROW(fatal_error, "Didn't find "+ToString<Flavour>(mother_flav)+
" in HadronDecays.dat.");
// set all decay channel BR's equal, such that we generate the same amount of
// each decay channel to be tested
PHASIC::Decay_Table* table=hadrons->DecayMap()->FindDecay(mother_flav);
for(size_t i(0);i<table->size();++i)
table->UpdateWidth(table->at(i), 1.0);
rpa->gen.SetEcms(mother_flav.HadMass());
msg_Info()<<"Welcome. I am decaying a "<<mother_flav<<endl;
}
示例2: InitialiseGenerator
void InitialiseGenerator(int argc, char *argv[])
{
if(argc<2) {
cout<<"Usage: ./SingleDecay <PDG_CODE>"<<endl;
THROW(normal_exit,"you didn't specify the decaying particle by PDG code.");
}
small_sherpa_init(argc, argv);
hadrons = new SHERPA::Hadron_Decay_Handler(".", "Fragmentation.dat");
Data_Reader * reader = new Data_Reader(" ",";","!","=");
reader->AddWordSeparator("\t");
reader->SetInputPath("./");
reader->SetInputFile("YFS.dat");
photons = new PHOTONS::Photons(reader,true);
mother_flav = Flavour( (kf_code) abs(ToType<int>(argv[1])) );
mother_flav.SetStable(false);
if(ToType<int>(argv[1])<0) mother_flav=mother_flav.Bar();
rpa->gen.SetEcms(mother_flav.HadMass());
msg_Info()<<"Welcome. I am decaying a "<<mother_flav<<endl;
Particle* mother_part = new Particle( 1,mother_flav,
Vec4D(mother_flav.HadMass(),0.,0.,0.) );
mother_part->SetTime();
mother_part->SetFinalMass(mother_flav.HadMass());
ref_blob = new Blob();
ref_blob->SetType(btp::Hadron_Decay);
ref_blob->SetStatus(blob_status::needs_hadrondecays);
ref_blob->AddToInParticles(mother_part);
try {
hadrons->FillOnshellDecay(ref_blob, NULL);
} catch (Return_Value::code ret) {
msg_Error()<<METHOD<<" Something went wrong for blob: "<<ref_blob<<endl;
return;
}
}