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

Public Member Functions

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

Public Attributes

 hist
 list of digits histograms
 
 hist2
 list of occupancy-like histograms
 
 nPXDL1
 number of PXD pixels (L1)
 
 nPXDL2
 number of PXD pixels (L2)
 
 nPXD
 number of PXD pixels (L1+L2)
 
 nSVDL3
 number of L3 strips (u+v)
 
 nCDCin
 number of inner CDC wires
 
 CDCITIn
 integration time of the inner CDC layers [ms]
 
 nCDCout
 number of outer CDC wires
 
 CDCITout
 integration time of the outer CDC layers [ms]
 
 allh
 merged list of all histograms
 
 ntpl
 ntuple to store background levels
 

Detailed Description

Make validation histograms for BG overlay.
This validation assumes that all channels are active
(no masked strip, dead pixels, ...)

Definition at line 31 of file validateOverlay.py.

Member Function Documentation

◆ event()

def event (   self)
 Event processor: fill histograms 

Definition at line 143 of file validateOverlay.py.

143  def event(self):
144  ''' Event processor: fill histograms '''
145 
146  for h in self.hist:
147  digits = Belle2.PyStoreArray(h.GetName())
148  if h.GetName() == 'ECLDigits':
149  n = 0
150  for digit in digits:
151  if digit.getAmp() > 500: # roughly 25 MeV
152  n += 1
153  h.Fill(n)
154  else:
155  h.Fill(digits.getEntries())
156 
157  # PXD
158  pxdDigits = Belle2.PyStoreArray('PXDDigits')
159  self.hist2[2].Fill(pxdDigits.getEntries()/self.nPXD * 100)
160  nL1 = 0
161  nL2 = 0
162  for pxdDigit in pxdDigits:
163  if pxdDigit.getSensorID().getLayerNumber() == 1: # check L1/L2
164  nL1 += 1
165  else:
166  nL2 += 1
167  self.hist2[0].Fill(nL1/self.nPXDL1 * 100)
168  self.hist2[1].Fill(nL2/self.nPXDL2 * 100)
169 
170  # SVD
171  svdDigits = Belle2.PyStoreArray('SVDShaperDigitsZS5')
172  nL3 = 0
173  for svdDigit in svdDigits:
174  if svdDigit.getSensorID().getLayerNumber() == 3: # only check SVD L3
175  nL3 += 1
176  self.hist2[3].Fill(nL3/self.nSVDL3 * 100)
177 
178  # CDC
179  cdcHits = Belle2.PyStoreArray('CDCHits')
180  self.hist2[6].Fill(cdcHits.getEntries() / (self.nCDCin * self.CDCITIn + self.nCDCout * self.CDCITout))
181  nCDC_in = 0
182  nCDC_out = 0
183  for cdcHit in cdcHits:
184  if cdcHit.getICLayer() < 8: # count wires of inner/outer layers
185  nCDC_in += 1
186  else:
187  nCDC_out += 1
188  self.hist2[4].Fill(nCDC_in/self.nCDCin / self.CDCITIn)
189  self.hist2[5].Fill(nCDC_out/self.nCDCout / self.CDCITout)
190 
A (simplified) python wrapper for StoreArray.
Definition: PyStoreArray.h:72

◆ initialize()

def initialize (   self)
 Initialize the Module: book histograms and set descriptions and checks

Definition at line 39 of file validateOverlay.py.

◆ terminate()

def terminate (   self)
 Write histograms to file.

Definition at line 191 of file validateOverlay.py.


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