Project

General

Profile

MAROC Scaler test » History » Revision 10

Revision 9 (Bishnu Karki, 09/01/2020 02:56 PM) → Revision 10/11 (Bishnu Karki, 09/01/2020 02:56 PM)

h1. MAROC Scaler Data Analysis test 

 h2. How to run the    scripts   
 # *Scripts are currently located under the following directories in solid@tunl11* 
 #    Scripts is located at "/home/clasrun/rich/suite1.0/sw/ana/ped" 
 # library is located at "/home/clasrun/rich/suite1.0/sw/ana/lib" 
 # The output files are at "/home/clasrun/rich/suite1.0/results/scalers" 
 #    The main library is created by compiling the code "rich.C" 
 # The script "recoPed.sh" take the input file and a integer number (0 or 1) 
   >> 0 is for pedestal run 
   >> 1 is for dark current run 

 h2. Example to run the code ./recoped.sh filename 0 

 h2. It runs the following scripts" 


 # "*richDoHistoCount.C*">>    It runs the function doHistoCount () in rich.C 
 *Output:* 
 1) stat.txt >> It gives the mean, rms of the pedestal in entire range 
 2) dead.txt >> Channel having the count less than 1 
 3) noisy.txt >> Noisty channels. Channel with RMS>=4 
 4) hot.txt >> channel with rate greater than 10 kHz 

 5) rate.txt >>Dark current rate for individual channel between 300-500 
 6) chip.txt >> mean and rms of pedestal for each pmt (average of all pixel within same pmt) 
 7) chiprate.txt >> mean and rms of dark current (average of all pixel within same pmt) 

 8) histo.root >> hCount[channel]-> Rate at different threshold 
               >> hRate[channel]->    Dark current rate in region between 300-500 
               >> hShoulder[channel]-> Dark current rate from Threshold to threshold +25 unts 


 # "*richPlot.C*" >> runs the function plot ( 1 , datatype) from rich.C 
  >> datatype = 0 (pedestal) or 1 (dark current) 
 *Output:* 
 1) range.txt >> mean, rms of the pedestal fitting the histogram with guassian in narrow range. It also gives the maximum value of Threshold (DAC unit) which has rate >1. That is the end of tail of histogram hCount. For dark current range is take between (150,650) while for pedestal its in between 170,220) 

 2) "largePedestals.txt" >> if the mean pedestal + 10*sigma > Threshold pedestal. Then that channel is flagged as large pedestal and written in file. 

 3) "slope.txt" >> slope at 5 different point above pedestal. Basically its measure of flucatation of of dark current above threshold. 

  >> how is slope determinded 
  5 point (Threshold +25 , Threshold +50,Threshold +100 , Threshold +200,Threshold +400) are picked 
  Then Dark current rate at each point is computed (average of 7 points in step of 3.5 DAC units) 

 4) plot.pdf >> Its the fit to the pedestal with guassian in narrow range around the peak 

 #####################      KEY NOTE      ########################### 
 Key note "range.txt" is the output with guassian fit but "stat.txt" contains same information without fitting but taking values from direclty histogram (for example h->GetMean() in case of "stat.txt"). So "stat.txt" is only good when pedestal is very high. 



 # "*richDisplayCount.C*" >> display2(filename, opt, ymin,ymax) from "rich.C" 
 filename is the name of file used to draw information 
 opt: is 0 (pedestal) or 1 (dark current) 
 ymax, ymin >> range to draw plot 

 *Output:* 
 1) display1.pdf >> plot1 >> xpixel:ypixel:pedestal_mean (using "stat.txt") 
                 >> plot2 >> 1D histogram of pedestal mean value 
		 >> plot3 >> mean pedestal for different channel within same PMT (for all PMT) 


 2) display2.pdf >> plot1 >> xpixel:ypixel:pedestal_rms (using "stat.txt") 
                 >> plot2 >> 1D histogram of pedestal rms value 
		 >> plot3 >> rms value of pedestal    pedestal for different channel within same PMT (for all PMT) 

 3) display3.pdf >> Equivalent to display1.pdf but using the file "range.txt" (which are extracted by fitting histogram in narrow rangel") 
 4) display4.pdf >> Equivalen to display2.pdf but using "rangle.txt" (fitted information) 

 5) display11.pdf >> plot1 >> xpixel:ypixel:Mean of Dark Current rate    between 300 -500 (using "range.txt") 
   		  >>plot2 >> 1D histogram of Mean of Dark Current for all 960 channel 
   	     	  >> plot3>> Mean of Dark current of different    pixel within a    PMT 

 6)    display12.pdf >> plot1 >> xpixel:ypixel:RMS of Dark Current rate    between 300 -500 (using "range.txt") 
   		  >>plot2 >> 1D histogram of RMS of Dark Current for all 960 channel 
   	     	  >> plot3>> RMS    Dark current of different    pixel within a    PMT 

 7)    display15.pdf >> plot1 >> xpixel:ypixel:RMS/mean of Dark Current rate    between 300 -500 (using "range.txt") 
   		  >>plot2 >> 1D histogram of RMS/mean of Dark Current for all 960 channel 
   	     	  >> plot3>> RMS/mean    Dark current of different    pixel within a    PMT 


 8)    display16.pdf >> plot1 >> xpixel:ypixel:RMS/sqrt(mean) of Dark Current rate    between 300 -500 (using "range.txt") 
   		  >>plot2 >> 1D histogram of RMS/sqrt(mean) of Dark Current for all 960 channel 
   	     	  >> plot3>> RMS/sqrt(mean)    Dark current of different    pixel within a    PMT 


 #"*richDisplayScan.C*">> call a function display3 from "rich.C" 
 * 
 Output:* 
 scan.pdf >> 1D and 2D plot are generated for each value of threshold between 200-300 
          >> Dark current is evaluated from 200 to next 300 in step of 1( for example dark current at 200, 201 202 ...) 

 >> 2D histo >> xpixel:ypixel:Dark Current 
          >> 1D histogram>> Dark current for given threshold ( for eg reading first plot : xaxis is dark current , most of the channel have dark current around 100. Y axis is count of number of channel have particular value of dark current 


 # "doAnalysis.C" >> invokes the function doAnalysis( dark current run) or doPedestalAnalysis( pedestal run) from "rich.C" 

 *output:* 
 1) ShowLargePedestal() >> largePedestals.pdf (if mean+10*sigma >Threshold) Then its large pedestal 
 2) DisplaySlopes()    >> 1) slopeDisplay.pdf >> slope of dark current at 4 different points above threshold 
   		     >> 2) slopeDisplay2.pdf>> slope of dark current of each pixel within a pmt. Red are slope with negative slope while blue a 				 re +ve slope. Though in plot its plots the absolute value 
		    
                     >> slopeHigh.txt >> if slope< -2 
		    
		     >> slopeVeryHigh.txt >>    if slope < -10 

 3)    DisplayRange() >> SPErange.pdf >> plot1 >> Maximum value if DAC unit (threshold) with count/rate>0 
                       or last point of x-axis of hCount histogram. 
		                    >> plot2 >> Maximum value of DAC unit with count>0, for different pixels in same pmt 
				    >> plot3>>    pedestal mean with file "range.txt" i.e fitted value 
				    >> plot4 >> mean    of the pedestal for each pixel in same pmt 
				    >> plot5>> RMS of the pedestal    with file "range.txt" i.e fitted value 
				    >> plot6 >> RMS    of the pedestal for each pixel in same pmt 

 4) DisplayRate() >> rate.pdf >> plot1 >> distribution of    Dark current rate (between 300 -500) for NPIXEL*NPMT 
                              >> plot2 >> distribution of RMS of dark current (300-500) 
			      >> plot3>> distribution of RMS/Mean 
			      >> plot4>> Dark current rate mean for all pixel within same pmt 
			      >> plot5 >> Dark current RMS for all pixel within same PMT 
 		              >> Plot6 >> Dark current RMS/Mean for all pixel within same pmt 
			      >> plot7 >> Dark current mean shoulder ( from Threshold + 25 )/ Dark current mean 
			      >> plot7 >>    RMS Dark current shoulder ( from Threshold + 25 )/ Dark current RMS 
			      >> plot8 >> Mean Dark current shoulder ( from Threshold + 25 )/ Dark current mean for different pixel within same PMT 
			      >>plot9 >> RMS Dark current shoulder ( from Threshold + 25 )/ RMS Dark current for different pixel within same pmt 

 5) DisplayRatePMT() >> ratePMT.pdf >>plot1>> Mean Dark current rate for every PMT ("chiprate.pdf", dark current 300-500) average of 64 pixel 
   		       		    >>plot2>> RMS Dark current rate for every PMT ("chiprate.pdf", dark current 300-500) average of 64 pixel 
				   >> plot3>> RMS/Mean of Dark current rate for every PMT ("chiprate.pdf", dark current 300-500) average of 64 pixe 

 6) DisplayHotPixels()     >> hot.pdf >> pixels with dark current rate larger than 10 kHz 

 7) showThresholds() >> rateorderedRatio.txt >>Prints the slot, fiber, pmt,pixel, and (ShoulderMean/Mean) Dark Current if its greater than 2. In case of no cross-talk (ShoulderMean/Mean) Dark Current is ==1 . In other words shows possible cross-talk candidates. 




 h1. Comparision between the pedestal or RMS between two runs at two different run period 
 # Script is located at "/home/clasrun/rich/suite1.0/sw/ana/ped/comparePed.sh" in (solid@tunl11 machine) 
 # Input of the script are the two directories where the pedestal files (""stat.txt) are located 
 # compiles the script "richStability.C" from    "/home/clasrun/rich/suite1.0/sw/ana/lib/" 
 # Example of compilation: ./comparePed.sh <directory1> <directory2> 
 # Output goes to directory "/home/clasrun/rich/suite1.0/results/scalers". Inside the folder "ped-<directory1>-<directory2>" 
 # Contains the pdf file showing the comparsion of pedestals and rms between two runs