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

Public Member Functions

def setOutputName (self, outputname)
 
def setMaxWidth (self, maxWidth)
 
def setMinWidth (self, minWidth)
 
def setMaxAmp (self, maxAmp)
 
def setMinAmp (self, minAmp)
 
def setMCCorrectionsFile (self, MCfile)
 
def ignoreNotCalibrated (self, ignoreNotCal)
 
def event (self)
 
def terminate (self)
 

Public Attributes

 outname
 output name
 
 m_maxWidth
 output name
 
 m_minWidth
 output name
 
 m_maxAmp
 output name
 
 m_minAmp
 output name
 
 m_mcCorrectionsFile
 output name
 
 m_ignoreNotCalibrated
 output name
 

Static Public Attributes

 h_LaserTimingVSChannel
 Width as function of the sample number in each channel. More...
 
 h_LaserTimingVSChannelOneSlot
 Laser timing in as function of the channel number. More...
 
list h_crossOccupancy
 cross occupancy More...
 
string outname = 'outStudyLaserResolution.root'
 output root file
 
bool m_ignoreNotCalibrated = True
 ignores the hits wthout calibration
 
bool m_runOnData = True
 ignores the hits wthout calibration
 
int m_maxWidth = 3.
 maximum width to accept a TOPDigit
 
float m_minWidth = 0.5
 minimum width to accept a TOPDigit
 
int m_maxAmp = 700.
 minimum amplitude to accept a TOPDigit
 
int m_minAmp = 250.
 minimum amplitude to accept a TOPDigit
 
string m_mcCorrectionsFile = '/group/belle2/group/detector/TOP/calibration/MCreferences/t0MC.root'
 root file with the MC distribution of the laser light, to get the light path corrections
 
list m_MCPeaks = [[]]
 positions of the first and second peak
 

Detailed Description

 Module to study resolution and performance of the top laser calibration.

Definition at line 30 of file studyLaserLight.py.

Member Function Documentation

◆ event()

def event (   self)
 Event processor: fill histograms 

Definition at line 122 of file studyLaserLight.py.

122  def event(self):
123  ''' Event processor: fill histograms '''
124 
125  digits = Belle2.PyStoreArray('TOPDigits')
126  nhits = [0 for i in range(16)]
127  for digit in digits:
128  if(not self.ignoreNotCalibrated and not digit.isTimeBaseCalibrated()):
129  continue
130  if (digit.getHitQuality() == 1 and
131  digit.getPulseWidth() > self.m_minWidth and digit.getPulseWidth() < self.m_maxWidth and
132  digit.getPulseHeight() > self.m_minAmp and digit.getPulseHeight() < self.m_maxAmp):
133  slotID = digit.getModuleID()
134  hwchan = digit.getChannel()
135  self.h_LaserTimingVSChannel.Fill(512 * (slotID - 1) + hwchan, digit.getTime())
136  simhits = digit.getRelationsWith('TOPSimHits')
137  nhits[slotID - 1] = nhits[slotID - 1] + 1
138  for simhit in simhits:
139  self.h_LaserTimingVSChannelOneSlot.Fill(hwchan, simhit.getTime())
140  for slotA in range(16):
141  for slotB in range(16):
142  self.h_crossOccupancy[slotA][slotB].Fill(nhits[slotA], nhits[slotB])
143 
A (simplified) python wrapper for StoreArray.
Definition: PyStoreArray.h:72

◆ ignoreNotCalibrated()

def ignoreNotCalibrated (   self,
  ignoreNotCal 
)
 Sets the flag to ingore the hits without calibration 

Definition at line 117 of file studyLaserLight.py.

◆ setMaxAmp()

def setMaxAmp (   self,
  maxAmp 
)
 Sets the maximum calpulse amplitude 

Definition at line 102 of file studyLaserLight.py.

◆ setMaxWidth()

def setMaxWidth (   self,
  maxWidth 
)
 Sets the maximum calpulse width 

Definition at line 92 of file studyLaserLight.py.

◆ setMCCorrectionsFile()

def setMCCorrectionsFile (   self,
  MCfile 
)
 Sets the file containing the MC correction

Definition at line 112 of file studyLaserLight.py.

◆ setMinAmp()

def setMinAmp (   self,
  minAmp 
)
 Sets the minimum calpulse amplitude 

Definition at line 107 of file studyLaserLight.py.

◆ setMinWidth()

def setMinWidth (   self,
  minWidth 
)
 Sets the minimum calpulse width 

Definition at line 97 of file studyLaserLight.py.

◆ setOutputName()

def setOutputName (   self,
  outputname 
)
 Sets the output file name 

Definition at line 87 of file studyLaserLight.py.

◆ terminate()

def terminate (   self)
 Write histograms to file, fills and fits the resolution plots

Definition at line 144 of file studyLaserLight.py.

Member Data Documentation

◆ h_crossOccupancy

list h_crossOccupancy
static
Initial value:
= [[TH2F(
'crossOccupancy_' + str(slotA) + '_' + str(slotB),
' ',
200,
0,
200,
200,
0.,
200) for slotA in range(16)] for slotB in range(16)]

cross occupancy

Definition at line 56 of file studyLaserLight.py.

◆ h_LaserTimingVSChannel

h_LaserTimingVSChannel
static
Initial value:
= TH2F(
'LaserTimingVSChannel',
'Laser timing in as function of the channel number',
512 * 16,
0,
512 * 16,
10000,
0.,
100)

Width as function of the sample number in each channel.

Definition at line 35 of file studyLaserLight.py.

◆ h_LaserTimingVSChannelOneSlot

h_LaserTimingVSChannelOneSlot
static
Initial value:
= TH2F(
'LaserTimingVSChannelOneSlot',
'Laser timing in as function of the channel number',
512,
0,
512,
10000,
0.,
100)

Laser timing in as function of the channel number.

Definition at line 45 of file studyLaserLight.py.


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