Hi corry fans
In the process of getting more ATLAS Strip stuff working, I noticed that clustering takes quite a while in runs with loads of noise.
To some extent I can trace that down to the objects being held by corryvreckan::Cluster being TRef, rather than actual corryvreckan::Pixel* - I am guessing that is to do with being able to read partially processed data from a root file, but still wondering - once a cluster has called upon the actual Pixel* object (by doing GetObject()), couldn’t it hold on to those Pixel* rather than repeatedly doing GetObject whenever the pixels are required? GetObject includes quite a few checks that should really only be run once. Clustering does repeated checks on all pixels within a cluster, comparing them to others, thus it repeatedly does GetObject()… with clusters of multiple “pixels” (10-20), this gets slow very quickly.
Another way out that which I am contemplating is not creating a corryvreckan::Cluster within ClusteringSpatial, before I have all the hits collated, i.e. gather hits first, then generate a new cluster and add, refactor isNeighbor to check a Pixel* with respect to std::vector<Pixel*>.
On another note, wondering whether to post an issue: SetSplit is only over set to true - if the order in which hits are processed ever observes a split hit before it finds the joining hit then the cluster is never “unsplit” (i.e. a cluster with hit locations 1, 3, 2 could be created as a split cluster, but when looking at it in an orderly fashion it isn’t)