ATLAS Offline Software
Functions | Variables
RpcMonitorAlgorithm Namespace Reference

Functions

def RpcMonitoringConfig (inputFlags)
 

Variables

 flags = initConfigFlags()
 
list file_list = []
 
 infile = open('input.txt', "r")
 
 Files
 
 HISTFileName
 
 AtlasVersion
 
 cfg = MainServicesCfg(flags)
 
def acc = RpcMonitoringConfig(flags)
 
 OutputLevel
 
 withDetails
 
 True
 
 summariseProps
 

Function Documentation

◆ RpcMonitoringConfig()

def RpcMonitorAlgorithm.RpcMonitoringConfig (   inputFlags)

Definition at line 10 of file RpcMonitorAlgorithm.py.

10 def RpcMonitoringConfig(inputFlags):
11 
12  from AthenaConfiguration.ComponentFactory import CompFactory
13  from AthenaConfiguration.ComponentAccumulator import ComponentAccumulator
14  result = ComponentAccumulator()
15 
16  from MagFieldServices.MagFieldServicesConfig import AtlasFieldCacheCondAlgCfg
17  result.merge(AtlasFieldCacheCondAlgCfg(inputFlags))
18 
19  from AthenaMonitoring import AthMonitorCfgHelper
20  helper = AthMonitorCfgHelper(inputFlags,'RpcMonitoringCfg')
21 
22 
25  from TrkConfig.AtlasExtrapolatorConfig import AtlasExtrapolatorCfg
26  extrapolator = result.popToolsAndMerge(AtlasExtrapolatorCfg(inputFlags))
27 
28  rpcTrackAnaAlg = helper.addAlgorithm(CompFactory.RpcTrackAnaAlg, "RpcTrackAnaAlgAlg", TrackExtrapolator = extrapolator)
29 
30  from TrackingGeometryCondAlg.AtlasTrackingGeometryCondAlgConfig import TrackingGeometryCondAlgCfg
31  result.merge( TrackingGeometryCondAlgCfg(inputFlags ) )
32 
33  rpcTrackAnaAlg.plotMuonEff = True
34  rpcTrackAnaAlg.plotPRD = True
35  rpcTrackAnaAlg.ElementsFileName = "Element.xml"
36  rpcTrackAnaAlg.TagAndProbe = False
37 
38  if not inputFlags.DQ.triggerDataAvailable:
39  rpcTrackAnaAlg.MuonRoIContainerName = ''
40  else:
41  # LVL1MuonRoIs are only available after the HLTResultMTByteStreamDecoderAlg has executed
42  from TrigDecisionTool.TrigDecisionToolConfig import getRun3NavigationContainerFromInput
43  rpcTrackAnaAlg.ExtraInputs.add(('xAOD::TrigCompositeContainer' , 'StoreGateSvc+'+getRun3NavigationContainerFromInput(inputFlags)))
44 
45 
48  myGroup_track = helper.addGroup(rpcTrackAnaAlg, 'RpcTrackAnaAlg', 'Muon/MuonRawDataMonitoring/RPC/')
49 
50  myGroup_track.defineHistogram('run;Run',
51  title='Run Number;run;Events',
52  type='TH1I',
53  path='RpcOccupancy',
54  xbins=800000,xmin=200000.5,xmax=1000000.5)
55 
56  myGroup_track.defineHistogram('evtLB',
57  title='Number of Event;Luminosity Block;N Event',
58  type='TH1I',
59  path='RpcOccupancy',
60  xbins=2000, xmin=0.5, xmax=2000.5)
61 
62  myGroup_track.defineHistogram('prdTime',
63  title="Number of RPC Hit;Time;NHit",
64  type='TH1D',
65  path='RpcOccupancy',
66  xbins=36, xmin=-101.5625, xmax=10.9375)
67 
68  myGroup_track.defineHistogram('prd_sec,prd_layer;NPRDHit_sectorVSlayer',
69  title="NPRDHit_sectorVSlayer;Sector(- for C side, + for A side);layer((dbR-1)*2+gasGap);NHit",
70  type='TH2I',
71  path='RpcOccupancy',
72  xbins=33, xmin=-16.5, xmax=16.5,
73  ybins=8, ymin=0.5, ymax=8.5)
74  myGroup_track.defineHistogram('prd_sec_1214,prd_layer_1214;NPRDHit_sectorVSlayer_Sector1214',
75  title="NPRDHit_sectorVSlayer_Sector1214;Sector(- for C side, + for A side);layer((dbR-1)*2+gasGap);NHit",
76  type='TH2I',
77  path='RpcOccupancy',
78  xbins=[-14.5,-13.5,-12.5,-11.5, 11.5, 12.5, 13.5, 14.5],
79  ybins=8, ymin=0.5, ymax=8.5)
80  myGroup_track.defineHistogram('prd_sec_eta,prd_layer_eta;NPRDHit_sectorVSlayer_Eta',
81  title="NPRDHit_sectorVSlayer_eta;Sector(- for C side, + for A side);layer((dbR-1)*2+gasGap);NHit",
82  type='TH2I',
83  path='RpcOccupancy',
84  xbins=33, xmin=-16.5, xmax=16.5,
85  ybins=8, ymin=0.5, ymax=8.5)
86  myGroup_track.defineHistogram('prd_sec_phi,prd_layer_phi;NPRDHit_sectorVSlayer_Phi',
87  title="NPRDHit_sectorVSlayer_phi;Sector(- for C side, + for A side);layer((dbR-1)*2+gasGap);NHit",
88  type='TH2I',
89  path='RpcOccupancy',
90  xbins=33, xmin=-16.5, xmax=16.5,
91  ybins=8, ymin=0.5, ymax=8.5)
92 
93  myGroup_track.defineHistogram('LB,panelInd;NPRDHit_Panels_All',
94  title='Number of RPC Hit;Luminosity Block;Panel Index;NHit',
95  type='TH2I',
96  path='RpcOccupancy',
97  xbins=2000, xmin=0.5, xmax=2000.5, ybins=8592, ymin=-0.5, ymax=8591.5)
98  myGroup_track.defineHistogram('LB;NPRDHitVSLB_All',
99  title="Number of RPC Hit;Luminosity Block;NHit",
100  type='TH1I',
101  path='RpcOccupancy',
102  xbins=2000, xmin=0.5, xmax=2000.5)
103 
104 
107  trackPath = 'TrackMatch'
108 
109  myGroup_track.defineHistogram('LB_nrpchit,PhiSector;NPRDHitFromMuon_PhiSector_vs_LB',
110  title='Number of RPC hits for muons decayed from Z candidates;Luminosity Block;#phi sector(- for C side, + for A side);NHit',
111  type='TH2I',
112  path=trackPath,
113  xbins=2000, xmin=0.5, xmax=2000.5, ybins=33, ymin=-16.5, ymax=16.5)
114 
115 
116  myGroup_track.defineHistogram('muPt_MuonFromZ;Pt_MuonFromZ',
117  title='Pt of muons decayed from Z candidates;Pt[MeV];NMuon',
118  type='TH1D',
119  path='PlotCand',
120  xbins=100,xmin=0,xmax=400e3)
121  myGroup_track.defineHistogram('muEta_MuonFromZ;Eta_MuonFromZ',
122  title='#eta of muons decayed from Z candidates;#eta;NMuon',
123  type='TH1D',
124  path='PlotCand',
125  xbins=42, xmin=-1.05, xmax=1.05)
126  myGroup_track.defineHistogram('muPhi_MuonFromZ;Phi_MuonFromZ',
127  title='#phi of muons decayed from Z candidates;#phi;NMuon',
128  type='TH1D',
129  path='PlotCand',
130  xbins=32, xmin=-3.1415926, xmax=3.1415926)
131  myGroup_track.defineHistogram('muEta_MuonFromZ,muPhi_MuonFromZ;EtaVSPhi_MuonFromZ',
132  type='TH2D',
133  title='Eta vs phi for muons decayed from Z;#eta;#phi;NMuon',
134  path='PlotCand',
135  xbins=42,xmin=-1.05, xmax=1.05,
136  ybins=32,ymin=-3.1415926,ymax=3.1415926)
137  myGroup_track.defineHistogram('muEta_p_MuonFromZ,muPhi_p_MuonFromZ;EtaVSPhi_MuonFromZ_plateau',
138  type='TH2D',
139  title='Eta vs phi for muons decayed from Z(pT>25GeV);#eta;#phi;NMuon',
140  path='PlotCand',
141  xbins=42,xmin=-1.05, xmax=1.05,
142  ybins=32,ymin=-3.1415926,ymax=3.1415926)
143 
144  myGroup_track.defineHistogram('hitMulti_eta;HitMultiplicity_eta',
145  type='TH1I',
146  title='Hit multiplicity in #eta view for muons decayed from Z candidates;#eta strip hit Multiplicity;muon entries',
147  path=trackPath,
148  xbins=11,xmin=-0.5, xmax=10.5)
149 
150  myGroup_track.defineHistogram('hitMulti_phi;HitMultiplicity_phi',
151  type='TH1I',
152  title='Hit multiplicity in #phi view for muons decayed from Z candidates;#phi strip hit Multiplicity;muon entries',
153  path=trackPath,
154  xbins=11,xmin=-0.5, xmax=10.5)
155 
156  myGroup_track.defineHistogram('hitMulti,panelInd_hM;HitMultiplicity_Panels',
157  title='Hit multiplicity for muons decayed from Z candidates;Hit Multiplicity;Panel Index;NMuon',
158  type='TH2I',
159  path=trackPath,
160  xbins=11, xmin=-0.5, xmax=10.5, ybins=8592, ymin=-0.5, ymax=8591.5)
161 
162  myGroup_track.defineHistogram('clusterSize_eta;ClusterSize_etaView',
163  type='TH1I',
164  title='Cluster size in #eta view for muons decayed from Z candidates;Cluster size;NCluster',
165  path=trackPath,
166  xbins=11,xmin=-0.5, xmax=10.5)
167 
168  myGroup_track.defineHistogram('clusterSize_phi;ClusterSize_phiView',
169  type='TH1I',
170  title='Cluster size in #phi view for muons decayed from Z candidates;Cluster size;NCluster',
171  path=trackPath,
172  xbins=11,xmin=-0.5, xmax=10.5)
173 
174  myGroup_track.defineHistogram('clusterSize,panelInd_clust;ClusterSize_Panels',
175  title='Cluster size for muons decayed from Z candidates;Cluster size;Panel Index;NCluster',
176  type='TH2I',
177  path=trackPath,
178  xbins=11, xmin=-0.5, xmax=10.5, ybins=8592, ymin=-0.5, ymax=8591.5)
179 
180  myGroup_track.defineHistogram('muon_passExtrap,panelInd_hM;Detection_Efficiency_MuonFromZ',
181  title='Panels detection efficiency for muons decayed from Z candidates;Panel Index;Efficiency',
182  type='TEfficiency',
183  path=trackPath,
184  xbins=8592, xmin=-0.5, xmax=8591.5)
185  myGroup_track.defineHistogram('muon_passExtrap_or,panelInd_hM;Detection_Efficiency_MuonFromZ_EtaORPhi',
186  title='Panels(eta or phi) detection efficiency for muons decayed from Z candidates;Panel Index;Efficiency',
187  type='TEfficiency',
188  path=trackPath,
189  xbins=8592, xmin=-0.5, xmax=8591.5)
190  myGroup_track.defineHistogram('muon_passExtrap_and,panelInd_hM;Detection_Efficiency_MuonFromZ_EtaANDPhi',
191  title='Panels(eta and phi) detection efficiency for muons decayed from Z candidates;Panel Index;Efficiency',
192  type='TEfficiency',
193  path=trackPath,
194  xbins=8592, xmin=-0.5, xmax=8591.5)
195  myGroup_track.defineHistogram('muon_passExtrap_signalhit_or,panelInd_hM;Detection_Efficiency_MuonFromZ_signalHit_EtaORPhi',
196  title='Panels(eta or phi) detection efficiency for muons decayed from Z candidates(Signal hits);Panel Index;Efficiency',
197  type='TEfficiency',
198  path=trackPath,
199  xbins=8592, xmin=-0.5, xmax=8591.5)
200  myGroup_track.defineHistogram('muon_passExtrap_signalhit_and,panelInd_hM;Detection_Efficiency_MuonFromZ_signalHit_EtaANDPhi',
201  title='Panels(eta and phi) detection efficiency for muons decayed from Z candidates(Signal hits);Panel Index;Efficiency',
202  type='TEfficiency',
203  path=trackPath,
204  xbins=8592, xmin=-0.5, xmax=8591.5)
205  myGroup_track.defineHistogram('muon_passExtrap_signalhit,panelInd_hM;Detection_Efficiency_MuonFromZ_signalHit',
206  title='Panels detection efficiency for muons decayed from Z candidates(Signal hits);Panel Index;Efficiency',
207  type='TEfficiency',
208  path=trackPath,
209  xbins=8592, xmin=-0.5, xmax=8591.5)
210  myGroup_track.defineHistogram('muon_passExtrap,LB_detEff;Detection_Efficiency_LB_MuonFromZ',
211  title='Panels detection efficiency for muons decayed from Z candidates;Luminosity Block;Efficiency',
212  type='TEfficiency',
213  path=trackPath,
214  xbins=2000, xmin=0.5, xmax=2000.5)
215 
216  myGroup_track.defineHistogram('isOutTime_prd,panelInd_prd;OuttimeHitFraction_PRDHit',
217  title='Fraction of out-of-time hits for muons decayed from Z candidates;Panel Index;Fraction of out-of-time hits',
218  type='TEfficiency',
219  path=trackPath,
220  xbins=8592, xmin=-0.5, xmax=8591.5)
221 
222  myGroup_track.defineHistogram('isOutTime_prd_onTrack,panelInd_prd_onTrack;OuttimeHitFraction_PRDHit_onTrack',
223  title='Fraction of out-of-time hits on tracks of muons decayed from Z candidates;Panel Index;Fraction of out-of-time hits',
224  type='TEfficiency',
225  path=trackPath,
226  xbins=8592, xmin=-0.5, xmax=8591.5)
227 
228  myGroup_track.defineHistogram('residual_eta;residual_eta',
229  title='Distance between extrapolated muon track position and RPC eta hit;Distance [mm];Number of hit',
230  type='TH1D',
231  path=trackPath,
232  xbins=200, xmin=-100., xmax=100.)
233 
234  myGroup_track.defineHistogram('residual_phi;residual_phi',
235  title='Distance between extrapolated muon track position and RPC eta hit;Distance [mm];Number of hit',
236  type='TH1D',
237  path=trackPath,
238  xbins=200, xmin=-100., xmax=100.)
239 
240  myGroup_track.defineHistogram('closest_residual_eta;closest_residual_eta',
241  title='The closest distance between extrapolated muon track position and RPC eta hit;Distance [mm];Number of muon track position',
242  type='TH1D',
243  path=trackPath,
244  xbins=200, xmin=-100., xmax=100.)
245 
246  myGroup_track.defineHistogram('closest_residual_phi;closest_residual_phi',
247  title='The closest distance between extrapolated muon track position and RPC eta hit;Distance [mm];Number of muon track position',
248  type='TH1D',
249  path=trackPath,
250  xbins=200, xmin=-100., xmax=100.)
251 
252  myGroup_track.defineHistogram('residual_panel,panelInd_res_inTime;Residual_Panels',
253  title='Distance between extrapolated muon track position and RPC hit;Panel Index;Distance [mm];Number of hit',
254  type='TH2D',
255  path=trackPath,
256  xbins=100, xmin=-50., xmax=50., ybins=8592, ymin=-0.5, ymax=8591.5)
257 
258 
259  myGroup_track.defineHistogram('muPt_allMu;Pt_AllMuons',
260  title='Pt of muons in all events;Pt[MeV];NMuon',
261  type='TH1D',
262  path='PlotCand',
263  xbins=100,xmin=0,xmax=400e3)
264  myGroup_track.defineHistogram('muEta_allMu;Eta_AllMuons',
265  title='#eta of muons in all events;#eta;NMuon',
266  type='TH1D',
267  path='PlotCand',
268  xbins=42, xmin=-1.05, xmax=1.05)
269  myGroup_track.defineHistogram('muPhi_allMu;Phi_AllMuons',
270  title='#phi of muons in all events;#phi;NMuon',
271  type='TH1D',
272  path='PlotCand',
273  xbins=32, xmin=-3.1415926, xmax=3.1415926)
274  myGroup_track.defineHistogram('muEta_allMu,muPhi_allMu;EtaVSPhi_AllMuons',
275  type='TH2D',
276  title='Eta vs phi of all muons;#eta;#phi;NMuon',
277  path='PlotCand',
278  xbins=42,xmin=-1.05, xmax=1.05,
279  ybins=32,ymin=-3.1415926,ymax=3.1415926)
280 
281 
282  myGroup_track.defineHistogram('muon_passExtrap_allMu,panelInd_hM_allMu;Detection_Efficiency_AllMuons',
283  title='Panels detection efficiency for all muons;Panel Index;Efficiency',
284  type='TEfficiency',
285  path=trackPath,
286  xbins=8592, xmin=-0.5, xmax=8591.5)
287 
288 
289  sectors = ["sector"+str(k) for k in range(1, 16+1)]
290  array_sectors = helper.addArray([sectors], rpcTrackAnaAlg, 'RpcTrackAnaAlg', 'Muon/MuonRawDataMonitoring/RPC/')
291 
292  array_sectors.defineHistogram('cs_sec;ClusterSize',
293  title='Cluster size on {0};Cluster size;NCluster',
294  type='TH1I',
295  path='TrackMatch/ClusterSize',
296  xbins=11, xmin=-0.5, xmax=10.5)
297 
298  array_sectors.defineHistogram('hitTime_sec;PRDHitTime_MuonFromZ',
299  title='Hit time on {0};Hit time;NHits',
300  type='TH1I',
301  path='TrackMatch/PRDHitTime',
302  xbins=36, xmin=-101.5625, xmax=10.9375)
303 
304 
307  myGroup_track.defineHistogram('nMu;NMuon',
308  title='Number of Muons;nMuons;Events',
309  type='TH1I',
310  path='PlotCand',
311  xbins=10,xmin=-0.5,xmax=9.5)
312  myGroup_track.defineHistogram('nMuBarrel;NMuonBarrel',
313  title='Number of Barrel Muons;nMuons;Events',
314  type='TH1I',
315  path='PlotCand',
316  xbins=5,xmin=-0.5,xmax=4.5)
317  myGroup_track.defineHistogram('roiEta;roiEta',
318  title='roi eta;roi #eta;rois',
319  type='TH1D',
320  path='PlotCand',
321  xbins=50,xmin=-2.5,xmax=2.5)
322 
323  myGroup_track.defineHistogram('roiBarrelEta;roiBarrelEta',
324  title='Barrel roi eta;roi #eta;rois',
325  type='TH1D',
326  path='PlotCand',
327  xbins=50,xmin=-2.5,xmax=2.5)
328 
329  myGroup_track.defineHistogram('roiBarrelThr;roiBarrelThrs',
330  title='Barrel roi threshold;roi threshold;rois',
331  type='TH1I',
332  path='PlotCand',
333  xbins=6,xmin=0.5,xmax=6.5)
334 
335  lv1Triggers = ["thr"+str(k) for k in range(1, 6+1)]
336  array_triggerThr = helper.addArray([lv1Triggers], rpcTrackAnaAlg, 'RpcTrackAnaAlg', 'Muon/MuonRawDataMonitoring/RPC/')
337 
338  array_triggerThr.defineHistogram('passTrigger,muPt_l1;L1TriggerEff_muPt',
339  title='L1 Trigger Efficiency for {0};Pt[MeV];#epsilon for {0}',
340  type='TEfficiency',
341  path='L1Trigger',
342  xbins=10, xmin=0.0, xmax=80.0e3)
343 
344  array_triggerThr.defineHistogram('passTrigger_plateau,muEta_l1;L1TriggerEff_muEta',
345  title='L1 Trigger Efficiency for {0};#eta;#epsilon for {0}',
346  type='TEfficiency',
347  path='L1Trigger',
348  xbins=42,xmin=-1.05, xmax=1.05)
349 
350  array_triggerThr.defineHistogram('passTrigger_plateau,muPhi_l1;L1TriggerEff_muPhi',
351  title='L1 Trigger Efficiency for {0};#phi;#epsilon for {0}',
352  type='TEfficiency',
353  path='L1Trigger',
354  xbins=32,xmin=-3.1415926,xmax=3.1415926)
355 
356  array_triggerThr.defineHistogram('passTrigger_plateau,muEta_l1,muPhi_l1;L1TriggerEff_eta_phi',
357  title='L1 Trigger Efficiency for {0};#eta;#phi;#epsilon for {0}',
358  type='TEfficiency',
359  path='L1Trigger',
360  xbins=42,xmin=-1.05, xmax=1.05,
361  ybins=32,ymin=-3.1415926,ymax=3.1415926)
362 
363  result.merge(helper.result())
364  print(" RpcMonitorAlgorithm END !")
365 
366  return result
367 
368 

Variable Documentation

◆ acc

def RpcMonitorAlgorithm.acc = RpcMonitoringConfig(flags)

Definition at line 410 of file RpcMonitorAlgorithm.py.

◆ AtlasVersion

RpcMonitorAlgorithm.AtlasVersion

Definition at line 399 of file RpcMonitorAlgorithm.py.

◆ cfg

RpcMonitorAlgorithm.cfg = MainServicesCfg(flags)

Definition at line 407 of file RpcMonitorAlgorithm.py.

◆ file_list

list RpcMonitorAlgorithm.file_list = []

Definition at line 383 of file RpcMonitorAlgorithm.py.

◆ Files

RpcMonitorAlgorithm.Files

Definition at line 396 of file RpcMonitorAlgorithm.py.

◆ flags

RpcMonitorAlgorithm.flags = initConfigFlags()

Definition at line 378 of file RpcMonitorAlgorithm.py.

◆ HISTFileName

RpcMonitorAlgorithm.HISTFileName

Definition at line 397 of file RpcMonitorAlgorithm.py.

◆ infile

RpcMonitorAlgorithm.infile = open('input.txt', "r")

Definition at line 385 of file RpcMonitorAlgorithm.py.

◆ OutputLevel

RpcMonitorAlgorithm.OutputLevel

