Project Phys291

    I was originally planning to do an analysis of simulated data to see the energy deposition in pixel detectors. However this simulation tool got recently updated and no longer worked properly. I got in touch with the guy that had made the software and allthough I made it partially working again, the root-file output got corrupted every time I did the simulations. Because of this I decided to try to analyse data from a testbeam at CERN. This data, is in the form of a root file explained beneath. The data was taken during a testbeam at SPS CERN in september 2015. We were testing 3D pixel sensors arranged in a testbeam telescope ("telescope" consisting of many well alligned, and well calibrated sensors). we mounted a total of 5 sensors into the telescope, but I will constrain myself to four of them in this analysis, as the last one performed much below expected.

    The first task is to read in the data from the root file. The file structure can be seen by looking into the root file. This reading is done by a TTreeReader function which defines a tree and assign it to an address in the TFile. furthermore is a TTreeReaderValue used to define the branches in the forementioned tree. i.e:

    TTreeReader myTree("name_of_tree_in_file", pointer_to_TFile);

    TTreeReaderValue< variable_type_or_vector > name(myReader,"name_of_branch");

    next we iterate over all entries in a given tree, by the myReader.Next() command, which basically just iterates one entry at a time, in order to extract the leaves and append them into new vectors for plotting and data handling. However, this iteration together with the looping I have written seemed to be wrong. The fact that the hitmaps (which I will come back to) contained what seemed like too many entries hinted at something being read wrong. I then made a "dummy"Tree with clearly different values for the leafs so that I could distinguish them once plotted. This tree is called testTree.root, located under "data".

    The testTree actually showed that the reading was done in a correct order so then I was good to continue. I have plottet x- and y- distributions for data originating from both the fitpoints- and tracks - trees. With these plots I have done some alignment studies, which resulted in having to correct for some rotations and offsets, then i plottet x from tracks vs. x from fitpoint trees to verify that the corrections were correct. These plots should follow a diagonal line if the alignment is good, and so they do! however the alignment for the y-coordinates are decreasing in the opposite direction due to either the fitpoint- or the track-coordinated are mirrored with respect to each other. I then plottet hitmaps by plotting x vs. y coordinates in the respective trees, and binning these histograms to match the pixel size of the sensors. These hitmaps clearly showed any differences in the rotations and offsets of the sensors. Lastly I made an attempt to do an efficiencyplot by dividing one hitmap from the tracks tree with another from the fitpoints tree. This Worked out rather badly and is commented out in the code.

    conclusion and outlook:

    In this code a rootfile is read in, different trees have been assigned specific addresses within the tree. The data from each branch/tree is extracted and assigned to vectors. A simple alignment study have been performed and hitmaps were made. An efficiencyplot was attempted, but did not turn out great. The reason this efficiencyplot is so bad is kind of obvoius since it is based on the division of two hitmap plots that are very well aligned. For this efficiencyplot to give any reasonable information, I believe the next step would be to make cluster out of the data in the "rawdata" tree. This tree contains branches such as: -row,-col,-tot etc. which could be used to find a most probable hit based on the tot and cluster any secondary hits corresponding to this primary hit. This, however, deemed to demanding for the scope of this project.


Here is the scripts used for the analysis and the generation of the test tree:

Analysis script

Script for creating custom tree



Here you can download the data used for the project:

Testbeam data

Test tree data