Open noemina opened 3 years ago
Started the hough transformation. The formula I ended up using is:
The results (for one-particle files) are this:
I had some issues with seaborn and heatmaps, I will upload tomorrow the code with the requested plots.
I implemented both equations for the Hough transform (with/without sinus). We will take a look at the sinus first and then check the other.
Had some bugs in the code (wasn't using enough samples, and one '-' sign was missing). Now the correct plots looks like this:
By applying the Hough transform, we get the following hits per bin (small bin size):
Let's see if the estimated emittance angle is legit by checking the ground truth:
It's spot on! Regarding the heatmap, we can see that the bin-separation is not clearly visible. This is due to the small bin size. The reason I chose a small bin size was to get a more accurate emittance angle. If we run the pipeline again, using a bigger bin size (0.3, 0.3) we get:
which is way clearer at explaining which regions (bins) have more hits. Of course, this drops the accuracy of the predicted parameters:
This happens because phi is actually 1.016, hence it falls in the bin that covers points in the range 0.9 - 1.2
. We can easily deduct now that decreasing the bin size might give more accurate results (in some cases, like this one).
Now regarding the many-particle files, the Hough transform looks like a cluster of colored rubber bands:
The heatmap is this:
The "crowded" region is along the central horizontal line, which makes total sense according to the tracks in the Hough Space.
Now let's see the results when we simplify sin(x - phi) to x - phi:
For single-particle files:
For many particle files:
Turns out the heatmap didn't look bad because of the colors. The problem was that I wasn't "zooming in" in the RoI. I refactored the script so that now we can choose which range of values for q/p_T we want to zoom in: The new heatmaps are these:
using sin() in the formula:
single-particle
many-particles
simplifying sin(x) to (x) in the formula:
single-particle
many-particles
Regarding the efficiency of the 2 transformations pet p_T values: Initially I thought that I had to group the tracks per q/p_T values. This managed to waste quite some time as I wasn't getting very good results. Luckily, I later realized that I had to group the tracks per p_T values intead:
Makes sense that the same parameters (bin-size, least-number-of-hits-per-bin) won't give similar results, so I tried fine-tuning those parameters by hand a bit:
Still the results are nowhere near as good as with the sin().
One key takeaway though is that the sin() version had many duplicates. They can be avoided by finding a good bin size (which I didn't invest time in doing it).
Regarding the heatmap in the r-z plane, the tracks in the Hough space and the heatmap look like this:
Regarding the combination of the transformations, I thought of taking an intersection of sets: That is, pick the tracks that appear in both transformation along with the same tracks (again, in both transformations). This is ongoing.
Regarding fixing the transverse momentum issue:
First I did the count plots for 1 event:
Then I computed the counts for all the events (separately) and aggregated the results to get these counts per p_T and eta:
The efficiency looks like this:
Still, the results don't look as expected. I will have to do some more analysis to find out what's wrong, though I have gone through the code for hours over and over again.
Regarding the combination of the two approaches, I have finished it for one-particle events. I will complete it tomorrow for many-particle events and then I will push the code. For the evaluation, I will make a plot: efficiency vs x-y vs r-z vs combination, to see if it actually improves the results.
Also, I finally booked a ticket to Switzerland. I will be flying August 3 to Zurich. Then I will take a train to Geneva. I hope the city and the views are at least as entertaining as this one :D
Finally found the problem with the high pT tracks. I wasn't considering the whole range of values for the approximated transformation, which is (-π, π). I was considering only (0, π), which is a valid assumption for the precise transformation since the sinus() is a periodic and even function. Here are the results I get:
1 data file, 25 tracks:
all the data files:
They get closer as p_T gets higher.
This is great to see!!! All makes sense now :)
Give the results you get we can continue using the approximated transformation for this project.
[x] Define the transformation to move from the (x,y) parameter space to the (phi_0,q/p_T) feature space. A bit of math is posted below.
[x] Plot the tracks in the (phi_0,q/p_T) and produce the binned version of the accumulation histogram, where the crossing point can be evaluated.
About the efficiency plots: