Skip to content

Commit 67417c3

Browse files
Optimise e+e- reconstruction (#76)
Optimised SoAs using StructArrays Using a StructArray approach to more easily access all of the necessary variables in compact form Documentation and formatting improved. Remove nx, ny, nz from EEJet
1 parent 5a02983 commit 67417c3

File tree

5 files changed

+229
-143
lines changed

5 files changed

+229
-143
lines changed

Project.toml

+2
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ LoopVectorization = "bdcacae8-1622-11e9-2a5c-532679323890"
1313
LorentzVectorHEP = "f612022c-142a-473f-8cfd-a09cf3793c6c"
1414
LorentzVectors = "3f54b04b-17fc-5cd4-9758-90c048d965e3"
1515
MuladdMacro = "46d2c3a1-f734-5fdb-9937-b9b9aeba4221"
16+
StructArrays = "09ab397b-f2b6-538f-b94a-2f83cf4a842a"
1617

1718
[weakdeps]
1819
Makie = "ee78f7c6-11fb-53f2-987a-cfe4a2b5a57a"
@@ -30,6 +31,7 @@ LorentzVectorHEP = "0.1.6"
3031
LorentzVectors = "0.4.3"
3132
Makie = "0.21"
3233
MuladdMacro = "0.2.4"
34+
StructArrays = "0.6.18"
3335
julia = "1.9"
3436

3537
[extras]

src/ClusterSequence.jl

+6-1
Original file line numberDiff line numberDiff line change
@@ -176,6 +176,8 @@ add_step_to_history!(clusterseq::ClusterSequence, parent1, parent2, jetp_index,
176176

177177
local_step = length(clusterseq.history)
178178

179+
# println("Adding step $local_step: parent1=$parent1, parent2=$parent2, jetp_index=$jetp_index, dij=$dij")
180+
179181
# Sanity check: make sure the particles have not already been recombined
180182
#
181183
# Note that good practice would make this an assert (since this is
@@ -184,7 +186,10 @@ add_step_to_history!(clusterseq::ClusterSequence, parent1, parent2, jetp_index,
184186
# retry the clustering with a different strategy.
185187
@assert parent1 >= 1
186188
if clusterseq.history[parent1].child != Invalid
187-
error("Internal error. Trying to recombine an object that has previsously been recombined.")
189+
error("Internal error. Trying to recombine an object that has previsously been recombined. Parent " *
190+
string(parent1) * "'s child index " *
191+
string(clusterseq.history[parent1].child) * ". Parent jet index: " *
192+
string(clusterseq.history[parent1].jetp_index) * ".")
188193
end
189194

190195
hist_elem = clusterseq.history[parent1]

0 commit comments

Comments
 (0)