ATLAS Offline Software
Loading...
Searching...
No Matches
TileMuonFitMonitorAlgorithm Namespace Reference

Functions

 TileMuonFitMonitoringConfig (flags, **kwargs)

Detailed Description

@file TileMuonFitMonitorAlgorithm.py
@brief Python configuration of TileMuonFitMonitorAlgorithm algorithm for the Run III

Function Documentation

◆ TileMuonFitMonitoringConfig()

TileMuonFitMonitorAlgorithm.TileMuonFitMonitoringConfig ( flags,
** kwargs )
Function to configure TileMuonFitMonitorAlgorithm algorithm in the monitoring system.

Definition at line 11 of file TileMuonFitMonitorAlgorithm.py.

11def TileMuonFitMonitoringConfig(flags, **kwargs):
12
13 ''' Function to configure TileMuonFitMonitorAlgorithm algorithm in the monitoring system.'''
14
15 # Define one top-level monitoring algorithm. The new configuration
16 # framework uses a component accumulator.
17
18 result = ComponentAccumulator()
19
20 # The following class will make a sequence, configure algorithms, and link
21 # them to GenericMonitoringTools
22 from AthenaMonitoring import AthMonitorCfgHelper
23 helper = AthMonitorCfgHelper(flags,'TileMuonFitMonitoring')
24
25 # Adding an TileMuonFitMonitorAlgorithm algorithm to the helper
26 TileMuonFitMonitorAlgorithm=CompFactory.TileMuonFitMonitorAlgorithm
27 tileMuonFitMonAlg = helper.addAlgorithm(TileMuonFitMonitorAlgorithm, 'TileMuonFitMonAlg')
28
29 tileMuonFitMonAlg.TriggerChain = ''
30
31 # L1Trigger Type Bits:
32 # bit0_RNDM, bit1_ZeroBias, bit2_L1Cal, bit3_Muon,
33 # bit4_RPC, bit5_FTK, bit6_CTP, bit7_Calib, AnyPhysTrig
34 kwargs.setdefault('fillHistogramsForL1Triggers', ['AnyPhysTrig', 'bit7_Calib'])
35 l1Triggers = kwargs['fillHistogramsForL1Triggers']
36
37 for k, v in kwargs.items():
38 setattr(tileMuonFitMonAlg, k, v)
39
40 run = str(flags.Input.RunNumbers[0])
41
42 # 1) Configure histogram with TileMuonFitMonAlg algorithm execution time
43 executeTimeGroup = helper.addGroup(tileMuonFitMonAlg, 'TileMuonFitMonExecuteTime', 'Tile/')
44 executeTimeGroup.defineHistogram('TIME_execute', path = 'MuonFit', type='TH1F',
45 title = 'Time for execute TileMuonFitMonAlg algorithm;time [#mus]',
46 xbins = 100, xmin = 0, xmax = 10000)
47
48
49 from TileCalibBlobObjs.Classes import TileCalibUtils as Tile
50 from TileMonitoring.TileMonitoringCfgHelper import addTile2DHistogramsArray
51
52 # 2) Configure histograms with Tile MuonFit position at y=0
53 addTile2DHistogramsArray(helper, tileMuonFitMonAlg, name = 'TileMuonFitPosition',
54 xvalue = 'zPosition', yvalue = 'xPosition',
55 title = 'Tile MuonFit position at y=0;z [mm];x [mm]', path = 'Tile/MuonFit',
56 xbins = 69, xmin = -6900, xmax = 6900., ybins = 44, ymin = -4400., ymax = 4400.,
57 type='TH2D', run = run, triggers = l1Triggers)
58
59 # 3) Configure histograms with Tile MuonFit sinus of the angle in the y-z plane vs position
60 addTile2DHistogramsArray(helper, tileMuonFitMonAlg, name = 'TileMuonFitPosDirectionTheta',
61 xvalue = 'zPosition', yvalue = 'theta', path = 'Tile/MuonFit',
62 title = 'Tile MuonFit vertical axis component;z [mm];sin(#theta)',
63 xbins = 49, xmin = -4900, xmax = 4900., ybins = 50, ymin = -0., ymax = 1.,
64 type='TH2D', run = run, triggers = l1Triggers)
65
66 from TileMonitoring.TileMonitoringCfgHelper import addTile1DHistogramsArray
67
68 # 4) Configure histograms with number of Tile MuonFits reconstructed
69 addTile1DHistogramsArray(helper, tileMuonFitMonAlg, name = 'TileMuonFitNum', xvalue = 'nMuons',
70 title = 'Number of Tile MuonFit reconstructed', path = 'Tile/MuonFit',
71 xbins = 10, xmin = -0.5, xmax = 9.5, type = 'TH1F', run = run,
72 triggers = l1Triggers, perPartition = False)
73
74 # 5) Configure histograms with number of Tile cells per MuonFit track
75 addTile1DHistogramsArray(helper, tileMuonFitMonAlg, name = 'TileMuonFitNCells', xvalue = 'nCells',
76 title = 'Number of Tile cells per MuonFit track', path = 'Tile/MuonFit',
77 xbins = 10, xmin = -0.5, xmax = 9.5, type = 'TH1F', run = run,
78 triggers = l1Triggers, perPartition = False)
79
80 # 6) Configure histograms with Tile MuonFit total energy
81 addTile1DHistogramsArray(helper, tileMuonFitMonAlg, name = 'TileMuonFitEnergy', xvalue = 'energy',
82 title = 'Tile MuonFit total energy;Muon energy [MeV]', path = 'Tile/MuonFit',
83 xbins = 50, xmin = 0., xmax = 10000., type = 'TH1F', run = run,
84 triggers = l1Triggers, perPartition = False)
85
86 # 7) Configure histograms with Tile MuonFit time at y=0 plane
87 addTile1DHistogramsArray(helper, tileMuonFitMonAlg, name = 'TileMuonFitTime', xvalue = 'time',
88 title = 'Tile MuonFit time at y=0 plane;Muon time [ns]', path = 'Tile/MuonFit',
89 xbins = 49, xmin = -73.5, xmax = 73.5, type = 'TH1F', run = run,
90 triggers = l1Triggers, perPartition = False)
91
92 # 8) Configure histograms with Tile MuonFit path
93 addTile1DHistogramsArray(helper, tileMuonFitMonAlg, name = 'TileMuonFitPath', xvalue = 'path',
94 title = 'Tile MuonFit total path length;Muon path length [mm]', path = 'Tile/MuonFit',
95 xbins = 50, xmin = 0., xmax = 10000., type = 'TH1F', run = run,
96 triggers = l1Triggers, perPartition = False)
97
98 # 9) Configure histograms with Tile MuonFit energy density
99 addTile1DHistogramsArray(helper, tileMuonFitMonAlg, name = 'TileMuonFitEneDensity', xvalue = 'eneDensity',
100 title = 'Tile MuonFit energy density;Muon energy loss [MeV/mm]', path = 'Tile/MuonFit',
101 xbins = 50, xmin = 0., xmax = 10., type = 'TH1F', run = run,
102 triggers = l1Triggers, perPartition = False)
103
104 # 10) Configure histograms with Tile MuonFit sinus of the angle in the x-y plane
105 addTile1DHistogramsArray(helper, tileMuonFitMonAlg, name = 'TileMuonFitDirectionPhi', xvalue = 'phi',
106 title = 'Tile MuonFit sinus of the angle in the x-y plane;sin(#phi)', path = 'Tile/MuonFit',
107 xbins = 100, xmin = -1., xmax = 1., type = 'TH1F', run = run,
108 triggers = l1Triggers, perPartition = False)
109
110 # 11) Configure histograms with Tile MuonFit sinus of the angle in the y-z plane
111 addTile1DHistogramsArray(helper, tileMuonFitMonAlg, name = 'TileMuonFitDirectionTheta', xvalue = 'theta',
112 title = 'Tile MuonFit sinus of the angle in the y-z plane;sin(#theta)', path = 'Tile/MuonFit',
113 xbins = 50, xmin = 0., xmax = 1., type = 'TH1F', run = run,
114 triggers = l1Triggers, perPartition = False)
115
116 # 12) Configure histograms with Tile MuonFit sinus of the angle in the y-z plane
117 addTile1DHistogramsArray(helper, tileMuonFitMonAlg, name = 'TileMuonFitPositionTime', xvalue = 'zPosition', value = 'time',
118 title = 'Tile MuonFit average time vs z position at y=0 plane;z [mm]; t [ns]', path = 'Tile/MuonFit',
119 xbins = 79, xmin = -7900., xmax = 7900., type = 'TProfile', run = run,
120 triggers = l1Triggers, perPartition = False)
121
122 from TileMonitoring.TileMonitoringCfgHelper import getPartitionName
123
124 # 13) Configure histograms with Tile MuonFit partition time
125 partitionLabels = [getPartitionName(ros) for ros in range(1, Tile.MAX_ROS)]
126 addTile1DHistogramsArray(helper, tileMuonFitMonAlg, name = 'TileMuonFitPartitionTime', xvalue = 'partition', value = 'time',
127 title = 'Tile MuonFit average time vs partition at y=0 plane;; t [ns]', path = 'Tile/MuonFit',
128 xbins = Tile.MAX_ROS - 1, xmin = -0.5, xmax = Tile.MAX_ROS - 1.5, xlabels = partitionLabels,
129 type = 'TProfile', run = run, triggers = l1Triggers, perPartition = False)
130
131
132 accumalator = helper.result()
133 result.merge(accumalator)
134 return result
135