Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GenParticlePruner: Added sorting of mother and daughter RefVectors #9709

Conversation

ferencek
Copy link
Contributor

Here are examples of ParticleListDrawer printouts before:

21-Jun-2015 12:33:02 CDT  Initiating request to open file root://cmsxrootd-site.fnal.gov//store/relval/CMSSW_7_4_1/RelValTTbar_13/GEN-SIM-RECO/PU50ns_MCRUN2_74_V8_gensim71X-v1/00000/06ACC5B7-7FEC-E411-8CB1-0025905964BA.root
21-Jun-2015 12:33:04 CDT  Successfully opened file root://cmsxrootd-site.fnal.gov//store/relval/CMSSW_7_4_1/RelValTTbar_13/GEN-SIM-RECO/PU50ns_MCRUN2_74_V8_gensim71X-v1/00000/06ACC5B7-7FEC-E411-8CB1-0025905964BA.root
Begin processing the 1st record. Run 1, Event 501, LumiSection 6 at 21-Jun-2015 12:33:15.035 CDT

[ParticleListDrawer] analysing particle collection prunedGenParticles
 idx  |    ID -       Name |Stat|  Mo1  Mo2  Da1  Da2 |nMo nDa|    pt       eta     phi   |     px         py         pz        m     |
    0 |  2212 -         p+ |  3 |   -1   -1    2   87 |  0  7 |   0.000  29256.000  0.000 |      0.000      0.000   6500.000    0.938 |
    1 |  2212 -         p+ |  3 |   -1   -1    3   68 |  0 15 |   0.000 -29256.000  0.000 |      0.000      0.000  -6500.000    0.938 |
    2 |    21 -          g |  3 |    0    0    4   73 |  1 29 |   0.652      7.613  0.166 |      0.643      0.107    659.832    0.000 |
    3 |    21 -          g |  3 |    1    1    5   80 |  1 26 |   5.094     -6.976 -1.473 |      0.500     -5.070  -2726.255    0.000 |
    4 |    21 -          g |  3 |    2    2    6    7 |  1  2 | 120.841     -0.253 -1.573 |     -0.216   -120.841    -30.843   -0.000 |
    5 |    21 -          g |  3 |    3    3    6    7 |  1  2 |  35.247     -4.607 -2.157 |    -19.496    -29.364  -1765.023    0.000 |
    6 |     6 -          t |  3 |    4    5    8    9 |  2  2 | 111.290     -3.118  2.243 |    -69.327     87.059  -1254.823  176.020 |
    7 |    -6 -       tbar |  3 |    4    5   10   69 |  2  8 | 242.396     -1.543 -1.365 |     49.615   -237.264   -541.042  174.839 |
    8 |    24 -         W+ |  3 |    6    6   12   16 |  1  3 |  96.246     -2.347  1.855 |    -26.998     92.382   -498.700   81.449 |
    9 |     5 -          b |  3 |    6    6   47   48 |  1  4 |  42.323     -3.607 -3.020 |    -42.012     -5.124   -779.089    4.800 |
   10 |   -24 -         W- |  3 |    7    7   14   17 |  1  3 | 212.242     -1.315 -1.532 |      8.312   -212.080   -366.739   81.631 |
   11 |    -5 -       bbar |  3 |    7    7   64   66 |  1  5 |  39.588     -2.197 -0.126 |     39.275     -4.962   -175.882    4.800 |
   12 |    -3 -       sbar |  3 |    8    8   76   77 |  1  2 |  71.268     -2.511  2.180 |    -40.790     58.441   -435.916    0.500 |
   13 |     4 -          c |  3 |    8    8   74   78 |  1  5 |  36.547     -1.309  1.184 |     13.797     33.843    -62.707    1.500 |
   14 |    11 -         e- |  3 |   10   10   20   20 |  1  1 | 193.973     -1.367 -1.459 |     21.549   -192.772   -355.771    0.001 |
   15 |   -12 -    nu_ebar |  3 |   10   10   23   23 |  1  1 |  22.054     -0.395 -2.209 |    -13.133    -17.718     -8.931    0.000 |
   16 |    24 -         W+ |  2 |    8    8   18   18 |  1  1 |  96.246     -2.347  1.855 |    -26.998     92.382   -498.700   81.449 |
   17 |   -24 -         W- |  2 |   10   10   19   19 |  1  1 | 212.242     -1.315 -1.532 |      8.312   -212.080   -366.739   81.631 |
   18 |    24 -         W+ |  2 |   16   16   -1   -1 |  1  0 |  96.151     -2.348  1.855 |    -26.993     92.284   -498.624   81.449 |
   19 |   -24 -         W- |  2 |   17   17   -1   -1 |  1  0 | 210.658     -1.317 -1.531 |      8.416   -210.490   -364.702   81.631 |
   20 |    11 -         e- |  2 |   14   14   21   22 |  1  2 | 193.973     -1.367 -1.459 |     21.549   -192.772   -355.771    0.001 |
   21 |    11 -         e- |  1 |   20   20   -1   -1 |  1  0 | 180.314     -1.367 -1.459 |     20.027   -179.199   -330.718    0.001 |
   22 |    22 -      gamma |  1 |   20   20   -1   -1 |  1  0 |  13.658     -1.367 -1.459 |      1.521    -13.573    -25.053    0.000 |
   23 |   -12 -    nu_ebar |  1 |   15   15   -1   -1 |  1  0 |  22.054     -0.395 -2.209 |    -13.133    -17.718     -8.931    0.000 |
   24 |    21 -          g |  2 |    0    0   91   91 |  1  1 |  11.611      2.354  2.307 |     -7.795      8.605     60.571    0.000 |
   25 |    21 -          g |  2 |    2    2   98   81 |  1  3 |   0.395      5.643 -0.206 |      0.387     -0.081     55.785   -0.000 |
   26 |    21 -          g |  2 |    2    2   98   81 |  1  3 |   0.626      2.658 -0.397 |      0.578     -0.242      4.448    0.000 |
   27 |    21 -          g |  2 |    3    3   82   82 |  1  1 |   1.292     -0.704  1.099 |      0.586      1.151     -0.987   -0.000 |
   28 |    21 -          g |  2 |    3    3   83   92 |  1  3 |   5.548     -2.150  1.324 |      1.353      5.381    -23.491    0.000 |
   29 |    21 -          g |  2 |    3    3   83   92 |  1  3 |   7.704     -2.483  1.096 |      3.521      6.852    -45.802    0.000 |
   30 |    21 -          g |  2 |    3    3   83   92 |  1  3 |   0.698     -2.400  0.979 |      0.390      0.580     -3.819    0.000 |
   31 |    21 -          g |  2 |    3    3   83   92 |  1  3 |   0.914     -3.613  0.241 |      0.888      0.218    -16.936   -0.000 |
   32 |    21 -          g |  2 |    3    3   83   92 |  1  3 |   2.443     -2.941  0.037 |      2.441      0.089    -23.055    0.000 |
   33 |    21 -          g |  2 |    3    3   83   92 |  1  3 |   0.162     -2.748 -2.010 |     -0.069     -0.147     -1.260    0.000 |
   34 |    21 -          g |  2 |    3    3   83   92 |  1  3 |   1.160     -3.091  0.494 |      1.022      0.550    -12.731    0.000 |
   35 |    21 -          g |  2 |    3    3   83   92 |  1  3 |   9.511     -3.227  0.377 |      8.842      3.503   -119.722   -0.000 |
   36 |    21 -          g |  2 |    3    3   83   92 |  1  3 |   3.674     -3.577  0.194 |      3.605      0.709    -65.680    0.000 |
   37 |    21 -          g |  2 |    3    3   83   92 |  1  3 |   2.413     -3.405  0.387 |      2.235      0.910    -36.283    0.000 |
   38 |    21 -          g |  2 |    3    3   83   92 |  1  3 |   0.345     -2.406 -0.730 |      0.257     -0.230     -1.898   -0.000 |
   39 |    21 -          g |  2 |    3    3   83   92 |  1  3 |   5.455     -2.849 -0.734 |      4.052     -3.652    -46.951    0.000 |
   40 |    21 -          g |  2 |    3    3   83   92 |  1  3 |   0.913     -3.298 -2.220 |     -0.552     -0.727    -12.337    0.000 |
   41 |    21 -          g |  2 |    3    3   83   92 |  1  3 |   0.789     -2.247 -1.001 |      0.426     -0.664     -3.692    0.000 |
   42 |    21 -          g |  2 |    3    3   93   84 |  1  2 |   5.043     -4.474  1.802 |     -1.157      4.909   -221.120   -0.000 |
   43 |    21 -          g |  2 |    3    3   93   84 |  1  2 |   0.213     -4.963 -0.217 |      0.208     -0.046    -15.212    0.000 |
   44 |    21 -          g |  2 |    3    3   93   84 |  1  2 |   5.692     -2.956  2.205 |     -3.371      4.587    -54.531    0.000 |
   45 |    21 -          g |  2 |    3    3   93   84 |  1  2 |   0.817     -2.454  2.581 |     -0.692      0.434     -4.714   -0.000 |
   46 |    21 -          g |  2 |    3    3   93   84 |  1  2 |   1.130     -2.298  2.166 |     -0.634      0.936     -5.571    0.000 |
   47 |    21 -          g |  2 |    9    9   93   84 |  1  2 |   7.520     -3.377 -3.030 |     -7.473     -0.840   -109.973    0.000 |
   48 |     5 -          b |  2 |    9    9   93   84 |  1  2 |  32.779     -3.652 -3.020 |    -32.535     -3.989   -631.280    4.800 |
   49 |    21 -          g |  2 |    2    2   95   95 |  1  1 |  17.708     -0.491  1.631 |     -1.061     17.676     -9.043   -0.000 |
   50 |    21 -          g |  2 |    2    2   95   95 |  1  1 |   1.869     -0.558  1.843 |     -0.503      1.800     -1.098    0.000 |
   51 |    21 -          g |  2 |    2    2   95   95 |  1  1 |   2.917     -0.530  1.738 |     -0.484      2.876     -1.619    0.000 |
   52 |    21 -          g |  2 |    2    2   95   95 |  1  1 |   4.173     -0.545  2.154 |     -2.299      3.483     -2.387    0.000 |
   53 |    21 -          g |  2 |    2    2   95   95 |  1  1 |  25.799     -0.576  2.010 |    -10.970     23.351    -15.697    0.000 |
   54 |    21 -          g |  2 |    2    2   95   95 |  1  1 |  14.556     -0.476  1.970 |     -5.657     13.412     -7.192    0.000 |
   55 |    21 -          g |  2 |    3    3   -1   -1 |  1  0 |   0.507     -0.113  2.250 |     -0.319      0.395     -0.057    0.000 |
   56 |     2 -          u |  2 |    2    2   -1   -1 |  1  0 |   5.306     -0.770  1.707 |     -0.718      5.257     -4.504    0.330 |
   57 |     1 -          d |  2 |    2    2   85   86 |  1  2 |  12.371     -0.322  0.457 |     11.101      5.460     -4.053    0.330 |
   58 |    21 -          g |  2 |    2    2   85   86 |  1  2 |   0.535     -0.976  0.090 |      0.533      0.048     -0.610   -0.000 |
   59 |    21 -          g |  2 |    2    2   85   86 |  1  2 |   3.598     -1.179  1.206 |      1.284      3.361     -5.295    0.000 |
   60 |    21 -          g |  2 |    2    2   85   86 |  1  2 |   2.277     -0.960  1.322 |      0.560      2.207     -2.538   -0.000 |
   61 |    21 -          g |  2 |    2    2   85   86 |  1  2 |   2.980     -0.847  1.522 |      0.146      2.977     -2.838   -0.000 |
   62 |    21 -          g |  2 |    2    2   85   86 |  1  2 |   3.649     -1.207  1.878 |     -1.103      3.478     -5.552    0.000 |
   63 |    21 -          g |  2 |    2    2   85   86 |  1  2 |   0.458     -0.238  2.954 |     -0.450      0.085     -0.110    0.000 |
   64 |    21 -          g |  2 |   11   11   85   86 |  1  2 |  11.127     -2.356 -0.212 |     10.879     -2.337    -58.168   -0.000 |
   65 |    21 -          g |  2 |   11   11   85   86 |  1  2 |  12.657     -2.312 -0.213 |     12.372     -2.670    -63.251   -0.000 |
   66 |    -5 -       bbar |  2 |   11   11   85   86 |  1  2 |  12.537     -1.888 -0.046 |     12.523     -0.579    -40.468    4.800 |
   67 |     1 -          d |  2 |    7    7   88   89 |  1  2 |   6.994     -0.180  2.718 |     -6.377      2.873     -1.265    0.330 |
   68 |    21 -          g |  2 |    1    1   88   89 |  1  2 |   6.574     -1.763 -0.210 |      6.429     -1.373    -18.592   -0.000 |
   69 |    -3 -       sbar |  2 |    7    7   -1   -1 |  1  0 |   8.024     -0.680  0.534 |      6.905      4.087     -5.884    0.500 |
   70 |    21 -          g |  2 |    2    2   -1   -1 |  1  0 |   0.424      7.160 -2.818 |     -0.402     -0.135    272.946    0.000 |
   71 |    21 -          g |  2 |    3    3   -1   -1 |  1  0 |   0.287      0.053 -0.860 |      0.188     -0.218      0.015   -0.000 |
   72 |    21 -          g |  2 |    3    3   -1   -1 |  1  0 |   0.466      1.983 -2.980 |     -0.460     -0.075      1.660    0.000 |
   73 |     3 -          s |  2 |    2    2   -1   -1 |  1  0 |  13.084      2.462 -0.197 |     12.832     -2.555     76.205    0.500 |
   74 |     4 -          c |  2 |   13   13   90   90 |  1  1 |  16.044     -1.351  0.881 |     10.209     12.377    -28.890    1.500 |
   75 |    21 -          g |  2 |   13   13   -1   -1 |  1  0 |   8.765     -2.255  1.979 |     -3.480      8.044    -41.341   -0.000 |
   76 |    21 -          g |  2 |   12   12   -1   -1 |  1  0 |   7.585     -2.555  2.149 |     -4.146      6.352    -48.521    0.000 |
   77 |    -3 -       sbar |  2 |   12   12   -1   -1 |  1  0 |  53.669     -2.495  2.189 |    -31.101     43.739   -323.109    0.500 |
   78 |    21 -          g |  2 |   13   13  105  105 |  1  1 |   7.124     -1.405  1.593 |     -0.161      7.122    -13.642    0.000 |
   79 |    21 -          g |  2 |    3    3   -1   -1 |  1  0 |   0.341     -3.445  0.215 |      0.333      0.073     -5.336    0.000 |
   80 |    21 -          g |  2 |    3    3   -1   -1 |  1  0 |   0.310     -3.943  2.188 |     -0.180      0.253     -8.001    0.000 |
   81 |  2212 -         p+ |  1 |    0    2   -1   -1 |  5  0 |   0.940      2.621 -1.144 |      0.389     -0.856      6.431    0.938 |
   82 |  2212 -         p+ |  1 |    0    2   -1   -1 |  4  0 |   0.745      7.218  1.960 |     -0.283      0.689    507.800    0.938 |
   83 |  2212 -         p+ |  1 |    1    2   -1   -1 | 16  0 |   2.661     -2.253  1.203 |      0.956      2.483    -12.525    0.938 |
   84 |  -523 -        B*- |  2 |    1   48   94   94 |  9  1 |  30.835     -3.611 -3.022 |    -30.614     -3.685   -570.300    5.325 |
   85 |  2212 -         p+ |  1 |   57   66   -1   -1 | 12  0 |   1.438     -2.459 -0.463 |      1.286     -0.642     -8.347    0.938 |
   86 | -5114 - Sigma*_bbar+ |  2 |   57   66   96   96 | 12  1 |  13.125     -1.951 -0.035 |     13.117     -0.465    -45.218    5.810 |
   87 |  2212 -         p+ |  1 |    2    1   -1   -1 |  3  0 |   2.586      2.625 -2.491 |     -2.057     -1.566     17.750    0.938 |
   88 |  2212 -         p+ |  1 |   67   68   -1   -1 |  4  0 |   0.679     -0.925 -2.926 |     -0.664     -0.145     -0.722    0.938 |
   89 |  2212 -         p+ |  1 |   67   68   -1   -1 |  4  0 |   1.068     -1.379 -1.683 |     -0.119     -1.062     -1.986    0.938 |
   90 |   423 -        D*0 |  2 |   74   13   97   97 |  2  1 |  12.180     -1.306  0.854 |      7.998      9.186    -20.836    2.007 |
   91 |  2212 -         p+ |  1 |    2    1   -1   -1 |  3  0 |   0.284     -0.112  3.041 |     -0.283      0.028     -0.032    0.938 |
   92 |  2212 -         p+ |  1 |    1    2   -1   -1 | 16  0 |   2.752     -3.409  0.136 |      2.726      0.373    -41.554    0.938 |
   93 |  2212 -         p+ |  1 |    1   48   -1   -1 |  9  0 |   0.932     -4.174  2.048 |     -0.428      0.827    -30.269    0.938 |
   94 |  -521 -         B- |  2 |   84   84  101  103 |  1  3 |  30.515     -3.612 -3.023 |    -30.300     -3.611   -564.875    5.279 |
   95 |   310 -       K_S0 |  1 |    2   54   -1   -1 |  7  0 |   1.464     -0.828  2.431 |     -1.110      0.955     -1.356    0.498 |
   96 | -5122 - Lambda_bbar0 |  2 |   86   86  104  104 |  1  1 |  12.759     -1.946 -0.041 |     12.748     -0.526    -43.757    5.641 |
   97 |   421 -         D0 |  2 |   90   90   -1   -1 |  1  0 |  11.658     -1.316  0.855 |      7.654      8.794    -20.179    1.865 |
   98 |    11 -         e- |  1 |    0    2   -1   -1 |  5  0 |   0.250      6.714 -2.041 |     -0.113     -0.223    102.836    0.001 |
   99 |   -11 -         e+ |  1 |    0    2   -1   -1 |  5  0 |   0.089      6.678 -1.952 |     -0.033     -0.083     35.422    0.001 |
  100 |   310 -       K_S0 |  1 |    1    2   -1   -1 | 16  0 |   1.585     -2.421  1.353 |      0.342      1.548     -8.857    0.498 |
  101 |   -12 -    nu_ebar |  1 |   94   94   -1   -1 |  1  0 |   0.495     -2.925 -3.043 |     -0.492     -0.048     -4.595    0.000 |
  102 |    11 -         e- |  1 |   94   94   -1   -1 |  1  0 |  13.845     -3.729 -2.964 |    -13.627     -2.445   -288.113    0.001 |
  103 |   421 -         D0 |  2 |   94   94   -1   -1 |  1  0 |  16.220     -3.514 -3.073 |    -16.181     -1.117   -272.167    1.865 |
  104 | -4122 - Lambda_cbar- |  2 |   96   96   -1   -1 |  1  0 |   9.616     -1.960  0.153 |      9.504      1.466    -33.457    2.285 |
  105 |   310 -       K_S0 |  1 |   13   78   -1   -1 |  2  0 |   2.680     -1.421  1.535 |      0.097      2.678     -5.228    0.498 |

and after this fix:

21-Jun-2015 12:34:21 CDT  Initiating request to open file root://cmsxrootd-site.fnal.gov//store/relval/CMSSW_7_4_1/RelValTTbar_13/GEN-SIM-RECO/PU50ns_MCRUN2_74_V8_gensim71X-v1/00000/06ACC5B7-7FEC-E411-8CB1-0025905964BA.root
21-Jun-2015 12:34:24 CDT  Successfully opened file root://cmsxrootd-site.fnal.gov//store/relval/CMSSW_7_4_1/RelValTTbar_13/GEN-SIM-RECO/PU50ns_MCRUN2_74_V8_gensim71X-v1/00000/06ACC5B7-7FEC-E411-8CB1-0025905964BA.root
Begin processing the 1st record. Run 1, Event 501, LumiSection 6 at 21-Jun-2015 12:34:33.347 CDT

[ParticleListDrawer] analysing particle collection prunedGenParticles
 idx  |    ID -       Name |Stat|  Mo1  Mo2  Da1  Da2 |nMo nDa|    pt       eta     phi   |     px         py         pz        m     |
    0 |  2212 -         p+ |  3 |   -1   -1    2   99 |  0  7 |   0.000  29256.000  0.000 |      0.000      0.000   6500.000    0.938 |
    1 |  2212 -         p+ |  3 |   -1   -1    3  100 |  0 15 |   0.000 -29256.000  0.000 |      0.000      0.000  -6500.000    0.938 |
    2 |    21 -          g |  3 |    0    0    4  100 |  1 29 |   0.652      7.613  0.166 |      0.643      0.107    659.832    0.000 |
    3 |    21 -          g |  3 |    1    1    5   80 |  1 26 |   5.094     -6.976 -1.473 |      0.500     -5.070  -2726.255    0.000 |
    4 |    21 -          g |  3 |    2    2    6    7 |  1  2 | 120.841     -0.253 -1.573 |     -0.216   -120.841    -30.843   -0.000 |
    5 |    21 -          g |  3 |    3    3    6    7 |  1  2 |  35.247     -4.607 -2.157 |    -19.496    -29.364  -1765.023    0.000 |
    6 |     6 -          t |  3 |    4    5    8    9 |  2  2 | 111.290     -3.118  2.243 |    -69.327     87.059  -1254.823  176.020 |
    7 |    -6 -       tbar |  3 |    4    5   10   89 |  2  8 | 242.396     -1.543 -1.365 |     49.615   -237.264   -541.042  174.839 |
    8 |    24 -         W+ |  3 |    6    6   12   16 |  1  3 |  96.246     -2.347  1.855 |    -26.998     92.382   -498.700   81.449 |
    9 |     5 -          b |  3 |    6    6   47   93 |  1  4 |  42.323     -3.607 -3.020 |    -42.012     -5.124   -779.089    4.800 |
   10 |   -24 -         W- |  3 |    7    7   14   17 |  1  3 | 212.242     -1.315 -1.532 |      8.312   -212.080   -366.739   81.631 |
   11 |    -5 -       bbar |  3 |    7    7   64   86 |  1  5 |  39.588     -2.197 -0.126 |     39.275     -4.962   -175.882    4.800 |
   12 |    -3 -       sbar |  3 |    8    8   76   77 |  1  2 |  71.268     -2.511  2.180 |    -40.790     58.441   -435.916    0.500 |
   13 |     4 -          c |  3 |    8    8   74  105 |  1  5 |  36.547     -1.309  1.184 |     13.797     33.843    -62.707    1.500 |
   14 |    11 -         e- |  3 |   10   10   20   20 |  1  1 | 193.973     -1.367 -1.459 |     21.549   -192.772   -355.771    0.001 |
   15 |   -12 -    nu_ebar |  3 |   10   10   23   23 |  1  1 |  22.054     -0.395 -2.209 |    -13.133    -17.718     -8.931    0.000 |
   16 |    24 -         W+ |  2 |    8    8   18   18 |  1  1 |  96.246     -2.347  1.855 |    -26.998     92.382   -498.700   81.449 |
   17 |   -24 -         W- |  2 |   10   10   19   19 |  1  1 | 212.242     -1.315 -1.532 |      8.312   -212.080   -366.739   81.631 |
   18 |    24 -         W+ |  2 |   16   16   -1   -1 |  1  0 |  96.151     -2.348  1.855 |    -26.993     92.284   -498.624   81.449 |
   19 |   -24 -         W- |  2 |   17   17   -1   -1 |  1  0 | 210.658     -1.317 -1.531 |      8.416   -210.490   -364.702   81.631 |
   20 |    11 -         e- |  2 |   14   14   21   22 |  1  2 | 193.973     -1.367 -1.459 |     21.549   -192.772   -355.771    0.001 |
   21 |    11 -         e- |  1 |   20   20   -1   -1 |  1  0 | 180.314     -1.367 -1.459 |     20.027   -179.199   -330.718    0.001 |
   22 |    22 -      gamma |  1 |   20   20   -1   -1 |  1  0 |  13.658     -1.367 -1.459 |      1.521    -13.573    -25.053    0.000 |
   23 |   -12 -    nu_ebar |  1 |   15   15   -1   -1 |  1  0 |  22.054     -0.395 -2.209 |    -13.133    -17.718     -8.931    0.000 |
   24 |    21 -          g |  2 |    0    0   91   91 |  1  1 |  11.611      2.354  2.307 |     -7.795      8.605     60.571    0.000 |
   25 |    21 -          g |  2 |    2    2   81   99 |  1  3 |   0.395      5.643 -0.206 |      0.387     -0.081     55.785   -0.000 |
   26 |    21 -          g |  2 |    2    2   81   99 |  1  3 |   0.626      2.658 -0.397 |      0.578     -0.242      4.448    0.000 |
   27 |    21 -          g |  2 |    3    3   82   82 |  1  1 |   1.292     -0.704  1.099 |      0.586      1.151     -0.987   -0.000 |
   28 |    21 -          g |  2 |    3    3   83  100 |  1  3 |   5.548     -2.150  1.324 |      1.353      5.381    -23.491    0.000 |
   29 |    21 -          g |  2 |    3    3   83  100 |  1  3 |   7.704     -2.483  1.096 |      3.521      6.852    -45.802    0.000 |
   30 |    21 -          g |  2 |    3    3   83  100 |  1  3 |   0.698     -2.400  0.979 |      0.390      0.580     -3.819    0.000 |
   31 |    21 -          g |  2 |    3    3   83  100 |  1  3 |   0.914     -3.613  0.241 |      0.888      0.218    -16.936   -0.000 |
   32 |    21 -          g |  2 |    3    3   83  100 |  1  3 |   2.443     -2.941  0.037 |      2.441      0.089    -23.055    0.000 |
   33 |    21 -          g |  2 |    3    3   83  100 |  1  3 |   0.162     -2.748 -2.010 |     -0.069     -0.147     -1.260    0.000 |
   34 |    21 -          g |  2 |    3    3   83  100 |  1  3 |   1.160     -3.091  0.494 |      1.022      0.550    -12.731    0.000 |
   35 |    21 -          g |  2 |    3    3   83  100 |  1  3 |   9.511     -3.227  0.377 |      8.842      3.503   -119.722   -0.000 |
   36 |    21 -          g |  2 |    3    3   83  100 |  1  3 |   3.674     -3.577  0.194 |      3.605      0.709    -65.680    0.000 |
   37 |    21 -          g |  2 |    3    3   83  100 |  1  3 |   2.413     -3.405  0.387 |      2.235      0.910    -36.283    0.000 |
   38 |    21 -          g |  2 |    3    3   83  100 |  1  3 |   0.345     -2.406 -0.730 |      0.257     -0.230     -1.898   -0.000 |
   39 |    21 -          g |  2 |    3    3   83  100 |  1  3 |   5.455     -2.849 -0.734 |      4.052     -3.652    -46.951    0.000 |
   40 |    21 -          g |  2 |    3    3   83  100 |  1  3 |   0.913     -3.298 -2.220 |     -0.552     -0.727    -12.337    0.000 |
   41 |    21 -          g |  2 |    3    3   83  100 |  1  3 |   0.789     -2.247 -1.001 |      0.426     -0.664     -3.692    0.000 |
   42 |    21 -          g |  2 |    3    3   84   93 |  1  2 |   5.043     -4.474  1.802 |     -1.157      4.909   -221.120   -0.000 |
   43 |    21 -          g |  2 |    3    3   84   93 |  1  2 |   0.213     -4.963 -0.217 |      0.208     -0.046    -15.212    0.000 |
   44 |    21 -          g |  2 |    3    3   84   93 |  1  2 |   5.692     -2.956  2.205 |     -3.371      4.587    -54.531    0.000 |
   45 |    21 -          g |  2 |    3    3   84   93 |  1  2 |   0.817     -2.454  2.581 |     -0.692      0.434     -4.714   -0.000 |
   46 |    21 -          g |  2 |    3    3   84   93 |  1  2 |   1.130     -2.298  2.166 |     -0.634      0.936     -5.571    0.000 |
   47 |    21 -          g |  2 |    9    9   84   93 |  1  2 |   7.520     -3.377 -3.030 |     -7.473     -0.840   -109.973    0.000 |
   48 |     5 -          b |  2 |    9    9   84   93 |  1  2 |  32.779     -3.652 -3.020 |    -32.535     -3.989   -631.280    4.800 |
   49 |    21 -          g |  2 |    2    2   95   95 |  1  1 |  17.708     -0.491  1.631 |     -1.061     17.676     -9.043   -0.000 |
   50 |    21 -          g |  2 |    2    2   95   95 |  1  1 |   1.869     -0.558  1.843 |     -0.503      1.800     -1.098    0.000 |
   51 |    21 -          g |  2 |    2    2   95   95 |  1  1 |   2.917     -0.530  1.738 |     -0.484      2.876     -1.619    0.000 |
   52 |    21 -          g |  2 |    2    2   95   95 |  1  1 |   4.173     -0.545  2.154 |     -2.299      3.483     -2.387    0.000 |
   53 |    21 -          g |  2 |    2    2   95   95 |  1  1 |  25.799     -0.576  2.010 |    -10.970     23.351    -15.697    0.000 |
   54 |    21 -          g |  2 |    2    2   95   95 |  1  1 |  14.556     -0.476  1.970 |     -5.657     13.412     -7.192    0.000 |
   55 |    21 -          g |  2 |    3    3   -1   -1 |  1  0 |   0.507     -0.113  2.250 |     -0.319      0.395     -0.057    0.000 |
   56 |     2 -          u |  2 |    2    2   -1   -1 |  1  0 |   5.306     -0.770  1.707 |     -0.718      5.257     -4.504    0.330 |
   57 |     1 -          d |  2 |    2    2   85   86 |  1  2 |  12.371     -0.322  0.457 |     11.101      5.460     -4.053    0.330 |
   58 |    21 -          g |  2 |    2    2   85   86 |  1  2 |   0.535     -0.976  0.090 |      0.533      0.048     -0.610   -0.000 |
   59 |    21 -          g |  2 |    2    2   85   86 |  1  2 |   3.598     -1.179  1.206 |      1.284      3.361     -5.295    0.000 |
   60 |    21 -          g |  2 |    2    2   85   86 |  1  2 |   2.277     -0.960  1.322 |      0.560      2.207     -2.538   -0.000 |
   61 |    21 -          g |  2 |    2    2   85   86 |  1  2 |   2.980     -0.847  1.522 |      0.146      2.977     -2.838   -0.000 |
   62 |    21 -          g |  2 |    2    2   85   86 |  1  2 |   3.649     -1.207  1.878 |     -1.103      3.478     -5.552    0.000 |
   63 |    21 -          g |  2 |    2    2   85   86 |  1  2 |   0.458     -0.238  2.954 |     -0.450      0.085     -0.110    0.000 |
   64 |    21 -          g |  2 |   11   11   85   86 |  1  2 |  11.127     -2.356 -0.212 |     10.879     -2.337    -58.168   -0.000 |
   65 |    21 -          g |  2 |   11   11   85   86 |  1  2 |  12.657     -2.312 -0.213 |     12.372     -2.670    -63.251   -0.000 |
   66 |    -5 -       bbar |  2 |   11   11   85   86 |  1  2 |  12.537     -1.888 -0.046 |     12.523     -0.579    -40.468    4.800 |
   67 |     1 -          d |  2 |    7    7   88   89 |  1  2 |   6.994     -0.180  2.718 |     -6.377      2.873     -1.265    0.330 |
   68 |    21 -          g |  2 |    1    1   88   89 |  1  2 |   6.574     -1.763 -0.210 |      6.429     -1.373    -18.592   -0.000 |
   69 |    -3 -       sbar |  2 |    7    7   -1   -1 |  1  0 |   8.024     -0.680  0.534 |      6.905      4.087     -5.884    0.500 |
   70 |    21 -          g |  2 |    2    2   -1   -1 |  1  0 |   0.424      7.160 -2.818 |     -0.402     -0.135    272.946    0.000 |
   71 |    21 -          g |  2 |    3    3   -1   -1 |  1  0 |   0.287      0.053 -0.860 |      0.188     -0.218      0.015   -0.000 |
   72 |    21 -          g |  2 |    3    3   -1   -1 |  1  0 |   0.466      1.983 -2.980 |     -0.460     -0.075      1.660    0.000 |
   73 |     3 -          s |  2 |    2    2   -1   -1 |  1  0 |  13.084      2.462 -0.197 |     12.832     -2.555     76.205    0.500 |
   74 |     4 -          c |  2 |   13   13   90   90 |  1  1 |  16.044     -1.351  0.881 |     10.209     12.377    -28.890    1.500 |
   75 |    21 -          g |  2 |   13   13   -1   -1 |  1  0 |   8.765     -2.255  1.979 |     -3.480      8.044    -41.341   -0.000 |
   76 |    21 -          g |  2 |   12   12   -1   -1 |  1  0 |   7.585     -2.555  2.149 |     -4.146      6.352    -48.521    0.000 |
   77 |    -3 -       sbar |  2 |   12   12   -1   -1 |  1  0 |  53.669     -2.495  2.189 |    -31.101     43.739   -323.109    0.500 |
   78 |    21 -          g |  2 |   13   13  105  105 |  1  1 |   7.124     -1.405  1.593 |     -0.161      7.122    -13.642    0.000 |
   79 |    21 -          g |  2 |    3    3   -1   -1 |  1  0 |   0.341     -3.445  0.215 |      0.333      0.073     -5.336    0.000 |
   80 |    21 -          g |  2 |    3    3   -1   -1 |  1  0 |   0.310     -3.943  2.188 |     -0.180      0.253     -8.001    0.000 |
   81 |  2212 -         p+ |  1 |    0   26   -1   -1 |  5  0 |   0.940      2.621 -1.144 |      0.389     -0.856      6.431    0.938 |
   82 |  2212 -         p+ |  1 |    0   27   -1   -1 |  4  0 |   0.745      7.218  1.960 |     -0.283      0.689    507.800    0.938 |
   83 |  2212 -         p+ |  1 |    1   41   -1   -1 | 16  0 |   2.661     -2.253  1.203 |      0.956      2.483    -12.525    0.938 |
   84 |  -523 -        B*- |  2 |    1   48   94   94 |  9  1 |  30.835     -3.611 -3.022 |    -30.614     -3.685   -570.300    5.325 |
   85 |  2212 -         p+ |  1 |    7   66   -1   -1 | 12  0 |   1.438     -2.459 -0.463 |      1.286     -0.642     -8.347    0.938 |
   86 | -5114 - Sigma*_bbar+ |  2 |    7   66   96   96 | 12  1 |  13.125     -1.951 -0.035 |     13.117     -0.465    -45.218    5.810 |
   87 |  2212 -         p+ |  1 |    0    2   -1   -1 |  3  0 |   2.586      2.625 -2.491 |     -2.057     -1.566     17.750    0.938 |
   88 |  2212 -         p+ |  1 |    1   68   -1   -1 |  4  0 |   0.679     -0.925 -2.926 |     -0.664     -0.145     -0.722    0.938 |
   89 |  2212 -         p+ |  1 |    1   68   -1   -1 |  4  0 |   1.068     -1.379 -1.683 |     -0.119     -1.062     -1.986    0.938 |
   90 |   423 -        D*0 |  2 |   13   74   97   97 |  2  1 |  12.180     -1.306  0.854 |      7.998      9.186    -20.836    2.007 |
   91 |  2212 -         p+ |  1 |    1   24   -1   -1 |  3  0 |   0.284     -0.112  3.041 |     -0.283      0.028     -0.032    0.938 |
   92 |  2212 -         p+ |  1 |    1   41   -1   -1 | 16  0 |   2.752     -3.409  0.136 |      2.726      0.373    -41.554    0.938 |
   93 |  2212 -         p+ |  1 |    1   48   -1   -1 |  9  0 |   0.932     -4.174  2.048 |     -0.428      0.827    -30.269    0.938 |
   94 |  -521 -         B- |  2 |   84   84  101  103 |  1  3 |  30.515     -3.612 -3.023 |    -30.300     -3.611   -564.875    5.279 |
   95 |   310 -       K_S0 |  1 |    2   54   -1   -1 |  7  0 |   1.464     -0.828  2.431 |     -1.110      0.955     -1.356    0.498 |
   96 | -5122 - Lambda_bbar0 |  2 |   86   86  104  104 |  1  1 |  12.759     -1.946 -0.041 |     12.748     -0.526    -43.757    5.641 |
   97 |   421 -         D0 |  2 |   90   90   -1   -1 |  1  0 |  11.658     -1.316  0.855 |      7.654      8.794    -20.179    1.865 |
   98 |    11 -         e- |  1 |    0   26   -1   -1 |  5  0 |   0.250      6.714 -2.041 |     -0.113     -0.223    102.836    0.001 |
   99 |   -11 -         e+ |  1 |    0   26   -1   -1 |  5  0 |   0.089      6.678 -1.952 |     -0.033     -0.083     35.422    0.001 |
  100 |   310 -       K_S0 |  1 |    1   41   -1   -1 | 16  0 |   1.585     -2.421  1.353 |      0.342      1.548     -8.857    0.498 |
  101 |   -12 -    nu_ebar |  1 |   94   94   -1   -1 |  1  0 |   0.495     -2.925 -3.043 |     -0.492     -0.048     -4.595    0.000 |
  102 |    11 -         e- |  1 |   94   94   -1   -1 |  1  0 |  13.845     -3.729 -2.964 |    -13.627     -2.445   -288.113    0.001 |
  103 |   421 -         D0 |  2 |   94   94   -1   -1 |  1  0 |  16.220     -3.514 -3.073 |    -16.181     -1.117   -272.167    1.865 |
  104 | -4122 - Lambda_cbar- |  2 |   96   96   -1   -1 |  1  0 |   9.616     -1.960  0.153 |      9.504      1.466    -33.457    2.285 |
  105 |   310 -       K_S0 |  1 |   13   78   -1   -1 |  2  0 |   2.680     -1.421  1.535 |      0.097      2.678     -5.228    0.498 |

The mother and daughter index ranges are correctly printed out after the fix.

@cmsbuild
Copy link
Contributor

A new Pull Request was created by @ferencek (Dinko Ferencek) for CMSSW_7_5_X.

GenParticlePruner: Added sorting of mother and daughter RefVectors

It involves the following packages:

PhysicsTools/HepMCCandAlgos

@cmsbuild, @vadler, @monttj can you please review it and eventually sign? Thanks.
You can sign-off by replying to this message having '+1' in the first line of your reply.
You can reject by replying to this message having '-1' in the first line of your reply.
If you are a L2 or a release manager you can ask for tests by saying 'please test' in the first line of a comment.
@Degano you are the release manager for this.
You can merge this pull request by typing 'merge' in the first line of your comment.

@ferencek
Copy link
Contributor Author

@monttj, can you please sign this one. Thanks.

@monttj
Copy link
Contributor

monttj commented Jun 24, 2015

@ferencek Could you point me which index ranges I am supposed to look?

@ferencek
Copy link
Contributor Author

For example, particle with idx 9 has 4 daughters between indices 47 and 48, which is clearly impossible. Similar case is particle with idx 11. Next, particles with idx 42 to 48 have their daughter index ranges reversed.

Similar problems also exist for mothers, e.g., particles with idx 83, 90, etc.

However, the total number of mothers and daughters is kept unchanged, as it should be.

@ferencek
Copy link
Contributor Author

In case it helps, here is a full diff.

3,5c3,5
<     0 |  2212 -         p+ |  3 |   -1   -1    2   87 |  0  7 |   0.000  29256.000  0.000 |      0.000      0.000   6500.000    0.938 |
<     1 |  2212 -         p+ |  3 |   -1   -1    3   68 |  0 15 |   0.000 -29256.000  0.000 |      0.000      0.000  -6500.000    0.938 |
<     2 |    21 -          g |  3 |    0    0    4   73 |  1 29 |   0.652      7.613  0.166 |      0.643      0.107    659.832    0.000 |
---
>     0 |  2212 -         p+ |  3 |   -1   -1    2   99 |  0  7 |   0.000  29256.000  0.000 |      0.000      0.000   6500.000    0.938 |
>     1 |  2212 -         p+ |  3 |   -1   -1    3  100 |  0 15 |   0.000 -29256.000  0.000 |      0.000      0.000  -6500.000    0.938 |
>     2 |    21 -          g |  3 |    0    0    4  100 |  1 29 |   0.652      7.613  0.166 |      0.643      0.107    659.832    0.000 |
10c10
<     7 |    -6 -       tbar |  3 |    4    5   10   69 |  2  8 | 242.396     -1.543 -1.365 |     49.615   -237.264   -541.042  174.839 |
---
>     7 |    -6 -       tbar |  3 |    4    5   10   89 |  2  8 | 242.396     -1.543 -1.365 |     49.615   -237.264   -541.042  174.839 |
12c12
<     9 |     5 -          b |  3 |    6    6   47   48 |  1  4 |  42.323     -3.607 -3.020 |    -42.012     -5.124   -779.089    4.800 |
---
>     9 |     5 -          b |  3 |    6    6   47   93 |  1  4 |  42.323     -3.607 -3.020 |    -42.012     -5.124   -779.089    4.800 |
14c14
<    11 |    -5 -       bbar |  3 |    7    7   64   66 |  1  5 |  39.588     -2.197 -0.126 |     39.275     -4.962   -175.882    4.800 |
---
>    11 |    -5 -       bbar |  3 |    7    7   64   86 |  1  5 |  39.588     -2.197 -0.126 |     39.275     -4.962   -175.882    4.800 |
16c16
<    13 |     4 -          c |  3 |    8    8   74   78 |  1  5 |  36.547     -1.309  1.184 |     13.797     33.843    -62.707    1.500 |
---
>    13 |     4 -          c |  3 |    8    8   74  105 |  1  5 |  36.547     -1.309  1.184 |     13.797     33.843    -62.707    1.500 |
28,29c28,29
<    25 |    21 -          g |  2 |    2    2   98   81 |  1  3 |   0.395      5.643 -0.206 |      0.387     -0.081     55.785   -0.000 |
<    26 |    21 -          g |  2 |    2    2   98   81 |  1  3 |   0.626      2.658 -0.397 |      0.578     -0.242      4.448    0.000 |
---
>    25 |    21 -          g |  2 |    2    2   81   99 |  1  3 |   0.395      5.643 -0.206 |      0.387     -0.081     55.785   -0.000 |
>    26 |    21 -          g |  2 |    2    2   81   99 |  1  3 |   0.626      2.658 -0.397 |      0.578     -0.242      4.448    0.000 |
31,51c31,51
<    28 |    21 -          g |  2 |    3    3   83   92 |  1  3 |   5.548     -2.150  1.324 |      1.353      5.381    -23.491    0.000 |
<    29 |    21 -          g |  2 |    3    3   83   92 |  1  3 |   7.704     -2.483  1.096 |      3.521      6.852    -45.802    0.000 |
<    30 |    21 -          g |  2 |    3    3   83   92 |  1  3 |   0.698     -2.400  0.979 |      0.390      0.580     -3.819    0.000 |
<    31 |    21 -          g |  2 |    3    3   83   92 |  1  3 |   0.914     -3.613  0.241 |      0.888      0.218    -16.936   -0.000 |
<    32 |    21 -          g |  2 |    3    3   83   92 |  1  3 |   2.443     -2.941  0.037 |      2.441      0.089    -23.055    0.000 |
<    33 |    21 -          g |  2 |    3    3   83   92 |  1  3 |   0.162     -2.748 -2.010 |     -0.069     -0.147     -1.260    0.000 |
<    34 |    21 -          g |  2 |    3    3   83   92 |  1  3 |   1.160     -3.091  0.494 |      1.022      0.550    -12.731    0.000 |
<    35 |    21 -          g |  2 |    3    3   83   92 |  1  3 |   9.511     -3.227  0.377 |      8.842      3.503   -119.722   -0.000 |
<    36 |    21 -          g |  2 |    3    3   83   92 |  1  3 |   3.674     -3.577  0.194 |      3.605      0.709    -65.680    0.000 |
<    37 |    21 -          g |  2 |    3    3   83   92 |  1  3 |   2.413     -3.405  0.387 |      2.235      0.910    -36.283    0.000 |
<    38 |    21 -          g |  2 |    3    3   83   92 |  1  3 |   0.345     -2.406 -0.730 |      0.257     -0.230     -1.898   -0.000 |
<    39 |    21 -          g |  2 |    3    3   83   92 |  1  3 |   5.455     -2.849 -0.734 |      4.052     -3.652    -46.951    0.000 |
<    40 |    21 -          g |  2 |    3    3   83   92 |  1  3 |   0.913     -3.298 -2.220 |     -0.552     -0.727    -12.337    0.000 |
<    41 |    21 -          g |  2 |    3    3   83   92 |  1  3 |   0.789     -2.247 -1.001 |      0.426     -0.664     -3.692    0.000 |
<    42 |    21 -          g |  2 |    3    3   93   84 |  1  2 |   5.043     -4.474  1.802 |     -1.157      4.909   -221.120   -0.000 |
<    43 |    21 -          g |  2 |    3    3   93   84 |  1  2 |   0.213     -4.963 -0.217 |      0.208     -0.046    -15.212    0.000 |
<    44 |    21 -          g |  2 |    3    3   93   84 |  1  2 |   5.692     -2.956  2.205 |     -3.371      4.587    -54.531    0.000 |
<    45 |    21 -          g |  2 |    3    3   93   84 |  1  2 |   0.817     -2.454  2.581 |     -0.692      0.434     -4.714   -0.000 |
<    46 |    21 -          g |  2 |    3    3   93   84 |  1  2 |   1.130     -2.298  2.166 |     -0.634      0.936     -5.571    0.000 |
<    47 |    21 -          g |  2 |    9    9   93   84 |  1  2 |   7.520     -3.377 -3.030 |     -7.473     -0.840   -109.973    0.000 |
<    48 |     5 -          b |  2 |    9    9   93   84 |  1  2 |  32.779     -3.652 -3.020 |    -32.535     -3.989   -631.280    4.800 |
---
>    28 |    21 -          g |  2 |    3    3   83  100 |  1  3 |   5.548     -2.150  1.324 |      1.353      5.381    -23.491    0.000 |
>    29 |    21 -          g |  2 |    3    3   83  100 |  1  3 |   7.704     -2.483  1.096 |      3.521      6.852    -45.802    0.000 |
>    30 |    21 -          g |  2 |    3    3   83  100 |  1  3 |   0.698     -2.400  0.979 |      0.390      0.580     -3.819    0.000 |
>    31 |    21 -          g |  2 |    3    3   83  100 |  1  3 |   0.914     -3.613  0.241 |      0.888      0.218    -16.936   -0.000 |
>    32 |    21 -          g |  2 |    3    3   83  100 |  1  3 |   2.443     -2.941  0.037 |      2.441      0.089    -23.055    0.000 |
>    33 |    21 -          g |  2 |    3    3   83  100 |  1  3 |   0.162     -2.748 -2.010 |     -0.069     -0.147     -1.260    0.000 |
>    34 |    21 -          g |  2 |    3    3   83  100 |  1  3 |   1.160     -3.091  0.494 |      1.022      0.550    -12.731    0.000 |
>    35 |    21 -          g |  2 |    3    3   83  100 |  1  3 |   9.511     -3.227  0.377 |      8.842      3.503   -119.722   -0.000 |
>    36 |    21 -          g |  2 |    3    3   83  100 |  1  3 |   3.674     -3.577  0.194 |      3.605      0.709    -65.680    0.000 |
>    37 |    21 -          g |  2 |    3    3   83  100 |  1  3 |   2.413     -3.405  0.387 |      2.235      0.910    -36.283    0.000 |
>    38 |    21 -          g |  2 |    3    3   83  100 |  1  3 |   0.345     -2.406 -0.730 |      0.257     -0.230     -1.898   -0.000 |
>    39 |    21 -          g |  2 |    3    3   83  100 |  1  3 |   5.455     -2.849 -0.734 |      4.052     -3.652    -46.951    0.000 |
>    40 |    21 -          g |  2 |    3    3   83  100 |  1  3 |   0.913     -3.298 -2.220 |     -0.552     -0.727    -12.337    0.000 |
>    41 |    21 -          g |  2 |    3    3   83  100 |  1  3 |   0.789     -2.247 -1.001 |      0.426     -0.664     -3.692    0.000 |
>    42 |    21 -          g |  2 |    3    3   84   93 |  1  2 |   5.043     -4.474  1.802 |     -1.157      4.909   -221.120   -0.000 |
>    43 |    21 -          g |  2 |    3    3   84   93 |  1  2 |   0.213     -4.963 -0.217 |      0.208     -0.046    -15.212    0.000 |
>    44 |    21 -          g |  2 |    3    3   84   93 |  1  2 |   5.692     -2.956  2.205 |     -3.371      4.587    -54.531    0.000 |
>    45 |    21 -          g |  2 |    3    3   84   93 |  1  2 |   0.817     -2.454  2.581 |     -0.692      0.434     -4.714   -0.000 |
>    46 |    21 -          g |  2 |    3    3   84   93 |  1  2 |   1.130     -2.298  2.166 |     -0.634      0.936     -5.571    0.000 |
>    47 |    21 -          g |  2 |    9    9   84   93 |  1  2 |   7.520     -3.377 -3.030 |     -7.473     -0.840   -109.973    0.000 |
>    48 |     5 -          b |  2 |    9    9   84   93 |  1  2 |  32.779     -3.652 -3.020 |    -32.535     -3.989   -631.280    4.800 |
84,86c84,86
<    81 |  2212 -         p+ |  1 |    0    2   -1   -1 |  5  0 |   0.940      2.621 -1.144 |      0.389     -0.856      6.431    0.938 |
<    82 |  2212 -         p+ |  1 |    0    2   -1   -1 |  4  0 |   0.745      7.218  1.960 |     -0.283      0.689    507.800    0.938 |
<    83 |  2212 -         p+ |  1 |    1    2   -1   -1 | 16  0 |   2.661     -2.253  1.203 |      0.956      2.483    -12.525    0.938 |
---
>    81 |  2212 -         p+ |  1 |    0   26   -1   -1 |  5  0 |   0.940      2.621 -1.144 |      0.389     -0.856      6.431    0.938 |
>    82 |  2212 -         p+ |  1 |    0   27   -1   -1 |  4  0 |   0.745      7.218  1.960 |     -0.283      0.689    507.800    0.938 |
>    83 |  2212 -         p+ |  1 |    1   41   -1   -1 | 16  0 |   2.661     -2.253  1.203 |      0.956      2.483    -12.525    0.938 |
88,95c88,95
<    85 |  2212 -         p+ |  1 |   57   66   -1   -1 | 12  0 |   1.438     -2.459 -0.463 |      1.286     -0.642     -8.347    0.938 |
<    86 | -5114 - Sigma*_bbar+ |  2 |   57   66   96   96 | 12  1 |  13.125     -1.951 -0.035 |     13.117     -0.465    -45.218    5.810 |
<    87 |  2212 -         p+ |  1 |    2    1   -1   -1 |  3  0 |   2.586      2.625 -2.491 |     -2.057     -1.566     17.750    0.938 |
<    88 |  2212 -         p+ |  1 |   67   68   -1   -1 |  4  0 |   0.679     -0.925 -2.926 |     -0.664     -0.145     -0.722    0.938 |
<    89 |  2212 -         p+ |  1 |   67   68   -1   -1 |  4  0 |   1.068     -1.379 -1.683 |     -0.119     -1.062     -1.986    0.938 |
<    90 |   423 -        D*0 |  2 |   74   13   97   97 |  2  1 |  12.180     -1.306  0.854 |      7.998      9.186    -20.836    2.007 |
<    91 |  2212 -         p+ |  1 |    2    1   -1   -1 |  3  0 |   0.284     -0.112  3.041 |     -0.283      0.028     -0.032    0.938 |
<    92 |  2212 -         p+ |  1 |    1    2   -1   -1 | 16  0 |   2.752     -3.409  0.136 |      2.726      0.373    -41.554    0.938 |
---
>    85 |  2212 -         p+ |  1 |    7   66   -1   -1 | 12  0 |   1.438     -2.459 -0.463 |      1.286     -0.642     -8.347    0.938 |
>    86 | -5114 - Sigma*_bbar+ |  2 |    7   66   96   96 | 12  1 |  13.125     -1.951 -0.035 |     13.117     -0.465    -45.218    5.810 |
>    87 |  2212 -         p+ |  1 |    0    2   -1   -1 |  3  0 |   2.586      2.625 -2.491 |     -2.057     -1.566     17.750    0.938 |
>    88 |  2212 -         p+ |  1 |    1   68   -1   -1 |  4  0 |   0.679     -0.925 -2.926 |     -0.664     -0.145     -0.722    0.938 |
>    89 |  2212 -         p+ |  1 |    1   68   -1   -1 |  4  0 |   1.068     -1.379 -1.683 |     -0.119     -1.062     -1.986    0.938 |
>    90 |   423 -        D*0 |  2 |   13   74   97   97 |  2  1 |  12.180     -1.306  0.854 |      7.998      9.186    -20.836    2.007 |
>    91 |  2212 -         p+ |  1 |    1   24   -1   -1 |  3  0 |   0.284     -0.112  3.041 |     -0.283      0.028     -0.032    0.938 |
>    92 |  2212 -         p+ |  1 |    1   41   -1   -1 | 16  0 |   2.752     -3.409  0.136 |      2.726      0.373    -41.554    0.938 |
101,103c101,103
<    98 |    11 -         e- |  1 |    0    2   -1   -1 |  5  0 |   0.250      6.714 -2.041 |     -0.113     -0.223    102.836    0.001 |
<    99 |   -11 -         e+ |  1 |    0    2   -1   -1 |  5  0 |   0.089      6.678 -1.952 |     -0.033     -0.083     35.422    0.001 |
<   100 |   310 -       K_S0 |  1 |    1    2   -1   -1 | 16  0 |   1.585     -2.421  1.353 |      0.342      1.548     -8.857    0.498 |
---
>    98 |    11 -         e- |  1 |    0   26   -1   -1 |  5  0 |   0.250      6.714 -2.041 |     -0.113     -0.223    102.836    0.001 |
>    99 |   -11 -         e+ |  1 |    0   26   -1   -1 |  5  0 |   0.089      6.678 -1.952 |     -0.033     -0.083     35.422    0.001 |
>   100 |   310 -       K_S0 |  1 |    1   41   -1   -1 | 16  0 |   1.585     -2.421  1.353 |      0.342      1.548     -8.857    0.498 |

