6 @file PixelAthHitMonAlgCfg.py
7 @brief Configuration of Pixel Hit Monitoring Histograms for Run 3
10 from PixelMonitoring.PixelAthMonitoringBase
import define2DProfHist, definePP0Histos, getLayerGroup
11 from PixelMonitoring.PixelAthMonitoringBase
import define1DProfLumiLayers, define2DProfPerFEHist
12 from PixelMonitoring.PixelAthMonitoringBase
import define1DLayers
13 from PixelMonitoring.PixelAthMonitoringBase
import layers, lumibinsx, bcidbinsx
14 from PixelMonitoring.PixelAthMonitoringBase
import addOnTrackTxt, addOnTrackToPath, fullDressTitle
15 from PixelMonitoring.PixelAthMonitoringBase
import runtext, ReadingDataErrLabels
20 helper -- AthMonitorCfgHelper(Old) instance
21 alg -- algorithm Configurable object returned from addAlgorithm
22 kwargs -- jo agruments
24 doOnline = kwargs.get(
'doOnline',
False)
25 doLumiBlock = kwargs.get(
'doLumiBlock',
False)
26 doFEPlots = kwargs.get(
'doFEPlots',
False)
31 pathLowStat =
'/Pixel/LumiBlock/'
34 hitGroup = helper.addGroup(alg,
'Hit')
36 varName =
'hitdataread_err;ReadingHitDataErr'
37 title =
'Number of Hit data reading errors;error type;# events'
38 hitGroup.defineHistogram(varName,
39 type=
'TH1I', path=pathGroup, title=title,
40 xbins=len(ReadingDataErrLabels), xmin=-0.5, xmax=-0.5+len(ReadingDataErrLabels), xlabels=ReadingDataErrLabels)
42 varName =
'pixhitsmontool_lb;EventsPerLumi'
43 title =
'nEvents per LB;lumi block;# events'
44 hitGroup.defineHistogram(varName,
45 type=
'TH1I', path=pathGroup, title=title,
46 xbins=lumibinsx, xmin=-0.5, xmax=-0.5+lumibinsx)
48 varName =
'pixhitsmontool_lb,nhits_per_event'
49 title =
fullDressTitle(
'Average number of pixel hits per event per LB', ontrack,
';lumi block',
';# hits/event')
51 hitGroup.defineHistogram(varName,
52 type=
'TProfile', path=pathGroup, title=title,
53 xbins=lumibinsx, xmin=-0.5, xmax=-0.5+lumibinsx)
56 title =
addOnTrackTxt(
'Average number of pixel hits per event per LB', ontrack,
True)
57 yaxistext =
';# hits/event'
60 histoGroupName =
addOnTrackTxt(
'AvgOccActivePerLumi', ontrack)
61 title =
addOnTrackTxt(
'Average pixel occupancy for active modules per event per LB', ontrack,
True)
62 yaxistext =
';# hits/pixel/event'
66 title =
addOnTrackTxt(
'Average pixel occupancy for good modules per event per LB', ontrack,
True)
67 yaxistext =
';# hits/pixel/event'
70 histoGroupName =
addOnTrackTxt(
'AvgOccRatioToIBLPerLumi', ontrack)
72 title =
addOnTrackTxt(
'Relative to IBL pixel occupancy per event per LB', ontrack,
True)
73 yaxistext =
';occ. ratio to IBL'
76 title =
addOnTrackTxt(
'Relative to IBL pixel occupancy per event per LB for last 100LB', ontrack,
True)
77 histname =
addOnTrackTxt(
'AvgOccRatioToIBLPerLumiLast100LB', ontrack)
78 define1DProfLumiLayers(helper, alg, histoGroupName, title, pathGroup,
';occ. ratio to IBL', type=
'TProfile', opt=
'kLive=100', histname=histname)
80 histoGroupName =
'HitToT'
82 define1DLayers(helper, alg, histoGroupName, title, pathGroup,
';ToT [BC]',
';# hits', xbins=[300]*5+[20]*2, xmins=[-0.5]*7, binsizes=[1.0]*7)
84 histoGroupName =
'HitMap'
89 histoGroupName =
'HitFEMap'
90 title =
'hit map per FE'
95 define2DProfHist(helper, alg, histoGroupName, title, pathLowStat, type=
'TH2F', lifecycle=
'lumiblock', histname=
'HitMapLB')
97 define2DProfPerFEHist(helper, alg, histoGroupName, title, pathLowStat, type=
'TH2F', lifecycle=
'lumiblock', histname=
'HitFEMapLB')
101 histoname =
'AvgOccPerBCID'
103 title =
'Average pixel occupancy per BCID, {0}'.
format(layer) + runtext +
';BCID;# hits/pixel/event'
105 fullvarstr =
'pixhitsmontool_bcid'
106 fullvarstr+=
',{0}_{1}'.
format(histoname,
'val')
107 fullvarstr+=
';' + histoname +
'_{0}'.
format(layer)
108 layerGroup.defineHistogram(fullvarstr,
109 type=
'TProfile', path=pathGroup, title=title,
110 xbins=bcidbinsx, xmin=-0.5, xmax=-0.5+bcidbinsx)
113 histoGroupName =
'HitOccupancyPP0'
114 title =
'Average per module(FE) hit occupancy per PP0 reset every 5 LBs'
115 definePP0Histos(helper, alg, histoGroupName, title, path=pathGroup, opt=
'kLBNHistoryDepth=5')
116 histoGroupName =
'OccupancyPerPixelEvent'
117 title =
'#hits / pixel / event reset every 2 LBs'
118 define2DProfHist(helper, alg, histoGroupName, title, path=pathGroup, type=
'TProfile2D', zmin=0, zmax=1.0, opt=
'kLBNHistoryDepth=2')
120 histoGroupName =
'HitOccupancyPP0'
121 title =
'Average per module(FE) hit occupancy per PP0'
123 histoGroupName =
'OccupancyPerPixelEvent'
124 title =
'#hits / pixel / event'
125 define2DProfHist(helper, alg, histoGroupName, title, path=pathGroup, type=
'TProfile2D', zmin=0, zmax=1.0)
130 pathTiming =
'/Pixel/Timing'
131 varName =
'Hit_LVL1A_pixel'
133 varName +=
';HitLVL1A'
134 hitGroup.defineHistogram(varName,
135 type=
'TH1F', path=pathTiming, title=title,
136 xbins=14, xmin=-1.5, xmax=12.5)
137 varName =
'Hit_LVL1A_layer'
140 title =
'Hit Level 1 Accept, {0}'.
format(layer) + runtext +
';Level 1 Accept;# hits'
142 fullvarstr = varName +
';' + histoname
143 layerGroup.defineHistogram(fullvarstr,
144 type=
'TH1F', path=pathTiming, title=title,
145 xbins=14, xmin=-1.5, xmax=12.5)
147 histonameLB =
'HitLVL1ALB_{0}'.
format(layer)
148 titleLB =
'Hit Level 1 Accept lowstat, {0}'.
format(layer) + runtext +
';Level 1 Accept;# hits'
149 fullvarstrLB = varName +
';' + histonameLB
150 layerGroup.defineHistogram(fullvarstrLB,
151 type=
'TH1F', path=pathLowStat, title=titleLB,
152 xbins=14, xmin=-1.5, xmax=12.5, duration=
'lowStat')