2-2, decay 1-2, output to pythia8 program, the program is wrong

Bug #1099790 reported by tang yilei
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
MadGraph5_aMC@NLO
Fix Released
Medium
Olivier Mattelaer

Bug Description

I inputed my model with extra squarks, and wanted to generate pythia8 program with such process:
  u~ g > l- squak, squark > l+ u~
and this is a 2->5 process finally. I then typed
 output pythia8
After compiled, the generated program showed warning telling me that the colour arrange is wrong.
After I went through the program generated automatically and discovered where the mistake come from:
in each function void ???::setIdColAcol() the code is shown below such as:
  if(id1 == 21 && id2 == -2)
  {
    // Pick one of the flavor combinations (13, -6013)
    int flavors[1][3] = {{13, -6013}}; //-6013 is the particle to decay into u~ and lepton
    vector<double> probs;
    double sum = matrix_element[0];
    probs.push_back(matrix_element[0]/sum);
    int choice = rndmPtr->pick(probs);
    id3 = flavors[choice][0];
    id4 = flavors[choice][1];
    id5 = flavors[choice][2];
  }
  setId(id1, id2, id3, id4, id5);
  // Pick color flow
  int ncolor[1] = {1};
  if(id1 == 21 && id2 == -2 && id3 == 13 && id4 -6013)
  {
    vector<double> probs;
    double sum = jamp2[0][0];
    for(int i = 0; i < ncolor[0]; i++ )
      probs.push_back(jamp2[0][i]/sum);
    int ic = rndmPtr->pick(probs);
    static int colors[1][10] = {{1, 2, 0, 1, 0, 0, 0, 0, 0, 2}};
    setColAcol(colors[ic][0], colors[ic][1], colors[ic][2], colors[ic][3],
        colors[ic][4], colors[ic][5], colors[ic][6], colors[ic][7],
        colors[ic][8], colors[ic][9]);
  }

-6013 is the new particle I inserted in this model. It is obvious that this program wrongly set id5=0(void), and assigned the wrong color flow since it fully ignored the decay of -6013 as I have inputed in the previous madgraph generate command. So I changed every program by hand into such as:
  if(id1 == 21 && id2 == -2)
  {
    // Pick one of the flavor combinations (13, -6013)
    int flavors[1][3] = {{13, -11, -2}}; //-6013
    vector<double> probs;
    double sum = matrix_element[0];
    probs.push_back(matrix_element[0]/sum);
    int choice = rndmPtr->pick(probs);
    id3 = flavors[choice][0];
    id4 = flavors[choice][1];
    id5 = flavors[choice][2];
  }
  setId(id1, id2, id3, id4, id5);
  // Pick color flow
  int ncolor[1] = {1};
  if(id1 == 21 && id2 == -2 && id3 == 13 && id4 == -11 && id5 == -2)
  {
    vector<double> probs;
    double sum = jamp2[0][0];
    for(int i = 0; i < ncolor[0]; i++ )
      probs.push_back(jamp2[0][i]/sum);
    int ic = rndmPtr->pick(probs);
    static int colors[1][10] = {{1, 2, 0, 1, 0, 0, 0, 0, 0, 2}};
    setColAcol(colors[ic][0], colors[ic][1], colors[ic][2], colors[ic][3],
        colors[ic][4], colors[ic][5], colors[ic][6], colors[ic][7],
        colors[ic][8], colors[ic][9]);
  }

Finnally, it worked.

Tags: pythia8

Related branches

Revision history for this message
tang yilei (tangyilei10) wrote :

sorry, I made a mistake in my description, it is a 2 -> 3 process, not 2->5.

Revision history for this message
Olivier Mattelaer (olivier-mattelaer) wrote :

Hi Tang,

Thanks a lot for this bug report.
You are perfectly right. This will be fixed in the next version of MG5.

Thanks so much,

Olivier

Changed in madgraph5:
assignee: nobody → Olivier Mattelaer (olivier-mattelaer)
status: New → In Progress
Changed in madgraph5:
importance: Undecided → Medium
Changed in madgraph5:
status: In Progress → Fix Committed
Changed in madgraph5:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.