Definition at line 411 of file RpcMonitorAlgorithm.py.

◆ summariseProps

RpcMonitorAlgorithm.summariseProps

Definition at line 423 of file RpcMonitorAlgorithm.py.

◆ True

RpcMonitorAlgorithm.True

Definition at line 423 of file RpcMonitorAlgorithm.py.

◆ withDetails

RpcMonitorAlgorithm.withDetails

Definition at line 423 of file RpcMonitorAlgorithm.py.

python.JetAnalysisCommon.ComponentAccumulator
ComponentAccumulator
Definition: JetAnalysisCommon.py:302
AtlasTrackingGeometryCondAlgConfig.TrackingGeometryCondAlgCfg
def TrackingGeometryCondAlgCfg(flags, name='AtlasTrackingGeometryCondAlg', doMaterialValidation=False, **kwargs)
Definition: AtlasTrackingGeometryCondAlgConfig.py:131
RpcMonitorAlgorithm.RpcMonitoringConfig
def RpcMonitoringConfig(inputFlags)
Definition: RpcMonitorAlgorithm.py:10
python.AtlasExtrapolatorConfig.AtlasExtrapolatorCfg
def AtlasExtrapolatorCfg(flags, name='AtlasExtrapolator')
Definition: AtlasExtrapolatorConfig.py:63
python.TrigDecisionToolConfig.getRun3NavigationContainerFromInput
def getRun3NavigationContainerFromInput(flags)
Definition: TrigDecisionToolConfig.py:63
plotBeamSpotVxVal.range
range
Definition: plotBeamSpotVxVal.py:195
str
Definition: BTagTrackIpAccessor.cxx:11
dbg::print
void print(std::FILE *stream, std::format_string< Args... > fmt, Args &&... args)
Definition: SGImplSvc.cxx:70
python.MagFieldServicesConfig.AtlasFieldCacheCondAlgCfg
def AtlasFieldCacheCondAlgCfg(flags, **kwargs)
Definition: MagFieldServicesConfig.py:8