Gain Time Dependence in FMS Cells

I have written some scripts that use RunDep.root (see that identifies FMS cells that have non-constant gain corrections. The scripts are to be executed in the root12fms directory.




This script creates gain correction plots for a specific cell number (currently one must change the cell number in the code). The gain correction plots are created for all the runs listed in RunDep.root. 9 plots are made and printed to a numbered pdf. After execution, the pdfs, called plot*.pdf, can be merged with a program such as gs. Note that this script will create only 3 pages of plots. There is a commented out for loop which can be uncommented so that the script will create plots for all the runs. 

Figure 1 shows en example of some plots for a good cell and Figure 2 shows an example of some plots for a cell with time-dependent gain corrections.


 FIGURE 1: Example of gain plots for a good cell


FIGURE 2: Example of gain plots for a bad cell 




This script returns the Chi2/NDF value for a certain cell and run number; this routine takes the cell number and run number as arguments as well as an instance of RunDepCor. This script is not intended to be run on its own - it is used by ledCell.C, as  explained below.





This script takes a run number as an argument; the output is a file called div.txt which contains the cell number together with the Chi2/NDF value for the contant fit to the gain correction plot for each cell in the FMS. The Chi2/NDF value can be used to determine if there are large fluctuations in the gain corrections. If the Chi2/NDF value for a particular cell is high, say above 7 for example, then that cell most likely has a time-dependent gain correction. This script also generates a text file called tdepcells.txt that lists all the cells that have a Chi2/NDF value greater than 7.

As an example, here are the output files for run 12081069:

 - div.txt

 - tdepcells.txt

Out of 1264 cells, 144 cells had time depenent gain corrections for this run; note that this information is for a rather subjectively placed cut of Chi2/NDF>7.




This script is an extension of ledCell.C in that it analyses all cells for all runs contained in RunDep.root. The output is six text files containing data tables of Chi2/NDF values; the rows are run numbers and the columns are cell numbers. Note that the rows are not sorted by run number. There are six text files to keep the size of the data tables somewhat reasonable; the organisation is described below:

 - led-table-1L.txt - NSTB=1, row<=16, all columns

 - led-table-1H.txt - NSTB=1, row>16, all columns

 - led-table-2L.txt - NSTB=2, row<=16, all columns

 - led-table-2H.txt - NSTB=2, row>16, all columns

 - led-table-3.txt - NSTB=3, all rows and columns

 - led-table-4.txt - NSTB=4, all rows and columns

After the analysis, the tables were imported into Microsoft Excel and the rows were sorted according to run number. Then conditional formatting was applied on the Chi2/NDF values according to the following:

 - Chi2/NDF < 3 - white

 - 3 < Chi2/NDF < 6.5 - green

 - 6.5 < Chi2/NDF < 10 - orange

 - 10 < Chi2/NDF - red

The Excel file is divided into six sheets, with labels correlating to the 6 text files (1L, 1H, 2L, 2H, 3, 4); note that it is a large Excel file (~11MB)

Here is the link:

The previous set of Excel files that I posted here contained duplicate run numbers - this new one does not.