Skip to content

Upgrade datamodel#8

Open
gpronost wants to merge 19 commits intomasterfrom
upgrade_datamodel
Open

Upgrade datamodel#8
gpronost wants to merge 19 commits intomasterfrom
upgrade_datamodel

Conversation

@gpronost
Copy link
Copy Markdown
Collaborator

This PR is a draft!

PR based on @LorenzoPerisse version, which should probably be merged first

PR goal is to upgrade the DataModel to use the last version from the private HK format. It's supposed to be the last update on github before pushing LEAF to the HK Gitlab, afterward the github LEAF version and the gitlab LEAF version may diverge.

This PR include:

  • Renaming file to use hk policies format: cpp/hpp extension
  • Removing reference to AstroAnalysis framework
  • Fix bugs in GNUmakefile
  • DataModel-lite is now the only DataModel available, script to build/extract DataModel from AstroAnalysis are removed. The HK DataModel will be loaded with the dedicated methods from HK Software in the upcoming gitlab version.

@gpronost gpronost marked this pull request as draft March 12, 2026 07:07
@gpronost
Copy link
Copy Markdown
Collaborator Author

gpronost commented Mar 27, 2026

Comparison: for the first 11 events in a 20k 5MeV e- simulation. Running on a single thread to allow comparison.

  • Before changes (@LorenzoPerisse branch, after minor update to be able to compile)
(X, Y, Z, T): (198.972, 205.242, 18.5097, 3.14862) NLL: 1108.64
(dX, dY, dZ): (0.984543, 0.00950118, -0.174886) NLL: -241.295
-----------------------------------------------------------------------------------------
(X, Y, Z, T): (152.478, 189.303, -66.0889, 2.49383) NLL: 1196.49
(dX, dY, dZ): (0.998413, 0.0491128, -0.0275489) NLL: -230.254
-----------------------------------------------------------------------------------------
(X, Y, Z, T): (55.4992, 234.67, 27.3437, -1.02108) NLL: 996.631
(dX, dY, dZ): (0.706048, -0.631101, -0.32126) NLL: -220.021
-----------------------------------------------------------------------------------------
(X, Y, Z, T): (1365.09, 573.773, 94.8001, 45.9262) NLL: 1259.77
(dX, dY, dZ): (0.993007, 0.115932, 0.0222876) NLL: -148.301
-----------------------------------------------------------------------------------------
(X, Y, Z, T): (78.7802, 207.771, -15.5541, 0.0748187) NLL: 1136.85
(dX, dY, dZ): (0.880488, 0.118981, 0.458896) NLL: -219.071
-----------------------------------------------------------------------------------------
(X, Y, Z, T): (115.312, 226.172, -79.3212, 1.86925) NLL: 1173.83
(dX, dY, dZ): (0.888263, 0.2354, -0.394431) NLL: -244.46
-----------------------------------------------------------------------------------------
(X, Y, Z, T): (308.66, 177.608, -94.7523, 8.68294) NLL: 1065.32
(dX, dY, dZ): (0.813731, -0.0999082, -0.572591) NLL: -234.887
-----------------------------------------------------------------------------------------
(X, Y, Z, T): (350.709, 121.962, -57.9954, 8.81455) NLL: 1254.41
(dX, dY, dZ): (0.966935, 0.0607541, -0.247679) NLL: -235.399
-----------------------------------------------------------------------------------------
(X, Y, Z, T): (159.79, 206.02, 64.2551, 2.67178) NLL: 1029.74
(dX, dY, dZ): (0.981713, 0.171293, -0.0830559) NLL: -256.893
-----------------------------------------------------------------------------------------
(X, Y, Z, T): (198.029, 178.569, -76.6889, 4.00393) NLL: 1161.13
(dX, dY, dZ): (0.981021, -0.181222, -0.0689725) NLL: -243.99
-----------------------------------------------------------------------------------------
(X, Y, Z, T): (424.538, 228.291, 9.73551, 12.2573) NLL: 1031.69
(dX, dY, dZ): (0.981418, 0.19179, -0.00597019) NLL: -264.246
  • After changes:
(X, Y, Z, T): (198.962, 205.225, 18.5148, 3.14793) NLL: 1108.64
(dX, dY, dZ, T): (0.982233, 0.00765911, -0.187511) NLL: -241.361
-----------------------------------------------------------------------------------------
(X, Y, Z, T): (152.444, 189.292, -66.1025, 2.49333) NLL: 1196.49
(dX, dY, dZ, T): (0.998413, 0.0491129, -0.0275489) NLL: -230.254
-----------------------------------------------------------------------------------------
(X, Y, Z, T): (55.505, 234.674, 27.3397, -1.02089) NLL: 996.631
(dX, dY, dZ, T): (0.706048, -0.631101, -0.32126) NLL: -220.021
-----------------------------------------------------------------------------------------
(X, Y, Z, T): (1365.07, 573.651, 94.9219, 45.924) NLL: 1259.77
(dX, dY, dZ, T): (0.992038, 0.125904, 0.00293499) NLL: -148.418
-----------------------------------------------------------------------------------------
(X, Y, Z, T): (78.7915, 207.771, -15.5526, 0.0748734) NLL: 1136.85
(dX, dY, dZ, T): (0.880482, 0.118977, 0.458908) NLL: -219.071
-----------------------------------------------------------------------------------------
(X, Y, Z, T): (115.306, 226.175, -79.3207, 1.86902) NLL: 1173.83
(dX, dY, dZ, T): (0.888263, 0.2354, -0.394431) NLL: -244.46
-----------------------------------------------------------------------------------------
(X, Y, Z, T): (308.703, 177.589, -94.7801, 8.68458) NLL: 1065.32
(dX, dY, dZ, T): (0.813731, -0.0999082, -0.572591) NLL: -234.887
-----------------------------------------------------------------------------------------
(X, Y, Z, T): (350.769, 121.935, -57.991, 8.81626) NLL: 1254.41
(dX, dY, dZ, T): (0.966935, 0.0607534, -0.247682) NLL: -235.399
-----------------------------------------------------------------------------------------
(X, Y, Z, T): (159.801, 206.019, 64.2592, 2.67191) NLL: 1029.74
(dX, dY, dZ, T): (0.981713, 0.171293, -0.0830559) NLL: -256.893
-----------------------------------------------------------------------------------------
(X, Y, Z, T): (198.021, 178.58, -76.692, 4.00393) NLL: 1161.13
(dX, dY, dZ, T): (0.981021, -0.181222, -0.0689725) NLL: -243.99
-----------------------------------------------------------------------------------------
(X, Y, Z, T): (424.537, 228.316, 9.73711, 12.2573) NLL: 1031.69
(dX, dY, dZ, T): (0.981418, 0.19179, -0.00597019) NLL: -264.246

Results are very close (within 0.01 cm difference for vertex, negligible different for direction and NLL.
Note that the new code is 2x faster too apparently. Now running over the full dataset to crosscheck, hoping to post plots this evening (will let the code running during the day)

@gpronost gpronost marked this pull request as ready for review March 27, 2026 20:06
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.

2 participants