5389 const double GeV=1./100.;
5390 double sum_msqjk = 0;
5398 double MatElsq[
nmsq][
nmsq]={ { 0 } };
5399 double MatElsq_tmp[
nmsq][
nmsq]={ { 0 } };
5402 if (matrixElement!=
TVar::JHUGen){
if (verbosity>=
TVar::ERROR)
MELAerr <<
"TUtil::HJJMatEl: Non-JHUGen MEs are not supported" << endl;
return sum_msqjk; }
5406 int nRequested_AssociatedJets=2;
5407 if (production ==
TVar::JQCD) nRequested_AssociatedJets=1;
5417 if (mela_event.
pAssociated.size()==0){
if (verbosity>=
TVar::ERROR)
MELAerr <<
"TUtil::HJJMatEl: Number of associated particles is 0!" << endl;
return sum_msqjk; }
5419 int MYIDUP_tmp[4]={ 0 };
5420 double p4[5][4]={ { 0 } };
5421 double pOneJet[4][4] ={ { 0 } };
5422 TLorentzVector MomStore[
mxpart];
5423 for (
int i = 0; i <
mxpart; i++) MomStore[i].SetXYZT(0, 0, 0, 0);
5429 for (
int ipar=0; ipar<2; ipar++){
5430 TLorentzVector* momTmp = &(mela_event.
pMothers.at(ipar).second);
5431 int* idtmp = &(mela_event.
pMothers.at(ipar).first);
5433 else MYIDUP_tmp[ipar] = 0;
5434 if (momTmp->T()>0.){
5435 p4[ipar][0] = momTmp->T()*GeV;
5436 p4[ipar][1] = momTmp->X()*GeV;
5437 p4[ipar][2] = momTmp->Y()*GeV;
5438 p4[ipar][3] = momTmp->Z()*GeV;
5439 MomStore[ipar] = (*momTmp);
5442 p4[ipar][0] = -momTmp->T()*GeV;
5443 p4[ipar][1] = -momTmp->X()*GeV;
5444 p4[ipar][2] = -momTmp->Y()*GeV;
5445 p4[ipar][3] = -momTmp->Z()*GeV;
5446 MomStore[ipar] = -(*momTmp);
5447 MYIDUP_tmp[ipar] = -MYIDUP_tmp[ipar];
5450 for (
unsigned int ipar=0; ipar<2; ipar++){
5452 TLorentzVector* momTmp = &(mela_event.
pAssociated.at(ipar).second);
5453 int* idtmp = &(mela_event.
pAssociated.at(ipar).first);
5455 else MYIDUP_tmp[ipar+2] = 0;
5456 p4[ipar+2][0] = momTmp->T()*GeV;
5457 p4[ipar+2][1] = momTmp->X()*GeV;
5458 p4[ipar+2][2] = momTmp->Y()*GeV;
5459 p4[ipar+2][3] = momTmp->Z()*GeV;
5460 MomStore[ipar+6] = (*momTmp);
5462 else MYIDUP_tmp[ipar+2] = -9000;
5464 for (
unsigned int ipar=0; ipar<mela_event.
pDaughters.size(); ipar++){
5465 TLorentzVector* momTmp = &(mela_event.
pDaughters.at(ipar).second);
5466 p4[4][0] += momTmp->T()*GeV;
5467 p4[4][1] += momTmp->X()*GeV;
5468 p4[4][2] += momTmp->Y()*GeV;
5469 p4[4][3] += momTmp->Z()*GeV;
5470 MomStore[5] = MomStore[5] + (*momTmp);
5473 for (
unsigned int i = 0; i < 4; i++){
5474 if (i<2){
for (
unsigned int j = 0; j < 4; j++) pOneJet[i][j] = p4[i][j]; }
5475 else if (i==2){
for (
unsigned int j = 0; j < 4; j++) pOneJet[i][j] = p4[4][j]; }
5476 else{
for (
unsigned int j = 0; j < 4; j++) pOneJet[i][j] = p4[2][j]; }
5479 for (
unsigned int i=0; i<5; i++)
MELAout <<
"p["<<i<<
"] (Px, Py, Pz, E, M):\t" << p4[i][1]/GeV <<
'\t' << p4[i][2]/GeV <<
'\t' << p4[i][3]/GeV <<
'\t' << p4[i][0]/GeV <<
'\t' << sqrt(fabs(pow(p4[i][0], 2)-pow(p4[i][1], 2)-pow(p4[i][2], 2)-pow(p4[i][3], 2)))/GeV << endl;
5480 MELAout <<
"One-jet momenta: " << endl;
5481 for (
unsigned int i=0; i<4; i++)
MELAout <<
"pOneJet["<<i<<
"] (Px, Py, Pz, E, M):\t" << pOneJet[i][1]/GeV <<
'\t' << pOneJet[i][2]/GeV <<
'\t' << pOneJet[i][3]/GeV <<
'\t' << pOneJet[i][0]/GeV <<
'\t' << sqrt(fabs(pow(pOneJet[i][0], 2)-pow(pOneJet[i][1], 2)-pow(pOneJet[i][2], 2)-pow(pOneJet[i][3], 2)))/GeV << endl;
5484 double defaultRenScale =
scale_.scale;
5485 double defaultFacScale =
facscale_.facscale;
5487 int defaultNflav =
nflav_.nflav;
5488 string defaultPdflabel =
pdlabel_.pdlabel;
5492 double alphasVal, alphasmzVal;
5502 <<
"TUtil::HJJMatEl: Set AlphaS:\n"
5503 <<
"\tBefore set, alphas scale: " << defaultRenScale <<
", PDF scale: " << defaultFacScale <<
'\n'
5505 <<
"\tAfter set, alphas scale: " <<
scale_.scale <<
", PDF scale: " <<
facscale_.facscale <<
", alphas(Qren): " << alphasVal <<
", alphas(MZ): " << alphasmzVal << endl;
5509 bool partonIsUnknown[4];
5510 for (
unsigned int ip=0; ip<4; ip++) partonIsUnknown[ip] = (MYIDUP_tmp[ip]==0);
5516 for (
int isel=-5; isel<=5; isel++){
5517 if (!partonIsUnknown[0] && !((
PDGHelpers::isAGluon(MYIDUP_tmp[0]) && isel==0) || MYIDUP_tmp[0]==isel))
continue;
5518 for (
int jsel=-5; jsel<=5; jsel++){
5519 if (!partonIsUnknown[1] && !((
PDGHelpers::isAGluon(MYIDUP_tmp[1]) && jsel==0) || MYIDUP_tmp[1]==jsel))
continue;
5521 if (isel!=0 && jsel!=0) rsel=0;
5522 else if (isel==0) rsel=jsel;
5524 if (!partonIsUnknown[2] && !((
PDGHelpers::isAGluon(MYIDUP_tmp[2]) && rsel==0) || MYIDUP_tmp[2]==rsel))
continue;
5525 MatElsq[jsel+5][isel+5] = MatElsq_tmp[jsel+5][isel+5];
5526 if (verbosity >=
TVar::DEBUG)
MELAout <<
"Channel (isel, jsel)=" << isel <<
", " << jsel << endl;
5532 int nijchannels = ijsel.size();
5533 for (
int ic=0; ic<nijchannels; ic++){
5535 int isel = ijsel[ic][0];
5536 int jsel = ijsel[ic][1];
5537 int code = ijsel[ic][2];
5547 (partonIsUnknown[0] || ((
PDGHelpers::isAGluon(MYIDUP_tmp[0]) && isel==0) || MYIDUP_tmp[0]==isel))
5549 (partonIsUnknown[1] || ((
PDGHelpers::isAGluon(MYIDUP_tmp[1]) && jsel==0) || MYIDUP_tmp[1]==jsel))
5552 if (isel==0 && jsel==0){
5563 MatElsq[jsel+5][isel+5] += msq_tmp;
5564 if (verbosity >=
TVar::DEBUG_VERBOSE)
MELAout <<
"Channel (isel, jsel, rsel, ssel)=" << isel <<
", " << jsel <<
", " << rsel <<
", " << ssel <<
'\t' << msq_tmp << endl;
5572 MatElsq[jsel+5][isel+5] += msq_tmp;
5573 if (verbosity >=
TVar::DEBUG_VERBOSE)
MELAout <<
"Channel (isel, jsel, rsel, ssel)=" << isel <<
", " << jsel <<
", " << ssel <<
", " << rsel <<
'\t' << msq_tmp << endl;
5584 MatElsq[jsel+5][isel+5] += msq_tmp;
5585 if (verbosity >=
TVar::DEBUG_VERBOSE)
MELAout <<
"Channel (isel, jsel, rsel, ssel)=" << isel <<
", " << jsel <<
", " << rsel <<
", " << ssel <<
'\t' << msq_tmp << endl;
5589 else if (isel==0 || jsel==0){
5591 (partonIsUnknown[2] || ((
PDGHelpers::isAGluon(MYIDUP_tmp[2]) && rsel==0) || MYIDUP_tmp[2]==rsel))
5593 (partonIsUnknown[3] || ((
PDGHelpers::isAGluon(MYIDUP_tmp[3]) && ssel==0) || MYIDUP_tmp[3]==ssel))
5596 MatElsq[jsel+5][isel+5] += msq_tmp;
5597 if (verbosity >=
TVar::DEBUG_VERBOSE)
MELAout <<
"Channel (isel, jsel, rsel, ssel)=" << isel <<
", " << jsel <<
", " << rsel <<
", " << ssel <<
'\t' << msq_tmp << endl;
5600 (partonIsUnknown[2] || ((
PDGHelpers::isAGluon(MYIDUP_tmp[2]) && ssel==0) || MYIDUP_tmp[2]==ssel))
5602 (partonIsUnknown[3] || ((
PDGHelpers::isAGluon(MYIDUP_tmp[3]) && rsel==0) || MYIDUP_tmp[3]==rsel))
5605 MatElsq[jsel+5][isel+5] += msq_tmp;
5606 if (verbosity >=
TVar::DEBUG_VERBOSE)
MELAout <<
"Channel (isel, jsel, rsel, ssel)=" << isel <<
", " << jsel <<
", " << ssel <<
", " << rsel <<
'\t' << msq_tmp << endl;
5609 else if ((isel>0 && jsel<0) || (isel<0 && jsel>0)){
5610 if (code==1 && isel==-jsel){
5618 MatElsq[jsel+5][isel+5] += msq_tmp;
5619 if (verbosity >=
TVar::DEBUG_VERBOSE)
MELAout <<
"Channel (isel, jsel, rsel, ssel)=" << isel <<
", " << jsel <<
", " << rsel <<
", " << ssel <<
'\t' << msq_tmp << endl;
5622 else if (code==3 && isel==-jsel){
5623 if (abs(isel)!=1){ rsel=1; ssel=-1; }
5624 else{ rsel=2; ssel=-2; }
5627 (partonIsUnknown[2] && partonIsUnknown[3])
5629 (partonIsUnknown[2] && std::abs(MYIDUP_tmp[3])!=std::abs(isel) && MYIDUP_tmp[3]<0)
5631 (std::abs(MYIDUP_tmp[2])!=std::abs(isel) && MYIDUP_tmp[2]>0 && partonIsUnknown[3])
5633 (std::abs(MYIDUP_tmp[2])!=std::abs(isel) && MYIDUP_tmp[2]==-MYIDUP_tmp[3] && MYIDUP_tmp[2]>0)
5636 MatElsq[jsel+5][isel+5] += msq_tmp;
5637 if (verbosity >=
TVar::DEBUG_VERBOSE)
MELAout <<
"Channel (isel, jsel, rsel, ssel)=" << isel <<
", " << jsel <<
", " << rsel <<
", " << ssel <<
'\t' << msq_tmp << endl;
5640 (partonIsUnknown[2] && partonIsUnknown[3])
5642 (partonIsUnknown[2] && std::abs(MYIDUP_tmp[3])!=std::abs(isel) && MYIDUP_tmp[3]>0)
5644 (std::abs(MYIDUP_tmp[2])!=std::abs(isel) && MYIDUP_tmp[2]<0 && partonIsUnknown[3])
5646 (std::abs(MYIDUP_tmp[2])!=std::abs(isel) && MYIDUP_tmp[2]==-MYIDUP_tmp[3] && MYIDUP_tmp[2]<0)
5649 MatElsq[jsel+5][isel+5] += msq_tmp;
5650 if (verbosity >=
TVar::DEBUG_VERBOSE)
MELAout <<
"Channel (isel, jsel, rsel, ssel)=" << isel <<
", " << jsel <<
", " << ssel <<
", " << rsel <<
'\t' << msq_tmp << endl;
5655 (partonIsUnknown[2] || MYIDUP_tmp[2]==rsel)
5657 (partonIsUnknown[3] || MYIDUP_tmp[3]==ssel)
5660 MatElsq[jsel+5][isel+5] += msq_tmp;
5661 if (verbosity >=
TVar::DEBUG_VERBOSE)
MELAout <<
"Channel (isel, jsel, rsel, ssel)=" << isel <<
", " << jsel <<
", " << rsel <<
", " << ssel <<
'\t' << msq_tmp << endl;
5664 (partonIsUnknown[2] || MYIDUP_tmp[2]==ssel)
5666 (partonIsUnknown[3] || MYIDUP_tmp[3]==rsel)
5669 MatElsq[jsel+5][isel+5] += msq_tmp;
5670 if (verbosity >=
TVar::DEBUG_VERBOSE)
MELAout <<
"Channel (isel, jsel, rsel, ssel)=" << isel <<
", " << jsel <<
", " << rsel <<
", " << ssel <<
'\t' << msq_tmp << endl;
5676 (partonIsUnknown[2] || MYIDUP_tmp[2]==rsel)
5678 (partonIsUnknown[3] || MYIDUP_tmp[3]==ssel)
5681 MatElsq[jsel+5][isel+5] += msq_tmp;
5682 if (verbosity >=
TVar::DEBUG_VERBOSE)
MELAout <<
"Channel (isel, jsel, rsel, ssel)=" << isel <<
", " << jsel <<
", " << rsel <<
", " << ssel <<
'\t' << msq_tmp << endl;
5687 (partonIsUnknown[2] || MYIDUP_tmp[2]==ssel)
5689 (partonIsUnknown[3] || MYIDUP_tmp[3]==rsel)
5692 MatElsq[jsel+5][isel+5] += msq_tmp;
5693 if (verbosity >=
TVar::DEBUG_VERBOSE)
MELAout <<
"Channel (isel, jsel, rsel, ssel)=" << isel <<
", " << jsel <<
", " << ssel <<
", " << rsel <<
'\t' << msq_tmp << endl;
5698 if (isel==jsel)
continue;
5699 isel = ijsel[ic][1];
5700 jsel = ijsel[ic][0];
5708 (partonIsUnknown[0] || ((
PDGHelpers::isAGluon(MYIDUP_tmp[0]) && isel==0) || MYIDUP_tmp[0]==isel))
5710 (partonIsUnknown[1] || ((
PDGHelpers::isAGluon(MYIDUP_tmp[1]) && jsel==0) || MYIDUP_tmp[1]==jsel))
5713 if (isel==0 || jsel==0){
5715 (partonIsUnknown[2] || ((
PDGHelpers::isAGluon(MYIDUP_tmp[2]) && rsel==0) || MYIDUP_tmp[2]==rsel))
5717 (partonIsUnknown[3] || ((
PDGHelpers::isAGluon(MYIDUP_tmp[3]) && ssel==0) || MYIDUP_tmp[3]==ssel))
5720 MatElsq[jsel+5][isel+5] += msq_tmp;
5721 if (verbosity >=
TVar::DEBUG_VERBOSE)
MELAout <<
"Channel (isel, jsel, rsel, ssel)=" << isel <<
", " << jsel <<
", " << rsel <<
", " << ssel <<
'\t' << msq_tmp << endl;
5724 (partonIsUnknown[2] || ((
PDGHelpers::isAGluon(MYIDUP_tmp[2]) && ssel==0) || MYIDUP_tmp[2]==ssel))
5726 (partonIsUnknown[3] || ((
PDGHelpers::isAGluon(MYIDUP_tmp[3]) && rsel==0) || MYIDUP_tmp[3]==rsel))
5729 MatElsq[jsel+5][isel+5] += msq_tmp;
5730 if (verbosity >=
TVar::DEBUG_VERBOSE)
MELAout <<
"Channel (isel, jsel, rsel, ssel)=" << isel <<
", " << jsel <<
", " << ssel <<
", " << rsel <<
'\t' << msq_tmp << endl;
5733 else if ((isel>0 && jsel<0) || (isel<0 && jsel>0)){
5734 if (code==1 && isel==-jsel){
5742 MatElsq[jsel+5][isel+5] += msq_tmp;
5743 if (verbosity >=
TVar::DEBUG_VERBOSE)
MELAout <<
"Channel (isel, jsel, rsel, ssel)=" << isel <<
", " << jsel <<
", " << rsel <<
", " << ssel <<
'\t' << msq_tmp << endl;
5746 else if(code==3 && isel==-jsel){
5747 if (abs(isel)!=1){ rsel=1; ssel=-1; }
5748 else{ rsel=2; ssel=-2; }
5751 (partonIsUnknown[2] && partonIsUnknown[3])
5753 (partonIsUnknown[2] && std::abs(MYIDUP_tmp[3])!=std::abs(isel) && MYIDUP_tmp[3]<0)
5755 (std::abs(MYIDUP_tmp[2])!=std::abs(isel) && MYIDUP_tmp[2]>0 && partonIsUnknown[3])
5757 (std::abs(MYIDUP_tmp[2])!=std::abs(isel) && MYIDUP_tmp[2]==-MYIDUP_tmp[3] && MYIDUP_tmp[2]>0)
5760 MatElsq[jsel+5][isel+5] += msq_tmp;
5761 if (verbosity >=
TVar::DEBUG_VERBOSE)
MELAout <<
"Channel (isel, jsel, rsel, ssel)=" << isel <<
", " << jsel <<
", " << rsel <<
", " << ssel <<
'\t' << msq_tmp << endl;
5764 (partonIsUnknown[2] && partonIsUnknown[3])
5766 (partonIsUnknown[2] && std::abs(MYIDUP_tmp[3])!=std::abs(isel) && MYIDUP_tmp[3]>0)
5768 (std::abs(MYIDUP_tmp[2])!=std::abs(isel) && MYIDUP_tmp[2]<0 && partonIsUnknown[3])
5770 (std::abs(MYIDUP_tmp[2])!=std::abs(isel) && MYIDUP_tmp[2]==-MYIDUP_tmp[3] && MYIDUP_tmp[2]<0)
5773 MatElsq[jsel+5][isel+5] += msq_tmp;
5774 if (verbosity >=
TVar::DEBUG_VERBOSE)
MELAout <<
"Channel (isel, jsel, rsel, ssel)=" << isel <<
", " << jsel <<
", " << ssel <<
", " << rsel <<
'\t' << msq_tmp << endl;
5779 (partonIsUnknown[2] || MYIDUP_tmp[2]==rsel)
5781 (partonIsUnknown[3] || MYIDUP_tmp[3]==ssel)
5784 MatElsq[jsel+5][isel+5] += msq_tmp;
5785 if (verbosity >=
TVar::DEBUG_VERBOSE)
MELAout <<
"Channel (isel, jsel, rsel, ssel)=" << isel <<
", " << jsel <<
", " << rsel <<
", " << ssel <<
'\t' << msq_tmp << endl;
5788 (partonIsUnknown[2] || MYIDUP_tmp[2]==ssel)
5790 (partonIsUnknown[3] || MYIDUP_tmp[3]==rsel)
5793 MatElsq[jsel+5][isel+5] += msq_tmp;
5794 if (verbosity >=
TVar::DEBUG_VERBOSE)
MELAout <<
"Channel (isel, jsel, rsel, ssel)=" << isel <<
", " << jsel <<
", " << ssel <<
", " << rsel <<
'\t' << msq_tmp << endl;
5800 (partonIsUnknown[2] || MYIDUP_tmp[2]==rsel)
5802 (partonIsUnknown[3] || MYIDUP_tmp[3]==ssel)
5805 MatElsq[jsel+5][isel+5] += msq_tmp;
5806 if (verbosity >=
TVar::DEBUG_VERBOSE)
MELAout <<
"Channel (isel, jsel, rsel, ssel)=" << isel <<
", " << jsel <<
", " << rsel <<
", " << ssel <<
'\t' << msq_tmp << endl;
5811 (partonIsUnknown[2] || MYIDUP_tmp[2]==ssel)
5813 (partonIsUnknown[3] || MYIDUP_tmp[3]==rsel)
5816 MatElsq[jsel+5][isel+5] += msq_tmp;
5817 if (verbosity >=
TVar::DEBUG_VERBOSE)
MELAout <<
"Channel (isel, jsel, rsel, ssel)=" << isel <<
", " << jsel <<
", " << ssel <<
", " << rsel <<
'\t' << msq_tmp << endl;
5824 int isel, jsel, rsel, ssel;
5833 double ckm_takeout=1;
5834 double msq_uu_zz_ijrs1234[2]={ 0 };
5835 double msq_uu_zz_ijrs1243[2]={ 0 };
5836 double msq_dd_zz_ijrs1234[2]={ 0 };
5837 double msq_dd_zz_ijrs1243[2]={ 0 };
5838 double msq_ubarubar_zz_ijrs1234[2]={ 0 };
5839 double msq_ubarubar_zz_ijrs1243[2]={ 0 };
5840 double msq_dbardbar_zz_ijrs1234[2]={ 0 };
5841 double msq_dbardbar_zz_ijrs1243[2]={ 0 };
5842 double msq_uu_zzid_ijrs1234[2]={ 0 };
5843 double msq_uu_zzid_ijrs1243[2]={ 0 };
5844 double msq_dd_zzid_ijrs1234[2]={ 0 };
5845 double msq_dd_zzid_ijrs1243[2]={ 0 };
5846 double msq_ubarubar_zzid_ijrs1234[2]={ 0 };
5847 double msq_ubarubar_zzid_ijrs1243[2]={ 0 };
5848 double msq_dbardbar_zzid_ijrs1234[2]={ 0 };
5849 double msq_dbardbar_zzid_ijrs1243[2]={ 0 };
5850 double msq_udbar_zz_ijrs1234[2]={ 0 };
5851 double msq_udbar_zz_ijrs1243[2]={ 0 };
5852 double msq_dubar_zz_ijrs1234[2]={ 0 };
5853 double msq_dubar_zz_ijrs1243[2]={ 0 };
5855 double msq_uubar_zz_ijrs1234[2]={ 0 };
5856 double msq_uubar_zz_ijrs1243[2]={ 0 };
5857 double msq_ddbar_zz_ijrs1234[2]={ 0 };
5858 double msq_ddbar_zz_ijrs1243[2]={ 0 };
5859 double msq_uubar_ww_ijrs1234[2]={ 0 };
5860 double msq_uubar_ww_ijrs1243[2]={ 0 };
5861 double msq_ddbar_ww_ijrs1234[2]={ 0 };
5862 double msq_ddbar_ww_ijrs1243[2]={ 0 };
5864 double msq_ud_wwonly_ijrs1234[2]={ 0 };
5865 double msq_ud_wwonly_ijrs1243[2]={ 0 };
5866 double msq_ubardbar_wwonly_ijrs1234[2]={ 0 };
5867 double msq_ubardbar_wwonly_ijrs1243[2]={ 0 };
5881 rsel=isel; ssel=jsel;
5885 msq_uu_zz_ijrs1234[1] = msq_uu_zz_ijrs1234[0];
5886 msq_uu_zz_ijrs1243[1] = msq_uu_zz_ijrs1243[0];
5889 rsel=isel; ssel=jsel;
5893 msq_uu_zzid_ijrs1234[1] = msq_uu_zzid_ijrs1234[0];
5894 msq_uu_zzid_ijrs1243[1] = msq_uu_zzid_ijrs1243[0];
5907 rsel=isel; ssel=jsel;
5911 msq_dd_zz_ijrs1234[1] = msq_dd_zz_ijrs1234[0];
5912 msq_dd_zz_ijrs1243[1] = msq_dd_zz_ijrs1243[0];
5915 rsel=isel; ssel=jsel;
5919 msq_dd_zzid_ijrs1234[1] = msq_dd_zzid_ijrs1234[0];
5920 msq_dd_zzid_ijrs1243[1] = msq_dd_zzid_ijrs1243[0];
5933 rsel=isel; ssel=jsel;
5937 msq_ubarubar_zz_ijrs1234[1] = msq_ubarubar_zz_ijrs1234[0];
5938 msq_ubarubar_zz_ijrs1243[1] = msq_ubarubar_zz_ijrs1243[0];
5941 rsel=isel; ssel=jsel;
5945 msq_ubarubar_zzid_ijrs1234[1] = msq_ubarubar_zzid_ijrs1234[0];
5946 msq_ubarubar_zzid_ijrs1243[1] = msq_ubarubar_zzid_ijrs1243[0];
5959 rsel=isel; ssel=jsel;
5963 msq_dbardbar_zz_ijrs1234[1] = msq_dbardbar_zz_ijrs1234[0];
5964 msq_dbardbar_zz_ijrs1243[1] = msq_dbardbar_zz_ijrs1243[0];
5967 rsel=isel; ssel=jsel;
5971 msq_dbardbar_zzid_ijrs1234[1] = msq_dbardbar_zzid_ijrs1234[0];
5972 msq_dbardbar_zzid_ijrs1243[1] = msq_dbardbar_zzid_ijrs1243[0];
5977 (partonIsUnknown[0] && partonIsUnknown[1])
5991 (partonIsUnknown[2] && partonIsUnknown[3])
6005 rsel=isel; ssel=jsel;
6014 (partonIsUnknown[0] && partonIsUnknown[1])
6028 (partonIsUnknown[2] && partonIsUnknown[3])
6042 rsel=isel; ssel=jsel;
6050 (partonIsUnknown[0] && partonIsUnknown[1])
6060 (partonIsUnknown[2] && partonIsUnknown[3])
6068 rsel=isel; ssel=jsel;
6075 (partonIsUnknown[2] && partonIsUnknown[3])
6094 if (abs(isel)>=6)
break;
6103 ckm_takeout = pow(ckm_ir*ckm_js, 2);
6104 for (
unsigned int iswap=0; iswap<2; iswap++){
6105 msq_uubar_ww_ijrs1234[iswap] /= ckm_takeout;
6106 msq_uubar_ww_ijrs1243[iswap] /= ckm_takeout;
6113 (partonIsUnknown[0] && partonIsUnknown[1])
6123 (partonIsUnknown[2] && partonIsUnknown[3])
6131 rsel=isel; ssel=jsel;
6138 (partonIsUnknown[2] && partonIsUnknown[3])
6157 if (abs(isel)>=6)
break;
6166 ckm_takeout = pow(ckm_ir*ckm_js, 2);
6167 for (
unsigned int iswap=0; iswap<2; iswap++){
6168 msq_ddbar_ww_ijrs1234[iswap] /= ckm_takeout;
6169 msq_ddbar_ww_ijrs1243[iswap] /= ckm_takeout;
6177 (partonIsUnknown[0] && partonIsUnknown[1])
6191 (partonIsUnknown[2] && partonIsUnknown[3])
6207 const unsigned int nCombinations = 6;
6208 int ijrs_arr[nCombinations][4] ={
6216 for (
unsigned int ijrs=0; ijrs<nCombinations; ijrs++){
6217 isel = ijrs_arr[ijrs][0];
6218 jsel = ijrs_arr[ijrs][1];
6219 rsel = ijrs_arr[ijrs][2];
6220 ssel = ijrs_arr[ijrs][3];
6223 if (ckm_ir!=0. && ckm_js!=0.)
break;
6225 if (ckm_ir!=0. && ckm_js!=0.){
6230 ckm_takeout = pow(ckm_ir*ckm_js, 2);
6231 for (
unsigned int iswap=0; iswap<2; iswap++){
6232 msq_ud_wwonly_ijrs1234[iswap] /= ckm_takeout;
6233 msq_ud_wwonly_ijrs1243[iswap] /= ckm_takeout;
6240 (partonIsUnknown[0] && partonIsUnknown[1])
6254 (partonIsUnknown[2] && partonIsUnknown[3])
6270 const unsigned int nCombinations = 6;
6271 int ijrs_arr[nCombinations][4] ={
6279 for (
unsigned int ijrs=0; ijrs<nCombinations; ijrs++){
6280 isel = ijrs_arr[ijrs][0];
6281 jsel = ijrs_arr[ijrs][1];
6282 rsel = ijrs_arr[ijrs][2];
6283 ssel = ijrs_arr[ijrs][3];
6286 if (ckm_ir!=0. && ckm_js!=0.)
break;
6288 if (ckm_ir!=0. && ckm_js!=0.){
6293 ckm_takeout = pow(ckm_ir*ckm_js, 2);
6294 for (
unsigned int iswap=0; iswap<2; iswap++){
6295 msq_ubardbar_wwonly_ijrs1234[iswap] /= ckm_takeout;
6296 msq_ubardbar_wwonly_ijrs1243[iswap] /= ckm_takeout;
6302 MELAout <<
"TUtil::HJJMatEl: The pre-computed MEs:" << endl;
6303 for (
unsigned int iswap=0; iswap<2; iswap++){
6305 <<
"\tmsq_uu_zz_ijrs1234[" << iswap <<
"] = " << msq_uu_zz_ijrs1234[iswap] <<
'\n'
6306 <<
"\tmsq_uu_zz_ijrs1243[" << iswap <<
"] = " << msq_uu_zz_ijrs1243[iswap] <<
'\n'
6307 <<
"\tmsq_dd_zz_ijrs1234[" << iswap <<
"] = " << msq_dd_zz_ijrs1234[iswap] <<
'\n'
6308 <<
"\tmsq_dd_zz_ijrs1243[" << iswap <<
"] = " << msq_dd_zz_ijrs1243[iswap] <<
'\n'
6309 <<
"\tmsq_ubarubar_zz_ijrs1234[" << iswap <<
"] = " << msq_ubarubar_zz_ijrs1234[iswap] <<
'\n'
6310 <<
"\tmsq_ubarubar_zz_ijrs1243[" << iswap <<
"] = " << msq_ubarubar_zz_ijrs1243[iswap] <<
'\n'
6311 <<
"\tmsq_dbardbar_zz_ijrs1234[" << iswap <<
"] = " << msq_dbardbar_zz_ijrs1234[iswap] <<
'\n'
6312 <<
"\tmsq_dbardbar_zz_ijrs1243[" << iswap <<
"] = " << msq_dbardbar_zz_ijrs1243[iswap] <<
'\n'
6313 <<
"\tmsq_uu_zzid_ijrs1234[" << iswap <<
"] = " << msq_uu_zzid_ijrs1234[iswap] <<
'\n'
6314 <<
"\tmsq_uu_zzid_ijrs1243[" << iswap <<
"] = " << msq_uu_zzid_ijrs1243[iswap] <<
'\n'
6315 <<
"\tmsq_dd_zzid_ijrs1234[" << iswap <<
"] = " << msq_dd_zzid_ijrs1234[iswap] <<
'\n'
6316 <<
"\tmsq_dd_zzid_ijrs1243[" << iswap <<
"] = " << msq_dd_zzid_ijrs1243[iswap] <<
'\n'
6317 <<
"\tmsq_ubarubar_zzid_ijrs1234[" << iswap <<
"] = " << msq_ubarubar_zzid_ijrs1234[iswap] <<
'\n'
6318 <<
"\tmsq_ubarubar_zzid_ijrs1243[" << iswap <<
"] = " << msq_ubarubar_zzid_ijrs1243[iswap] <<
'\n'
6319 <<
"\tmsq_dbardbar_zzid_ijrs1234[" << iswap <<
"] = " << msq_dbardbar_zzid_ijrs1234[iswap] <<
'\n'
6320 <<
"\tmsq_dbardbar_zzid_ijrs1243[" << iswap <<
"] = " << msq_dbardbar_zzid_ijrs1243[iswap] <<
'\n'
6321 <<
"\tmsq_udbar_zz_ijrs1234[" << iswap <<
"] = " << msq_udbar_zz_ijrs1234[iswap] <<
'\n'
6322 <<
"\tmsq_udbar_zz_ijrs1243[" << iswap <<
"] = " << msq_udbar_zz_ijrs1243[iswap] <<
'\n'
6323 <<
"\tmsq_dubar_zz_ijrs1234[" << iswap <<
"] = " << msq_dubar_zz_ijrs1234[iswap] <<
'\n'
6324 <<
"\tmsq_dubar_zz_ijrs1243[" << iswap <<
"] = " << msq_dubar_zz_ijrs1243[iswap] <<
'\n'
6325 <<
"\tmsq_uubar_zz_ijrs1234[" << iswap <<
"] = " << msq_uubar_zz_ijrs1234[iswap] <<
'\n'
6326 <<
"\tmsq_uubar_zz_ijrs1243[" << iswap <<
"] = " << msq_uubar_zz_ijrs1243[iswap] <<
'\n'
6327 <<
"\tmsq_ddbar_zz_ijrs1234[" << iswap <<
"] = " << msq_ddbar_zz_ijrs1234[iswap] <<
'\n'
6328 <<
"\tmsq_ddbar_zz_ijrs1243[" << iswap <<
"] = " << msq_ddbar_zz_ijrs1243[iswap] <<
'\n'
6329 <<
"\tmsq_uubar_ww_ijrs1234[" << iswap <<
"] = " << msq_uubar_ww_ijrs1234[iswap] <<
'\n'
6330 <<
"\tmsq_uubar_ww_ijrs1243[" << iswap <<
"] = " << msq_uubar_ww_ijrs1243[iswap] <<
'\n'
6331 <<
"\tmsq_ddbar_ww_ijrs1234[" << iswap <<
"] = " << msq_ddbar_ww_ijrs1234[iswap] <<
'\n'
6332 <<
"\tmsq_ddbar_ww_ijrs1243[" << iswap <<
"] = " << msq_ddbar_ww_ijrs1243[iswap] <<
'\n'
6333 <<
"\tmsq_ud_wwonly_ijrs1234[" << iswap <<
"] = " << msq_ud_wwonly_ijrs1234[iswap] <<
'\n'
6334 <<
"\tmsq_ud_wwonly_ijrs1243[" << iswap <<
"] = " << msq_ud_wwonly_ijrs1243[iswap] <<
'\n'
6335 <<
"\tmsq_ubardbar_wwonly_ijrs1234[" << iswap <<
"] = " << msq_ubardbar_wwonly_ijrs1234[iswap] <<
'\n'
6336 <<
"\tmsq_ubardbar_wwonly_ijrs1243[" << iswap <<
"] = " << msq_ubardbar_wwonly_ijrs1243[iswap]
6342 int nijchannels = ijsel.size();
6344 for (
int ic=0; ic<nijchannels; ic++){
6346 isel = ijsel[ic][0];
6347 jsel = ijsel[ic][1];
6348 int code = ijsel[ic][2];
6349 bool ijselIsUpType[2];
6350 bool ijselIsDownType[2];
6351 bool ijselIsParticle[2];
6352 bool ijselIsAntiparticle[2];
6366 ijselIsParticle[0] = (isel>0); ijselIsAntiparticle[0] = (isel<0);
6367 ijselIsParticle[1] = (jsel>0); ijselIsAntiparticle[1] = (jsel<0);
6370 (partonIsUnknown[0] || MYIDUP_tmp[0]==isel)
6372 (partonIsUnknown[1] || MYIDUP_tmp[1]==jsel)
6377 (partonIsUnknown[2] || MYIDUP_tmp[2]==rsel)
6379 (partonIsUnknown[3] || MYIDUP_tmp[3]==ssel)
6382 if (ijselIsUpType[0] && ijselIsUpType[1]){
6383 if (ijselIsParticle[0] && ijselIsParticle[1]){
6384 if (isel!=jsel) msq_tmp = msq_uu_zz_ijrs1234[0];
6385 else msq_tmp = msq_uu_zzid_ijrs1234[0];
6387 else if (ijselIsAntiparticle[0] && ijselIsAntiparticle[1]){
6388 if (isel!=jsel) msq_tmp = msq_ubarubar_zz_ijrs1234[0];
6389 else msq_tmp = msq_ubarubar_zzid_ijrs1234[0];
6391 else if (ijselIsParticle[0] && ijselIsAntiparticle[1]) msq_tmp = msq_uubar_zz_ijrs1234[0];
6393 else if (ijselIsDownType[0] && ijselIsDownType[1]){
6394 if (ijselIsParticle[0] && ijselIsParticle[1]){
6395 if (isel!=jsel) msq_tmp = msq_dd_zz_ijrs1234[0];
6396 else msq_tmp = msq_dd_zzid_ijrs1234[0];
6398 else if (ijselIsAntiparticle[0] && ijselIsAntiparticle[1]){
6399 if (isel!=jsel) msq_tmp = msq_dbardbar_zz_ijrs1234[0];
6400 else msq_tmp = msq_dbardbar_zzid_ijrs1234[0];
6402 else if (ijselIsParticle[0] && ijselIsAntiparticle[1]) msq_tmp = msq_ddbar_zz_ijrs1234[0];
6404 else if (ijselIsUpType[0] && ijselIsDownType[1] && ijselIsParticle[0] && ijselIsAntiparticle[1]) msq_tmp = msq_udbar_zz_ijrs1234[0];
6405 else if (ijselIsDownType[0] && ijselIsUpType[1] && ijselIsParticle[0] && ijselIsAntiparticle[1]) msq_tmp = msq_dubar_zz_ijrs1234[0];
6406 MatElsq[jsel+5][isel+5] += msq_tmp;
6407 if (verbosity >=
TVar::DEBUG_VERBOSE)
MELAout <<
"Channel (isel, jsel, rsel, ssel)=" << isel <<
", " << jsel <<
", " << rsel <<
", " << ssel <<
'\t' << msq_tmp << endl;
6412 (partonIsUnknown[2] || MYIDUP_tmp[2]==ssel)
6414 (partonIsUnknown[3] || MYIDUP_tmp[3]==rsel)
6417 if (ijselIsUpType[0] && ijselIsUpType[1]){
6418 if (ijselIsParticle[0] && ijselIsParticle[1]){
6419 if (isel!=jsel) msq_tmp = msq_uu_zz_ijrs1243[0];
6420 else msq_tmp = msq_uu_zzid_ijrs1243[0];
6422 else if (ijselIsAntiparticle[0] && ijselIsAntiparticle[1]){
6423 if (isel!=jsel) msq_tmp = msq_ubarubar_zz_ijrs1243[0];
6424 else msq_tmp = msq_ubarubar_zzid_ijrs1243[0];
6426 else if (ijselIsParticle[0] && ijselIsAntiparticle[1]) msq_tmp = msq_uubar_zz_ijrs1243[0];
6428 else if (ijselIsDownType[0] && ijselIsDownType[1]){
6429 if (ijselIsParticle[0] && ijselIsParticle[1]){
6430 if (isel!=jsel) msq_tmp = msq_dd_zz_ijrs1243[0];
6431 else msq_tmp = msq_dd_zzid_ijrs1243[0];
6433 else if (ijselIsAntiparticle[0] && ijselIsAntiparticle[1]){
6434 if (isel!=jsel) msq_tmp = msq_dbardbar_zz_ijrs1243[0];
6435 else msq_tmp = msq_dbardbar_zzid_ijrs1243[0];
6437 else if (ijselIsParticle[0] && ijselIsAntiparticle[1]) msq_tmp = msq_ddbar_zz_ijrs1243[0];
6439 else if (ijselIsUpType[0] && ijselIsDownType[1] && ijselIsParticle[0] && ijselIsAntiparticle[1]) msq_tmp = msq_udbar_zz_ijrs1243[0];
6440 else if (ijselIsDownType[0] && ijselIsUpType[1] && ijselIsParticle[0] && ijselIsAntiparticle[1]) msq_tmp = msq_dubar_zz_ijrs1243[0];
6441 MatElsq[jsel+5][isel+5] += msq_tmp;
6442 if (verbosity >=
TVar::DEBUG_VERBOSE)
MELAout <<
"Channel (isel, jsel, rsel, ssel)=" << isel <<
", " << jsel <<
", " << ssel <<
", " << rsel <<
'\t' << msq_tmp << endl;
6446 vector<int> possible_rsel;
6447 vector<int> possible_ssel;
6448 vector<double> possible_Vsqir;
6449 vector<double> possible_Vsqjs;
6450 if (ijselIsUpType[0]){ possible_rsel.push_back(1); possible_rsel.push_back(3); possible_rsel.push_back(5); }
6451 else if (ijselIsDownType[0]){ possible_rsel.push_back(2); possible_rsel.push_back(4); }
6452 for (
unsigned int ix=0; ix<possible_rsel.size(); ix++){
6453 rsel=possible_rsel.at(ix);
6455 possible_Vsqir.push_back(ckmval);
6457 if (ijselIsUpType[1]){ possible_ssel.push_back(1); possible_ssel.push_back(3); possible_ssel.push_back(5); }
6458 else if (ijselIsDownType[1]){ possible_ssel.push_back(2); possible_ssel.push_back(4); }
6459 for (
unsigned int iy=0; iy<possible_ssel.size(); iy++){
6460 ssel=possible_ssel.at(iy);
6462 possible_Vsqjs.push_back(ckmval);
6466 for (
unsigned int ix=0; ix<possible_rsel.size(); ix++){
6467 rsel=possible_rsel.at(ix)*TMath::Sign(1, isel);
6468 for (
unsigned int iy=0; iy<possible_ssel.size(); iy++){
6469 ssel=possible_ssel.at(iy)*TMath::Sign(1, jsel);
6470 double ckmval = possible_Vsqir.at(ix)*possible_Vsqjs.at(iy);
6472 (partonIsUnknown[2] || MYIDUP_tmp[2]==rsel)
6474 (partonIsUnknown[3] || MYIDUP_tmp[3]==ssel)
6477 if (ijselIsUpType[0] && ijselIsUpType[1] && ijselIsParticle[0] && ijselIsAntiparticle[1]) msq_tmp = msq_uubar_ww_ijrs1234[0];
6478 else if (ijselIsDownType[0] && ijselIsDownType[1] && ijselIsParticle[0] && ijselIsAntiparticle[1]) msq_tmp = msq_ddbar_ww_ijrs1234[0];
6480 MatElsq[jsel+5][isel+5] += msq_tmp;
6481 if (verbosity >=
TVar::DEBUG_VERBOSE)
MELAout <<
"Channel (isel, jsel, rsel, ssel)=" << isel <<
", " << jsel <<
", " << rsel <<
", " << ssel <<
'\t' << msq_tmp << endl;
6486 (partonIsUnknown[2] || MYIDUP_tmp[2]==ssel)
6488 (partonIsUnknown[3] || MYIDUP_tmp[3]==rsel)
6491 if (ijselIsUpType[0] && ijselIsUpType[1] && ijselIsParticle[0] && ijselIsAntiparticle[1]) msq_tmp = msq_uubar_ww_ijrs1243[0];
6492 else if (ijselIsDownType[0] && ijselIsDownType[1] && ijselIsParticle[0] && ijselIsAntiparticle[1]) msq_tmp = msq_ddbar_ww_ijrs1243[0];
6494 MatElsq[jsel+5][isel+5] += msq_tmp;
6495 if (verbosity >=
TVar::DEBUG_VERBOSE)
MELAout <<
"Channel (isel, jsel, rsel, ssel)=" << isel <<
", " << jsel <<
", " << ssel <<
", " << rsel <<
'\t' << msq_tmp << endl;
6501 vector<int> possible_rsel;
6502 vector<int> possible_ssel;
6503 vector<double> possible_Vsqir;
6504 vector<double> possible_Vsqjs;
6505 if (ijselIsUpType[0]){ possible_rsel.push_back(1); possible_rsel.push_back(3); possible_rsel.push_back(5); }
6506 else if (ijselIsDownType[0]){ possible_rsel.push_back(2); possible_rsel.push_back(4); }
6507 for (
unsigned int ix=0; ix<possible_rsel.size(); ix++){
6508 rsel=possible_rsel.at(ix);
6510 possible_Vsqir.push_back(ckmval);
6512 if (ijselIsUpType[1]){ possible_ssel.push_back(1); possible_ssel.push_back(3); possible_ssel.push_back(5); }
6513 else if (ijselIsDownType[1]){ possible_ssel.push_back(2); possible_ssel.push_back(4); }
6514 for (
unsigned int iy=0; iy<possible_ssel.size(); iy++){
6515 ssel=possible_ssel.at(iy);
6517 possible_Vsqjs.push_back(ckmval);
6521 for (
unsigned int ix=0; ix<possible_rsel.size(); ix++){
6522 rsel=possible_rsel.at(ix)*TMath::Sign(1, isel);
6523 for (
unsigned int iy=0; iy<possible_ssel.size(); iy++){
6524 ssel=possible_ssel.at(iy)*TMath::Sign(1, jsel);
6525 double ckmval = possible_Vsqir.at(ix)*possible_Vsqjs.at(iy);
6527 (partonIsUnknown[2] || MYIDUP_tmp[2]==rsel)
6529 (partonIsUnknown[3] || MYIDUP_tmp[3]==ssel)
6531 if (rsel!=jsel && ssel!=isel){
6533 if (ijselIsUpType[0] && ijselIsDownType[1]){
6534 if (ijselIsParticle[0] && ijselIsParticle[1]) msq_tmp = msq_ud_wwonly_ijrs1234[0];
6535 else if (ijselIsAntiparticle[0] && ijselIsAntiparticle[1]) msq_tmp = msq_ubardbar_wwonly_ijrs1234[0];
6538 MatElsq[jsel+5][isel+5] += msq_tmp;
6539 if (verbosity >=
TVar::DEBUG_VERBOSE)
MELAout <<
"Channel (isel, jsel, rsel, ssel)=" << isel <<
", " << jsel <<
", " << rsel <<
", " << ssel <<
'\t' << msq_tmp << endl;
6543 MatElsq[jsel+5][isel+5] += msq_tmp;
6544 if (verbosity >=
TVar::DEBUG_VERBOSE)
MELAout <<
"Channel (isel, jsel, rsel, ssel)=" << isel <<
", " << jsel <<
", " << rsel <<
", " << ssel <<
'\t' << msq_tmp << endl;
6550 (partonIsUnknown[2] || MYIDUP_tmp[2]==ssel)
6552 (partonIsUnknown[3] || MYIDUP_tmp[3]==rsel)
6554 if (rsel!=jsel && ssel!=isel){
6556 if (ijselIsUpType[0] && ijselIsDownType[1]){
6557 if (ijselIsParticle[0] && ijselIsParticle[1]) msq_tmp = msq_ud_wwonly_ijrs1243[0];
6558 else if (ijselIsAntiparticle[0] && ijselIsAntiparticle[1]) msq_tmp = msq_ubardbar_wwonly_ijrs1243[0];
6561 MatElsq[jsel+5][isel+5] += msq_tmp;
6562 if (verbosity >=
TVar::DEBUG_VERBOSE)
MELAout <<
"Channel (isel, jsel, rsel, ssel)=" << isel <<
", " << jsel <<
", " << ssel <<
", " << rsel <<
'\t' << msq_tmp << endl;
6566 MatElsq[jsel+5][isel+5] += msq_tmp;
6567 if (verbosity >=
TVar::DEBUG_VERBOSE)
MELAout <<
"Channel (isel, jsel, rsel, ssel)=" << isel <<
", " << jsel <<
", " << ssel <<
", " << rsel <<
'\t' << msq_tmp << endl;
6575 if (isel==jsel)
continue;
6576 isel = ijsel[ic][1];
6577 jsel = ijsel[ic][0];
6589 ijselIsParticle[0] = (isel>0); ijselIsAntiparticle[0] = (isel<0);
6590 ijselIsParticle[1] = (jsel>0); ijselIsAntiparticle[1] = (jsel<0);
6593 (partonIsUnknown[0] || ((
PDGHelpers::isAGluon(MYIDUP_tmp[0]) && isel==0) || MYIDUP_tmp[0]==isel))
6595 (partonIsUnknown[1] || ((
PDGHelpers::isAGluon(MYIDUP_tmp[1]) && jsel==0) || MYIDUP_tmp[1]==jsel))
6601 (partonIsUnknown[2] || MYIDUP_tmp[2]==rsel)
6603 (partonIsUnknown[3] || MYIDUP_tmp[3]==ssel)
6606 if (ijselIsUpType[1] && ijselIsUpType[0]){
6607 if (ijselIsParticle[1] && ijselIsParticle[0]){
6608 if (isel!=jsel) msq_tmp = msq_uu_zz_ijrs1234[1];
6609 else msq_tmp = msq_uu_zzid_ijrs1234[1];
6611 else if (ijselIsAntiparticle[1] && ijselIsAntiparticle[0]){
6612 if (isel!=jsel) msq_tmp = msq_ubarubar_zz_ijrs1234[1];
6613 else msq_tmp = msq_ubarubar_zzid_ijrs1234[1];
6615 else if (ijselIsParticle[1] && ijselIsAntiparticle[0]) msq_tmp = msq_uubar_zz_ijrs1234[1];
6617 else if (ijselIsDownType[1] && ijselIsDownType[0]){
6618 if (ijselIsParticle[1] && ijselIsParticle[0]){
6619 if (isel!=jsel) msq_tmp = msq_dd_zz_ijrs1234[1];
6620 else msq_tmp = msq_dd_zzid_ijrs1234[1];
6622 else if (ijselIsAntiparticle[1] && ijselIsAntiparticle[0]){
6623 if (isel!=jsel) msq_tmp = msq_dbardbar_zz_ijrs1234[1];
6624 else msq_tmp = msq_dbardbar_zzid_ijrs1234[1];
6626 else if (ijselIsParticle[1] && ijselIsAntiparticle[0]) msq_tmp = msq_ddbar_zz_ijrs1234[1];
6628 else if (ijselIsUpType[1] && ijselIsDownType[0] && ijselIsParticle[1] && ijselIsAntiparticle[0]) msq_tmp = msq_udbar_zz_ijrs1234[1];
6629 else if (ijselIsDownType[1] && ijselIsUpType[0] && ijselIsParticle[1] && ijselIsAntiparticle[0]) msq_tmp = msq_dubar_zz_ijrs1234[1];
6630 MatElsq[jsel+5][isel+5] += msq_tmp;
6631 if (verbosity >=
TVar::DEBUG_VERBOSE)
MELAout <<
"Channel (isel, jsel, rsel, ssel)=" << isel <<
", " << jsel <<
", " << rsel <<
", " << ssel <<
'\t' << msq_tmp << endl;
6636 (partonIsUnknown[2] || MYIDUP_tmp[2]==ssel)
6638 (partonIsUnknown[3] || MYIDUP_tmp[3]==rsel)
6641 if (ijselIsUpType[1] && ijselIsUpType[0]){
6642 if (ijselIsParticle[1] && ijselIsParticle[0]){
6643 if (isel!=jsel) msq_tmp = msq_uu_zz_ijrs1243[1];
6644 else msq_tmp = msq_uu_zzid_ijrs1243[1];
6646 else if (ijselIsAntiparticle[1] && ijselIsAntiparticle[0]){
6647 if (isel!=jsel) msq_tmp = msq_ubarubar_zz_ijrs1243[1];
6648 else msq_tmp = msq_ubarubar_zzid_ijrs1243[1];
6650 else if (ijselIsParticle[1] && ijselIsAntiparticle[0]) msq_tmp = msq_uubar_zz_ijrs1243[1];
6652 else if (ijselIsDownType[1] && ijselIsDownType[0]){
6653 if (ijselIsParticle[1] && ijselIsParticle[0]){
6654 if (isel!=jsel) msq_tmp = msq_dd_zz_ijrs1243[1];
6655 else msq_tmp = msq_dd_zzid_ijrs1243[1];
6657 else if (ijselIsAntiparticle[1] && ijselIsAntiparticle[0]){
6658 if (isel!=jsel) msq_tmp = msq_dbardbar_zz_ijrs1243[1];
6659 else msq_tmp = msq_dbardbar_zzid_ijrs1243[1];
6661 else if (ijselIsParticle[1] && ijselIsAntiparticle[0]) msq_tmp = msq_ddbar_zz_ijrs1243[1];
6663 else if (ijselIsUpType[1] && ijselIsDownType[0] && ijselIsParticle[1] && ijselIsAntiparticle[0]) msq_tmp = msq_udbar_zz_ijrs1243[1];
6664 else if (ijselIsDownType[1] && ijselIsUpType[0] && ijselIsParticle[1] && ijselIsAntiparticle[0]) msq_tmp = msq_dubar_zz_ijrs1243[1];
6665 MatElsq[jsel+5][isel+5] += msq_tmp;
6666 if (verbosity >=
TVar::DEBUG_VERBOSE)
MELAout <<
"Channel (isel, jsel, rsel, ssel)=" << isel <<
", " << jsel <<
", " << ssel <<
", " << rsel <<
'\t' << msq_tmp << endl;
6670 vector<int> possible_rsel;
6671 vector<int> possible_ssel;
6672 vector<double> possible_Vsqir;
6673 vector<double> possible_Vsqjs;
6674 if (ijselIsUpType[0]){ possible_rsel.push_back(1); possible_rsel.push_back(3); possible_rsel.push_back(5); }
6675 else if (ijselIsDownType[0]){ possible_rsel.push_back(2); possible_rsel.push_back(4); }
6676 for (
unsigned int ix=0; ix<possible_rsel.size(); ix++){
6677 rsel=possible_rsel.at(ix);
6679 possible_Vsqir.push_back(ckmval);
6681 if (ijselIsUpType[1]){ possible_ssel.push_back(1); possible_ssel.push_back(3); possible_ssel.push_back(5); }
6682 else if (ijselIsDownType[1]){ possible_ssel.push_back(2); possible_ssel.push_back(4); }
6683 for (
unsigned int iy=0; iy<possible_ssel.size(); iy++){
6684 ssel=possible_ssel.at(iy);
6686 possible_Vsqjs.push_back(ckmval);
6690 for (
unsigned int ix=0; ix<possible_rsel.size(); ix++){
6691 rsel=possible_rsel.at(ix)*TMath::Sign(1, isel);
6692 for (
unsigned int iy=0; iy<possible_ssel.size(); iy++){
6693 ssel=possible_ssel.at(iy)*TMath::Sign(1, jsel);
6694 double ckmval = possible_Vsqir.at(ix)*possible_Vsqjs.at(iy);
6696 (partonIsUnknown[2] || MYIDUP_tmp[2]==rsel)
6698 (partonIsUnknown[3] || MYIDUP_tmp[3]==ssel)
6701 if (ijselIsUpType[1] && ijselIsUpType[0] && ijselIsParticle[1] && ijselIsAntiparticle[0]) msq_tmp = msq_uubar_ww_ijrs1234[1];
6702 else if (ijselIsDownType[1] && ijselIsDownType[0] && ijselIsParticle[1] && ijselIsAntiparticle[0]) msq_tmp = msq_ddbar_ww_ijrs1234[1];
6704 MatElsq[jsel+5][isel+5] += msq_tmp;
6705 if (verbosity >=
TVar::DEBUG_VERBOSE)
MELAout <<
"Channel (isel, jsel, rsel, ssel)=" << isel <<
", " << jsel <<
", " << rsel <<
", " << ssel <<
'\t' << msq_tmp << endl;
6710 (partonIsUnknown[2] || MYIDUP_tmp[2]==ssel)
6712 (partonIsUnknown[3] || MYIDUP_tmp[3]==rsel)
6715 if (ijselIsUpType[1] && ijselIsUpType[0] && ijselIsParticle[1] && ijselIsAntiparticle[0]) msq_tmp = msq_uubar_ww_ijrs1243[1];
6716 else if (ijselIsDownType[1] && ijselIsDownType[0] && ijselIsParticle[1] && ijselIsAntiparticle[0]) msq_tmp = msq_ddbar_ww_ijrs1243[1];
6718 MatElsq[jsel+5][isel+5] += msq_tmp;
6719 if (verbosity >=
TVar::DEBUG_VERBOSE)
MELAout <<
"Channel (isel, jsel, rsel, ssel)=" << isel <<
", " << jsel <<
", " << ssel <<
", " << rsel <<
'\t' << msq_tmp << endl;
6725 vector<int> possible_rsel;
6726 vector<int> possible_ssel;
6727 vector<double> possible_Vsqir;
6728 vector<double> possible_Vsqjs;
6729 if (ijselIsUpType[0]){ possible_rsel.push_back(1); possible_rsel.push_back(3); possible_rsel.push_back(5); }
6730 else if (ijselIsDownType[0]){ possible_rsel.push_back(2); possible_rsel.push_back(4); }
6731 for (
unsigned int ix=0; ix<possible_rsel.size(); ix++){
6732 rsel=possible_rsel.at(ix);
6734 possible_Vsqir.push_back(ckmval);
6736 if (ijselIsUpType[1]){ possible_ssel.push_back(1); possible_ssel.push_back(3); possible_ssel.push_back(5); }
6737 else if (ijselIsDownType[1]){ possible_ssel.push_back(2); possible_ssel.push_back(4); }
6738 for (
unsigned int iy=0; iy<possible_ssel.size(); iy++){
6739 ssel=possible_ssel.at(iy);
6741 possible_Vsqjs.push_back(ckmval);
6745 for (
unsigned int ix=0; ix<possible_rsel.size(); ix++){
6746 rsel=possible_rsel.at(ix)*TMath::Sign(1, isel);
6747 for (
unsigned int iy=0; iy<possible_ssel.size(); iy++){
6748 ssel=possible_ssel.at(iy)*TMath::Sign(1, jsel);
6749 double ckmval = possible_Vsqir.at(ix)*possible_Vsqjs.at(iy);
6751 (partonIsUnknown[2] || MYIDUP_tmp[2]==rsel)
6753 (partonIsUnknown[3] || MYIDUP_tmp[3]==ssel)
6755 if (rsel!=jsel && ssel!=isel){
6757 if (ijselIsUpType[1] && ijselIsDownType[0]){
6758 if (ijselIsParticle[1] && ijselIsParticle[0]) msq_tmp = msq_ud_wwonly_ijrs1234[1];
6759 else if (ijselIsAntiparticle[1] && ijselIsAntiparticle[0]) msq_tmp = msq_ubardbar_wwonly_ijrs1234[1];
6762 MatElsq[jsel+5][isel+5] += msq_tmp;
6763 if (verbosity >=
TVar::DEBUG_VERBOSE)
MELAout <<
"Channel (isel, jsel, rsel, ssel)=" << isel <<
", " << jsel <<
", " << rsel <<
", " << ssel <<
'\t' << msq_tmp << endl;
6767 MatElsq[jsel+5][isel+5] += msq_tmp;
6768 if (verbosity >=
TVar::DEBUG_VERBOSE)
MELAout <<
"Channel (isel, jsel, rsel, ssel)=" << isel <<
", " << jsel <<
", " << rsel <<
", " << ssel <<
'\t' << msq_tmp << endl;
6774 (partonIsUnknown[2] || MYIDUP_tmp[2]==ssel)
6776 (partonIsUnknown[3] || MYIDUP_tmp[3]==rsel)
6778 if (rsel!=jsel && ssel!=isel){
6780 if (ijselIsUpType[1] && ijselIsDownType[0]){
6781 if (ijselIsParticle[1] && ijselIsParticle[0]) msq_tmp = msq_ud_wwonly_ijrs1243[1];
6782 else if (ijselIsAntiparticle[1] && ijselIsAntiparticle[0]) msq_tmp = msq_ubardbar_wwonly_ijrs1243[1];
6785 MatElsq[jsel+5][isel+5] += msq_tmp;
6786 if (verbosity >=
TVar::DEBUG_VERBOSE)
MELAout <<
"Channel (isel, jsel, rsel, ssel)=" << isel <<
", " << jsel <<
", " << ssel <<
", " << rsel <<
'\t' << msq_tmp << endl;
6790 MatElsq[jsel+5][isel+5] += msq_tmp;
6791 if (verbosity >=
TVar::DEBUG_VERBOSE)
MELAout <<
"Channel (isel, jsel, rsel, ssel)=" << isel <<
", " << jsel <<
", " << ssel <<
", " << rsel <<
'\t' << msq_tmp << endl;
6802 int GeVexponent_MEsq = 4-(1+nRequested_AssociatedJets)*2;
6803 double constant = pow(GeV, -GeVexponent_MEsq);
6804 for (
int ii=0; ii<
nmsq; ii++){
for (
int jj=0; jj<
nmsq; jj++) MatElsq[jj][ii] *= constant; }
6810 for (
int ii = 0; ii <
nmsq; ii++){
for (
int jj = 0; jj <
nmsq; jj++)
MELAout << MatElsq[jj][ii] <<
'\t';
MELAout << endl; }
6812 sum_msqjk =
SumMEPDF(MomStore[0], MomStore[1], MatElsq, RcdME, EBEAM, verbosity);
6829 <<
"TUtil::HJJMatEl: Reset AlphaS:\n"
6830 <<
"\tBefore reset, alphas scale: " <<
scale_.scale <<
", PDF scale: " <<
facscale_.facscale << endl;
6832 SetAlphaS(defaultRenScale, defaultFacScale, 1., 1., defaultNloop, defaultNflav, defaultPdflabel);
6836 <<
"TUtil::HJJMatEl: Reset AlphaS result:\n"
6837 <<
"\tAfter reset, alphas scale: " <<
scale_.scale <<
", PDF scale: " <<
facscale_.facscale <<
", alphas(Qren): " << alphasVal <<
", alphas(MZ): " << alphasmzVal << endl;