Belle II Software  release-05-02-19
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 39 of file t0CalTime.py.

Member Function Documentation

◆ event()

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

Definition at line 78 of file t0CalTime.py.

78  def event(self):
79  ''' Event processor: fill the tree and scatter plots '''
80 
81  digits = Belle2.PyStoreArray('TOPDigits')
82  for digit in digits:
83  if digit.getModuleID() == int(args[1]):
84  self.data.slot = digit.getModuleID()
85  self.data.channel = digit.getChannel()
86  self.data.pixel = digit.getPixelID()
87  self.data.time = digit.getTime()
88  self.data.caltime = digit.getTime() + t0const.get(digit.getChannel())
89  self.data.height = digit.getPulseHeight()
90  self.data.width = digit.getPulseWidth()
91  self.data.quality = digit.getHitQuality()
92  self.data.rawtime = digit.getRawTime()
93  self.data.firstwindow = digit.getFirstWindow()
94  self.data.pmtpixel = digit.getPMTPixel()
95  self.data.pmt = digit.getPMTNumber()
96 
97  self.file.cd()
98  self.tree.Fill()
99 
100  self.histTimeCh.Fill(digit.getChannel(), digit.getTime())
101  self.histCalTimeCh.Fill(digit.getChannel(), digit.getTime() - t0const.get(digit.getChannel()))
102 

◆ initialize()

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

Definition at line 61 of file t0CalTime.py.

◆ terminate()

def terminate (   self)
Write the file 

Definition at line 103 of file t0CalTime.py.


The documentation for this class was generated from the following file:
ClusterEfficiency.ClusterEfficiency.event
def event(self)
Definition: ClusterEfficiency.py:146
Belle2::PyStoreArray
a (simplified) python wrapper for StoreArray.
Definition: PyStoreArray.h:58