11def SCTLorentzMonAlgConfig(flags):
12
13
16 from AthenaConfiguration.ComponentAccumulator import ComponentAccumulator
17 result = ComponentAccumulator()
18
19
20
21 from AthenaMonitoring import AthMonitorCfgHelper
22 helper = AthMonitorCfgHelper(flags, 'SCTLorentzMonCfg')
23
24
25
31 from AthenaConfiguration.ComponentFactory import CompFactory
32 from InDetConfig.InDetAssociationToolsConfig import InDetPRDtoTrackMapToolGangedPixelsCfg
33 from TrkConfig.TrkTrackSummaryToolConfig import InDetTrackSummaryToolCfg
34
35 myMonAlg = helper.addAlgorithm(
36 CompFactory.SCTLorentzMonAlg,
37 'SCTLorentzMonAlg',
38 AssociationTool = result.popToolsAndMerge(
39 InDetPRDtoTrackMapToolGangedPixelsCfg(flags)),
40 TrackSummaryTool = result.popToolsAndMerge(
41 InDetTrackSummaryToolCfg(flags)))
42
43
44
45
46
47
48
49
51 myMonAlg.TriggerChain = ''
52
53
54
57
58
59
60 from SCT_ConditionsAlgorithms.SCT_ConditionsAlgorithmsConfig import SCT_DetectorElementCondAlgCfg
61 result.merge(SCT_DetectorElementCondAlgCfg(flags))
62
63
64
65
66
67
68
69
70 myMonGroup = helper.addGroup(
71 myMonAlg,
72 "SCTLorentzMonitor",
73 "SCT/GENERAL/"
74 )
75
76
78 N_BARRELS = 4
79 nSides = 2
80 nSurfaces = 2
81 surfaceNames = ["_100", "_111"]
82 surfaceNames2 = ["_100_", "_111_"]
83 surfaceTitles = ["100 - ", "111 - "]
84 sideNames = ["_0", "_1"]
85 for l in range(N_BARRELS):
86 for iSurface in range(nSurfaces):
87 for side in range(nSides):
88 xVar = "phiToWafer_"+str(l)+surfaceNames[iSurface]+sideNames[side]
89 yVar = "nStrip_"+str(l)+surfaceNames[iSurface]+sideNames[side]
90 histTitle = surfaceTitles[iSurface]+"Inc. Angle vs nStrips for Layer Side"+str(l)+str(side)
91 histName = "h_phiVsNstrips"+surfaceNames2[iSurface]+str(l)+"Side"+str(side)
92 myMonGroup.defineHistogram(varname=xVar+","+yVar+";"+histName,
93 type="TProfile",
94 title=histTitle+";#phi to Wafer;Num of Strips",
95 path="lorentz",
96 xbins=360, xmin=-90., xmax=90.)
97
98 myMonGroup.defineHistogram(varname=xVar+","+yVar+";"+histName + "_e0p5",
99 type="TProfile",
100 title=histTitle+"(|#eta| < 0.5);#phi to Wafer;Num of Strips",
101 path="lorentz",
102 xbins=360, xmin=-90., xmax=90.,
103 cutmask="isCentral")
104 nEndcaps = 2
105 nDisks = 9
106 nSides = 2
107 nEta = 3
108 endcapNames = ["ECA", "ECC"]
109 etaNames = ["outer", "middle", "inner"]
110 sideNames = ["_0", "_1"]
111 for e in range(nEndcaps):
112 for d in range(nDisks):
113 for iEta in range(nEta):
114 sensorType = "HPK"
115 if ((d == 1 and iEta == 1) or
116 (d == 3 and iEta == 1) or
117 (d == 4 and iEta >= 1) or
118 (d == 5 and iEta == 2) or
119 (d == 7 and iEta == 1)):
120 sensorType = "CiS"
121 elif (d == 2 and iEta == 1):
122 sensorType = "Both"
123
124 for side in range(nSides):
125 xVar = "phiToWafer_"+endcapNames[e]+str(d)+"_"+etaNames[iEta]+sideNames[side]
126 yVar = "nStrip_"+endcapNames[e]+str(d)+"_"+etaNames[iEta]+sideNames[side]
127 histTitle = "111 (" + sensorType + ") - Inc. Angle vs nStrips for " + endcapNames[e] + " Disk Eta Side"+str(d)+str(iEta)+str(side)
128 histName = "h_phiVsNstrips_"+endcapNames[e]+str(d)+"_"+etaNames[iEta]+"_Side"+str(side)
129 myMonGroup.defineHistogram(varname=xVar+","+yVar+";"+histName,
130 type="TProfile",
131 title=histTitle+";#phi to Wafer;Num of Strips",
132 path="lorentz",
133 xbins=360, xmin=-90., xmax=90.)
134
135
141
142
143 result.merge(helper.result())
144 return result
145