Commit 6b60da24 authored by Frank Siegert's avatar Frank Siegert
Browse files

T-Channel EW option for Amegic and Comix: r19358, r19360 and r19362 from...

T-Channel EW option for Amegic and Comix: r19358, r19360 and r19362 from trunk, with additional switch for backward compatibility.
parent ab75d723
......@@ -762,6 +762,7 @@ void Amplitude_Generator::CountOrders(Single_Amplitude * & first)
bool Amplitude_Generator::CheckTChannels(Point * p) {
int ntchan(-1);
if (p->fl.Strong()) ntchan++;
p->CountT(ntchan,0);
//to treat decays correctly
if (ntchan==-1) ntchan++;
......
......@@ -163,17 +163,17 @@ bool Point::CountT(int & tchan,const long unsigned int & kfcode) {
if (left) {
if (left->CountT(tchan,kfcode)) {
comp=left->fl.Kfcode();
if (comp==kfcode || kfcode==0) tchan++;
if ((comp==kfcode || kfcode==0) && !fl.Strong()) tchan++;
return true;
}
if (right->CountT(tchan,kfcode)) {
comp=right->fl.Kfcode();
if (comp==kfcode || kfcode==0) tchan++;
if ((comp==kfcode || kfcode==0) && !fl.Strong()) tchan++;
return true;
}
if (middle && middle->CountT(tchan,kfcode)) {
comp=middle->fl.Kfcode();
if (comp==kfcode || kfcode==0) tchan++;
if ((comp==kfcode || kfcode==0) && !fl.Strong()) tchan++;
return true;
}
}
......
......@@ -28,6 +28,7 @@ static const double invsqrttwo(1.0/sqrt(2.0));
Amplitude::Amplitude():
p_model(NULL), m_nin(0), m_nout(0), m_n(0), m_nf(6), m_ngpl(3),
m_ew_tchan_mode(0),
m_oew(99), m_oqcd(99), m_maxoew(99), m_maxoqcd(99), m_minntc(0),
m_pmode('D'), p_dinfo(new Dipole_Info()), p_colint(NULL), p_helint(NULL),
m_trig(true), p_loop(NULL)
......@@ -45,6 +46,8 @@ Amplitude::Amplitude():
if (!read.ReadFromFile(helpi,"COMIX_VL_MODE")) helpi=0;
else msg_Info()<<METHOD<<"(): Set vertex label mode "<<helpi<<".\n";
Vertex::SetVLMode(helpi);
if (!read.ReadFromFile(m_ew_tchan_mode,"EW_TCHAN_MODE")) m_ew_tchan_mode=0;
else msg_Info()<<METHOD<<"(): Set EW Tchannel mode "<<m_ew_tchan_mode<<".\n";
if (!read.ReadFromFile(helpi,"COMIX_N_GPL")) helpi=3;
else msg_Info()<<METHOD<<"(): Set graphs per line "<<helpi<<".\n";
m_ngpl=Max(1,Min(helpi,5));
......@@ -400,18 +403,32 @@ Vertex *Amplitude::AddCurrent
vkey.p_b->OrderQCD()+v->OrderQCD());
size_t ntc(vkey.p_a->NTChannel()+vkey.p_b->NTChannel());
bool isa(false), isb(false);
if (m_ew_tchan_mode==0) {
if (n<m_n-1 && vkey.p_e==NULL) {
isa=(vkey.p_a->CId()&1)^(vkey.p_a->CId()&2);
isb=(vkey.p_b->CId()&1)^(vkey.p_b->CId()&2);
ntc+=isa^isb;
}
}
else {
isa=(vkey.p_a->CId()&1)^(vkey.p_a->CId()&2);
isb=(vkey.p_b->CId()&1)^(vkey.p_b->CId()&2);
if (n<m_n-1 && vkey.p_e==NULL) {
ntc+=(isa^isb)&&!ckey.m_fl.Strong();
}
}
if (vkey.p_e) {
oew+=vkey.p_e->OrderEW();
oqcd+=vkey.p_e->OrderQCD();
ntc+=vkey.p_e->NTChannel();
if (n<m_n-1) {
bool ise((vkey.p_e->CId()&1)^(vkey.p_e->CId()&2));
ntc+=isa^isb^ise;
if (m_ew_tchan_mode==0) {
ntc+=isa^isb^ise;
}
else {
ntc+=(isa^isb^ise)&&!ckey.m_fl.Strong();
}
}
}
if (!v->Active() || oew>m_oew || oqcd>m_oqcd ||
......
......@@ -86,7 +86,7 @@ namespace COMIX {
Int_Matrix m_cl;
size_t m_nin, m_nout;
size_t m_n, m_nf, m_pgmode, m_ngpl, m_sccmur;
size_t m_n, m_nf, m_pgmode, m_ngpl, m_sccmur, m_ew_tchan_mode;
size_t m_oew, m_oqcd, m_maxoew, m_maxoqcd, m_minntc;
char m_pmode;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment