Cosmic Data Analysis

From Hall A Wiki
Jump to: navigation, search

Motivation for Cosmic Ray Analysis

Cosmic rays provide a good proxy for high energy charged particles that will be found in Hall A during the time of experimentation. The robust nature of cosmic rays allow for vertical track testing at any point of the day/year, which makes them ideal for continuous testing/debugging methodology used in CDet.

DAQ Computer Access

The current computer setup for the DAQ is sbs2 which is located in the test lab, under the user adaq. it is recommended when setting up coda, to do so at the test lab setup, as remote ssh connections can be terminated periodically from the jlab host server.

To boot CODA (Data acquisition system)

1. Set the High voltage crates to On and Local

2. Login to sbs2 under user adaq

3 On CODA desktop

 - open terminal and type msqld
 - on a separate terminal, type starcoda
 - wait for the main CODA window to appear before changing desktops

4. Change to desktop ROC

 - open terminal, type telnet cdetts2 2006
 - once the telnet is connected, it will tell you there is an escape character (^[) just press enter ONCE
 - an "->" prompt will appear, type reboot
 - The terminal will say "callbackControl: Do not understand the command: Session/control/setSession"

5. Change Desktop to HV (high Voltage)

 - open terminal, ssh into highv@hvsrv3
 - change directory into slowc
 - type './hvs TEST
 - refer to High Voltage Control to operate.

Hall A Analyzer

After a completed CODA run, the raw data must be converted into a usable root file.

On the computer sbs2 under user adaq, in directory analyzer/replay

1. Type analyzer

ASCII text will appear that resembles the root startup.

2. To analyze a file, type .x setup.C

3. When prompted, type the event number that is displayed on the CODA window

4. The program will then ask you to type the amount of events you wish to analyze (for all events type -1)

The root file will be saved in the directory analyzer/replay/rootfiles

Root Analysis Script

Access directory "analyzer" which contains directories "replay" and "rootfiles". Directory "replay" contains script for writing raw data files into root files which are saved in directory "rootfiles". In directory "rootfiles" there is the plot.C script.

To run plot.C type commands:

cd rootfiles

root -l

.x plot.C(####)

The #### is the run number to analyse. All events analyzed using the hall a analyser and the setup.C script will load for analysis.

The script plot.C contains many pointer methods with descriptions and directions for running as follows. All pointer methods must be run after executing the plot.C script for the specified run number.

Plot ADC Fit

To run plot adc fit type command:

plot_adc_fit(#)

The # is the number of the scintillating bar (1-14) to analyse.

The pointer method plot_adc_fit plots a 4 by 4 canvas of histograms for each of the fourteen scintillating paddles within the selected scintillating bars. ADC cuts are placed on neighbouring paddles at less than value 10 amplitude to ensure that the data used for the selected paddle has a near perfectly vertical track through the paddle.

The method also fits the data after cuts are applied using a Gaussian fit. This allows for further analysis of parameters such as means, standard deviations, amplitudes, and total event values.

Another graph is also generated providing the mean ADC values for each of the fourteen scintillating paddles in the selected bar.

Plot ADC

To run plot adc type command:

plot_adc(#)

The # is the number of the scintillating bar (1-14) to analyse.

The pointer method plot_adc plots a 4 by 4 canvas of histograms for each of the fourteen scintillating paddles within the selected scintillating bars. Each histogram plots two graphs on top of each other showing the ADC spectrum with just TDC cuts and then also with ADC cuts used for the selected paddle.

Plot TDC

To run plot tdc type command:

plot_tdc(#)

The # is the number of the scintillating bar (1-14) to analyse.

The pointer method plot_tdc plots a 4 by 4 canvas of histograms for each of the fourteen scintillating paddles within the selected scintillating bars. The histograms plot the TDC spectrum for each of the fourteen scintillating paddles in the selected bar.

Plot TDC and ADC

To run plot tdc adc type command:

plot_tdc_adc(#)

The # is the number of the scintillating bar (1-14) to analyse.

The pointer method plot_tdc_adc plots a 4 by 4 canvas of histograms for each of the fourteen scintillating paddles within the selected scintillating bars. The histograms plot the TDC spectrum and ADC spectrum for each of the fourteen scintillating paddles in the selected bar.

Plot TDC Diff

To run plot tdc diff type command:

plot_tdc_diff(#)

The # is the number of the scintillating bar (1-14) to analyse.

The pointer method plot_tdc_diff plots a 4 by 4 canvas of histograms for each of the fourteen scintillating paddles within the selected scintillating bars. The histograms plot the difference between the TDC leading edge and the TDC trailing edge for each of the fourteen scintillating paddles in the selected bar.

Plot Occupancy

To run plot occupancy type command:

plot_occupancy()

The pointer method plot_occupancy plots a canvas containing three graphs. The main graph plots the occupancy for every channel for every scintillating paddle in the half detector set-up. This allows the user to see if certain channels are providing sufficient data. The lower left graph plots the multiplicity. The lower right graph plots a heat map for all channels in the half module set-up.

Plot Occupancy Single

To run plot occupancy single type command:

plot_occupancy_single(#)

The # is the number of the scintillating bar (1-14) to analyse.

The pointer method plot_occupancy_single plots a canvas containing graphs of the occupancy for every scintillating paddle in the selected bar. This allows the user to see if certain channels are providing sufficient data within the single selected bar.

Plot Ratio

To run plot ratio type command:

plot_ratio(#)

The # is the number of the scintillating bar (1-14) to analyse.

The pointer method plot_ratio plots a 4 by 4 canvas of histograms for each of the fourteen scintillating paddles within the selected scintillating bars. The histograms plot the quotient of the ADC spectrum with adjacent cuts and TDC cuts, and the ADC spectrum with only adjacent ADC cuts for each scintillating paddle in the selected bar. This command is useful when evaluating the TDC threshold (where the plot of the quotient is 50%).

Plot Mean Ratio

To run plot mean ratio type command:

plot_mean_ratio(#)

The # is the number of the scintillating bar (1-14) to analyse.

The pointer method plot_mean_ratio executes the same calculations as the plot_ratio pointer method, except the output is a single graph showing the channel positions of the TDC thresholds. This plot contains error bars showing the positions between 25%-75% quotient.

Plot Mean ADC

To run plot mean adc type command:

plot_mean_adc(#)

The # is the number of the scintillating bar (1-14) to analyse.

The pointer method plot_mean_adc plots a graph providing the ADC values with no ADC cuts and only good TDC cuts for each of the 14 scintillating paddles within the selected bar. A average of these ADC values is also provided in the graph.

Calibrate ADC

To run calibrate adc type command:

calibrate_adc(#)

The # is the number of the scintillating bar (1-14) to analyse

The pointer method plot_ratio plots a 4 by 4 canvas of histograms for each of the fourteen scintillating paddles within the selected scintillating bars. The adjustments shown in the histograms are used as a check to adjust the pedestal data so its centre is about 0, and corrects the pedestal if is is not centred about 0.

Crosstalk Analysis

Crosstalk is defined as ....

ADC Based Approach

The purpose of the crosstalk analysis is to determine what percentage of the data is coming from crosstalk events. Using the ADC data obtained from cosmic ray test runs, the percent crosstalk events in the data can be determined. This is done for each channel in the detector individually. The number of crosstalk events is determined by placing cuts that define a crosstalk event on the data for an individual channel and then taking that number over the total number of events.

                                      % Crosstalk = (number of crosstalk events)/(total number of events)

The first method looked dominantly at the ADC data obtained from the cosmic ray test runs as it relates to the orientation of the scintillating paddles in the detector. Three cuts were used to get the total number of events. First, the cosmic ray must only trigger an event in the scintillating paddle being analysed. This means that the cosmic ray must have an almost completely vertical track going through the scintillating bar. An adjacent ADC cut is placed on the scintillating paddles on either side of the paddle being analysed such that the ADC in the adjacent scintillating paddles are close to zero. Second, the TDC must be triggered by the cosmic ray event so we place a cut on the analysed (centre) paddle such that the TDC data has recorded a good event. Third, the ADC signal in the analysed (centre) paddle must be a good ADC value such that it is above a certain value used as a base line ADC cut.

The same cuts were used to get the number of crosstalk events, but a fourth cut was also added. A crosstalk event occurs when an event from the total number of events in the analysed paddle also triggers an event in the TDC data for another paddle. The fourth cut on the ADC was that the TDC in one or both of the adjacent paddles was triggered at the same time as an event in the analysed (centre) paddle. The number obtained from these four cuts was then placed over the number of events using just the first three cuts to get the number of crosstalk events over the total number of events for that individual paddle.

From this method the channels with the most amount of crosstalk occur with their adjacent paddles could be determined, but this still did not show how crosstalk from one channel relates to any channel in the whole group of fourteen scintillating paddles.

The second method also looked dominantly at the ADC data obtained from the comic ray test runs, but now it relates to the orientation of the pixels in the sixteen anode photomultiplier tubes (PMT). The same cuts were used to determine the number of total event, but the difference is in the fourth cut which determines the number of crosstalk event. A crosstalk event now occurs when an event from the total number of events in the analysed pixel also triggers an event in the TDC data for another pixel in the same PMT. The fourth cut on the ADC was that the TDC in another pixel was triggered at the same time as an event in the analysed pixel. The number obtained from the four cuts was then placed over the number of events obtained using just the first three cuts to get the number of crosstalk events over the total number of events for that individual paddle.

From this method the