Commit fbd6a22d authored by Stefan Hoeche's avatar Stefan Hoeche

adapted ntuple writer to new swap methods

parent 598e8016
......@@ -877,8 +877,9 @@ void Single_Virtual_Correction::SetSelectorOn(const bool on)
void Single_Virtual_Correction::FillMEwgts(ATOOLS::ME_Weight_Info& wgtinfo)
{
wgtinfo.m_y1=m_x0;
wgtinfo.m_y2=m_x1;
wgtinfo.m_swap=p_int->Momenta()[0][3]<p_int->Momenta()[1][3];
wgtinfo.m_y1=wgtinfo.m_swap?m_x1:m_x0;
wgtinfo.m_y2=wgtinfo.m_swap?m_x0:m_x1;
if (wgtinfo.m_type&mewgttype::VI)
for (size_t i=0;i<2;i++) wgtinfo.m_wren[i]=m_cmur[i];
if (p_kpterms) p_kpterms->FillMEwgts(wgtinfo);
......
......@@ -174,7 +174,7 @@ namespace ATOOLS {
double m_B, m_VI, m_KP, m_K;
std::vector<double> m_wren,m_wfac;
double m_x1, m_x2, m_y1, m_y2, m_mur2, m_muf2;
int m_fl1, m_fl2;
int m_fl1, m_fl2, m_swap;
size_t m_oqcd, m_oew;
Cluster_Sequence_Info m_clusseqinfo;
std::vector<DADS_Info> m_dadsinfos;
......@@ -185,7 +185,7 @@ namespace ATOOLS {
m_wren(2,0.0), m_wfac(16,0.0),
m_x1(1.0), m_x2(1.0), m_y1(1.0), m_y2(1.0),
m_mur2(0.0), m_muf2(0.0), m_fl1(0), m_fl2(0),
m_oqcd(0), m_oew(0), m_clusseqinfo() {}
m_swap(0), m_oqcd(0), m_oew(0), m_clusseqinfo() {}
ME_Weight_Info& operator*=(const double &scal);
void Reset();
};
......
......@@ -280,12 +280,12 @@ void Output_RootNtuple::Output(Blob_List* blobs, const double weight)
m_evtlist[m_cnt2].uwgt[nren+i]=wgtinfo->m_wfac[i];
}
}
for (int inp=0, i=0;i<blob->NInP();i++) {
for (int i=0;i<blob->NInP();i++) {
Particle *part=blob->InParticle(i);
if (part->ProductionBlob() &&
part->ProductionBlob()->Type()==btp::Signal_Process) continue;
int kfc=part->Flav().Kfcode(); if (part->Flav().IsAnti()) kfc=-kfc;
if (++inp==1) m_evtlist[m_cnt2].f1=m_evtlist[m_cnt2].kf1=kfc;
if (part->Momentum()[3]>0.0) m_evtlist[m_cnt2].f1=m_evtlist[m_cnt2].kf1=kfc;
else m_evtlist[m_cnt2].f2=m_evtlist[m_cnt2].kf2=kfc;
}
int np=0;
......@@ -342,14 +342,16 @@ void Output_RootNtuple::Output(Blob_List* blobs, const double weight)
}
m_evtlist[m_cnt2].nuwgt=0;
Particle* part=signal->InParticle(0);
int swap(signal->InParticle(0)->Momentum()[3]<
signal->InParticle(1)->Momentum()[3]);
Particle* part=signal->InParticle(swap);
int kfc=part->Flav().Kfcode(); if (part->Flav().IsAnti()) kfc=-kfc;
m_evtlist[m_cnt2].kf1=kfc;
m_evtlist[m_cnt2].f1=(long int)(*nlos)[j]->p_fl[0];
part=signal->InParticle(1);
m_evtlist[m_cnt2].f1=(long int)(*nlos)[j]->p_fl[swap];
part=signal->InParticle(1-swap);
kfc=part->Flav().Kfcode(); if (part->Flav().IsAnti()) kfc=-kfc;
m_evtlist[m_cnt2].kf2=kfc;
m_evtlist[m_cnt2].f2=(long int)(*nlos)[j]->p_fl[1];
m_evtlist[m_cnt2].f2=(long int)(*nlos)[j]->p_fl[1-swap];
++m_cnt2;
for (ATOOLS::Particle_List::const_iterator pit=pl->begin();
......
......@@ -477,8 +477,9 @@ double COMIX::Single_Process::KPTerms(const int mode,
void COMIX::Single_Process::FillMEWeights(ME_Weight_Info &wgtinfo) const
{
wgtinfo.m_y1=m_x[0];
wgtinfo.m_y2=m_x[1];
wgtinfo.m_swap=m_p[0][3]<m_p[1][3];
wgtinfo.m_y1=m_x[wgtinfo.m_swap];
wgtinfo.m_y2=m_x[1-wgtinfo.m_swap];
(p_map?p_map:this)->p_bg->FillMEWeights(wgtinfo);
if (p_kpterms) p_kpterms->FillMEwgts(wgtinfo);
}
......
......@@ -430,10 +430,10 @@ void KP_Terms::FillMEwgts(ATOOLS::ME_Weight_Info &wgtinfo)
{
if (wgtinfo.m_type&mewgttype::KP) {
for (int i=0;i<4;i++) {
wgtinfo.m_wfac[i]=m_kpca[i];
wgtinfo.m_wfac[i+4]=m_kpcb[i];
wgtinfo.m_wfac[i+8]=m_kpca[i+4];
wgtinfo.m_wfac[i+12]=m_kpcb[i+4];
wgtinfo.m_wfac[i]=wgtinfo.m_swap?m_kpcb[i]:m_kpca[i];
wgtinfo.m_wfac[i+4]=wgtinfo.m_swap?m_kpca[i]:m_kpcb[i];
wgtinfo.m_wfac[i+8]=wgtinfo.m_swap?m_kpcb[i+4]:m_kpca[i+4];
wgtinfo.m_wfac[i+12]=wgtinfo.m_swap?m_kpca[i+4]:m_kpcb[i+4];
}
}
}
......
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