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

Member Function Documentation

◆ event()

def event (   self)
Event processor: fill histograms 

Definition at line 120 of file studyLaserLight.py.

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

◆ ignoreNotCalibrated()

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

Definition at line 115 of file studyLaserLight.py.

◆ setMaxAmp()

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

Definition at line 100 of file studyLaserLight.py.

◆ setMaxWidth()

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

Definition at line 90 of file studyLaserLight.py.

◆ setMCCorrectionsFile()

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

Definition at line 110 of file studyLaserLight.py.

◆ setMinAmp()

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

Definition at line 105 of file studyLaserLight.py.

◆ setMinWidth()

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

Definition at line 95 of file studyLaserLight.py.

◆ setOutputName()

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

Definition at line 85 of file studyLaserLight.py.

◆ terminate()

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

Definition at line 142 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 54 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 33 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 43 of file studyLaserLight.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