ATLAS Offline Software
Functions
PPMSimBSMonitorAlgorithm Namespace Reference

Functions

def PPMSimBSMonitoringConfig (flags)
 
def BinErrors (y, crs)
 

Function Documentation

◆ BinErrors()

def PPMSimBSMonitorAlgorithm.BinErrors (   y,
  crs 
)

Definition at line 127 of file PPMSimBSMonitorAlgorithm.py.

127 def BinErrors(y, crs):
128 
129  cr0 = crs.split("cr")[1]
130  cr1 = crs.split("cr")[2]
131 
132 
133  yErrorLabels = []
134  for i in range(0, int(y/2)):
135  yErrorLabels.append(str(cr0)+'/'+str(i))
136  for i in range(0, int(y/2)):
137  yErrorLabels.append(str(cr1)+'/'+str(i))
138 
139  return yErrorLabels
140 
141 
142 
143 
144 

◆ PPMSimBSMonitoringConfig()

def PPMSimBSMonitorAlgorithm.PPMSimBSMonitoringConfig (   flags)
Function to configure LVL1 PPM Sim algorithm in the monitoring system.

Definition at line 7 of file PPMSimBSMonitorAlgorithm.py.

7 def PPMSimBSMonitoringConfig(flags):
8  '''Function to configure LVL1 PPM Sim algorithm in the monitoring system.'''
9 
10 
11  # get the component factory - used for getting the algorithms
12  from AthenaConfiguration.ComponentFactory import CompFactory
13  from AthenaConfiguration.ComponentAccumulator import ComponentAccumulator
14  result = ComponentAccumulator()
15 
16  # make the athena monitoring helper
17  from AthenaMonitoring import AthMonitorCfgHelper
18  helper = AthMonitorCfgHelper(flags,'PPMSimBSMonitoringCfg')
19 
20  # get any algorithms
21  PPMSimBSMonAlg = helper.addAlgorithm(CompFactory.PPMSimBSMonitorAlgorithm,'PPMSimBSMonAlg')
22 
23  # import tools
24  from DetDescrCnvSvc.DetDescrCnvSvcConfig import DetDescrCnvSvcCfg # Needed for L1TTIDTools (ATR-21865)
25  helper.result().merge(DetDescrCnvSvcCfg(flags))
26 
27  from TrigT1CaloCondSvc.L1CaloCondConfig import L1CaloCondAlgCfg
28  helper.result().merge(L1CaloCondAlgCfg(flags,Physics=True, Calib1=False, Calib2=False))
29 
30  from TrigConfxAOD.TrigConfxAODConfig import getxAODConfigSvc
31  helper.result().getPrimaryAndMerge(getxAODConfigSvc(flags))
32 
33  # add any steering
34  groupName = 'PPMSimBSMonitor' # the monitoring group name is also used for the package name
35  PPMSimBSMonAlg.PackageName = groupName
36 
37  # Histogram paths
38  mainDir = 'L1Calo'
39  trigPath = 'PPM/'
40 
41  # Trigger tower plots: eta-phi granularity
42  etabins = [-4.9,-4.475,-4.050,-3.625,-3.2,-3.1,-2.9,
43  -2.7,-2.5,-2.4,-2.3,-2.2,-2.1,-2.0,-1.9,
44  -1.8,-1.7,-1.6,-1.5,-1.4,-1.3,-1.2,-1.1,
45  -1.0,-0.9,-0.8,-0.7,-0.6,-0.5,-0.4,-0.3,
46  -0.2,-0.1,0.0,0.1,0.2,0.3,0.4,0.5,0.6,0.7,
47  0.8,0.9,1.0,1.1,1.2,1.3,1.4,1.5,1.6,1.7,
48  1.8,1.9,2.0,2.1,2.2,2.3,2.4,2.5,2.7,2.9,
49  3.1,3.2,3.625,4.050,4.475,4.9]
50 
51 
52 
53 
54  phibins = 64
55  phimin = 0
56 
57  # Common location
58  trigPath = "/PPM/Errors/Data_Simulation"
59 
60 
63 
64 
65  group_names = {"peakf": "Peakfinder", "satBcid": "SaturatedBCID"}
66  mismatch_map= {"NonZeroMatches": "Data/Simulation Non-Zero Matches", "ZeroMatches": "Data/Simulation Zero Matches", "DataNoSim":"Data but no Simulation", "SimNoData":"Simulation but no Data"}
67 
68 
69  # Eta-phi maps
70  histPath = trigPath+'/PPMBcidSim'
71  for names in group_names:
72  for elem in mismatch_map:
73  group_bcidsim = helper.addGroup(PPMSimBSMonAlg, 'group_Mismatch_{0}_{1}'.format(names, elem), mainDir)
74  group_bcidsim.defineHistogram('etaTT_2D,phiTT_2D;ppm_2d_etaPhi_tt_'+names+'_'+elem, title='PPM '+group_names[names]+' ' + mismatch_map[elem], type='TH2D', path=histPath, xbins=etabins, ybins=phibins, ymin=phimin, ymax=phibins, opt='kAlwaysCreate')
75 
76 
77 
78 
81 
82  histPath_CP = trigPath+'/PPMLUTSim'
83  histPath_JEP = trigPath+'/PPMLUTSim'
84  lut_map = { "SimEqData": "Data/Simulation Non-zero Matches", "SimNeData": "Data/Simulation Non-zero Mismatches", "SimNoData": "Simulation but no Data", "DataNoSim": "Data but no Simulation" }
85  group_names_lut = {"lutCp": ["CP", histPath_CP], "lutJep": ["JEP", histPath_JEP] }
86 
87  # EM layer
88  for names in group_names_lut:
89  for elem in lut_map:
90  group_lut_em = helper.addGroup(PPMSimBSMonAlg, 'groupLUT{0}_EM_{1}'.format(group_names_lut[names][0],elem), mainDir)
91  group_lut_em.defineHistogram('etaTT_2D,phiTT_2D;ppm_em_2d_etaPhi_tt_'+names+'_'+elem, title='PPM LUT-'+group_names_lut[names][0]+' EM ' + lut_map[elem], type='TH2D', path=group_names_lut[names][1], xbins=etabins, ybins=phibins, ymin=phimin, ymax=phibins, opt='kAlwaysCreate')
92 
93  # HAD layer
94  for names in group_names_lut:
95  for elem in lut_map:
96  group_lut_had = helper.addGroup(PPMSimBSMonAlg, 'groupLUT{0}_HAD_{1}'.format(group_names_lut[names][0],elem), mainDir)
97  group_lut_had.defineHistogram('etaTT_2D,phiTT_2D;ppm_had_2d_etaPhi_tt_'+names+'_'+elem, title='PPM LUT-'+group_names_lut[names][0]+' HAD ' + lut_map[elem], type='TH2D', path=group_names_lut[names][1], xbins=etabins, ybins=phibins, ymin=phimin, ymax=phibins, opt='kAlwaysCreate')
98 
99 
102 
103  # Mismatch errors
104  nCrates = 8
105  nModulesPerCrate = 16
106 
107  histPath = trigPath+'/MismatchEventNumbers'
108 
109  y = 2 * (nModulesPerCrate + 16 * (nCrates % 2) )
110 
111  yErrorLabels = []
112 
113 
114  crate_map= [ "cr0cr1", "cr2cr3", "cr4cr5", "cr6cr7"]
115 
116  for elem in crate_map:
117  yErrorLabels = BinErrors(y, elem)
118  group_Error= helper.addGroup(PPMSimBSMonAlg, 'group_Error_{}'.format(elem), mainDir)
119  group_Error.defineHistogram('eventMonitor,y_2D;ppm_2d_LUT_MismatchEvents_'+ elem, title='PPM LUT Mismatch Event Numbers;Events with Error/Mismatch;Crate/Module', type='TH2I', path=histPath,xbins=10,xmin=0, xmax=10, ybins=y, ymin=0, ymax=y,ylabels=yErrorLabels,opt='kAlwaysCreate')
120 
121  # Finish up
122 
123  acc = helper.result()
124  result.merge(acc)
125  return result
126 
PPMSimBSMonitorAlgorithm.PPMSimBSMonitoringConfig
def PPMSimBSMonitoringConfig(flags)
Definition: PPMSimBSMonitorAlgorithm.py:7
python.JetAnalysisCommon.ComponentAccumulator
ComponentAccumulator
Definition: JetAnalysisCommon.py:302
vtune_athena.format
format
Definition: vtune_athena.py:14
CaloCellPos2Ntuple.int
int
Definition: CaloCellPos2Ntuple.py:24
PPMSimBSMonitorAlgorithm.BinErrors
def BinErrors(y, crs)
Definition: PPMSimBSMonitorAlgorithm.py:127
TrigConfxAODConfig.getxAODConfigSvc
def getxAODConfigSvc(flags)
Definition: TrigConfxAODConfig.py:5
python.DetDescrCnvSvcConfig.DetDescrCnvSvcCfg
def DetDescrCnvSvcCfg(flags, **kwargs)
Definition: DetDescrCnvSvcConfig.py:6
plotBeamSpotVxVal.range
range
Definition: plotBeamSpotVxVal.py:195
L1CaloCondConfig.L1CaloCondAlgCfg
def L1CaloCondAlgCfg(flags, readTest=False, Physics=True, Calib1=False, Calib2=False)
Definition: L1CaloCondConfig.py:6
str
Definition: BTagTrackIpAccessor.cxx:11
merge
Definition: merge.py:1