5def DQTBackgroundMonAlgConfig(flags):
6 from AthenaMonitoring import AthMonitorCfgHelper
7 from AthenaConfiguration.ComponentFactory import CompFactory
8 helper = AthMonitorCfgHelper(flags, 'DQTBackgroundMonAlgCfg')
9
10
11 monAlg = helper.addAlgorithm(CompFactory.DQTBackgroundMon,'DQTBackgroundMonAlg')
12 monAlg.Muons = True
13 group = helper.addGroup(monAlg,'default','GLOBAL/BackgroundMon','run')
14
15
16 bgT = 'Background Word '
17 filledT = '(Filled BG) '
18 emptyT = '(Empty BG) '
19 unpairIsoT = '(UnpairIso BG) '
20 unpairNonIsoT = '(UnpairNonIso BG) '
21 pixT = 'Pixel SpacePoints '
22 sctT = 'SCT SpacePoints '
23 hugeMultT = 'Huge Multiplicity '
24 lowMultT = 'Low Multiplicity '
25 pVertexT = 'Number of Primary Vertices '
26
27
28 bitSetLabels = ["MBTSTimeDiffHalo","MBTSTimeDiffCol","LArECTimeDiffHalo",
29 "LArECTimeDiffCol","PixMultiplicityHuge","PixSPNonEmpty","SCTMultiplicityHuge",
30 "SCTSPNonEmpty","CSCTimeDiffHalo","CSCTimeDiffCol","BCMTimeDiffHalo",
31 "BCMTimeDiffCol","MuonTimingCol","MuonTimingCosmic","MBTSBeamVeto",
32 "BCMBeamVeto","LUCIDBeamVeto","HaloMuonSegment","HaloClusterShape",
33 "HaloMuonOneSided","HaloMuonTwoSided","HaloTileClusterPattern","BeamGasPixel",
34 "CosmicStandAlone","CosmicStandAloneTight","CosmicCombined",
35 "CosmicCombinedTight","BkgdResvBit1","BkgdResvBit2","BkgdResvBit3",
36 "BkgdResvBit4","BkgdResvBit5"]
37 group.defineHistogram('bitSet', title=bgT, xlabels=bitSetLabels,
38 xbins=len(bitSetLabels),xmin=0,xmax=len(bitSetLabels))
39 group.defineHistogram('bitSetFilled', weight='filled',
40 title=bgT+filledT, xlabels=bitSetLabels,
41 xbins=len(bitSetLabels),xmin=0,xmax=len(bitSetLabels))
42 group.defineHistogram('bitSetEmpty', weight='empty',
43 title=bgT+emptyT, xlabels=bitSetLabels,
44 xbins=len(bitSetLabels),xmin=0,xmax=len(bitSetLabels))
45 group.defineHistogram('bitSetUnpairIso', weight='unpairIso',
46 title=bgT+unpairIsoT, xlabels=bitSetLabels,
47 xbins=len(bitSetLabels),xmin=0,xmax=len(bitSetLabels))
48 group.defineHistogram('bitSetUnpairNonIso', weight='unpairNonIso',
49 title=bgT+unpairNonIsoT, xlabels=bitSetLabels,
50 xbins=len(bitSetLabels),xmin=0,xmax=len(bitSetLabels))
51
52
53 group.defineHistogram('nPixSPs;nPixSPs_high',
54 title=pixT+hugeMultT,
55 xbins=200, xmin=0, xmax=1e6)
56 group.defineHistogram('nPixSPs;nPixSPs_high_unpairIso', weight='unpairIso',
57 title=pixT+hugeMultT+unpairIsoT,
58 xbins=200, xmin=0, xmax=1e6)
59 group.defineHistogram('nPixSPs;nPixSPs_high_unpairNonIso', weight='unpairNonIso',
60 title=pixT+hugeMultT+unpairNonIsoT,
61 xbins=200, xmin=0, xmax=1e6)
62
63 lowMultiplicityPixGroup = helper.addGroup(monAlg,'lowMultiplicityPixGroup',
64 'GLOBAL/BackgroundMon','run')
65 lowMultiplicityPixGroup.defineHistogram('nPixSPs;nPixSPs_low',
66 title=pixT+lowMultT,
67 xbins=200, xmin=0, xmax=5e3)
68 lowMultiplicityPixGroup.defineHistogram('nPixSPs;nPixSPs_low_unpairIso',
69 weight='unpairIso',
70 title=pixT+lowMultT+unpairIsoT,
71 xbins=200, xmin=0, xmax=5e3)
72 lowMultiplicityPixGroup.defineHistogram('nPixSPs;nPixSPs_low_unpairNonIso',
73 weight='unpairNonIso',
74 title=pixT+lowMultT+unpairNonIsoT,
75 xbins=200, xmin=0, xmax=5e3)
76
77
78 group.defineHistogram('nSctSPs;nSctSPs_high',
79 title=sctT+hugeMultT,
80 xbins=200, xmin=0, xmax=1e6)
81 group.defineHistogram('nSctSPs;nSctSPs_high_unpairIso', weight='unpairIso',
82 title=sctT+hugeMultT+unpairIsoT,
83 xbins=200, xmin=0, xmax=1e6)
84 group.defineHistogram('nSctSPs;nSctSPs_high_unpairNonIso', weight='unpairNonIso',
85 title=sctT+hugeMultT+unpairNonIsoT,
86 xbins=200, xmin=0, xmax=1e6)
87
88 lowMultiplicitySctGroup = helper.addGroup(monAlg,'lowMultiplicitySctGroup',
89 'GLOBAL/BackgroundMon','run')
90 lowMultiplicitySctGroup.defineHistogram('nSctSPs;nSctSPs_low',
91 title=sctT+lowMultT,
92 xbins=200, xmin=0, xmax=1e4)
93 lowMultiplicitySctGroup.defineHistogram('nSctSPs;nSctSPs_low_unpairIso',
94 weight='unpairIso',
95 title=sctT+lowMultT+unpairIsoT,
96 xbins=200, xmin=0, xmax=1e4)
97 lowMultiplicitySctGroup.defineHistogram('nSctSPs;nSctSPs_low_unpairNonIso',
98 weight='unpairNonIso',
99 title=sctT+lowMultT+unpairNonIsoT,
100 xbins=200, xmin=0, xmax=1e4)
101
102
103 group.defineHistogram('LArECTimeDiff',
104 title='LAr EC collision time difference;<t_{A}>-<t_{C}> [ns]',
105 xbins=100, xmin=-50, xmax=50)
106
107
108 group.defineHistogram('MBTStimeDiff', title='MBTS collision time difference',
109 xbins=100, xmin=-50, xmax=50)
110 group.defineHistogram('MBTSvetoHits',
111 title="Total MBTS Hits Setting Veto Bit;Number of MBTS 'veto' hits",
112 xbins=40, xmin=0, xmax=40)
113
114
115 group.defineHistogram('LUCIDHits', title='Total Lucid Hits',
116 xbins=64, xmin=0, xmax=32)
117
118
119 if monAlg.Muons:
120 group.defineHistogram('muonSegmentX,muonSegmentY', type='TH2F',
121 title='Position of the muon segments',
122 xbins=100, xmin=-4, xmax=4,
123 ybins=100, ymin=-4, ymax=4)
124
125
126 group.defineHistogram('clusterEnergy', title='Cluster Energy',
127 xbins=150, xmin=0, xmax=1500)
128 group.defineHistogram('clusterEta,clusterPhi', type='TH2F', title='Cluster Eta-Phi',
129 xbins=50, xmin=-3, xmax=3, ybins=50, ymin=-3.15, ymax=3.15)
130 group.defineHistogram('clusterEta,clusterTime',type='TH2F', title='Cluster Eta-Time',
131 xbins=50, xmin=-3, xmax=3, ybins=50, ymin=-25, ymax=25)
132
133
134 group.defineHistogram('jetIndex', title='Fake Jet Index',
135 xbins=10, xmin=0, xmax=10)
136
137
138 group.defineHistogram('leadingJetPt', title='Fake jet pT',
139 xbins=150, xmin=0, xmax=1500)
140 group.defineHistogram('leadingJetEta', title='Fake jet Eta',
141 xbins=50, xmin=-3, xmax=3)
142 group.defineHistogram('leadingJetPhi', title='Fake jet Phi',
143 xbins=50, xmin=-3.15, xmax=3.15)
144 group.defineHistogram('leadingJetTime', title='Fake jet Time',
145 xbins=120, xmin=-30, xmax=30)
146 group.defineHistogram('leadingJetChf', title='Fake jet EM Charge Fraction',
147 xbins=100, xmin=0, xmax=1)
148 group.defineHistogram('leadingJetEta,leadingJetTime', type='TH2F', title='Fake jet Eta-Time',
149 xbins=50, xmin=-3, xmax=3, ybins=50, ymin=-25, ymax=25)
150 group.defineHistogram('leadingJetEMF,leadingJetCHF', type='TH2F', title='Fake jet EMF-CHF',
151 xbins=50, xmin=0, xmax=1, ybins=50, ymin=0, ymax=1)
152
153
154 group.defineHistogram('bicd;bcid_AC', weight='isAC', title='Rate per BCID in A->C Direction',
155 xbins=3564, xmin=0, xmax=3564)
156 group.defineHistogram('bcid;bcid_CA', weight='isBC', title='Rate per BCID in C->A Direction',
157 xbins=3564, xmin=0, xmax=3564)
158 group.defineHistogram('bcid;bcid_ACOneSided', weight='isACOneSided',
159 title='Rate per BCID in A->C Direction (one- and two-sided)',
160 xbins=3564, xmin=0, xmax=3564)
161 group.defineHistogram('bcid;bcid_CAOneSided', weight='isCAOneSided',
162 title='Rate per BCID in C->A Direction (one- and two-sided)',
163 xbins=3564, xmin=0, xmax=3564)
164
165 group.defineHistogram('nVertex', title='Number of Primary Vertices;N_{PV}',
166 xbins=50, xmin=0, xmax=50)
167 group.defineHistogram('nVertex;nVertex_unpairIso', title=pVertexT+unpairIsoT,
168 weight='unpairIso', xbins=50, xmin=0, xmax=50)
169 group.defineHistogram('nVertex;nVertex_unpairNonIso', title=pVertexT+unpairNonIsoT,
170 weight='unpairNonIso', xbins=50, xmin=0, xmax=50)
171
172
173 from AthenaConfiguration.ComponentAccumulator import ComponentAccumulator
174 acc = ComponentAccumulator()
175 from RecBackgroundAlgs.BackgroundAlgsConfig import BackgroundAlgsCfg
176 acc.merge(BackgroundAlgsCfg(flags))
177 acc.merge(helper.result())
178
179 return acc