本文整理汇总了C++中Flavour::Width方法的典型用法代码示例。如果您正苦于以下问题:C++ Flavour::Width方法的具体用法?C++ Flavour::Width怎么用?C++ Flavour::Width使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Flavour
的用法示例。
在下文中一共展示了Flavour::Width方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: pow
double Soft_Cluster_Handler::
TransformKin(const double MC,const Flavour & flav,const bool & enforce) {
double mass2(sqr(flav.HadMass()));
double width2(sqr(Max(flav.Width(),1.e-6)));
if (!enforce && sqr(MC*MC-mass2)>10.*mass2*width2) return 0.;
return
pow(sqr(mass2)/(sqr(MC*MC-mass2) + mass2*width2),m_kappa) *
pow(mass2*width2/(sqr(MC*MC-mass2) + mass2*width2),m_lambda);
}
示例2: sqr
T3Channel::T3Channel(int _nin,int _nout,Flavour * fl,Flavour res)
{
nin = _nin;
nout = _nout;
ms = new double[nin+nout];
for (int i=0;i<nin+nout;i++) ms[i] = ATOOLS::sqr(fl[i].Mass());
rannum = 3*nout-4;
rans = new double[rannum];
s = smax = pt2max = sqr(ATOOLS::rpa->gen.Ecms());
pt2min = 0.0;
E = 0.5 * sqrt(s);
name = "T3-Channel";
if (nout>2) name = ToString(nin)+"->"+ToString(nout)+"_"+name;
mass = width = 0.;
type = 0;
if (res!=Flavour(kf_none)) {
mass = res.Mass(); width = res.Width(); type = 1;
}
p_vegas = new Vegas(rannum,100,name,0);
}
示例3: abort
Decay2Channel::Decay2Channel(int _nin,int _nout,const Flavour * fl,Flavour res)
{
if (_nout != 2 || _nin!=1) {
msg_Error()<<"Tried to initialize Decay2Channel with nout = "<<_nin<<" -> "<<_nout<<endl;
abort();
}
nin = _nin; nout = _nout;
ms = new double[nin+nout];
for (short int i=0;i<nin+nout;i++) ms[i] = ATOOLS::sqr(fl[i].Mass());
rannum = 2;
rans = new double[rannum];
s = smax = pt2max = sqr(ATOOLS::rpa->gen.Ecms());
pt2min = 0.;
E = 0.5 * sqrt(s);
name = "Decay2-Channel";
mass = width = 0.;
type = 0;
if (res!=Flavour(kf_none)) {
mass = res.Mass(); width = res.Width(); type = 1;
}
}
示例4: GenerateMasses
void Channel_Generator_Decays::GenerateMasses(int flag,Point** _plist,int pcount,
int& rannum,ofstream& sf)
{
string * lm = new string[pcount];
string * momp = new string[pcount];
int * sflag = new int[pcount];
string mummy;
string sum_s_i;
string help;
for (short int i=0;i<pcount;i++) {
lm[i] = LinkedMasses(_plist[i]);
mummy += lm[i];
if (_plist[i]->left==0) {
if (flag==0 || flag==10) AddToVariables(flag,lm[i],string("ms[")+GetMassIndex(lm[i])+string("]"),0,sf);
//sf<<" double s"<<lm[i]<<" = ms["<<lm[i]<<"];"<<endl;
momp[i] = string("p[") + GetMassIndex(lm[i]) + string("]");
sflag[i] = 1;
//sum_s_i += string("-sqrt(s")+lm[i]+string(")");
help += lm[i];
}
else {
CalcSmin(flag,"min",lm[i],sf,_plist[i]);
momp[i] = string("p") + Order(lm[i]);
sflag[i] = 0;
}
}
if (help.length()>0) {
//CalcSmin(flag,"restmin",help,sf,0);
//sum_s_i = string("-sqrt(s")+Order(help)+string("_restmin)");
CalcSmin(flag,"min",help,sf,0);
sum_s_i = string("-sqrt(s")+Order(help)+string("_min)");
}
int hit;
double maxpole;
double res;
Flavour flav;
string smax;
for (;;) {
hit = -1;
maxpole = -1.;
for (short int j=0;j<pcount;j++) {
if (sflag[j]==0) {
flav = _plist[j]->fl;
res = ATOOLS::sqr(flav.Width()*flav.Mass());
if (!ATOOLS::IsZero(res) && Massive(flav)) {
if (1./res>maxpole) {
maxpole = 1./res;
hit = j;
}
}
else {
if (hit==-1) hit = j;
}
}
}
if (hit==-1) break;
smax = string("sqr(sqrt(s")+Order(mummy)+string(")")+sum_s_i;
for (short int j=0;j<pcount;j++) {
if (sflag[j]==0 && j!=hit) {
smax += string("-sqrt(s")+Order(lm[j])+string("_min)");
}
}
smax += string(")");
AddToVariables(flag,lm[hit] +string("_max"),smax,0,sf);
//sf<<" double s"<<Order(lm[hit])<<"_max = "<<smax<<endl;
int hi = 0;
if (maxpole>0.) {
hi = (_plist[hit]->fl).Kfcode();
if (flag>=0) sf<<" Flavour fl"<<lm[hit]<<" = "<<"Flavour((kf_code)("<<hi<<"));"<<endl;
}
switch (flag) {
case -11: case -1:
if (maxpole>0.) {
m_idc.push_back(string("MP")+ToString(hi)+string("_")+Order(lm[hit]));
}
else m_idc.push_back(string("MlP_")+Order(lm[hit]));
break;
case 0: case 10:
sf<<" Vec4D "<<momp[hit]<<";"<<endl
<<" double s"<<Order(lm[hit])<<";"<<endl;
if (maxpole>0.) {
sf<<" s"<<Order(lm[hit])
<<" = CE.MassivePropMomenta(fl"<<lm[hit]<<".Mass(),"<<"fl"<<lm[hit]<<".Width(),1,"
<<"s"<<Order(lm[hit])<<"_min,s"<<Order(lm[hit])<<"_max,ran["<<rannum<<"]);"<<endl;
}
else {
sf<<" s"<<Order(lm[hit])<<" = CE.MasslessPropMomenta(1.,s"<<Order(lm[hit])<<"_min,"
<<"s"<<Order(lm[hit])<<"_max,ran["<<rannum<<"]);"<<endl;
}
rannum++;
break;
default:
string s("");
for (int i=0;i<(int)lm[hit].length()-1;i++) s += string("p[")+GetMassIndex(lm[hit][i])+string("]+");
s += string("p[")+GetMassIndex(lm[hit][lm[hit].length()-1])+string("]");
AddToVariables(flag,lm[hit],s,1,sf);
//.........这里部分代码省略.........