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/'
32 pathGroup = addOnTrackToPath(path, ontrack)
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')
50 varName +=
';'+ addOnTrackTxt(
'HitsPerLumi', ontrack)
51 hitGroup.defineHistogram(varName,
52 type=
'TProfile', path=pathGroup, title=title,
53 xbins=lumibinsx, xmin=-0.5, xmax=-0.5+lumibinsx)
55 histoGroupName = addOnTrackTxt(
'HitsPerLumi', ontrack)
56 title = addOnTrackTxt(
'Average number of pixel hits per event per LB', ontrack,
True)
57 yaxistext =
';# hits/event'
58 define1DProfLumiLayers(helper, alg, histoGroupName, title, pathGroup, yaxistext, type=
'TProfile')
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'
63 define1DProfLumiLayers(helper, alg, histoGroupName, title, pathGroup, yaxistext, type=
'TProfile')
65 histoGroupName = addOnTrackTxt(
'AvgOccGoodPerLumi', ontrack)
66 title = addOnTrackTxt(
'Average pixel occupancy for good modules per event per LB', ontrack,
True)
67 yaxistext =
';# hits/pixel/event'
68 define1DProfLumiLayers(helper, alg, histoGroupName, title, pathGroup, yaxistext, type=
'TProfile')
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'
74 define1DProfLumiLayers(helper, alg, histoGroupName, title, pathGroup, yaxistext, type=
'TProfile')
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'
86 define2DProfHist(helper, alg, histoGroupName, title, path, type=
'TH2F')
89 histoGroupName =
'HitFEMap'
90 title =
'hit map per FE'
91 define2DProfPerFEHist(helper, alg, histoGroupName, title, path, type=
'TH2F')
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'
104 layerGroup = getLayerGroup(helper, alg, layer)
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'
122 definePP0Histos(helper, alg, histoGroupName, title, path=pathGroup)
123 histoGroupName =
'OccupancyPerPixelEvent'
124 title =
'#hits / pixel / event'
125 define2DProfHist(helper, alg, histoGroupName, title, path=pathGroup, type=
'TProfile2D', zmin=0, zmax=1.0)