Belle II Software  release-08-01-10
Ntuple Class Reference
Inheritance diagram for Ntuple:
Collaboration diagram for Ntuple:

Public Member Functions

def initialize (self)
 
def event (self)
 
def terminate (self)
 

Public Attributes

 file
 output file name
 
 tree
 output tree name
 
 data
 tree strruct
 

Static Public Attributes

dictionary t0const = {0: 0.0}
 t0 constant per channel per slot
 
 f = ROOT.TFile.Open('t0const_slot' + str(args[1]) + '.root')
 input t0const root file
 
 histTimeCh = TH2F('before T0Cal slot#' + str(args[1]), 'before T0Cal slot#' + str(args[1]), 512, 0, 511, 500, 50, 100)
 scatter plot before t0 calibartion
 
 histCalTimeCh = TH2F('after T0Cal slot#' + str(args[1]), 'after T0Cal slot#' + str(args[1]), 512, 0, 511, 500, 50, 100)
 scatter plot after t0 calibartion
 

Detailed Description

 t0const ntpule infomation 

Definition at line 47 of file t0CalTime.py.

Member Function Documentation

◆ event()

def event (   self)
 Event processor: fill the tree and scatter plots 

Definition at line 86 of file t0CalTime.py.

86  def event(self):
87  ''' Event processor: fill the tree and scatter plots '''
88 
89  digits = Belle2.PyStoreArray('TOPDigits')
90  for digit in digits:
91  if digit.getModuleID() == int(args[1]):
92  self.data.slot = digit.getModuleID()
93  self.data.channel = digit.getChannel()
94  self.data.pixel = digit.getPixelID()
95  self.data.time = digit.getTime()
96  self.data.caltime = digit.getTime() + t0const.get(digit.getChannel())
97  self.data.height = digit.getPulseHeight()
98  self.data.width = digit.getPulseWidth()
99  self.data.quality = digit.getHitQuality()
100  self.data.rawtime = digit.getRawTime()
101  self.data.firstwindow = digit.getFirstWindow()
102  self.data.pmtpixel = digit.getPMTPixel()
103  self.data.pmt = digit.getPMTNumber()
104 
105  self.file.cd()
106  self.tree.Fill()
107 
108  self.histTimeCh.Fill(digit.getChannel(), digit.getTime())
109  self.histCalTimeCh.Fill(digit.getChannel(), digit.getTime() - t0const.get(digit.getChannel()))
110 
A (simplified) python wrapper for StoreArray.
Definition: PyStoreArray.h:72

◆ initialize()

def initialize (   self)
 Initialize the Module: output root file 

Definition at line 69 of file t0CalTime.py.

◆ terminate()

def terminate (   self)
 Write the file 

Definition at line 111 of file t0CalTime.py.


The documentation for this class was generated from the following file: