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

Public Member Functions

def __init__ (self, exp, run, histName, pdfName, eventPdfName, verbosity, maxDisplays, minRPCHits, legacyTimes, singleEntry, view)
 
def makeGraph (self, x, y)
 
def makeText (self, x, y, s)
 
def initialize (self)
 
def terminate (self)
 
def beginRun (self)
 
def endRun (self)
 
def event (self)
 

Public Attributes

 exp
 internal copy of experiment number
 
 run
 internal copy of run number
 
 histName
 internal copy of the pathname of the output histogram ROOT file
 
 pdfName
 internal copy of the pathname of the output histogram PDF file
 
 eventPdfName
 internal copy of the pathname of the output event-display PDF file
 
 verbosity
 internal copy of the histogram verbosity in the histogram PDF file
 
 maxDisplays
 internal copy of the maximum number of event displays to write
 
 minRPCHits
 internal copy of the minimum number of RPC KLMHit2ds in any sector for event display
 
 legacyTimes
 calculate prompt time for legacy BKLMHit1ds and KLMHit2ds (True) or use stored time (False)
 
 singleEntry
 select events with any (0) or exactly one (1) or more than one (2) entries/channel
 
 view
 view event displays using one-dimensional (1) or two-dimensional (2) hits
 
 eventCounter
 event counter (needed for PDF table of contents' ordinal event#)
 
 eventDisplays
 event-display counter
 
 lastTitle
 title of the last-drawn event display (needed for PDF table of contents' last event)
 
 hist_XY
 blank scatterplot to define the bounds of the BKLM end view
 
 hist_ZY1D
 blank scatterplot to define the bounds of the BKLM side view for 1D hits
 
 hist_ZY
 blank scatterplot to define the bounds of the BKLM side view for 2D hits
 
 electIdToModuleId
 readout <-> detector map (from the information retrieved from the conditions database)
 
 sectorFBToDC
 map for sectorFB -> data concentrator
 
 dcToSectorFB
 map for data concentrator -> sectorFB
 
 t0Cal
 Time-calibration constants obtained from experiment 7 run 1505 RPC-time calibration adjustment (ns) for rawKLMs.
 
 t0Cal1d
 RPC-time calibration adjustment (ns) for BKLMHit1ds.
 
 t0Cal2d
 RPC-time calibration adjustment (ns) for KLMHit2ds.
 
 ct0Cal
 scint-ctime calibration adjustment (ns) for rawKLMs
 
 ct0Cal1d
 scint-ctime calibration adjustment (ns) for BKLMHit1ds
 
 ct0Cal2d
 scint-ctime calibration adjustment (ns) for KLMHit2ds
 
 t0RPC
 per-layer variations in RPC z- and phi-time calibration adjustment (ns) for rawKLMs
 
 ct0Scint
 per-layer variations in scint-ctime calibration adjustment (ns) for rawKLMs
 
 histogramFile
 Output ROOT TFile that will contain the histograms/scatterplots.
 
 hist_nDigit
 histogram of the number of BKLMDigits in the event
 
 hist_nRawKLM
 histogram of the number of RawKLMs in the event (should be 1)
 
 hist_rawKLMnumEvents
 histogram of the RawKLM's NumEvents (should be 1)
 
 hist_rawKLMnumNodes
 histogram of the RawKLM's NumNodes (should be 1)
 
 hist_rawKLMnodeID
 scatterplot of the RawKLM's COPPER index vs NodeID relative to the base BKLM/EKLM values
 
 hist_rawKLMlaneFlag
 scatterplot of the RawKLM hit's lane vs flag (1=RPC, 2=Scint)
 
 hist_rawKLMtdcExtraRPC
 scatterplot of the RawKLM RPC hit's extra bits vs sector in the third (time) word
 
 hist_rawKLMadcExtraRPC
 scatterplot of the RawKLM RPC hit's extra bits vs sector in the fourth (adc) word
 
 hist_rawKLMtdcExtraScint
 scatterplot of the RawKLM scint hit's extra bits vs sector in the third (time) word
 
 hist_rawKLMadcExtraScint
 scatterplot of the RawKLM scint hit's extra bits vs sector in the fourth (adc) word
 
 hist_rawKLMsizeMultihit
 histogram of number of hits, including multiple entries on one readout channel
 
 hist_rawKLMsize
 histogram of number of hits, at most one entry per readout channel
 
 hist_rawKLMsizeByDCMultihit
 histograms of number of hits, including multiple entries on one readout channel, indexed by sector#
 
 hist_rawKLMsizeByDC
 histograms of number of hits, at most one entry per readout channel, indexed by sector#
 
 hist_rawKLMchannelMultiplicity
 scatterplots of multiplicity of entries in one readout channel vs lane/axis, indexed by sector#
 
 hist_rawKLMchannelMultiplicityFine
 scatterplots of multiplicity of entries in one readout channel vs lane/axis/channel, indexed by sector#
 
 hist_mappedSectorOccupancyMultihit
 histogram of number of mapped hits by sector, including multiple entries on one readout channel
 
 hist_unmappedSectorOccupancyMultihit
 histogram of number of unmapped hits by sector, including multiple entries on one readout channel
 
 hist_mappedSectorOccupancy
 histogram of number of mapped hits by sector, at most one entry per readout channel
 
 hist_unmappedSectorOccupancy
 histogram of number of unmapped hits by sector, at most one entry per readout channel
 
 hist_mappedRPCSectorOccupancy
 histogram of number of mapped RPC hits by sector, at most one entry per readout channel
 
 hist_mappedRPCLaneAxisOccupancy
 scatterplot of number of mapped RPC hits by lane/axis vs sector, at most one entry per readout channel
 
 hist_unmappedRPCSectorOccupancy
 histogram of number of unmapped RPC hits by sector, at most one entry per readout channel
 
 hist_unmappedRPCLaneAxisOccupancy
 scatterplot of number of unmapped RPC hits by lane/axis vs sector, at most one entry per readout channel
 
 hist_mappedScintSectorOccupancy
 scatterplot of number of mapped scint hits by lane/axis vs sector, at most one entry per readout channel
 
 hist_mappedScintLaneAxisOccupancy
 scatterplot of number of mapped scint hits by lane/axis vs sector, at most one entry per readout channel
 
 hist_unmappedScintSectorOccupancy
 histogram of number of unmapped scint hits by sector, at most one entry per readout channel
 
 hist_unmappedScintLaneAxisOccupancy
 scatterplot of number of unmapped scint hits by lane/axis vs sector, at most one entry per readout channel
 
 hist_mappedChannelOccupancyPrompt
 scatterplots of in-time mapped channel occupancy (1 hit per readout channel), indexed by sector#
 
 hist_mappedChannelOccupancyBkgd
 scatterplots of out-of-time mapped channel occupancy (1 hit per readout channel), indexed by sector#
 
 hist_unmappedChannelOccupancy
 scatterplots of unmapped channel occupancy (1 hit per readout channel), indexed by sector#
 
 hist_RPCTimeLowBitsBySector
 scatterplot of RPC TDC low-order bits vs sector (should be 0 since granularity is 4 ns)
 
 hist_mappedRPCTime
 histogram of RPC mapped-channel TDC value relative to event's trigger time
 
 hist_mappedRPCTimeCal
 histogram of RPC mapped-channel TDC value relative to event's trigger time, corrected for inter-sector variation
 
 hist_mappedRPCPhiTimePerLayer
 histograms of RPC mapped-channel phi-strip TDC value relative to event's trigger time, indexed by sector/layer
 
 hist_mappedRPCZTimePerLayer
 histograms of RPC mapped-channel z-strip TDC value relative to event's trigger time, indexed by sector/layer
 
 hist_mappedRPCTimeBySector
 scatterplot of RPC mapped-channel TDC value relative to event's trigger time vs sector
 
 hist_mappedRPCTimeCalBySector
 scatterplot of RPC mapped-channel TDC relative to trigger time, corrected for inter-sector variation, by sector
 
 hist_mappedRPCCtimeRange
 histogram of RPC mapped-channel REVO9 range in event
 
 hist_mappedRPCCtimeRangeBySector
 scatterplot of RPC mapped-channel REVO9 range in event vs sector
 
 hist_unmappedRPCTime
 histogram of RPC unmapped-channel TDC value relative to event's trigger time
 
 hist_unmappedRPCTimeBySector
 scatterplot of RPC unmapped-channel TDC value relative to event's trigger time, by sector
 
 hist_ScintTimeLowBitsBySector
 scatterplot of scint TDC low-order bits vs sector
 
 hist_mappedScintCtime
 histogram of scint mapped-channel CTIME value relative to event's trigger Ctime
 
 hist_mappedScintCtimeBySector
 scatterplot of scint mapped-channel CTIME value relative to event's trigger Ctime vs sector
 
 hist_mappedScintCtimeCal
 histogram of scint mapped-channel CTIME value relative to event's trigger Ctime, corrected for inter-sector variation
 
 hist_mappedScintCtimeCalBySector
 scatterplot of scint mapped-channel CTIME relative to trigger Ctime, corrected for inter-sector variation, by sector
 
 hist_mappedScintPhiCtimePerLayer
 histograms of scint mapped-channel phi-strip CTIME value relative to event's trigger Ctime, indexed by sector/layer
 
 hist_mappedScintZCtimePerLayer
 histograms of scint mapped-channel z-strip CTIME value relative to event's trigger Ctime, indexed by sector/layer
 
 hist_mappedScintCtimeRange
 histogram of scint mapped-channel CTIME range in event
 
 hist_mappedScintCtimeRangeBySector
 scatterplot of scint mapped-channel CTIME range in event vs sector
 
 hist_unmappedScintCtime
 histogram of scint unmapped-channel CTIME value relative to event's trigger Ctime
 
 hist_unmappedScintCtimeBySector
 scatterplot of scint unmapped-channel CTIME value relative to event's trigger Ctime, by sector
 
 hist_mappedScintTDC
 histogram of scint mapped-channel TDC value (NOT relative to event's trigger Ctime)
 
 hist_mappedScintTime
 histogram of scint mapped-channel TDC value relative to event's trigger Ctime
 
 hist_mappedScintTDCBySector
 scatterplot of scint mapped-channel TDC value (NOT relative to event's trigger Ctime) vs sector
 
 hist_mappedScintTimeBySector
 scatterplot of scint mapped-channel TDC value relative to event's trigger Ctime vs sector
 
 hist_unmappedScintTime
 histogram of scint unmapped-channel TDC value relative to event's trigger Ctime
 
 hist_unmappedScintTimeBySector
 scatterplot of scint unmapped-channel TDC value relative to event's trigger Ctime vs sector
 
 hist_trigCtimeVsTrigRevo9time
 histogram of RawKLM[] header's trigger CTIME relative to its final-data-word trigger REVO9 time
 
 hist_tdcRangeRPC
 histogram of RPC TDC range
 
 hist_ctimeRangeRPC
 histogram of RPC Ctime range
 
 hist_tdcRangeVsCtimeRangeRPC
 scatterplot of RPC TDC range vs Ctime range
 
 hist_tdcRangeVsTimeRPC
 scatterplot of RPC TDC range vs time
 
 hist_ctimeRangeVsTimeRPC
 scatterplot of RPC Ctime range vs time
 
 hist_nHit1d
 histogram of the number of BKLMHit1ds
 
 hist_nHit1dRPCPrompt
 histogram of the number of in-time RPC BKLMHit1ds
 
 hist_nHit1dRPCBkgd
 histogram of the number of out-of-time RPC BKLMHit1ds
 
 hist_nHit1dScint
 histogram of the number of scint BKLMHit1ds
 
 hist_nHit1dPrompt
 histogram of the number of in-time scint BKLMHit1ds
 
 hist_nHit1dBkgd
 histogram of the number of out-of-time scint BKLMHit1ds
 
 hist_n1dPhiZ
 scatterplot of number of Z BKLMHit1ds vs number of Phi BKLMHit1ds
 
 hist_multiplicityPhiBySector
 scatterplot of number of Phi BKLMHit1ds vs sector
 
 hist_multiplicityZBySector
 scatterplot of number of Z BKLMHit1ds vs sector
 
 hist_tphiRPCCal1d
 histogram of RPC-phi BKLMHit1d time relative to event's trigger time, corrected for inter-sector variation
 
 hist_tzRPCCal1d
 histogram of RPC-z BKLMHit1d time relative to event's trigger time, corrected for inter-sector variation
 
 hist_tRPCCal1d
 histogram of RPC-phi and -z BKLMHit1d avg time relative to event's trigger time, corrected for inter-sector variation
 
 hist_dtRPC1d
 histogram of RPC-phi and -z BKLMHit1d time difference
 
 hist_ctphiScintCal1d
 histogram of scint-phi BKLMHit1d time relative to event's trigger Ctime, corrected for inter-sector variation
 
 hist_ctzScintCal1d
 histogram of scint-z BKLMHit1d time relative to event's trigger Ctime, corrected for inter-sector variation
 
 hist_ctScintCal1d
 histogram of scint-phi and -z BKLMHit1d avg time relative to event's trigger Ctime, corrected for inter-sector variation
 
 hist_dtScint1d
 histogram of scint-phi and -z BKLMHit1d time difference
 
 hist_nHit2d
 histogram of the number of KLMHit2ds
 
 hist_occupancyForwardXYPrompt
 scatterplot of end view of forward BKLM for in-time KLMHit2ds
 
 hist_occupancyBackwardXYPrompt
 scatterplot of end view of backward BKLM for in-time KLMHit2ds
 
 hist_occupancyForwardXYBkgd
 scatterplot of end view of forward BKLM for out-of-time KLMHit2ds
 
 hist_occupancyBackwardXYBkgd
 scatterplot of end view of backward BKLM for out-of-time KLMHit2ds
 
 hist_occupancyRZPrompt
 scatterplot of side view of forward BKLM for in-time KLMHit2ds
 
 hist_occupancyZPrompt
 histogram of z coordinate for in-time KLMHit2ds
 
 hist_occupancyRPrompt
 histogram of layer# for in-time KLMHit2ds
 
 hist_occupancyRZBkgd
 scatterplot of side view of forward BKLM for in-time KLMHit2ds
 
 hist_occupancyZBkgd
 histogram of z coordinate for out-of-time KLMHit2ds
 
 hist_occupancyRBkgd
 histogram of layer# for out-of-time KLMHit2ds
 
 hist_tRPCCal2d
 histogram of RPC calibrated time in KLMHit2ds
 
 hist_tRPCCal2dBySector
 scatterplot of RPC calibrated time in KLMHit2ds vs sector
 
 hist_ctScintCal2d
 histogram of scint calibrated time in KLMHit2ds
 
 hist_ctScintCal2dBySector
 scatterplot of scint calibrated time in KLMHit2ds vs sector
 
 hist_tVsZFwd
 profile histogram of KLMHit2d RPC time vs z (forward)
 
 hist_tVsZBwd
 profile histogram of KLMHit2d RPC time vs z (forward)
 
 eventCanvas
 TCanvas on which event displays will be drawn.
 
 bklmXY
 list of line-segment (x,y) points for the BKLM end view
 
 bklmZY
 list of line-segment (z,y) points for the BKLM side view
 

Static Public Attributes

int BKLM_ID = 0x07000000
 COPPER base identifier for BKLM readout.
 
int EKLM_ID = 0x08000000
 COPPER base identifier for EKLM readout.
 
int BKLM_STRIP_BIT = 0
 bit position for strip-1 [0..47]
 
int BKLM_PLANE_BIT = 6
 bit position for plane-1 [0..1]; 0 is inner-plane
 
int BKLM_LAYER_BIT = 7
 bit position for layer-1 [0..14]; 0 is innermost
 
int BKLM_SECTOR_BIT = 11
 bit position for sector-1 [0..7]; 0 is on the +x axis and 2 is on the +y axis
 
int BKLM_SECTION_BIT = 14
 bit position for section [0..1]; forward is 0
 
int BKLM_MAXSTRIP_BIT = 15
 bit position for maxStrip-1 [0..47]
 
int BKLM_STRIP_MASK = 0x3f
 bit mask for strip-1 [0..47]
 
tuple BKLM_PLANE_MASK = (1 << BKLM_PLANE_BIT)
 bit mask for plane-1 [0..1]; 0 is inner-plane
 
tuple BKLM_LAYER_MASK = (15 << BKLM_LAYER_BIT)
 bit mask for layer-1 [0..15]; 0 is innermost and 14 is outermost
 
tuple BKLM_SECTOR_MASK = (7 << BKLM_SECTOR_BIT)
 bit mask for sector-1 [0..7]; 0 is on the +x axis and 2 is on the +y axis
 
tuple BKLM_SECTION_MASK = (1 << BKLM_SECTION_BIT)
 bit mask for section [0..1]; forward is 0
 
tuple BKLM_MAXSTRIP_MASK = (63 << BKLM_MAXSTRIP_BIT)
 bit mask for maxStrip-1 [0..47]
 
tuple BKLM_MODULEID_MASK = (BKLM_SECTION_MASK | BKLM_SECTOR_MASK | BKLM_LAYER_MASK)
 bit mask for unique module identifier (end, sector, layer)
 

Detailed Description

Fill BKLM histograms of values from RawKLMs, KLMDigits, BKLMHit1ds, and KLMHit2ds;
(optionally) draw event displays from these data-objects.

Definition at line 23 of file EventInspector.py.

Constructor & Destructor Documentation

◆ __init__()

def __init__ (   self,
  exp,
  run,
  histName,
  pdfName,
  eventPdfName,
  verbosity,
  maxDisplays,
  minRPCHits,
  legacyTimes,
  singleEntry,
  view 
)
Constructor

Arguments:
    exp (str): formatted experiment number
    run (str): formatter run number
    histName (str): path name of the output histogram ROOT file
    pdfName (str): path name of the output histogram PDF file
    eventPdfName (str): path name of the output event-display PDF file
    verbosity (int): determines how many histograms are written to the histogram PDF file
    maxDisplays (int): max # of events displays to write
    minRPCHits (int): min # of RPC KLMHit2ds in any sector for event display
    legacyTimes (bool): true to correct BKLMHit{1,2}d times in legacy reconstruction, False otherwise
    singleEntry (int): select events with any (0) or exactly one (1) or more than one (2) entries/channel
    view (int): view event displays using one-dimensional (1) or two-dimensional (2) BKLMHits

Definition at line 58 of file EventInspector.py.

59  maxDisplays, minRPCHits, legacyTimes, singleEntry, view):
60  """Constructor
61 
62  Arguments:
63  exp (str): formatted experiment number
64  run (str): formatter run number
65  histName (str): path name of the output histogram ROOT file
66  pdfName (str): path name of the output histogram PDF file
67  eventPdfName (str): path name of the output event-display PDF file
68  verbosity (int): determines how many histograms are written to the histogram PDF file
69  maxDisplays (int): max # of events displays to write
70  minRPCHits (int): min # of RPC KLMHit2ds in any sector for event display
71  legacyTimes (bool): true to correct BKLMHit{1,2}d times in legacy reconstruction, False otherwise
72  singleEntry (int): select events with any (0) or exactly one (1) or more than one (2) entries/channel
73  view (int): view event displays using one-dimensional (1) or two-dimensional (2) BKLMHits
74  """
75  super().__init__()
76 
77  self.exp = exp
78 
79  self.run = run
80 
81  self.histName = histName
82 
83  self.pdfName = pdfName
84 
85  self.eventPdfName = eventPdfName
86 
87  self.verbosity = verbosity
88 
89  self.maxDisplays = maxDisplays
90 
91  self.minRPCHits = minRPCHits
92 
93  self.legacyTimes = legacyTimes
94 
95  self.singleEntry = singleEntry
96 
97  self.view = view
98 
99  self.eventCounter = 0
100 
101  self.eventDisplays = 0
102 
103  self.lastTitle = ''
104 

Member Function Documentation

◆ beginRun()

def beginRun (   self)
Handle begin of run: print diagnostic message

Definition at line 1408 of file EventInspector.py.

◆ endRun()

def endRun (   self)
Handle end of run: print diagnostic message

Definition at line 1413 of file EventInspector.py.

◆ event()

def event (   self)
Process one event: fill histograms, (optionally) draw event display

Definition at line 1418 of file EventInspector.py.

◆ initialize()

def initialize (   self)
Handle job initialization: fill the mapping database, create histograms, open the event-display file

Definition at line 135 of file EventInspector.py.

◆ makeGraph()

def makeGraph (   self,
  x,
  y 
)
Create and return a ROOT TGraph

Arguments:
  x[] (real): x coordinates
  y[] (real): y coordinates

Definition at line 105 of file EventInspector.py.

◆ makeText()

def makeText (   self,
  x,
  y,
  s 
)
Create and return a ROOT TLatex with the following properties:
size = 0.04, color = red, alignment = middle centre, angle = 90 degrees

Arguments:
  x (real): x coordinate
  y (real): y coordinate
  s (str):  character string

Definition at line 119 of file EventInspector.py.

◆ terminate()

def terminate (   self)
Handle job termination: draw histograms, close output files

Definition at line 894 of file EventInspector.py.


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