10 '''Function to configures some algorithms in the monitoring system.'''
14 from AthenaConfiguration.ComponentAccumulator
import ComponentAccumulator
18 from MuonConfig.MuonGeometryConfig
import MuonGeoModelCfg
24 from AthenaMonitoring
import AthMonitorCfgHelper
25 helper = AthMonitorCfgHelper(inputFlags,
'StgcAthMonitorCfg')
28 sTgcMonAlg = helper.addAlgorithm(CompFactory.sTgcRawDataMonAlg,
'sTgcMonAlg')
29 sTgcMonAlg.cutPt = 15000.
30 sTgcMonAlg.cutEtaDown = 1.3
31 sTgcMonAlg.cutEtaUp = 2.4
32 sTgcMonAlg.minDeltaR = 0.1
33 sTgcMonAlg.cutTriggerPhiId = 63
34 sTgcMonAlg.cutTriggerBandId = 255
35 sTgcMonAlg.NSW_PadTriggerDataKey = NSW_PadTrigKey
37 globalPath =
'Muon/MuonRawDataMonitoring/STG/'
40 sTgcOverviewGroup = helper.addGroup(sTgcMonAlg,
'sTgcOverview', globalPath +
'Shifter')
41 sTgcQuadOccupancyGroupPad = helper.addGroup(sTgcMonAlg,
'sTgcQuadOccupancyPad', globalPath +
'Shifter/Occupancy')
42 sTgcQuadOccupancyGroupStrip = helper.addGroup(sTgcMonAlg,
'sTgcQuadOccupancyStrip', globalPath +
'Shifter/Occupancy')
43 sTgcQuadOccupancyGroupWire = helper.addGroup(sTgcMonAlg,
'sTgcQuadOccupancyWire', globalPath +
'Shifter/Occupancy')
44 sTgcTimingGroup = helper.addGroup(sTgcMonAlg,
'sTgcTiming', globalPath +
'Shifter/Timing')
45 sTgcPadTriggerShifterGroup = helper.addGroup(sTgcMonAlg,
'padTriggerShifter', globalPath +
'Shifter/')
46 sTgcLBshifterGroup = helper.addGroup(sTgcMonAlg,
'sTgcLumiblock', globalPath +
'Shifter/Lumiblock/')
49 sTgcOccupancyGroup = helper.addGroup(sTgcMonAlg,
'sTgcOccupancy', globalPath +
'Expert/Occupancy')
50 sTgcPadTriggerExpertGroup = helper.addGroup(sTgcMonAlg,
'padTriggerExpert', globalPath +
'Expert/')
51 padTriggerOccupancyGroup = helper.addGroup(sTgcMonAlg,
'padTriggerOccupancy', globalPath +
'Expert/PadTrigger/Hits/')
62 columnLabels = [columnLabels_AL, columnLabels_AS, columnLabels_CL, columnLabels_CS]
63 columnLabelsCounter = 0
65 titleEtaPhiEffMap =
'; #eta (reco); #phi (reco); Pad trigger efficiency wrt. reco. muon'
66 varEtaPhiEffMap =
'muonRecoTriggerMatch,etaRecoMuonEff,phiRecoMuonEff;padTrigger_Efficiency_per_etaPhi'
67 sTgcOverviewGroup.defineHistogram(varEtaPhiEffMap, type =
'TEfficiency', title = titleEtaPhiEffMap, path =
'Overview', xbins = 100, xmin = -3., xmax = 3., ybins = 100, ymin = -math.pi, ymax = math.pi, opt =
'kAlwaysCreate')
69 titleEtaEffMap =
'; #eta (reco); Pad trigger efficiency wrt. reco. muon'
70 varEtaEffMap =
'muonRecoTriggerMatch,etaRecoMuonEff;padTrigger_Efficiency_per_eta'
71 sTgcOverviewGroup.defineHistogram(varEtaEffMap, type =
'TEfficiency', title = titleEtaEffMap, path =
'Overview', xbins = 100, xmin = -3., xmax = 3., opt =
'kAlwaysCreate')
73 titleEtaPhiRecoMuonMap =
'; #eta (reco); #phi (reco); Entries'
74 varEtaPhiRecoMuonMap =
'etaRecoMuon,phiRecoMuon;recoMuon_Map_per_etaPhi'
75 sTgcOverviewGroup.defineHistogram(varEtaPhiRecoMuonMap, type =
'TH2F', title = titleEtaPhiRecoMuonMap, path =
'Overview', xbins = 100, xmin = -3., xmax = 3., ybins = 100, ymin = -math.pi, ymax = math.pi, opt =
'kAlwaysCreate')
77 titleEtaPhiPadTriggerMap =
'; #eta (trig); #phi (trig); Entries'
78 varEtaPhiPadTriggerMap =
'etaPadTrigger,phiPadTrigger;padTrigger_Map_per_etaPhi'
79 sTgcOverviewGroup.defineHistogram(varEtaPhiPadTriggerMap, type =
'TH2F', title = titleEtaPhiPadTriggerMap, path =
'Overview', xbins = 100, xmin = -3., xmax = 3., ybins = 100, ymin = -math.pi, ymax = math.pi, opt =
'kAlwaysCreate')
81 titleEtaRecoMuonMap =
'; #eta (reco); Entries'
82 varEtaRecoMuonMap =
'etaRecoMuon;recoMuon_Map_per_eta'
83 sTgcOverviewGroup.defineHistogram(varEtaRecoMuonMap, type =
'TH1F', title = titleEtaRecoMuonMap, path =
'Overview', xbins = 100, xmin = -3., xmax = 3., opt =
'kAlwaysCreate')
85 titleEtaPadTriggerMap =
'; #eta (trig); Entries'
86 varEtaPadTriggerMap =
'etaPadTrigger;padTrigger_Map_per_eta'
87 sTgcOverviewGroup.defineHistogram(varEtaPadTriggerMap, type =
'TH1F', title = titleEtaPadTriggerMap, path =
'Overview', xbins = 100, xmin = -3., xmax = 3., opt =
'kAlwaysCreate')
89 titleDeltaR =
'; #Delta R(trig,reco); Entries'
90 varDeltaR =
'deltaR;deltaR_Matching_recoMuonPadTrigger'
91 sTgcOverviewGroup.defineHistogram(varDeltaR, type =
'TH1F', title = titleDeltaR, path =
'Overview', xbins = 100, xmin = 0, xmax = 10, opt =
'kAlwaysCreate')
93 titleSectorsVersusLumiblockPad =
'Pad; LB; Sector; Hits'
94 varSectorsVersusLumiblockPad =
'padLumiblock,padSector;Nhits_all_pad_in_sector_per_LB'
95 sTgcLBshifterGroup.defineHistogram(varSectorsVersusLumiblockPad, type =
'TH2F', title = titleSectorsVersusLumiblockPad, path =
'Pad', xbins = 2001, xmin = -0.5, xmax = 2000.5, ybins = 2*sectorMax + 1, ymin = -sectorMax - 0.5, ymax = sectorMax + 0.5, opt =
'kAlwaysCreate')
97 titleSectorsVersusLumiblockStrip =
'Strip; LB; Sector; Hits'
98 varSectorsVersusLumiblockStrip =
'stripLumiblock,stripSector;Nhits_all_strip_in_sector_per_LB'
99 sTgcLBshifterGroup.defineHistogram(varSectorsVersusLumiblockStrip, type =
'TH2F', title = titleSectorsVersusLumiblockStrip, path =
'Strip', xbins = 2001, xmin = -0.5, xmax = 2000.5, ybins = 2*sectorMax + 1, ymin = -sectorMax - 0.5, ymax = sectorMax + 0.5, opt =
'kAlwaysCreate')
101 titleSectorsVersusLumiblockWire =
'Wire; LB; Sector; Hits'
102 varSectorsVersusLumiblockWire =
'wireLumiblock,wireSector;Nhits_all_wire_in_sector_per_LB'
103 sTgcLBshifterGroup.defineHistogram(varSectorsVersusLumiblockWire, type =
'TH2F', title = titleSectorsVersusLumiblockWire, path =
'Wire', xbins = 2001, xmin = -0.5, xmax = 2000.5, ybins = 2*sectorMax + 1, ymin = -sectorMax - 0.5, ymax = sectorMax + 0.5, opt =
'kAlwaysCreate')
105 titleSectorVsLB =
'; LB; Sector; Number of triggers'
106 varSectorVsLB =
'lb,sector;OccupancySector_vs_LB'
107 weightSectorVsLB =
'numberOfTriggers'
108 sTgcPadTriggerShifterGroup.defineHistogram(varSectorVsLB, type =
'TH2F', title = titleSectorVsLB, path =
'PadTrigger/Triggers', xbins = 2001, xmin = -0.5, xmax = 2000.5, ybins = 2*sectorMax + 1, ymin = -sectorMax - 0.5, ymax = sectorMax + 0.5, opt =
'kAlwaysCreate', weight = weightSectorVsLB)
110 titleRelBCIDvsLB =
'; LB; Trigger relBCID; Pad Trigger hits'
111 varRelBCIDvsLB =
'lb,relBCID;RelBCID_vs_LB'
112 sTgcPadTriggerShifterGroup.defineHistogram(varRelBCIDvsLB, type =
'TH2F', title = titleRelBCIDvsLB, path =
'PadTrigger/Triggers', xbins = 2001, xmin = -0.5, xmax = 2000.5, ybins = 7, ymin = -0.5, ymax = 6.5, opt =
'kAlwaysCreate')
114 titleHitPFEBperSector =
'; Sector; Hit pFEB; Pad Trigger hits associated to reco muons'
115 varHitPFEBperSector =
'sector,hitPfebs;OccupancypFEB_vs_Sector'
116 sTgcPadTriggerShifterGroup.defineHistogram(varHitPFEBperSector, type =
'TH2F', title = titleHitPFEBperSector, path =
'PadTrigger/Hits', xbins = 2*sectorMax + 1, xmin = -sectorMax - 0.5, xmax = sectorMax + 0.5, ybins = 25, ymin = -0.5, ymax = 24.5, opt =
'kAlwaysCreate')
118 titleHitRelBCID =
'; Sector; Hit relBCID; Pad Trigger hits associated to reco muons'
119 varHitRelBCID =
'sector,hitRelBCID;relBCID_vs_Sector'
120 sTgcPadTriggerShifterGroup.defineHistogram(varHitRelBCID, type =
'TH2F', title = titleHitRelBCID, path =
'PadTrigger/Hits', xbins = 2*sectorMax + 1, xmin = -sectorMax - 0.5, xmax = sectorMax + 0.5, ybins = 7, ymin = -0.5, ymax = 6.5, opt =
'kAlwaysCreate')
122 for sideIndex
in side:
123 titlePhiRecoMuonMap = f
'{sideIndex}; #phi (reco); Entries'
124 varPhiRecoMuonMap = f
'phiRecoMuon_{sideIndex};recoMuon_Map_per_phi_Side{sideIndex}'
125 sTgcOverviewGroup.defineHistogram(varPhiRecoMuonMap, type =
'TH1F', title = titlePhiRecoMuonMap, path =
'Overview', xbins = 100, xmin = -math.pi, xmax = math.pi, opt =
'kAlwaysCreate')
127 titlePhiPadTriggerMap = f
'{sideIndex}; #phi (trig); Entries'
128 varPhiPadTriggerMap = f
'phiPadTrigger_{sideIndex};padTrigger_Map_per_phi_Side{sideIndex}'
129 sTgcOverviewGroup.defineHistogram(varPhiPadTriggerMap, type =
'TH1F', title = titlePhiPadTriggerMap, path =
'Overview', xbins = 100, xmin = -math.pi, xmax = math.pi, opt =
'kAlwaysCreate')
131 titlePhiEffMap = f
'{sideIndex}; #phi (reco); Pad trigger efficiency wrt. reco. muon'
132 varPhiEffMap = f
'muonRecoTriggerMatch,phiRecoMuonEff_{sideIndex};padTrigger_Efficiency_per_phi_Side_{sideIndex}'
133 sTgcOverviewGroup.defineHistogram(varPhiEffMap, type =
'TEfficiency', title = titlePhiEffMap, path =
'Overview', xbins = 100, xmin = -math.pi, xmax = math.pi, opt =
'kAlwaysCreate')
135 for sectorIndex
in range(1, sectorMax + 1):
136 efficiencyGlobalRgroup = helper.addGroup(sTgcMonAlg, f
'rPosStrip_{sideIndex}{sectorIndex}', globalPath +
'Expert/Efficiency/')
138 for layerIndex
in range(1, layerMax + 1):
139 titleEffGlobalRstrip = f
'{sideIndex}' + f
'{sectorIndex}'.zfill(2) + f
'L{layerIndex}; sTgc-GlobalR-Strip (on track) [mm]' + f
'; Efficiency sTGC strip {sideIndex}' + f
'{sectorIndex}'.zfill(2) + f
'L{layerIndex}'
140 varEffGlobalRstrip = f
'hitLayer,rPosStrip_{sideIndex}_sector_{sectorIndex}_layer_{layerIndex};Efficiency_per_Radius_Layer{layerIndex}'
141 efficiencyGlobalRgroup.defineHistogram(varEffGlobalRstrip, type =
'TEfficiency', title = titleEffGlobalRstrip, path = f
'{sideIndex}' + f
'{sectorIndex}'.zfill(2), xbins = 100, xmin = 0., xmax = 5000., opt =
'kAlwaysCreate')
142 for layerIndex
in range(1, layerMax + 1):
143 titleEffYvsXstrip = f
'{sideIndex}L{layerIndex}; sTgc-GlobalX-Strip (on track) [mm]; sTgc-GlobalY-Strip (on track) [mm]; Efficiency sTGC strip {sideIndex}L{layerIndex}'
144 varEffYvsXstrip = f
'hitLayer,xPosStrip_{sideIndex}_layer_{layerIndex},yPosStrip_{sideIndex}_layer_{layerIndex};strip_efficiency_per_mm_squared_Wheel{sideIndex}_layer{layerIndex}'
145 sTgcOverviewGroup.defineHistogram(varEffYvsXstrip, type =
'TEfficiency', title = titleEffYvsXstrip, path =
'Overview', xbins = 500, xmin = -5000., xmax = 5000., ybins = 500, ymin = -5000., ymax = 5000., opt =
'kAlwaysCreate')
147 for stationEtaIndex
in range(1, stationEtaMax + 1):
148 sTgcPadTimingExpertGroup = helper.addGroup(sTgcMonAlg, f
'padTiming_quad_{stationEtaIndex}', globalPath +
'Expert/Timing/Pad')
149 sTgcStripTimingExpertGroup = helper.addGroup(sTgcMonAlg, f
'stripTiming_quad_{stationEtaIndex}', globalPath +
'Expert/Timing/Strip')
150 sTgcWireTimingExpertGroup = helper.addGroup(sTgcMonAlg, f
'wireTiming_quad_{stationEtaIndex}', globalPath +
'Expert/Timing/Wire')
152 sTgcLBpadShifterGroup = helper.addGroup(sTgcMonAlg, f
'sTgcLumiblockPad_quad_{stationEtaIndex}', globalPath +
'Shifter/Lumiblock/Pad')
153 sTgcLBstripShifterGroup = helper.addGroup(sTgcMonAlg, f
'sTgcLumiblockStrip_quad_{stationEtaIndex}', globalPath +
'Shifter/Lumiblock/Strip')
154 sTgcLBwireShifterGroup = helper.addGroup(sTgcMonAlg, f
'sTgcLumiblockWire_quad_{stationEtaIndex}', globalPath +
'Shifter/Lumiblock/Wire')
156 for layerIndex
in range(1, layerMax + 1):
157 titleTimingPadTrack = f
'Q{stationEtaIndex}L{layerIndex}; Sector; Pad Timing (on-track) [ns]; Hits'
158 varTimingPadTrack = f
'padTrackSectorSided_quad_{stationEtaIndex}_layer_{layerIndex},padTrackTiming_quad_{stationEtaIndex}_layer_{layerIndex};All_pad_timing_in_Q{stationEtaIndex}_Layer{layerIndex}'
159 sTgcPadTimingExpertGroup.defineHistogram(varTimingPadTrack, type =
'TH2F', title = titleTimingPadTrack, path = f
'Q{stationEtaIndex}', xbins = 2*sectorMax + 1, xmin = -sectorMax - 0.5, xmax = sectorMax + 0.5, ybins = 201, ymin = -75.5, ymax = 125.5, opt =
'kAlwaysCreate')
161 titleTimingStripTrack = f
'Q{stationEtaIndex}L{layerIndex}; Sector; Strip Cluster Timing (on-track) [ns]; Hits'
162 varTimingStripTrack = f
'stripTrackSectorSided_quad_{stationEtaIndex}_layer_{layerIndex},stripTrackTiming_quad_{stationEtaIndex}_layer_{layerIndex};All_strip_timing_in_Q{stationEtaIndex}_Layer{layerIndex}'
163 sTgcStripTimingExpertGroup.defineHistogram(varTimingStripTrack, type =
'TH2F', title = titleTimingStripTrack, path = f
'Q{stationEtaIndex}', xbins = 2*sectorMax + 1, xmin = -sectorMax - 0.5, xmax = sectorMax + 0.5, ybins = 201, ymin = -75.5, ymax = 125.5, opt =
'kAlwaysCreate')
165 titleTimingWireTrack = f
'Q{stationEtaIndex}L{layerIndex}; Sector; Wire Group Timing (on-track) [ns]; Hits'
166 varTimingWireTrack = f
'wireTrackSectorSided_quad_{stationEtaIndex}_layer_{layerIndex},wireTrackTiming_quad_{stationEtaIndex}_layer_{layerIndex};All_wire_timing_in_Q{stationEtaIndex}_Layer{layerIndex}'
167 sTgcWireTimingExpertGroup.defineHistogram(varTimingWireTrack, type =
'TH2F', title = titleTimingWireTrack, path = f
'Q{stationEtaIndex}', xbins = 2*sectorMax + 1, xmin = -sectorMax - 0.5, xmax = sectorMax + 0.5, ybins = 201, ymin = -75.5, ymax = 125.5, opt =
'kAlwaysCreate')
169 titleSectorsVersusLumiblockPad = f
'Pad_L{layerIndex}Q{stationEtaIndex}; LB; Sector; Hits'
170 varSectorsVersusLumiblockPad = f
'padLumiblock_quad_{stationEtaIndex}_layer_{layerIndex},padSector_quad_{stationEtaIndex}_layer_{layerIndex};Nhits_all_pad_in_sector_per_LB_in_Q{stationEtaIndex}_Layer{layerIndex}'
171 sTgcLBpadShifterGroup.defineHistogram(varSectorsVersusLumiblockPad, type =
'TH2F', title = titleSectorsVersusLumiblockPad, path = f
'Q{stationEtaIndex}', xbins = 2001, xmin = -0.5, xmax = 2000.5, ybins = 2*sectorMax + 1, ymin = -sectorMax - 0.5, ymax = sectorMax + 0.5, opt =
'kAlwaysCreate')
173 titleSectorsVersusLumiblockStrip = f
'Strip_L{layerIndex}Q{stationEtaIndex}; LB; Sector; Hits'
174 varSectorsVersusLumiblockStrip = f
'stripLumiblock_quad_{stationEtaIndex}_layer_{layerIndex},stripSector_quad_{stationEtaIndex}_layer_{layerIndex};Nhits_all_strip_in_sector_per_LB_in_Q{stationEtaIndex}_Layer{layerIndex}'
175 sTgcLBstripShifterGroup.defineHistogram(varSectorsVersusLumiblockStrip, type =
'TH2F', title = titleSectorsVersusLumiblockStrip, path = f
'Q{stationEtaIndex}', xbins = 2001, xmin = -0.5, xmax = 2000.5, ybins = 2*sectorMax + 1, ymin = -sectorMax - 0.5, ymax = sectorMax + 0.5, opt =
'kAlwaysCreate')
177 titleSectorsVersusLumiblockWire = f
'Wire_L{layerIndex}Q{stationEtaIndex}; LB; Sector; Hits'
178 varSectorsVersusLumiblockWire = f
'wireLumiblock_quad_{stationEtaIndex}_layer_{layerIndex},wireSector_quad_{stationEtaIndex}_layer_{layerIndex};Nhits_all_wire_in_sector_per_LB_in_Q{stationEtaIndex}_Layer{layerIndex}'
179 sTgcLBwireShifterGroup.defineHistogram(varSectorsVersusLumiblockWire, type =
'TH2F', title = titleSectorsVersusLumiblockWire, path = f
'Q{stationEtaIndex}', xbins = 2001, xmin = -0.5, xmax = 2000.5, ybins = 2*sectorMax + 1, ymin = -sectorMax - 0.5, ymax = sectorMax + 0.5, opt =
'kAlwaysCreate')
181 for sideIndex
in side:
182 for sizeIndex
in size:
183 titlePhiVsIds = f
'{sideIndex}{sizeIndex}; Trigger phiID; Trigger bandID; Pad Trigger hits'
184 varPhiVsIds = f
'phiIds_{sideIndex}_{sizeIndex},bandIds_{sideIndex}_{sizeIndex};bandIds_vs_phiIds_Side{sideIndex}_Size{sizeIndex}'
185 sTgcPadTriggerShifterGroup.defineHistogram(varPhiVsIds, type =
'TH2F', title = titlePhiVsIds, path =
'PadTrigger/Triggers', xbins = 65, xmin = -32.5, xmax = 32.5, ybins = 101, ymin = -0.5, ymax = 100.5, opt =
'kAlwaysCreate')
187 for layerIndex
in range(1, layerMax + 1):
188 titleEtaPhiOcc = f
'{layerIndex}{sideIndex}{sizeIndex}; Pad column; Pad row; Hits'
189 varEtaPhiOcc = f
'padPhi_{sideIndex}_{sizeIndex}_layer_{layerIndex},padEta_{sideIndex}_{sizeIndex}_layer_{layerIndex};padEtaPhiOcc_{layerIndex}{sideIndex}{sizeIndex}'
190 padTriggerOccupancyGroup.defineHistogram(varEtaPhiOcc, type =
'TH2F', title = titleEtaPhiOcc, path =
'padTriggerOccupancy', xbins = 71, xmin = 0.5, xmax = 71.5, xlabels = columnLabels[columnLabelsCounter], ybins = 56, ymin = 0.5, ymax = 56.5, ylabels = rowLabels, opt =
'kAlwaysCreate')
192 columnLabelsCounter += 1
193 for sectorIndex
in range(1, sectorMax + 1):
194 titleBandIdVersusLBperSector = f
'{sideIndex}' + f
'{sectorIndex}'.zfill(2) +
'; LB; Trigger bandID; number of triggers'
195 varBandIdVersusLBperSector = f
'lb_{sideIndex}_sector_{sectorIndex},bandIds_{sideIndex}_sector_{sectorIndex};OccupancyBandId_vs_LB_Side{sideIndex}_Sector{sectorIndex}'
196 weightBandIdVersusLBperSector = f
'numberOfTriggers_{sideIndex}_sector_{sectorIndex}'
197 sTgcPadTriggerExpertGroup.defineHistogram(varBandIdVersusLBperSector, type =
'TH2F', title = titleBandIdVersusLBperSector, path =
'PadTrigger/Triggers/OccupancyBandIDvsLB', xbins = 2001, xmin = -0.5, xmax = 2000.5, ybins = 101, ymin = -0.5, ymax = 100.5, opt =
'kAlwaysCreate', weight = weightBandIdVersusLBperSector)
199 titlePhiVsIds = f
'{sideIndex}' + f
'{sectorIndex}'.zfill(2) +
'; Trigger phiID; Trigger bandID; Pad Trigger hits'
200 varPhiVsIds = f
'phiIds_{sideIndex}_sector_{sectorIndex},bandIds_{sideIndex}_sector_{sectorIndex};bandIds_vs_phiIds_Side{sideIndex}_Sector{sectorIndex}'
201 sTgcPadTriggerExpertGroup.defineHistogram(varPhiVsIds, type =
'TH2F', title = titlePhiVsIds, path =
'PadTrigger/Triggers/OccupancyBandIDvsPhiId', xbins = 65, xmin = -32.5, xmax = 32.5, ybins = 101, ymin = -0.5, ymax = 100.5, opt =
'kAlwaysCreate')
202 titleRelBCIDvsLB = f
'{sideIndex}' + f
'{sectorIndex}'.zfill(2) +
'; LB; Trigger relBCID; Pad Trigger hits'
203 varRelBCIDvsLB = f
'lb_{sideIndex}_sector_{sectorIndex},relBCID_{sideIndex}_sector_{sectorIndex};RelBCID_vs_LB_Side{sideIndex}_Sector{sectorIndex}'
204 sTgcPadTriggerExpertGroup.defineHistogram(varRelBCIDvsLB, type =
'TH2F', title = titleRelBCIDvsLB, path =
'PadTrigger/Triggers/RelBCIDvsLB', xbins = 2001, xmin = -0.5, xmax = 2000.5, ybins = 7, ymin = -0.5, ymax = 6.5, opt =
'kAlwaysCreate')
206 titleTriggerPhiIDvsRelBCIDPerSector = f
'{sideIndex}' + f
'{sectorIndex}'.zfill(2) +
'; Trigger relBCID; Trigger phiID; Pad Trigger hits'
207 varTriggerPhiIDvsRelBCIDPerSector = f
'relBCID_{sideIndex}_sector_{sectorIndex},phiIds_{sideIndex}_sector_{sectorIndex};Trigger_PhiID_vs_RelBCID_Side{sideIndex}_Sector{sectorIndex}'
208 sTgcPadTriggerShifterGroup.defineHistogram(varTriggerPhiIDvsRelBCIDPerSector, type =
'TH2F', title = titleTriggerPhiIDvsRelBCIDPerSector, path =
'PadTrigger/Triggers/PhiIDvsRelBCID', xbins = 7, xmin = -0.5, xmax = 6.5, ybins = 65, ymin = -32.5, ymax = 32.5, opt =
'kAlwaysCreate')
210 titleTriggerBandIDvsRelBCIDPerSector = f
'{sideIndex}' + f
'{sectorIndex}'.zfill(2) +
'; Trigger relBCID; Trigger bandID; Pad Trigger hits'
211 varTriggerBandIDvsRelBCIDPerSector = f
'relBCID_{sideIndex}_sector_{sectorIndex},bandID_{sideIndex}_sector_{sectorIndex};Trigger_BandID_vs_RelBCID_Side{sideIndex}_Sector{sectorIndex}'
212 sTgcPadTriggerShifterGroup.defineHistogram(varTriggerBandIDvsRelBCIDPerSector, type =
'TH2F', title = titleTriggerBandIDvsRelBCIDPerSector, path =
'PadTrigger/Triggers/BandIDvsRelBCID', xbins = 7, xmin = -0.5, xmax = 6.5, ybins = 101, ymin = -0.5, ymax = 100.5, opt =
'kAlwaysCreate')
214 titleHitPFEBvsRelBCIDPerSector = f
'{sideIndex}' + f
'{sectorIndex}'.zfill(2) +
'; Hit relBCID; Hit pFEB; Pad Trigger hits associated to reco muons'
215 varHitPFEBvsRelBCIDPerSector = f
'hitRelBCID_{sideIndex}_sector_{sectorIndex},hitPfebs_{sideIndex}_sector_{sectorIndex};pFEB_vs_relBCID_Side{sideIndex}_Sector{sectorIndex}'
216 sTgcPadTriggerShifterGroup.defineHistogram(varHitPFEBvsRelBCIDPerSector, type =
'TH2F', title = titleHitPFEBvsRelBCIDPerSector, path =
'PadTrigger/Hits/PFEBvsRelBCID', xbins = 7, xmin = -0.5, xmax = 6.5, ybins = 25, ymin = -0.5, ymax = 24.5, opt =
'kAlwaysCreate')
218 for stationEtaIndex
in range(1, stationEtaMax + 1):
219 padChargeGroup = helper.addGroup(sTgcMonAlg, f
'padCharge_{sideIndex}{sectorIndex}_quad_{stationEtaIndex}', globalPath + f
'Expert/Charge/{sideIndex}' + f
'{sectorIndex}'.zfill(2) +
'/Pad')
220 stripChargeGroup = helper.addGroup(sTgcMonAlg, f
'stripCharge_{sideIndex}{sectorIndex}_quad_{stationEtaIndex}', globalPath + f
'Expert/Charge/{sideIndex}' + f
'{sectorIndex}'.zfill(2) +
'/Strip')
221 wireGroupChargeGroup = helper.addGroup(sTgcMonAlg, f
'wireGroupCharge_{sideIndex}{sectorIndex}_quad_{stationEtaIndex}', globalPath + f
'Expert/Charge/{sideIndex}' + f
'{sectorIndex}'.zfill(2) +
'/Wire')
222 residualGroup = helper.addGroup(sTgcMonAlg, f
'sTgcResiduals_{sideIndex}{sectorIndex}_quad_{stationEtaIndex}', globalPath + f
'Expert/Residuals/{sideIndex}' + f
'{sectorIndex}'.zfill(2))
224 for layerIndex
in range(1, layerMax + 1):
225 titlePadChargeTrack = f
'{sideIndex}' + f
'{sectorIndex}'.zfill(2) + f
'L{layerIndex}Q{stationEtaIndex}; Pad Charge (on-track) [fC]; Number of Entries'
226 varPadChargeTrack = f
'padTrackCharge_{sideIndex}_quad_{stationEtaIndex}_sector_{sectorIndex}_layer_{layerIndex};All_pad_charge_in_Q{stationEtaIndex}_Layer{layerIndex}'
227 padChargeGroup.defineHistogram(varPadChargeTrack, type =
'TH1F', title = titlePadChargeTrack, path = f
'Q{stationEtaIndex}', xbins = 100, xmin = 0., xmax = 1000., opt =
'kAlwaysCreate')
229 titleStripChargeTrack = f
'{sideIndex}' + f
'{sectorIndex}'.zfill(2) + f
'L{layerIndex}Q{stationEtaIndex}; Strip Cluster Charge (on-track) [fC]; Number of Entries'
230 varStripChargeTrack = f
'stripTrackCharge_{sideIndex}_quad_{stationEtaIndex}_sector_{sectorIndex}_layer_{layerIndex};All_strip_charge_in_Q{stationEtaIndex}_Layer{layerIndex}'
231 stripChargeGroup.defineHistogram(varStripChargeTrack, type =
'TH1F', title = titleStripChargeTrack, path = f
'Q{stationEtaIndex}', xbins = 120, xmin = 0., xmax = 1200., opt =
'kAlwaysCreate')
233 titleWireGroupChargeTrack = f
'{sideIndex}' + f
'{sectorIndex}'.zfill(2) + f
'L{layerIndex}Q{stationEtaIndex}; Wire Group Charge (on-track) [fC]; Number of Entries'
234 varWireGroupChargeTrack = f
'wireGroupTrackCharge_{sideIndex}_quad_{stationEtaIndex}_sector_{sectorIndex}_layer_{layerIndex};All_wire_charge_in_Q{stationEtaIndex}_Layer{layerIndex}'
235 wireGroupChargeGroup.defineHistogram(varWireGroupChargeTrack, type =
'TH1F', title = titleWireGroupChargeTrack, path = f
'Q{stationEtaIndex}', xbins = 100, xmin = 0., xmax = 1000., opt =
'kAlwaysCreate')
237 titleResidual = f
'{sideIndex}' + f
'{sectorIndex}'.zfill(2) + f
'L{layerIndex}Q{stationEtaIndex}; Residual [mm]; Number of Entries'
238 varResidual = f
'residual_{sideIndex}_quad_{stationEtaIndex}_sector_{sectorIndex}_layer_{layerIndex};Residuals_in_Q{stationEtaIndex}_Layer{layerIndex}'
239 residualGroup.defineHistogram(varResidual, type =
'TH1F', title = titleResidual, path = f
'Q{stationEtaIndex}', xbins = 1000, xmin = -2., xmax = 2., opt =
'kAlwaysCreate')
242 for layerIndex
in range(1, layerMax + 1):
243 titleStripClusterSizeTrack = f
'L{layerIndex}; Sector; Strip Cluster Size (on-track); Hits'
244 varStripClusterSizeTrack = f
'stripTrackSectorSided_layer_{layerIndex},stripTrackClusterSize_layer_{layerIndex};Strip_cluster_size_ontrk_per_sector_Layer{layerIndex}'
245 sTgcOverviewGroup.defineHistogram(varStripClusterSizeTrack, type =
'TH2F', title = titleStripClusterSizeTrack, path =
'Overview', xbins = 2*sectorMax + 1, xmin = -sectorMax - 0.5, xmax = sectorMax + 0.5, ybins = 13, ymin = -0.5, ymax = 12.5, opt =
'kAlwaysCreate')
247 titleTimingStripTrack = f
'L{layerIndex}; Sector; Strip Cluster Timing (on-track) [ns]; Hits'
248 varTimingStripTrack = f
'stripTrackSectorSided_layer_{layerIndex},stripTrackTiming_layer_{layerIndex};Strip_cluster_timing_ontrk_per_sector_Layer{layerIndex}'
249 sTgcOverviewGroup.defineHistogram(varTimingStripTrack, type =
'TH2F', title = titleTimingStripTrack, path =
'Overview', xbins = 2*sectorMax + 1, xmin = -sectorMax - 0.5, xmax = sectorMax + 0.5, ybins = 201, ymin = -75.5, ymax = 125.5, opt =
'kAlwaysCreate')
251 titleStationEtaSectorPadHitMap = f
'Pad_L{layerIndex}; Sector; Quad; Hits'
252 varStationEtaSectorPadHitMap = f
'sector_layer_{layerIndex},stationEta_layer_{layerIndex};Pad_quad_occupancy_per_sector_Layer{layerIndex}'
253 sTgcQuadOccupancyGroupPad.defineHistogram(varStationEtaSectorPadHitMap, type =
'TH2F', title = titleStationEtaSectorPadHitMap, path =
'Pad', xbins = sectorMax, xmin = 0.5, xmax = sectorMax + 0.5, ybins = 2*stationEtaMax + 1, ymin = -stationEtaMax - 0.5, ymax = stationEtaMax + 0.5, opt =
'kAlwaysCreate')
255 titleStationEtaSectorStripHitMap = f
'Strip_L{layerIndex}; Sector; Quad; Hits'
256 varStationEtaSectorStripHitMap = f
'sector_layer_{layerIndex},stationEta_layer_{layerIndex};Strip_quad_occupancy_per_sector_Layer{layerIndex}'
257 sTgcQuadOccupancyGroupStrip.defineHistogram(varStationEtaSectorStripHitMap, type =
'TH2F', title = titleStationEtaSectorStripHitMap, path =
'Strip', xbins = sectorMax, xmin = 0.5, xmax = sectorMax + 0.5, ybins = 2*stationEtaMax + 1, ymin = -stationEtaMax - 0.5, ymax = stationEtaMax + 0.5, opt =
'kAlwaysCreate')
259 titleStationEtaSectorWireGroupHitMap = f
'Wire_L{layerIndex}; Sector; Quad; Hits'
260 varStationEtaSectorWireGroupHitMap = f
'sector_layer_{layerIndex},stationEta_layer_{layerIndex};Wire_quad_occupancy_per_sector_Layer{layerIndex}'
261 sTgcQuadOccupancyGroupWire.defineHistogram(varStationEtaSectorWireGroupHitMap, type =
'TH2F', title = titleStationEtaSectorWireGroupHitMap, path =
'Wire', xbins = sectorMax, xmin = 0.5, xmax = sectorMax + 0.5, ybins = 2*stationEtaMax + 1, ymin = -stationEtaMax - 0.5, ymax = stationEtaMax + 0.5, opt =
'kAlwaysCreate')
263 titleTimingPadTrack = f
'L{layerIndex}; Sector; Pad Timing (on-track) [ns]; Hits'
264 varTimingPadTrack = f
'padTrackSectorSided_layer_{layerIndex},padTrackTiming_layer_{layerIndex};All_pad_timing_per_sector_Layer{layerIndex}'
265 sTgcTimingGroup.defineHistogram(varTimingPadTrack, type =
'TH2F', title = titleTimingPadTrack, path =
'Pad', xbins = 2*sectorMax + 1, xmin = -sectorMax - 0.5, xmax = sectorMax + 0.5, ybins = 225, ymin = -100., ymax = 125., opt =
'kAlwaysCreate')
267 titleTimingStripTrack = f
'L{layerIndex}; Sector; Strip Cluster Timing (on-track) [ns]; Hits'
268 varTimingStripTrack = f
'stripTrackSectorSided_layer_{layerIndex},stripTrackTiming_layer_{layerIndex};All_strip_timing_per_sector_Layer{layerIndex}'
269 sTgcTimingGroup.defineHistogram(varTimingStripTrack, type =
'TH2F', title = titleTimingStripTrack, path =
'Strip', xbins = 2*sectorMax + 1, xmin = -sectorMax - 0.5, xmax = sectorMax + 0.5, ybins = 225, ymin = -100., ymax = 125., opt =
'kAlwaysCreate')
271 titleTimingWireGroupTrack = f
'L{layerIndex}; Sector; Wire Group timing (on-track) [ns]; Hits'
272 varTimingWireGroupTrack = f
'wireGroupTrackSectorSided_layer_{layerIndex},wireGroupTrackTiming_layer_{layerIndex};All_wire_timing_per_sector_Layer{layerIndex}'
273 sTgcTimingGroup.defineHistogram(varTimingWireGroupTrack, type =
'TH2F', title = titleTimingWireGroupTrack, path =
'Wire', xbins = 2*sectorMax + 1, xmin = -sectorMax - 0.5, xmax = sectorMax + 0.5, ybins = 225, ymin = -100., ymax = 125., opt =
'kAlwaysCreate')
275 titlePadOccupancy = f
'L{layerIndex}; Sector; Pad Number; Hits'
276 varPadOccupancy = f
'sector_layer_{layerIndex},padNumber_layer_{layerIndex};Pad_ch_occupancy_per_sector_Layer{layerIndex}'
277 sTgcOccupancyGroup.defineHistogram(varPadOccupancy, type =
'TH2F', title = titlePadOccupancy, path =
'Pad', xbins = 2*sectorMax + 1, xmin = -sectorMax - 0.5, xmax = sectorMax + 0.5, ybins = 317, ymin = 0., ymax = 317., opt =
'kAlwaysCreate')
279 titleStripOccupancy = f
'L{layerIndex}; Sector; Strip Number; Hits'
280 varStripOccupancy = f
'sector_layer_{layerIndex},stripNumber_layer_{layerIndex};Strip_ch_occupancy_per_sector_Layer{layerIndex}'
281 sTgcOccupancyGroup.defineHistogram(varStripOccupancy, type =
'TH2F', title = titleStripOccupancy, path =
'Strip', xbins = 2*sectorMax + 1, xmin = -sectorMax - 0.5, xmax = sectorMax + 0.5, ybins = 1130, ymin = 0., ymax = 1130., opt =
'kAlwaysCreate')
283 titleWireGroupOccupancyPerQuad = f
'L{layerIndex}; Wire Group Number; Quad; Hits'
284 varWireGroupOccupancyPerQuad = f
'wireGroupNumber_layer_{layerIndex},stationEta_layer_{layerIndex};Wire_ch_occupancy_per_sector_Layer{layerIndex}'
285 sTgcOccupancyGroup.defineHistogram(varWireGroupOccupancyPerQuad, type =
'TH2F', title = titleWireGroupOccupancyPerQuad, path =
'Wire', xbins = 58*sectorMax + 1, xmin = -0.5, xmax = 58*sectorMax + 0.5, xlabels = wireGroupNumberLabel, ybins = 2*stationEtaMax + 1, ymin = -stationEtaMax - 0.5, ymax = stationEtaMax + 0.5, opt =
'kAlwaysCreate')
287 acc = helper.result()