ROOT waveDir

From MariachiWiki

Jason Immerman wrote a script (version 1.1 here) utilizing oscilloscope data that will deduce the direction of an incident shower front. Oscilloscope data, processed by a LabView script written by Dima Vavilov, displays for each fivefold coincidence event the corresponding pulse heights and relative times each detector is triggered, among other data.

Verifying and Correcting Data

The script has several functions for verifying this data, including plotting the pulse heights to check for anomalies and plotting the sum of times for detectors 1 and 3 versus 2 and 4, as these should be approximately equal for each event. In addition, the data is calibrated for uncertainties in time originating from the photomultiplier tubes in the detectors. The script suggests setting the average relative time that each detector is triggered to 0 so that the average shower is incident from above. Finally, in order to check the results for each event, the times each detector is triggered are derived from the angles of the normal vector to the shower front calculated by the program and a histogram of the differences between actual and expected times is drawn. Finally, a plot of the corresponding chi squares is created.

Using the Script

The script can be called using root by first navigating to the directory containing the source file and compiling the source file:

root[] .L waveDir.C+

Then one must first calibrate the detector times for the given data. This is done by calling the function calibration:

root[] calibration("data.txt)

Three plots will appear, each corresponding to a detector's relative trigger time with respect to the first detector. The mean of each plot should be zero, and thus if they are not then the data needs a correction. This is done by entering the mean value into the "props.txt" file (contained in the zip file above) under the corresponding "//time correction for d". In addition, this file should be edited to contain the information pertaining to the array being analyzed. To do this, open the "props.txt" file and change only the numbers, including the coordinates of each detector relative to detector 1 (at point 0,0) and the calibration times for each detector. Finally, the driver can be called using:

root[] waveDir("data.txt","props.txt")

To change the output, open the properties file "props.txt" and alter the desired lines, 1 for yes and a 0 for no.

The properties file "props.txt" format:

0,9.45				//x,y of d2
11.7,9.45			//x,y of d3
11.7,0				//x,y of d4
-1.93e-9			//time correction for d2
-6.58e-9			//time correction for d3
2.74e-9			//time correction for d4
1				//Plot cos(theta)
1				//Plot phi
0				//Plot sum of times
0				//Plot theta
0				//Plot pulse heights
0				//Plot corrected relative times
0 				//Plot predicted - actual times
0				//Plot chi square
1				//Plot hemisphere
1				//Plot red markers for hemisphere visualization assistance (hemisphere must be turned on)

Results

A linear least squares method is utilized to fit a plane to the overdetermined system. The results can be displayed several ways, but the defaults are a histogram of cos(theta), a histogram of phi (degrees) (both in spherical coordinates), and a three dimensional histogram containing the unit vectors. Due to the property of unit vectors, this plot shows the points corresponding to each normal vector displayed on a hemisphere, with the vectors being a single point connected to the origin. The red points are not data but rather positioned to help with the visualization of the hemisphere.