Skip to content

podio-dump output of MCParticle table can be improved #920

@dudarboh

Description

@dudarboh

The current output of the MCParticles table from podio-dump -d is extremely hard to read compared to the formatting from dumpevent.

Here are things that can be improved:

  • header alignment with the columns content
  • column values formatting
  • simulatorStatus should print readable simulation flags [sbvtcls] instead of the integer encoding
  • id columns, and ids in "parents" and "daughters" columns should not contain an extra "a1cba250|+" string identical for all entries.
  • parents and daughters should be part of the table as separate columns rather than creating independent new lines.
    Side to side comparison:

Output from podio-dump -d

MCParticles
          id:         PDG:generatorStatus:simulatorStatus:      charge:        time:        mass:                   vertex [ x, y, z]:                 endpoint [ x, y, z]:                 momentum [ x, y, z]:       momentumAtEndpoint [ x, y, z]:    helicity:
a1cba250|+0          +11           +3           +0 -1.000000e+00 +0.000000e+00 +0.000000e+00 +0.000000e+00 +0.000000e+00 +0.000000e+00  +0.000000e+00 +0.000000e+00 +0.000000e+00  +0.000000e+00 +0.000000e+00 +4.550000e+01  +0.000000e+00 +0.000000e+00 +0.000000e+00            +0 
      parents : 
      daughters : a1cba250|+2 a1cba250|+3 
a1cba250|+1          -11           +3           +0 +1.000000e+00 +0.000000e+00 +0.000000e+00 +0.000000e+00 +0.000000e+00 +0.000000e+00  +0.000000e+00 +0.000000e+00 +0.000000e+00  +0.000000e+00 +0.000000e+00 -4.550000e+01  +0.000000e+00 +0.000000e+00 +0.000000e+00            +0 
      parents : 
      daughters : a1cba250|+2 a1cba250|+3 
a1cba250|+2           -3           +2           +0 +3.333333e-01 +0.000000e+00 +6.743496e-07 +0.000000e+00 +0.000000e+00 +0.000000e+00  +0.000000e+00 +0.000000e+00 +0.000000e+00  +2.625073e+01 +3.538229e+01 -1.136850e+01  +0.000000e+00 +0.000000e+00 +0.000000e+00            +0 
      parents : a1cba250|+0 a1cba250|+1 
      daughters : a1cba250|+4 
a1cba250|+3           +3           +2           +0 -3.333333e-01 +0.000000e+00 +6.743496e-07 +0.000000e+00 +0.000000e+00 +0.000000e+00  +0.000000e+00 +0.000000e+00 +0.000000e+00  -2.625073e+01 -3.538229e+01 +1.136850e+01  +0.000000e+00 +0.000000e+00 +0.000000e+00            +0 
      parents : a1cba250|+0 a1cba250|+1 
      daughters : a1cba250|+4 
a1cba250|+4          +94           +2           +0 +0.000000e+00 +0.000000e+00 +9.100000e+01 +0.000000e+00 +0.000000e+00 +0.000000e+00  +0.000000e+00 +0.000000e+00 +0.000000e+00  +0.000000e+00 +0.000000e+00 +0.000000e+00  +0.000000e+00 +0.000000e+00 +0.000000e+00            +0 
      parents : a1cba250|+2 a1cba250|+3 
      daughters : a1cba250|+5 a1cba250|+6 

// to highlight a simStatus difference

a1cba250|+24         +225           +2   +134217728 +0.000000e+00 +0.000000e+00 +1.265306e+00 +0.000000e+00 +0.000000e+00 +0.000000e+00  +9.753921e-309 +1.414426e-308 -2.289286e-309  +4.309140e+00 +6.248727e+00 -1.011373e+00  +4.309140e+00 +6.248727e+00 -1.011373e+00            +0 
      parents : a1cba250|+18 
      daughters : a1cba250|+42 a1cba250|+43 

