QIE10 Chip Test
In order to study the different variables from the QIE10 chip test at Fermilab, this twiki explains how to use the code for plotting the different variables.
1. Get the code for plotting your histograms
After you are logged in a lpc machine please follow this instructions:
- This code will use pyROOT. Create a working area and set a CMSSW environment (e.g. CMSSW_5_3_16)
mkdir YOURWORKINGAREA
cd YOURWORKINGAREA
### If you are using csh shell
setenv SCRAM_ARCH slc6_amd64_gcc481
### If you are using Bash shell
export SCRAM_ARCH=slc6_amd64_gcc481
cmsrel CMSSW_7_3_0_pre1
cd CMSSW_7_3_0_pre1/src
cmsenv
- Get the code from
GitHub
:
git clone git@github.com:danielguerrero/QIE10.git
cd QIE10
2. Make the TH1F and TH2F plots
The script runPlotter.py will generate the plots that you want.This plotter can help you to make plots with these features:
- Plot the chip variables (TH1F )
- Add the label to the axis and title
- Number of bins
- Stats box showing: Mean, RMS, Entries, Overflow and Underflow
- Add a caption
- Plot the chip variables (TH2F)
- Compare two chip variables
- Add the label to the axis and title
- Number of bins
- Add a caption
- Generate a colz, scat plot by editing the code
The code will ask you what kind of plot you want like this:
Would you like to make TH1D plots (Yes/No)?
Would you like to add the cut bars to the plots (Yes/No)?
Would you like to make TH2D plots (Yes/No)?
In order to get your plots and add the labels that you want, you need to create some text files and write the information in columns as it is explained below:
1. qie10_histograms.txt: "Histogramname"
2. qie10_labels.txt: "LabelinXaxis
LabelinYaxis "
3. qie10_cuts.txt: "ValueLowCut
ValueHiCut ". Note: If you want to add some bars of the cuts from the chip, you have to create this text file.
4. qie10_bins.txt:"Nbins"
In the case of
TH2F plots you need also to create a text files:
5. qie10_2dhistograms.txt: "HistonameXaxis
HistonameYaxis"
After that, you just have to run the script over the ntuple in this way (file.root is the ntuple you get from the chip):
python runPlotter.py file.root
The output are some folders with the plots (you can edit the name of the folder in the code):
Here is some of examples of how your plots will look:
-
TH1F variable plot:
-
TH2F scatter plot
-
TH2F colz plot
3. Make Comparison Histogram
Let's say you want to compare chips based on cut on one of the variable (e.g. Volt_ref <0.39). The runPlottersplit.py can make the comparison with these features:
- A plot which will compare the shape of the distributions
- Add poisson errors
- Make a hatched band comparing plot in aiming to see if there is a correlation between the two groups (e.g. Volt_ref <0.39 and Volt_ref >0.39)
- Set labels and title
- Add a caption
In order to get your plots and add the labels that you want, you need to create some text files and write the information in columns as it is explained below:
1. qie10_histograms.txt: "Histogramname"
2. qie10_labels.txt: "LabelinXaxis
LabelinYaxis "
3. qie10_bins.txt:"Nbins"
After that, you just have to run the script over the ntuple in this way (file.root is the ntuple you get from the chip):
python runPlottersplit.py file.root
The output is folder with the plots (you can edit the name of the folder in the code): qie10splits
Here is an example of a plot using the plotter: