NOTE!!! PLEASE DO NOT USE THE SCRATCH WEBSITE!!! INSTEAD, USE TURBOWARP AS IT IS MUCH FASTER. WITHOUT TURBOWARP LARGE DATA WILL TAKE FOREVER (like 15s with) https://turbowarp.org/1167473539 To use, press Import Data and paste in your X Y Z separated data. At the bottom of Notes and Credits will be the full data (parsed) linked if you want to copy and paste it. Then just press enter. This will take a bit since a few (estimated) hundred thousand string/array operations need to be performed due to the nature of scratch not having nested arrays and string operations. Starting the Mass Finder: To start, simply press the red Find Masses button and it will begin. This should be very fast. Displaying Data: Press Generate Histogram to generate the histogram. From the histogram panel you can toggle the extra values and change the scaling and such of the graph.
Explanation: After obtaining all the event data, we want to iter over each event and for every combonation of two leptons with equal charge in said event we find their invarient mass. We then add that mass to a list so we can use it later. While it has a very simple premise this was quite difficult to figure out at first. normally one would use nested lists, struct, or class to manage the data but here we have none. Instead I created my own encoding system. we take each of the data pieces from the lepton and put it into one string, each data seperated by an X. we then combine the leptons to an event in a similar manner with a Y instead. To later seperate these, I created a helper method to split a string by a character and also a substring method. Finally I added the formula for the invariate mass with a parser for the values when input as strings. Working now. TODO: list encoding of input - done substring and splitStringBy methods - done rewrite list encoding into splitString encoding because scratch doesn't have nested loops - done add invariate mass calculator - done combine process - done outward import - todo Doubly Charged Higgs Boson Invariant Mass FInder in Ideal Data - SIR Project #1 Essentially rewriting a rust program i made for scratch, for fun Because of scratch rules you can't paste the full pastebin link, but here is the URL ending: UJHvKSwj