Output from dumpevent:

--------------- print out of MCParticle collection --------------- 

  flag:  0x0
  simulator status bits: [sbvtcls]  s: created in simulation b: backscatter v: vertex is not endpoint of parent t: decayed in tracker c: decayed in calorimeter l: has left detector s: stopped o: overlay


[   id   ]index|      PDG |    px,     py,        pz    | px_ep,   py_ep , pz_ep      | energy  |gen|[simstat ]| vertex x,     y   ,   z     | endpoint x,    y  ,   z     |    mass |  charge |            spin             | colorflow | [parents] - [daughters]

[00012557]    0|        11| 0.00e+00, 0.00e+00, 4.55e+01| 0.00e+00, 0.00e+00, 0.00e+00| 4.55e+01| 3 |[        ]| 0.00e+00, 0.00e+00, 0.00e+00| 0.00e+00, 0.00e+00, 0.00e+00| 0.00e+00|-1.00e+00| 0.00e+00, 0.00e+00, 0.00e+00|  (0, 0)   | [] - [2,3] 
[00012558]    1|       -11| 0.00e+00, 0.00e+00,-4.55e+01| 0.00e+00, 0.00e+00, 0.00e+00| 4.55e+01| 3 |[        ]| 0.00e+00, 0.00e+00, 0.00e+00| 0.00e+00, 0.00e+00, 0.00e+00| 0.00e+00| 1.00e+00| 0.00e+00, 0.00e+00, 0.00e+00|  (0, 0)   | [] - [2,3] 
[00012559]    2|        -1| 2.97e+01,-3.11e+01, 1.49e+01| 0.00e+00, 0.00e+00, 0.00e+00| 4.55e+01| 2 |[        ]| 0.00e+00, 0.00e+00, 0.00e+00| 0.00e+00, 0.00e+00, 0.00e+00| 0.00e+00| 3.33e-01| 0.00e+00, 0.00e+00, 0.00e+00|  (0, 1)   | [0,1] - [4] 
[00012560]    3|         1|-2.97e+01, 3.11e+01,-1.49e+01| 0.00e+00, 0.00e+00, 0.00e+00| 4.55e+01| 2 |[        ]| 0.00e+00, 0.00e+00, 0.00e+00| 0.00e+00, 0.00e+00, 0.00e+00| 0.00e+00|-3.33e-01| 0.00e+00, 0.00e+00, 0.00e+00|  (1, 0)   | [0,1] - [4] 
[00012561]    4|        94| 0.00e+00, 0.00e+00, 0.00e+00| 0.00e+00, 0.00e+00, 0.00e+00| 9.10e+01| 2 |[        ]| 0.00e+00, 0.00e+00, 0.00e+00| 0.00e+00, 0.00e+00, 0.00e+00| 9.10e+01| 0.00e+00| 0.00e+00, 0.00e+00, 0.00e+00|  (0, 0)   | [2,3] - [5,6] 
[00012562]    5|        -1| 2.89e+01,-3.02e+01, 1.45e+01| 0.00e+00, 0.00e+00, 0.00e+00| 4.57e+01| 2 |[        ]| 0.00e+00, 0.00e+00, 0.00e+00| 0.00e+00, 0.00e+00, 0.00e+00| 1.16e+01| 3.33e-01| 0.00e+00, 0.00e+00, 0.00e+00|  (0, 500)   | [4] - [7,8] 

// to highlight a simStatus difference

[00012635]   78|        11| 1.83e-03,-1.70e-03,-1.40e-03|-0.00e+00, 0.00e+00,-0.00e+00| 2.91e-03| 0 |[s vt  s ]| 4.71e+02,-6.27e+02,-2.30e+03| 4.71e+02,-6.28e+02,-2.30e+03| 5.11e-04|-1.00e+00| 0.00e+00, 0.00e+00, 0.00e+00|  (0, 0)   | [72] - [] 

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions