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

add optional track output scheme #181

Merged
merged 2 commits into from
Dec 9, 2024
Merged

Conversation

ManuelHu
Copy link
Collaborator

@ManuelHu ManuelHu commented Dec 7, 2024

fixes #178

@ManuelHu
Copy link
Collaborator Author

ManuelHu commented Dec 7, 2024

example output:

evtid  trackid  parent_trackid  procid   particle  ...          zloc          px          py          pz     ekin
     0        1               0      -1 1000902280  ...  0.000000e+00   -0.000000    0.000000    0.000000 0.000000
     0        3               1       0 1000020040  ...  0.000000e+00  132.287874 -103.651817  110.515499 5.423120
     0        2               1       0 1000882240  ...  0.000000e+00 -132.287874  103.651817 -110.515499 0.096960
     0        5               2       0 1000020040  ... -4.594312e-09  174.504082 -103.121849   36.461075 5.685346
     0        4               2       0 1000862200  ... -4.594312e-09 -174.504082  103.121849  -36.461075 0.103504
   ...      ...             ...     ...        ...  ...           ...         ...         ...         ...      ...
     9       75              72       2         11  ... -1.152096e-01   -0.033582    0.063979   -1.016347 0.628870
     9       74              72       2         11  ... -9.015364e-02   -0.011724   -0.006307    0.006917 0.000220
     9       73              72       2         11  ... -9.015364e-02    1.284836    1.433781   -0.443888 1.529758
     9       88              73       4         11  ... -9.232236e-02   -0.088711   -0.289352    0.211443 0.119415
     9       71              42       0 1000822080  ... -1.577275e-08   -1.693407   -1.387681    1.429109 0.000018

with attrs['time']={'units': 'ns'}
with attrs['xloc']={'units': 'm'}
with attrs['yloc']={'units': 'm'}
with attrs['zloc']={'units': 'm'}
with attrs['px']={'units': 'MeV'}
with attrs['py']={'units': 'MeV'}
with attrs['pz']={'units': 'MeV'}
with attrs['ekin']={'units': 'MeV'}
 procid               name
      0 b'Radioactivation'
      2           b'compt'
      3           b'eBrem'
      4           b'eIoni'
      1            b'phot'

important note: to read the output as LH5, you will need legend-exp/legend-pydataobj#124

@ManuelHu ManuelHu force-pushed the output-tracks branch 2 times, most recently from 4393411 to adb2b36 Compare December 8, 2024 09:49
@ManuelHu ManuelHu marked this pull request as ready for review December 8, 2024 09:57
@ManuelHu ManuelHu force-pushed the output-tracks branch 2 times, most recently from 7d27b7f to 6a5abe8 Compare December 9, 2024 00:01
@ManuelHu ManuelHu merged commit 9c14b2e into legend-exp:main Dec 9, 2024
6 checks passed
@ManuelHu ManuelHu deleted the output-tracks branch December 9, 2024 10:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

New output table to store track vertex information
1 participant