12 '''Function to configures some algorithms in the monitoring system.'''
14 from AthenaConfiguration.ComponentAccumulator
import ComponentAccumulator
17 from AthenaMonitoring
import AthMonitorCfgHelper
18 helper = AthMonitorCfgHelper(flags,
'TRTMonitoringCfg')
20 from AthenaConfiguration.ComponentFactory
import CompFactory
21 have_trt_phase = flags.InDet.doTRTPhase
or 'TRT_Phase' in flags.Input.Collections
22 algTRTMonitoringRun3ESD = helper.addAlgorithm(CompFactory.TRTMonitoringRun3ESD_Alg,
23 'AlgTRTMonitoringRun3',
24 ComTimeObjectName =
'TRT_Phase' if have_trt_phase
else '')
26 from InDetConfig.InDetTrackSelectionToolConfig
import InDetTrackSelectionTool_Loose_Cfg
30 if not flags.DQ.triggerDataAvailable:
31 algTRTMonitoringRun3ESD.TrigDecisionObjectName =
''
33 from IOVDbSvc.IOVDbSvcConfig
import addFoldersSplitOnline
35 result.merge(
addFoldersSplitOnline(flags,
"TRT",
"/TRT/Onl/Calib/errors2d",
"/TRT/Calib/errors2d",className=
"TRTCond::RtRelationMultChanContainer"))
36 result.merge(
addFoldersSplitOnline(flags,
"TRT",
"/TRT/Onl/Calib/slopes",
"/TRT/Calib/slopes",className=
"TRTCond::RtRelationMultChanContainer"))
37 result.merge(
addFoldersSplitOnline(flags,
"TRT",
"/TRT/Onl/Calib/RT",
"/TRT/Calib/RT",className=
"TRTCond::RtRelationMultChanContainer"))
38 result.merge(
addFoldersSplitOnline(flags,
"TRT",
"/TRT/Onl/Calib/T0",
"/TRT/Calib/T0",className=
"TRTCond::StrawT0MultChanContainer"))
40 from TRT_ConditionsServices.TRT_ConditionsServicesConfig
import (
42 algTRTMonitoringRun3ESD.ITRT_CalDbTool = (
45 from TRT_ConditionsServices.TRT_ConditionsServicesConfig
import (
46 TRT_StrawStatusSummaryToolCfg)
47 algTRTMonitoringRun3ESD.InDetTRTStrawStatusSummaryTool = (
50 from TRT_ConditionsServices.TRT_ConditionsServicesConfig
import (
51 TRT_StrawNeighbourSvcCfg)
52 algTRTMonitoringRun3ESD.NeighbourSvc = (
55 from InDetConfig.TRT_DriftFunctionToolConfig
import (
56 TRT_DriftFunctionToolCfg)
57 algTRTMonitoringRun3ESD.DriftFunctionTool = (
60 from TrkConfig.TrkTrackSummaryToolConfig
import InDetTrackSummaryToolCfg
69 barrelOrEndcap = (
'Barrel',
'EndCap')
72 strawMax = (1642, 3840)
74 numberOfStacks = (32, 32)
81 oss_distance = distToStraw
82 distance =
str(oss_distance)
83 regionTag =
' (' + barrelOrEndcap[ibe] +
')'
85 for i
in range(numberOfStacks[ibe]*2):
86 trackGroup = helper.addGroup(algTRTMonitoringRun3ESD,
'TRTTrackHistograms{0}{1}'.
format(ibe,i))
91 if i < numberOfStacks[ibe]:
92 nBarrelModules = i + 1
93 oss =
'TRT/Barrel/Stack{0}A'.
format(nBarrelModules)
94 elif i >= numberOfStacks[ibe]:
95 nBarrelModules = i + 1 - 32
96 oss =
'TRT/Barrel/Stack{0}C'.
format(nBarrelModules)
98 if i < numberOfStacks[ibe]:
99 nBarrelModules = i + 1
100 oss =
'TRT/EndcapA/Sector{0}'.
format(nBarrelModules)
101 elif i >= numberOfStacks[ibe]:
102 nBarrelModules = i + 1 - 32
103 oss =
'TRT/EndcapC/Sector{0}'.
format(nBarrelModules)
105 trackGroup.defineHistogram(
'ValidRawDriftTimeonTrkS_x,ValidRawDriftTimeonTrkS_y;hValidRawDriftTimeonTrkS',type=
'TProfile',title=
'Valid Raw Drift Time on Track: Straws;Straw Number in Stack;Time (ns)',path=oss,xbins=strawMax[ibe],xmin=0,xmax=strawMax[ibe],duration=
'run',opt=
'kAlwaysCreate')
106 trackGroup.defineHistogram(
'HitTronTwEPCMapS_x,HitTronTwEPCMapS_y;hHitTronTwEPCMapS',type=
'TProfile',title=
'Mean Trailing Edge on Track (with Event Phase Correction): Straws;Straw Number in Stack;Time (ns)',path=oss,xbins=strawMax[ibe],xmin=0,xmax=strawMax[ibe],duration=
'run',opt=
'kAlwaysCreate')
108 trackGroup.defineHistogram(
'ValidRawDriftTimeonTrkC_x,ValidRawDriftTimeonTrkC_y;hValidRawDriftTimeonTrkC',type=
'TProfile',title=
'Valid Raw Drift Time on Track: Chips;Chip Number in Stack;Time (ns)',path=oss,xbins=iChipMax[ibe],xmin=0,xmax=iChipMax[ibe],duration=
'run',opt=
'kAlwaysCreate')
109 trackGroup.defineHistogram(
'HitTronTwEPCMapC_x,HitTronTwEPCMapC_y;hHitTronTwEPCMapC',type=
'TProfile',title=
'Mean Trailing Edge on Track (with Event Phase Correction): Chips;Chip Number in Stack;Time (ns)',path=oss,xbins=iChipMax[ibe],xmin=0,xmax=iChipMax[ibe],duration=
'run',opt=
'kAlwaysCreate')
112 gas = (
'in_A',
'in_B',
'out_A',
'out_B')
113 Mod = (
'1',
'2',
'3',
'shortP',
'shortN')
116 shiftTrackGroup = helper.addGroup(algTRTMonitoringRun3ESD,
'ShiftTRTTrackHistograms{0}'.
format(ibe))
117 regionTag =
' (' + barrelOrEndcap[ibe] +
')'
120 shiftTrackGroup.defineHistogram(
'EvtPhase;hEvtPhase',type=
'TH1F',title=
'Event Phase Correction Factor;Event Phase (ns);Entries',path=
'TRT/Shift/{0}'.
format(barrelOrEndcap[ibe]),xbins=200,xmin=-50,xmax=50,opt=
'kAlwaysCreate')
121 shiftTrackGroup.defineHistogram(
'EvtPhaseVsTrig_x,EvtPhaseVsTrig_y;hEvtPhaseVsTrig',type=
'TH2F',title=
'Event Phase vs L1 Trigger Item;Event Phase (ns);L1 Trigger Item',path=
'TRT/Shift/{0}'.
format(barrelOrEndcap[ibe]),xbins=300,xmin=-200,xmax=100,ybins=256,ymin=-0.5,ymax=255.5,duration=
'run',opt=
'kAlwaysCreate')
122 shiftTrackGroup.defineHistogram(
'EvtPhaseDetPhi_B_x,EvtPhaseDetPhi_B_y;hEvtPhaseDetPhi',type=
'TProfile',title=
'Event Phase vs #phi (2D){0};#phi (deg);Event Phase from Tracks per Event'.
format(regionTag),path=
'TRT/Shift/{0}'.
format(barrelOrEndcap[ibe]),xbins=nPhiBins,xmin=0.,xmax=360.,duration=
'run',opt=
'kAlwaysCreate')
123 shiftTrackGroup.defineHistogram(
'RtRelation_B_x,RtRelation_B_y;hrtRelation',type=
'TH2F',title=
'R(t) Relation for Xenon Straws{0};Measured Leading Edge (ns);Track-to-Wire Distance (mm)'.
format(regionTag),path=
'TRT/Shift/{0}'.
format(barrelOrEndcap[ibe]),xbins=30,xmin=-12.5,xmax=81.25,ybins=50,ymin=0.,ymax=2.5,duration=
'run',opt=
'kAlwaysCreate')
124 shiftTrackGroup.defineHistogram(
'NumHoTDetPhi_B_x,NumHoTDetPhi_B_y;hNumHoTDetPhi',type=
'TProfile',title=
'Number of Hits per Track with {0} mm Cut vs #phi{1};#phi (deg);Hits per Track, TRT Hits >= {2}'.
format(distance,regionTag,minTRTHits),path=
'TRT/Shift/{0}'.
format(barrelOrEndcap[ibe]),xbins=nPhiBins,xmin=0.,xmax=360.,duration=
'run',opt=
'kAlwaysCreate')
125 shiftTrackGroup.defineHistogram(
'TronTDist_B;hTronTDist',type=
'TH1F',title=
'Trailing Edge Distribution on Track for Xenon Straws{0};Trailing Edge (ns);Entries'.
format(regionTag),path=
'TRT/Shift/{0}'.
format(barrelOrEndcap[ibe]),xbins=26,xmin=-0.5,xmax=80.75,duration=
'run',opt=
'kAlwaysCreate')
126 shiftTrackGroup.defineHistogram(
'DriftTimeonTrkDist_B;hDriftTimeonTrkDist',type=
'TH1F',title=
'Drift Time Distribution on Track for Xenon Straws{0};Drift Time (ns);Entries'.
format(regionTag),path=
'TRT/Shift/{0}'.
format(barrelOrEndcap[ibe]),xbins=32,xmin=0,xmax=100,duration=
'run',opt=
'kAlwaysCreate')
127 shiftTrackGroup.defineHistogram(
'NumTrksDetPhi_B;hNumTrksDetPhi',type=
'TH1F',title=
'Number of Reconstructed Tracks vs #phi (2D){0};#phi (deg);Number of Tracks'.
format(regionTag),path=
'TRT/Shift/{0}'.
format(barrelOrEndcap[ibe]),xbins=60,xmin=0,xmax=360,duration=
'run',opt=
'kAlwaysCreate')
129 shiftTrackGroup.defineHistogram(
'DriftTimeonTrkDist_B_Ar;hDriftTimeonTrkDist_Ar',type=
'TH1F',title=
'Drift Time Distribution on Track for Argon Straws{0};Drift Time (ns);Entries'.
format(regionTag),path=
'TRT/Shift/{0}'.
format(barrelOrEndcap[ibe]),xbins=32,xmin=0,xmax=100,duration=
'run',opt=
'kAlwaysCreate')
130 shiftTrackGroup.defineHistogram(
'TronTDist_B_Ar;hTronTDist_Ar',type=
'TH1F',title=
'Trailing Edge Distribution on Track for Argon Straws{0};Trailing Edge (ns);Entries'.
format(regionTag),path=
'TRT/Shift/{0}'.
format(barrelOrEndcap[ibe]),xbins=26,xmin=-0.5,xmax=80.75,duration=
'run',opt=
'kAlwaysCreate')
131 shiftTrackGroup.defineHistogram(
'RtRelation_B_Ar_x,RtRelation_B_Ar_y;hrtRelation_Ar',type=
'TH2F',title=
'R(t) Relation for Argon Straws{0};Measured Leading Edge (ns);Track-to-Wire Distance (mm)'.
format(regionTag),path=
'TRT/Shift/{0}'.
format(barrelOrEndcap[ibe]),xbins=30,xmin=-12.5,xmax=81.25,ybins=50,ymin=0,ymax=2.5,duration=
'run',opt=
'kAlwaysCreate')
132 shiftTrackGroup.defineHistogram(
'Pull_Biased_Barrel;hPull_Biased_Barrel',type=
'TH1F',title=
'Biased Track Pulls for Barrel Hits;Pulls;Entries',path=
'TRT/Shift/{0}'.
format(barrelOrEndcap[ibe]),xbins=200,xmin=-2.5,xmax=2.5,duration=
'run',opt=
'kAlwaysCreate')
133 shiftTrackGroup.defineHistogram(
'Residual_B_Ar;hResidual_Ar',type=
'TH1F',title=
'Residuals for Argon Straws{0};Hit-to-Track Distance (mm);Entries'.
format(regionTag),path=
'TRT/Shift/{0}'.
format(barrelOrEndcap[ibe]),xbins=200,xmin=-2.5,xmax=2.5,duration=
'lowStat',opt=
'kAlwaysCreate')
134 shiftTrackGroup.defineHistogram(
'Residual_B_Ar;hResidual_Ar',type=
'TH1F',title=
'Residuals for Argon Straws{0};Hit-to-Track Distance (mm);Entries'.
format(regionTag),path=
'TRT/Shift/{0}'.
format(barrelOrEndcap[ibe]),xbins=200,xmin=-2.5,xmax=2.5,duration=
'run',opt=
'kAlwaysCreate')
135 shiftTrackGroup.defineHistogram(
'Residual_noTubeHits_B_Ar;hResidual_noTubeHits_Ar',type=
'TH1F',title=
'Residuals for Argon Straws{0} (no tube hits);Hit-to-Track Distance (mm);Entries'.
format(regionTag),path=
'TRT/Shift/{0}'.
format(barrelOrEndcap[ibe]),xbins=200,xmin=-2.5,xmax=2.5,duration=
'lowStat',opt=
'kAlwaysCreate')
136 shiftTrackGroup.defineHistogram(
'Residual_noTubeHits_B_Ar;hResidual_noTubeHits_Ar',type=
'TH1F',title=
'Residuals for Argon Straws{0} (no tube hits);Hit-to-Track Distance (mm);Entries'.
format(regionTag),path=
'TRT/Shift/{0}'.
format(barrelOrEndcap[ibe]),xbins=200,xmin=-2.5,xmax=2.5,duration=
'run',opt=
'kAlwaysCreate')
137 shiftTrackGroup.defineHistogram(
'Residual_B_Ar_20GeV;hResidual_Ar_20GeV',type=
'TH1F',title=
'Residuals for Argon Straws{0} (After 20GeV pT cut);Hit-to-Track Distance (mm);Entries'.
format(regionTag),path=
'TRT/Shift/{0}'.
format(barrelOrEndcap[ibe]),xbins=200,xmin=-2.5,xmax=2.5,duration=
'run',opt=
'kAlwaysCreate')
138 shiftTrackGroup.defineHistogram(
'Residual_noTubeHits_B_Ar_20GeV;hResidual_noTubeHits_Ar_20GeV',type=
'TH1F',title=
'Residuals for Argon Straws{0} (After 20GeV pT cut, no tube hits);Hit-to-Track Distance (mm);Entries'.
format(regionTag),path=
'TRT/Shift/{0}'.
format(barrelOrEndcap[ibe]),xbins=200,xmin=-2.5,xmax=2.5,duration=
'run',opt=
'kAlwaysCreate')
139 shiftTrackGroup.defineHistogram(
'AvgTroTDetPhi_B_Ar_x,AvgTroTDetPhi_B_Ar_y;hAvgTroTDetPhi_Ar',type=
'TProfile',title=
'Avg. Trailing Edge on Track vs #phi (2D) for Argon{0};#phi (deg);Trailing Edge (ns)'.
format(regionTag),path=
'TRT/Shift/{0}'.
format(barrelOrEndcap[ibe]),xbins=nPhiBins,xmin=0,xmax=360,duration=
'run',opt=
'kAlwaysCreate')
140 shiftTrackGroup.defineHistogram(
'TimeResidual_B_Ar;hTimeResidual_Ar',type=
'TH1F',title=
'Time Residuals for Argon Straws{0};Time Residual (ns);Entries'.
format(regionTag),path=
'TRT/Shift/{0}'.
format(barrelOrEndcap[ibe]),xbins=200,xmin=-20,xmax=20,duration=
'run',opt=
'kAlwaysCreate')
141 shiftTrackGroup.defineHistogram(
'TimeResidual_noTubeHits_B_Ar;hTimeResidual_noTubeHits_Ar',type=
'TH1F',title=
'Time Residuals for Argon Straws{0} (no tube hits);Time Residual (ns);Entries'.
format(regionTag),path=
'TRT/Shift/{0}'.
format(barrelOrEndcap[ibe]),xbins=200,xmin=-20,xmax=20,duration=
'run',opt=
'kAlwaysCreate')
142 shiftTrackGroup.defineHistogram(
'WireToTrkPosition_B_Ar;hWireToTrkPosition_Ar',type=
'TH1F',title=
'Track-to-Wire Distance for Argon{0};Track-to-Wire Distance (mm);Entries'.
format(regionTag),path=
'TRT/Shift/{0}'.
format(barrelOrEndcap[ibe]),xbins=100,xmin=-5,xmax=5,duration=
'run',opt=
'kAlwaysCreate')
144 shiftTrackGroup.defineHistogram(
'Residual_B;hResidual',type=
'TH1F',title=
'Residuals for Xenon Straws{0};Hit-to-Track Distance (mm);Entries'.
format(regionTag),path=
'TRT/Shift/{0}'.
format(barrelOrEndcap[ibe]),xbins=200,xmin=-2.5,xmax=2.5,duration=
'lowStat',opt=
'kAlwaysCreate')
145 shiftTrackGroup.defineHistogram(
'Residual_B;hResidual',type=
'TH1F',title=
'Residuals for Xenon Straws{0};Hit-to-Track Distance (mm);Entries'.
format(regionTag),path=
'TRT/Shift/{0}'.
format(barrelOrEndcap[ibe]),xbins=200,xmin=-2.5,xmax=2.5,duration=
'run',opt=
'kAlwaysCreate')
146 shiftTrackGroup.defineHistogram(
'Residual_noTubeHits_B;hResidual_noTubeHits',type=
'TH1F',title=
'Residuals for Xenon Straws{0} (no tube hits);Hit-to-Track Distance (mm);Entries'.
format(regionTag),path=
'TRT/Shift/{0}'.
format(barrelOrEndcap[ibe]),xbins=200,xmin=-2.5,xmax=2.5,duration=
'lowStat',opt=
'kAlwaysCreate')
147 shiftTrackGroup.defineHistogram(
'Residual_noTubeHits_B;hResidual_noTubeHits',type=
'TH1F',title=
'Residuals for Xenon Straws{0} (no tube hits);Hit-to-Track Distance (mm);Entries'.
format(regionTag),path=
'TRT/Shift/{0}'.
format(barrelOrEndcap[ibe]),xbins=200,xmin=-2.5,xmax=2.5,duration=
'run',opt=
'kAlwaysCreate')
148 shiftTrackGroup.defineHistogram(
'Residual_B_20GeV;hResidual_20GeV',type=
'TH1F',title=
'Residuals for Xenon Straws{0} (After 20GeV pT cut);Hit-to-Track Distance (mm);Entries'.
format(regionTag),path=
'TRT/Shift/{0}'.
format(barrelOrEndcap[ibe]),xbins=200,xmin=-2.5,xmax=2.5,duration=
'run',opt=
'kAlwaysCreate')
149 shiftTrackGroup.defineHistogram(
'Residual_noTubeHits_B_20GeV;hResidual_noTubeHits_20GeV',type=
'TH1F',title=
'Residuals for Xenon Straws{0} (After 20GeV pT cut, no tube hits);Hit-to-Track Distance (mm);Entries'.
format(regionTag),path=
'TRT/Shift/{0}'.
format(barrelOrEndcap[ibe]),xbins=200,xmin=-2.5,xmax=2.5,duration=
'run',opt=
'kAlwaysCreate')
150 shiftTrackGroup.defineHistogram(
'TimeResidual_B;hTimeResidual',type=
'TH1F',title=
'Time Residuals for Xenon Straws{0};Time Residual (ns);Entries'.
format(regionTag),path=
'TRT/Shift/{0}'.
format(barrelOrEndcap[ibe]),xbins=200,xmin=-20,xmax=20,duration=
'run',opt=
'kAlwaysCreate')
151 shiftTrackGroup.defineHistogram(
'TimeResidual_noTubeHits_B;hTimeResidual_noTubeHits',type=
'TH1F',title=
'Time Residuals for Xenon Straws{0} (no tube hits);Time Residual (ns);Entries'.
format(regionTag),path=
'TRT/Shift/{0}'.
format(barrelOrEndcap[ibe]),xbins=200,xmin=-20,xmax=20,duration=
'run',opt=
'kAlwaysCreate')
152 shiftTrackGroup.defineHistogram(
'WireToTrkPosition_B;hWireToTrkPosition',type=
'TH1F',title=
'Track-to-Wire Distance for Xenon{0};Track-to-Wire Distance (mm);Entries'.
format(regionTag),path=
'TRT/Shift/{0}'.
format(barrelOrEndcap[ibe]),xbins=100,xmin=-5,xmax=5,duration=
'run',opt=
'kAlwaysCreate')
153 shiftTrackGroup.defineHistogram(
'AvgTroTDetPhi_B_x,AvgTroTDetPhi_B_y;hAvgTroTDetPhi',type=
'TProfile',title=
'Avg. Trailing Edge on Track vs #phi (2D) for Xenon{0};#phi (deg);Trailing Edge (ns)'.
format(regionTag),path=
'TRT/Shift/{0}'.
format(barrelOrEndcap[ibe]),xbins=nPhiBins,xmin=0,xmax=360,duration=
'run',opt=
'kAlwaysCreate')
154 shiftTrackGroup.defineHistogram(
'NTrksperLB_x,NTrksperLB_y;hNTrksperLB',type=
'TProfile',title=
'Avg. Number of Reconstructed Tracks per Event{0};Luminosity Block;Number of Tracks'.
format(regionTag),path=
'TRT/Shift/{0}'.
format(barrelOrEndcap[ibe]),xbins=maxLumiblock+1,xmin=-0.5,xmax=maxLumiblock+0.5,duration=
'run',opt=
'kAlwaysCreate')
156 shiftTrackGroup.defineHistogram(
'Pull_Biased_EndCap;hPull_Biased_EndCap',type=
'TH1F',title=
'Biased Track Pulls for EndCap Hits;Pulls;Entries',path=
'TRT/Shift/{0}'.
format(barrelOrEndcap[ibe]),xbins=200,xmin=-2.5,xmax=2.5,duration=
'run',opt=
'kAlwaysCreate')
158 for iside
in range(2):
159 regionTag =
' (' + beId[ibe] + sideId[iside] +
')'
160 shiftTrackEndcapGroup = helper.addGroup(algTRTMonitoringRun3ESD,
'ShiftTRTTrackHistograms{0}{1}'.
format(ibe,iside))
161 shiftTrackEndcapGroup.defineHistogram(
'EvtPhaseDetPhi_E_x,EvtPhaseDetPhi_E_y;hEvtPhaseDetPhi_{0}'.
format(sideId[iside]),type=
'TProfile',title=
'Event Phase vs #phi (2D){0};#phi (deg);Event Phase from Tracks per Event'.
format(regionTag),path=
'TRT/Shift/{0}'.
format(barrelOrEndcap[ibe]),xbins=nPhiBins,xmin=0,xmax=360,duration=
'run',opt=
'kAlwaysCreate')
162 shiftTrackEndcapGroup.defineHistogram(
'RtRelation_E_x,RtRelation_E_y;hrtRelation_{0}'.
format(sideId[iside]),type=
'TH2F',title=
'R(t) Relation for Xenon Straws{0};Measured Leading Edge (ns);Track-to-Wire Distance (mm)'.
format(regionTag),path=
'TRT/Shift/{0}'.
format(barrelOrEndcap[ibe]),xbins=30,xmin=-12.5,xmax=81.25,ybins=50,ymin=0,ymax=2.5,duration=
'run',opt=
'kAlwaysCreate')
163 shiftTrackEndcapGroup.defineHistogram(
'NumHoTDetPhi_E_x,NumHoTDetPhi_E_y;hNumHoTDetPhi_{0}'.
format(sideId[iside]),type=
'TProfile',title=
'Number of Hits per Track with {0} mm Cut vs #phi{1};#phi (deg);Hits per Track, TRT Hits> = {2}'.
format(distance,regionTag,minTRTHits),path=
'TRT/Shift/{0}'.
format(barrelOrEndcap[ibe]),xbins=nPhiBins,xmin=0,xmax=360,duration=
'run',opt=
'kAlwaysCreate')
164 shiftTrackEndcapGroup.defineHistogram(
'TronTDist_E;hTronTDist_{0}'.
format(sideId[iside]),type=
'TH1F',title=
'Trailing Edge Distribution on Track for Xenon Straws{0};Trailing Edge (ns);Entries'.
format(regionTag),path=
'TRT/Shift/{0}'.
format(barrelOrEndcap[ibe]),xbins=26,xmin=-0.5,xmax=80.75,duration=
'run',opt=
'kAlwaysCreate')
165 shiftTrackEndcapGroup.defineHistogram(
'DriftTimeonTrkDist_E;hDriftTimeonTrkDist_{0}'.
format(sideId[iside]),type=
'TH1F',title=
'Drift Time Distribution on Track for Xenon Straws{0};Drift Time (ns);Entries'.
format(regionTag),path=
'TRT/Shift/{0}'.
format(barrelOrEndcap[ibe]),xbins=32,xmin=0,xmax=100,duration=
'run',opt=
'kAlwaysCreate')
166 shiftTrackEndcapGroup.defineHistogram(
'NumTrksDetPhi_E;hNumTrksDetPhi_{0}'.
format(sideId[iside]),type=
'TH1F',title=
'Number of Reconstructed Tracks vs #phi (2D){0};#phi (deg);Number of Tracks'.
format(regionTag),path=
'TRT/Shift/{0}'.
format(barrelOrEndcap[ibe]),xbins=60,xmin=0,xmax=360,duration=
'run',opt=
'kAlwaysCreate')
167 shiftTrackEndcapGroup.defineHistogram(
'Residual_E;hResidual_{0}'.
format(sideId[iside]),type=
'TH1F',title=
'Residuals for Xenon Straws{0};Hit-to-Track Distance (mm);Entries'.
format(regionTag),path=
'TRT/Shift/{0}'.
format(barrelOrEndcap[ibe]),xbins=200,xmin=-2.5,xmax=2.5,duration=
'lowStat',opt=
'kAlwaysCreate')
168 shiftTrackEndcapGroup.defineHistogram(
'Residual_E;hResidual_{0}'.
format(sideId[iside]),type=
'TH1F',title=
'Residuals for Xenon Straws{0};Hit-to-Track Distance (mm);Entries'.
format(regionTag),path=
'TRT/Shift/{0}'.
format(barrelOrEndcap[ibe]),xbins=200,xmin=-2.5,xmax=2.5,duration=
'run',opt=
'kAlwaysCreate')
169 shiftTrackEndcapGroup.defineHistogram(
'Residual_noTubeHits_E;hResidual_noTubeHits_{0}'.
format(sideId[iside]),type=
'TH1F',title=
'Residuals for Xenon Straws{0} (no tube hits);Hit-to-Track Distance (mm);Entries'.
format(regionTag),path=
'TRT/Shift/{0}'.
format(barrelOrEndcap[ibe]),xbins=200,xmin=-2.5,xmax=2.5,duration=
'lowStat',opt=
'kAlwaysCreate')
170 shiftTrackEndcapGroup.defineHistogram(
'Residual_noTubeHits_E;hResidual_noTubeHits_{0}'.
format(sideId[iside]),type=
'TH1F',title=
'Residuals for Xenon Straws{0} (no tube hits);Hit-to-Track Distance (mm);Entries'.
format(regionTag),path=
'TRT/Shift/{0}'.
format(barrelOrEndcap[ibe]),xbins=200,xmin=-2.5,xmax=2.5,duration=
'run',opt=
'kAlwaysCreate')
171 shiftTrackEndcapGroup.defineHistogram(
'Residual_E_20GeV;hResidual_{0}_20GeV'.
format(sideId[iside]),type=
'TH1F',title=
'Residuals for Xenon Straws{0} (After 20GeV pT cut);Hit-to-Track Distance (mm);Entries'.
format(regionTag),path=
'TRT/Shift/{0}'.
format(barrelOrEndcap[ibe]),xbins=200,xmin=-2.5,xmax=2.5,duration=
'run',opt=
'kAlwaysCreate')
172 shiftTrackEndcapGroup.defineHistogram(
'Residual_noTubeHits_E_20GeV;hResidual_noTubeHits_{0}_20GeV'.
format(sideId[iside]),type=
'TH1F',title=
'Residuals for Xenon Straws{0} (After 20GeV pT cut, no tube hits);Hit-to-Track Distance (mm);Entries'.
format(regionTag),path=
'TRT/Shift/{0}'.
format(barrelOrEndcap[ibe]),xbins=200,xmin=-2.5,xmax=2.5,duration=
'run',opt=
'kAlwaysCreate')
173 shiftTrackEndcapGroup.defineHistogram(
'TimeResidual_E;hTimeResidual_{0}'.
format(sideId[iside]),type=
'TH1F',title=
'Time Residuals for Xenon Straws{0};Time Residual (ns);Entries'.
format(regionTag),path=
'TRT/Shift/{0}'.
format(barrelOrEndcap[ibe]),xbins=200,xmin=-20,xmax=20,duration=
'run',opt=
'kAlwaysCreate')
174 shiftTrackEndcapGroup.defineHistogram(
'TimeResidual_noTubeHits_E;hTimeResidual_noTubeHits_{0}'.
format(sideId[iside]),type=
'TH1F',title=
'Time Residuals for Xenon Straws{0} (no tube hits);Time Residual (ns);Entries'.
format(regionTag),path=
'TRT/Shift/{0}'.
format(barrelOrEndcap[ibe]),xbins=200,xmin=-20,xmax=20,duration=
'run',opt=
'kAlwaysCreate')
176 shiftTrackEndcapGroup.defineHistogram(
'TronTDist_E_Ar;hTronTDist_Ar_{0}'.
format(sideId[iside]),type=
'TH1F',title=
'Trailing Edge Distribution on Track for Argon Straws{0};Trailing Edge (ns);Entries'.
format(regionTag),path=
'TRT/Shift/{0}'.
format(barrelOrEndcap[ibe]),xbins=26,xmin=-0.5,xmax=80.75,duration=
'run',opt=
'kAlwaysCreate')
177 shiftTrackEndcapGroup.defineHistogram(
'AvgTroTDetPhi_E_Ar_x,AvgTroTDetPhi_E_Ar_y;hAvgTroTDetPhi_Ar_{0}'.
format(sideId[iside]),type=
'TProfile',title=
'Avg. Trailing Edge on Track vs #phi (2D) for Argon{0};#phi (deg);Trailing Edge (ns)'.
format(regionTag),path=
'TRT/Shift/{0}'.
format(barrelOrEndcap[ibe]),xbins=nPhiBins,xmin=0,xmax=360,duration=
'run',opt=
'kAlwaysCreate')
178 shiftTrackEndcapGroup.defineHistogram(
'RtRelation_E_Ar_x,RtRelation_E_Ar_y;hrtRelation_Ar_{0}'.
format(sideId[iside]),type=
'TH2F',title=
'R(t) Relation for Argon Straws{0};Measured Leading Edge (ns);Track-to-Wire Distance (mm)'.
format(regionTag),path=
'TRT/Shift/{0}'.
format(barrelOrEndcap[ibe]),xbins=30,xmin=-12.5,xmax=81.25,ybins=50,ymin=0,ymax=2.5,duration=
'run',opt=
'kAlwaysCreate')
179 shiftTrackEndcapGroup.defineHistogram(
'DriftTimeonTrkDist_E_Ar;hDriftTimeonTrkDist_Ar_{0}'.
format(sideId[iside]),type=
'TH1F',title=
'Drift Time Distribution on Track for Argon Straws{0};Drift Time (ns);Entries'.
format(regionTag),path=
'TRT/Shift/{0}'.
format(barrelOrEndcap[ibe]),xbins=32,xmin=0,xmax=100,duration=
'run',opt=
'kAlwaysCreate')
180 shiftTrackEndcapGroup.defineHistogram(
'Residual_E_Ar;hResidual_Ar_{0}'.
format(sideId[iside]),type=
'TH1F',title=
'Residuals for Argon Straws{0};Hit-to-Track Distance (mm);Entries'.
format(regionTag),path=
'TRT/Shift/{0}'.
format(barrelOrEndcap[ibe]),xbins=200,xmin=-2.5,xmax=2.5,duration=
'lowStat',opt=
'kAlwaysCreate')
181 shiftTrackEndcapGroup.defineHistogram(
'Residual_E_Ar;hResidual_Ar_{0}'.
format(sideId[iside]),type=
'TH1F',title=
'Residuals for Argon Straws{0};Hit-to-Track Distance (mm);Entries'.
format(regionTag),path=
'TRT/Shift/{0}'.
format(barrelOrEndcap[ibe]),xbins=200,xmin=-2.5,xmax=2.5,duration=
'run',opt=
'kAlwaysCreate')
182 shiftTrackEndcapGroup.defineHistogram(
'Residual_noTubeHits_E_Ar;hResidual_noTubeHits_Ar_{0}'.
format(sideId[iside]),type=
'TH1F',title=
'Residuals for Argon Straws{0} (no tube hits);Hit-to-Track Distance (mm);Entries'.
format(regionTag),path=
'TRT/Shift/{0}'.
format(barrelOrEndcap[ibe]),xbins=200,xmin=-2.5,xmax=2.5,duration=
'lowStat',opt=
'kAlwaysCreate')
183 shiftTrackEndcapGroup.defineHistogram(
'Residual_noTubeHits_E_Ar;hResidual_noTubeHits_Ar_{0}'.
format(sideId[iside]),type=
'TH1F',title=
'Residuals for Argon Straws{0} (no tube hits);Hit-to-Track Distance (mm);Entries'.
format(regionTag),path=
'TRT/Shift/{0}'.
format(barrelOrEndcap[ibe]),xbins=200,xmin=-2.5,xmax=2.5,duration=
'run',opt=
'kAlwaysCreate')
184 shiftTrackEndcapGroup.defineHistogram(
'Residual_E_Ar_20GeV;hResidual_Ar_{0}_20GeV'.
format(sideId[iside]),type=
'TH1F',title=
'Residuals for Argon Straws{0} (After 20GeV pT cut);Hit-to-Track Distance (mm);Entries'.
format(regionTag),path=
'TRT/Shift/{0}'.
format(barrelOrEndcap[ibe]),xbins=200,xmin=-2.5,xmax=2.5,duration=
'run',opt=
'kAlwaysCreate')
185 shiftTrackEndcapGroup.defineHistogram(
'Residual_noTubeHits_E_Ar_20GeV;hResidual_noTubeHits_Ar_{0}_20GeV'.
format(sideId[iside]),type=
'TH1F',title=
'Residuals for Argon Straws{0} (After 20GeV pT cut, no tube hits);Hit-to-Track Distance (mm);Entries'.
format(regionTag),path=
'TRT/Shift/{0}'.
format(barrelOrEndcap[ibe]),xbins=200,xmin=-2.5,xmax=2.5,duration=
'run',opt=
'kAlwaysCreate')
186 shiftTrackEndcapGroup.defineHistogram(
'TimeResidual_E_Ar;hTimeResidual_Ar_{0}'.
format(sideId[iside]),type=
'TH1F',title=
'Time Residuals for Argon Straws{0};Time Residual (ns);Entries'.
format(regionTag),path=
'TRT/Shift/{0}'.
format(barrelOrEndcap[ibe]),xbins=200,xmin=-20,xmax=20,duration=
'run',opt=
'kAlwaysCreate')
187 shiftTrackEndcapGroup.defineHistogram(
'TimeResidual_noTubeHits_E_Ar;hTimeResidual_noTubeHits_Ar_{0}'.
format(sideId[iside]),type=
'TH1F',title=
'Time Residuals for Argon Straws{0} (no tube hits);Time Residual (ns);Entries'.
format(regionTag),path=
'TRT/Shift/{0}'.
format(barrelOrEndcap[ibe]),xbins=200,xmin=-20,xmax=20,duration=
'run',opt=
'kAlwaysCreate')
188 shiftTrackEndcapGroup.defineHistogram(
'WireToTrkPosition_E_Ar;hWireToTrkPosition_Ar_{0}'.
format(sideId[iside]),type=
'TH1F',title=
'Track-to-Wire Distance for Argon{0};Track-to-Wire Distance (mm);Entries'.
format(regionTag),path=
'TRT/Shift/{0}'.
format(barrelOrEndcap[ibe]),xbins=100,xmin=-5,xmax=5,duration=
'run',opt=
'kAlwaysCreate')
190 shiftTrackEndcapGroup.defineHistogram(
'WireToTrkPosition_E;hWireToTrkPosition_{0}'.
format(sideId[iside]),type=
'TH1F',title=
'Track-to-Wire Distance for Xenon{0};Track-to-Wire Distance (mm);Entries'.
format(regionTag),path=
'TRT/Shift/{0}'.
format(barrelOrEndcap[ibe]),xbins=100,xmin=-5,xmax=5,duration=
'run',opt=
'kAlwaysCreate')
191 shiftTrackEndcapGroup.defineHistogram(
'AvgTroTDetPhi_E_x,AvgTroTDetPhi_E_y;hAvgTroTDetPhi_{0}'.
format(sideId[iside]),type=
'TProfile',title=
'Avg. Trailing Edge on Track vs #phi (2D) for Xenon{0};#phi (deg);Trailing Edge (ns)'.
format(regionTag),path=
'TRT/Shift/{0}'.
format(barrelOrEndcap[ibe]),xbins=nPhiBins,xmin=0,xmax=360,duration=
'run',opt=
'kAlwaysCreate')
192 shiftTrackEndcapGroup.defineHistogram(
'NTrksperLB_x,NTrksperLB_y;hNTrksperLB_{0}'.
format(sideId[iside]),type=
'TProfile',title=
'Avg. Number of Reconstructed Tracks per Even{0};Luminosity Block;Number of Tracks'.
format(regionTag),path=
'TRT/Shift/{0}'.
format(barrelOrEndcap[ibe]),xbins=maxLumiblock+1,xmin=-0.5,xmax=maxLumiblock+0.5,duration=
'run',opt=
'kAlwaysCreate')
196 for iSide
in range(2):
199 agingGroup = helper.addGroup(algTRTMonitoringRun3ESD,
'TRTAgingHistograms0{0}{1}'.
format(iL,iSide))
200 agingGroup.defineHistogram(
'Trackz_All;trackz_m{0}_{1}_All'.
format(Mod[iL],sideId[iSide]),type=
'TH1F',title=
'Number All Hits side {0} Layer {1};z [mm];Number of Hits'.
format(sideId[iSide],Mod[iL]),path=
'TRT/Aging/{0}'.
format(barrelOrEndcap[ibe]),xbins=30,xmin=-750.,xmax=750.,duration=
'run',opt=
'kAlwaysCreate')
201 agingGroup.defineHistogram(
'Trackz_All;trackz_m{0}_{1}_All'.
format(Mod[iL],sideId[iSide]),type=
'TH1F',title=
'Number All Hits side {0} Layer {1};z [mm];Number of Hits'.
format(sideId[iSide],Mod[iL]),path=
'TRT/Aging/{0}'.
format(barrelOrEndcap[ibe]),xbins=30,xmin=-750.,xmax=750.,duration=
'lowStat',opt=
'kAlwaysCreate')
202 agingGroup.defineHistogram(
'Trackz_HT;trackz_m{0}_{1}_HT'.
format(Mod[iL],sideId[iSide]),type=
'TH1F',title=
'Number HT Hits side {0} Layer {1};z [mm];Number of HT Hits'.
format(sideId[iSide],Mod[iL]),path=
'TRT/Aging/{0}'.
format(barrelOrEndcap[ibe]),xbins=30,xmin=-750.,xmax=750.,duration=
'run',opt=
'kAlwaysCreate')
203 agingGroup.defineHistogram(
'Trackz_HT;trackz_m{0}_{1}_HT'.
format(Mod[iL],sideId[iSide]),type=
'TH1F',title=
'Number HT Hits side {0} Layer {1};z [mm];Number of HT Hits'.
format(sideId[iSide],Mod[iL]),path=
'TRT/Aging/{0}'.
format(barrelOrEndcap[ibe]),xbins=30,xmin=-750.,xmax=750.,duration=
'lowStat',opt=
'kAlwaysCreate')
205 agingGroup = helper.addGroup(algTRTMonitoringRun3ESD,
'TRTAgingHistograms03{0}'.
format(iSide))
206 agingGroup.defineHistogram(
'Trackz_All;trackz_m1_{0}_All_{1}'.
format(sideId[iSide],Mod[iL]),type=
'TH1F',title=
'Number All Hits side {0} Layer 1 {1};z [mm];Number of Hits'.
format(sideId[iSide],Mod[iL]),path=
'TRT/Aging/{0}'.
format(barrelOrEndcap[ibe]),xbins=30,xmin=0.,xmax=725.,duration=
'run',opt=
'kAlwaysCreate')
207 agingGroup.defineHistogram(
'Trackz_All;trackz_m1_{0}_All_{1}'.
format(sideId[iSide],Mod[iL]),type=
'TH1F',title=
'Number All Hits side {0} Layer 1 {1};z [mm];Number of Hits'.
format(sideId[iSide],Mod[iL]),path=
'TRT/Aging/{0}'.
format(barrelOrEndcap[ibe]),xbins=30,xmin=0.,xmax=725.,duration=
'lowStat',opt=
'kAlwaysCreate')
208 agingGroup.defineHistogram(
'Trackz_HT;trackz_m1_{0}_HT_{1}'.
format(sideId[iSide],Mod[iL]),type=
'TH1F',title=
'Number HT Hits side {0} Layer 1 {1};z [mm];Number of HT Hits'.
format(sideId[iSide],Mod[iL]),path=
'TRT/Aging/{0}'.
format(barrelOrEndcap[ibe]),xbins=30,xmin=0.,xmax=725.,duration=
'run',opt=
'kAlwaysCreate')
209 agingGroup.defineHistogram(
'Trackz_HT;trackz_m1_{0}_HT_{1}'.
format(sideId[iSide],Mod[iL]),type=
'TH1F',title=
'Number HT Hits side {0} Layer 1 {1};z [mm];Number of HT Hits'.
format(sideId[iSide],Mod[iL]),path=
'TRT/Aging/{0}'.
format(barrelOrEndcap[ibe]),xbins=30,xmin=0.,xmax=725.,duration=
'lowStat',opt=
'kAlwaysCreate')
211 agingGroup = helper.addGroup(algTRTMonitoringRun3ESD,
'TRTAgingHistograms04{0}'.
format(iSide))
212 agingGroup.defineHistogram(
'Trackz_All;trackz_m1_{0}_All_{1}'.
format(sideId[iSide],Mod[iL]),type=
'TH1F',title=
'Number All Hits side {0} Layer 1 {1};z [mm];Number of Hits'.
format(sideId[iSide],Mod[iL]),path=
'TRT/Aging/{0}'.
format(barrelOrEndcap[ibe]),xbins=30,xmin=-725.,xmax=0.,duration=
'run',opt=
'kAlwaysCreate')
213 agingGroup.defineHistogram(
'Trackz_All;trackz_m1_{0}_All_{1}'.
format(sideId[iSide],Mod[iL]),type=
'TH1F',title=
'Number All Hits side {0} Layer 1 {1};z [mm];Number of Hits'.
format(sideId[iSide],Mod[iL]),path=
'TRT/Aging/{0}'.
format(barrelOrEndcap[ibe]),xbins=30,xmin=-725.,xmax=0.,duration=
'lowStat',opt=
'kAlwaysCreate')
214 agingGroup.defineHistogram(
'Trackz_HT;trackz_m1_{0}_HT_{1}'.
format(sideId[iSide],Mod[iL]),type=
'TH1F',title=
'Number HT Hits side {0} Layer 1 {1};z [mm];Number of HT Hits'.
format(sideId[iSide],Mod[iL]),path=
'TRT/Aging/{0}'.
format(barrelOrEndcap[ibe]),xbins=30,xmin=-725.,xmax=0.,duration=
'run',opt=
'kAlwaysCreate')
215 agingGroup.defineHistogram(
'Trackz_HT;trackz_m1_{0}_HT_{1}'.
format(sideId[iSide],Mod[iL]),type=
'TH1F',title=
'Number HT Hits side {0} Layer 1 {1};z [mm];Number of HT Hits'.
format(sideId[iSide],Mod[iL]),path=
'TRT/Aging/{0}'.
format(barrelOrEndcap[ibe]),xbins=30,xmin=-725.,xmax=0.,duration=
'lowStat',opt=
'kAlwaysCreate')
219 agingGroup = helper.addGroup(algTRTMonitoringRun3ESD,
'TRTAgingHistograms1{0}{1}'.
format(iL,iSide))
220 agingGroup.defineHistogram(
'Trackr_All;trackr_E{0}_{1}_All'.
format(sideId[iSide],gas[iL]),type=
'TH1F',title=
'Number All Hits E{0} {1};r [mm];Number of Hits'.
format(sideId[iSide],gas[iL]),path=
'TRT/Aging/{0}'.
format(barrelOrEndcap[ibe]),xbins=30,xmin=644.,xmax=1004.,duration=
'run',opt=
'kAlwaysCreate')
221 agingGroup.defineHistogram(
'Trackr_All;trackr_E{0}_{1}_All'.
format(sideId[iSide],gas[iL]),type=
'TH1F',title=
'Number All Hits E{0} {1};r [mm];Number of Hits'.
format(sideId[iSide],gas[iL]),path=
'TRT/Aging/{0}'.
format(barrelOrEndcap[ibe]),xbins=30,xmin=644.,xmax=1004.,duration=
'lowStat',opt=
'kAlwaysCreate')
222 agingGroup.defineHistogram(
'Trackr_HT;trackr_E{0}_{1}_HT'.
format(sideId[iSide],gas[iL]),type=
'TH1F',title=
'Number HT Hits E{0} {1};r [mm];Number of HT Hits'.
format(sideId[iSide],gas[iL]),path=
'TRT/Aging/{0}'.
format(barrelOrEndcap[ibe]),xbins=30,xmin=644.,xmax=1004.,duration=
'run',opt=
'kAlwaysCreate')
223 agingGroup.defineHistogram(
'Trackr_HT;trackr_E{0}_{1}_HT'.
format(sideId[iSide],gas[iL]),type=
'TH1F',title=
'Number HT Hits E{0} {1};r [mm];Number of HT Hits'.
format(sideId[iSide],gas[iL]),path=
'TRT/Aging/{0}'.
format(barrelOrEndcap[ibe]),xbins=30,xmin=644.,xmax=1004.,duration=
'lowStat',opt=
'kAlwaysCreate')
225 smryGroup = helper.addGroup(algTRTMonitoringRun3ESD,
'SmryHistograms')
226 sumLabels = [
'Events',
'Tracks Total',
'Tracks BA',
'Tracks BC',
'Tracks EA',
'Tracks EC',
'Transition Side A',
'Transition Side C']
227 smryGroup.defineHistogram(
'Summary;hSummary',weight=
'SummaryWeight',type=
'TH1F',title=
'Run Summary;;Entries',path=
'TRT/Shift/Summary',xbins=8,xmin=0,xmax=8,xlabels=sumLabels,opt=
'kAlwaysCreate')
228 smryGroup.defineHistogram(
'IntLum;hIntLum',weight=
'IntLumWeight',type=
'TH1F',title=
'Luminosity;;Luminosity [#mub^{1}]',path=
'TRT/Shift/Summary',xbins=1,xmin=0.,xmax=1.,opt=
'kAlwaysCreate')
229 smryGroup.defineHistogram(
'LBvsLum;hLBvsLum',weight=
'LBvsLumWeight',type=
'TH1F',title=
'Luminosity;Luminosity Bin;Luminosity [#mub^{1}]',path=
'TRT/Shift/Summary',xbins=2000,xmin=0.,xmax=2000.,opt=
'kAlwaysCreate')
230 smryGroup.defineHistogram(
'LBvsTime_x,LBvsTime_y;hLBvsTime',type=
'TProfile',title=
'Time;Luminosity Bin;Time [s]',path=
'TRT/Shift/Summary',xbins=2000,xmin=0.,xmax=2000.,opt=
'kAlwaysCreate')
232 acc = helper.result()