Skip to content

add post-scaling to HLT1 lines

Daniel Charles Craik requested to merge dcraik-postscale into master

This is a rough first version of a post-scaling algorithm, parallelised across events. As we currently don't have the ODIN banks, the post-scale hash is currently being calculated with run number, event number and GPS time all zero for every event (so all events will either pass or fail for a given line).

One difference from the CPU version of the hashing is that our initial_value is based on the numeric value of each line in Hlt1::Hlt1Lines rather than a name std::string (because we can't have std::strings in device code) - we need to double-check that using consecutive numbers doesn't introduce any correlations between lines for the same event.

Another difference is that I skip calculating the hash for events where the post-scale is set to 1 and just keep the event. If I'm reading it correctly then even a pre-scale of 1 should reject 1 in 2^32 events in the CPU version (but I don't see why this would be desirable).

I've run some quick tests with post-scales of 1. and 0. and the results look reasonable.

Aside from adding the real ODIN bank, I think the other main outstanding task is to make the post-scale values configurable. I'm also not sure if the algorithm needs to change anything else besides the various decision arrays - this is the same as RunHlt1 outputs so I think it's OK.

Postscaling is now working as intended for binary inputs (provided ODIN binaries are provided). For CI to run, these need to be added to the CI datasets (I've attached a quick python script that creates dummy ODIN banks to match all of the files in the VP directory).makeODIN.py

I quickly tested scaling the two tracks line by 0., 0.5 and 1. and got total rates of 14/1000, 20/1000 and 33/1000, which seem reasonable.

Edited by Daniel Charles Craik

Merge request reports