@monttj
Copy link
Contributor

monttj commented Jun 25, 2015

+1
I see. Thank you for the examples.

@monttj
Copy link
Contributor

monttj commented Jun 25, 2015

@cmsbuild please test

@cmsbuild
Copy link
Contributor

The tests are being triggered in jenkins.

@cmsbuild
Copy link
Contributor

This pull request is fully signed and it will be integrated in one of the next CMSSW_7_5_X IBs once checked with relvals in the development release cycle of CMSSW or unless it breaks tests. This pull request requires discussion in the ORP meeting before it's merged. @davidlange6, @Degano, @smuzaffar

@cmsbuild
Copy link
Contributor

This pull request is fully signed and it will be integrated in one of the next CMSSW_7_5_X IBs once checked with relvals in the development release cycle of CMSSW (tests are also fine). This pull request requires discussion in the ORP meeting before it's merged. @davidlange6, @Degano, @smuzaffar

@davidlange6
Copy link
Contributor

+1

cmsbuild added a commit that referenced this pull request Jun 25, 2015
…rAndDaughterRefVectors_from-CMSSW_7_4_0

GenParticlePruner: Added sorting of mother and daughter RefVectors
@cmsbuild cmsbuild merged commit ad480db into cms-sw:CMSSW_7_5_X Jun 25, 2015
@ferencek ferencek deleted the PrunedGenParticles-SortedMotherAndDaughterRefVectors_from-CMSSW_7_4_0 branch June 25, 2015 19:03
@smuzaffar
Copy link
Contributor

@ferencek, may be the change in GenParticlePruner::getMotherKeys is causing two workflows (533.0 and 534.0) to crash (segmentation fault). Stack trace show

#0  0x00007ffff7c7f606 in edm::EventPrincipal::pidToBid (this=this@entry=0x7fffcff07710, pid=...) at /var/build/muz/y/CMSSW_7_6_X_2015-07-01-2300/src/FWCore/Framework/src/EventPrincipal.cc:222
#1  0x00007ffff7c7f8a3 in edm::EventPrincipal::getByProductID (this=0x7fffcff07710, pid=...) at /var/build/muz/y/CMSSW_7_6_X_2015-07-01-2300/src/FWCore/Framework/src/EventPrincipal.cc:266
#2  0x00007ffff7c7fbe8 in edm::EventPrincipal::getIt (this=<optimized out>, pid=...) at /var/build/muz/y/CMSSW_7_6_X_2015-07-01-2300/src/FWCore/Framework/src/EventPrincipal.cc:300
#3  0x00007ffff7f32b8b in edm::RefCore::tryToGetProductPtr (this=0x7fffff3ff450, type=..., prodGetter=<optimized out>) at /var/build/muz/y/CMSSW_7_6_X_2015-07-01-2300/src/DataFormats/Common/src/RefCore.cc:106
#4  0x00007fffd61ef78e in tryToGetProductWithCoreFromRef_<std::vector<reco::GenParticle> > (prodGetter=<optimized out>, ref=...) at /var/build/muz/y/CMSSW_7_6_X_2015-07-01-2300/src/DataFormats/Common/interface/RefCoreGet.h:90
#5  tryToGetProductWithCoreFromRef<std::vector<reco::GenParticle> > (prodGetter=<optimized out>, ref=...) at /var/build/muz/y/CMSSW_7_6_X_2015-07-01-2300/src/DataFormats/Common/interface/RefCoreGet.h:112
#6  getRefPtr_ (key=<optimized out>, product=...) at /var/build/muz/y/CMSSW_7_6_X_2015-07-01-2300/src/DataFormats/Common/interface/RefItemGet.h:67
#7  getRefPtr<std::vector<reco::GenParticle>, reco::GenParticle, edm::refhelper::FindUsingAdvance<std::vector<reco::GenParticle>, reco::GenParticle>, unsigned int> (iKey=<optimized out>, product=...) at /var/build/muz/y/CMSSW_7_6_X_2015-07-01-2300/src/DataFormats/Common/interface/RefItemGet.h:87
#8  operator-> (this=<optimized out>) at /var/build/muz/y/CMSSW_7_6_X_2015-07-01-2300/src/DataFormats/Common/interface/Ref.h:618
#9  GenParticlePruner::getMotherKeys (this=0x7fffff3ff3d0, moIndxs=..., mothers=...) at /var/build/muz/y/CMSSW_7_6_X_2015-07-01-2300/src/PhysicsTools/HepMCCandAlgos/plugins/GenParticlePruner.cc:303
#10 0x00007fffd61ef74b in GenParticlePruner::getMotherKeys (this=0x7fffff3ff3d0, moIndxs=..., mothers=...) at /var/build/muz/y/CMSSW_7_6_X_2015-07-01-2300/src/PhysicsTools/HepMCCandAlgos/plugins/GenParticlePruner.cc:305
#11 0x00007fffd61ef74b in GenParticlePruner::getMotherKeys (this=0x7fffff3ff3d0, moIndxs=..., mothers=...) at /var/build/muz/y/CMSSW_7_6_X_2015-07-01-2300/src/PhysicsTools/HepMCCandAlgos/plugins/GenParticlePruner.cc:305
#12 0x00007fffd61ef74b in GenParticlePruner::getMotherKeys (this=0x7fffff3ff3d0, moIndxs=..., mothers=...) at /var/build/muz/y/CMSSW_7_6_X_2015-07-01-2300/src/PhysicsTools/HepMCCandAlgos/plugins/GenParticlePruner.cc:305
#13 0x00007fffd61ef74b in GenParticlePruner::getMotherKeys (this=0x7fffff3ff3d0, moIndxs=..., mothers=...) at /var/build/muz/y/CMSSW_7_6_X_2015-07-01-2300/src/PhysicsTools/HepMCCandAlgos/plugins/GenParticlePruner.cc:305
#14 0x00007fffd61ef74b in GenParticlePruner::getMotherKeys (this=0x7fffff3ff3d0, moIndxs=..., mothers=...) at /var/build/muz/y/CMSSW_7_6_X_2015-07-01-2300/src/PhysicsTools/HepMCCandAlgos/plugins/GenParticlePruner.cc:305
#15 0x00007fffd61ef74b in GenParticlePruner::getMotherKeys (this=0x7fffff3ff3d0, moIndxs=..., mothers=...) at /var/build/muz/y/CMSSW_7_6_X_2015-07-01-2300/src/PhysicsTools/HepMCCandAlgos/plugins/GenParticlePruner.cc:305
#16 0x00007fffd61ef74b in GenParticlePruner::getMotherKeys (this=0x7fffff3ff3d0, moIndxs=..., mothers=...) at /var/build/muz/y/CMSSW_7_6_X_2015-07-01-2300/src/PhysicsTools/HepMCCandAlgos/plugins/GenParticlePruner.cc:305
#17 0x00007fffd61ef74b in GenParticlePruner::getMotherKeys (this=0x7fffff3ff3d0, moIndxs=..., mothers=...) at /var/build/muz/y/CMSSW_7_6_X_2015-07-01-2300/src/PhysicsTools/HepMCCandAlgos/plugins/GenParticlePruner.cc:305
.... and ~ 78000 calls from getMotherKeys

these workflows run fine in a release without this change e.g. CMSSW_7_6_X_2015-06-23-1100

@ferencek
Copy link
Contributor Author

ferencek commented Jul 2, 2015

@smuzaffar, I will take a look. Thank you for reporting the problem.

@ferencek
Copy link
Contributor Author

ferencek commented Jul 3, 2015

@smuzaffar, the problem should be fixed by #10028.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants