/search.css" rel="stylesheet" type="text/css"/> /search.js">
| Classes | Job Modules | Data Objects | Services | Algorithms | Tools | Packages | Directories | Tracs |

In This Package:

Public Member Functions | Public Attributes
DataQuality::AdViewer::AdViewer Class Reference

List of all members.

Public Member Functions

def __init__
def drawPlots
def drawCoincidence

Public Attributes

 canvases
 files

Detailed Description

Display output plots in ROOT

Definition at line 3 of file AdViewer.py.


Constructor & Destructor Documentation

def DataQuality::AdViewer::AdViewer::__init__ (   self)

Definition at line 7 of file AdViewer.py.

00008                       :
00009         self.canvases = []
00010         self.files = []


Member Function Documentation

def DataQuality::AdViewer::AdViewer::drawPlots (   self,
  filename 
)

Definition at line 11 of file AdViewer.py.

00012                                 :
00013         from ROOT import TFile, TCanvas, TH1F, TH2F, gStyle
00014         # set some style info
00015         gStyle.SetPalette(1)
00016         
00017         # Open the file
00018         plotFile = TFile(filename)
00019         if not plotFile.IsOpen():
00020             print "drawPlots: Can't open file ",filename
00021         self.files.append(plotFile)
00022         path = "adplotter/DayaBayAD1/"
00023         
00024         # Draw hit pmts
00025         hitPmts = plotFile.Get(path+"DayaBayAD1_HitPmts")
00026         c1 = TCanvas("c1")
00027         hitPmts.Draw()
00028         self.canvases.append(c1)
00029         # Draw time between readouts
00030         dtReadout = plotFile.Get(path+"DayaBayAD1_DtReadout")
00031         c2 = TCanvas("c2")
00032         dtReadout.Draw()
00033         self.canvases.append(c2)
00034         # Close-up of short times between readouts
00035         dtReadoutShort = plotFile.Get(path+"DayaBayAD1_DtReadoutShort")
00036         c3 = TCanvas("c3")
00037         dtReadoutShort.Draw()
00038         self.canvases.append(c3)
00039         # ADC values from all channels
00040         adc = plotFile.Get(path+"DayaBayAD1_AdcSpectrum")
00041         c4 = TCanvas("c4")
00042         adc.Draw()
00043         self.canvases.append(c4)
00044         # TDC values from all channels
00045         tdc = plotFile.Get(path+"DayaBayAD1_TdcSpectrum")
00046         c5 = TCanvas("c5")
00047         tdc.Draw()
00048         self.canvases.append(c5)
00049         # Sum of all adc charge in each readout
00050         chargeSum = plotFile.Get(path+"DayaBayAD1_ChargeSum")
00051         c6 = TCanvas("c6")
00052         chargeSum.Draw()
00053         self.canvases.append(c6)
00054         # PMTs hit vs. total charge
00055         hitVsCharge = plotFile.Get(path+"DayaBayAD1_HitPmtVsChargeSum")
00056         c7 = TCanvas("c7")
00057         hitVsCharge.Draw("colz")
00058         self.canvases.append(c7)
00059         # Position of generated vertex
00060         vertexZRho = plotFile.Get(path+"DayaBayAD1_GenVertexZRho")
00061         c8 = TCanvas("c8")
00062         vertexZRho.Draw("colz")
00063         self.canvases.append(c8)
00064         return

def DataQuality::AdViewer::AdViewer::drawCoincidence (   self,
  filename 
)

Definition at line 65 of file AdViewer.py.

00066                                       :
00067         from ROOT import TFile, TCanvas, TH1F, TH2F, gStyle, TLine
00068         # set some style info
00069         gStyle.SetPalette(1)
00070         
00071         # Open the file
00072         plotFile = TFile(filename)
00073         if not plotFile.IsOpen():
00074             print "drawCoincidence: Can't open file ",filename
00075         self.files.append(plotFile)
00076         path = "adplotter/DayaBayAD1/"
00077         
00078         # Sum of all adc charge in each readout
00079         chargeSum = plotFile.Get(path+"DayaBayAD1_ChargeSum")
00080         c1 = TCanvas("c1")
00081         chargeSum.SetTitle("AD charge singles spectrum for DayaBayAD1")
00082         chargeSum.Draw()
00083         self.canvases.append(c1)
00084         
00085         # Draw neutron capture time
00086         dtNeutron = plotFile.Get(path+"DayaBayAD1_DtNeutronCapture")
00087         c2 = TCanvas("c2")
00088         dtNeutron.Draw()
00089         dtNeutron.Fit("expo","LL")
00090         self.canvases.append(c2)
00091 
00092         # Draw prompt spectrum
00093         promptE = plotFile.Get(path+"DayaBayAD1_PromptEnergy")
00094         c3 = TCanvas("c3")
00095         promptE.Draw()
00096         self.canvases.append(c3)
00097 
00098         # Draw delayed spectrum
00099         delayedE = plotFile.Get(path+"DayaBayAD1_DelayedEnergy")
00100         c4 = TCanvas("c4")
00101         delayedE.Draw()
00102         self.canvases.append(c4)
00103 
00104         # Draw delayed vs. prompt spectrum
00105         delayedVsPromptE = plotFile.Get(path+"DayaBayAD1_DelayedVsPromptEnergy")
00106         c5 = TCanvas("c5")
00107         self.canvases.append(c5)
00108         delayedVsPromptE.SetMarkerStyle(8)
00109         delayedVsPromptE.SetMarkerColor(4)
00110         delayedVsPromptE.SetMarkerSize(0.5)
00111         delayedVsPromptE.Draw()
00112         # Draw signal box
00113         line = TLine()
00114         line.SetLineWidth(2)
00115         line.SetLineColor(2)
00116         line.SetLineStyle(2)
00117         line.DrawLine(0.7,6.,0.7,10.)
00118         line.DrawLine(8.0,6.,8.0,10.)
00119         line.DrawLine(0.7,6.,8.0,6.)
00120         line.DrawLine(0.7,10.,8.0,10.)
00121 

Member Data Documentation

Definition at line 7 of file AdViewer.py.

Definition at line 7 of file AdViewer.py.


The documentation for this class was generated from the following file:
| Classes | Job Modules | Data Objects | Services | Algorithms | Tools | Packages | Directories | Tracs |

Generated on Fri May 16 2014 10:06:20 for DataQuality by doxygen 1.7.4