ATLAS Offline Software
Functions
SCTLorentzMonAlg Namespace Reference

Functions

def SCTLorentzMonAlgConfig (flags)
 

Function Documentation

◆ SCTLorentzMonAlgConfig()

def SCTLorentzMonAlg.SCTLorentzMonAlgConfig (   flags)

Definition at line 11 of file SCTLorentzMonAlg.py.

11 def SCTLorentzMonAlgConfig(flags):
12 
13 
16  from AthenaConfiguration.ComponentAccumulator import ComponentAccumulator
17  result = ComponentAccumulator()
18 
19  # The following class will make a sequence, configure algorithms, and link
20  # them to GenericMonitoringTools
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(
40  TrackSummaryTool = result.popToolsAndMerge(
42 
43  # # If for some really obscure reason you need to instantiate an algorithm
44  # # yourself, the AddAlgorithm method will still configure the base
45  # # properties and add the algorithm to the monitoring sequence.
46  # helper.AddAlgorithm(myExistingAlg)
47 
48 
49 
51  myMonAlg.TriggerChain = ''
52  # myMonAlg.RandomHist = True
53 
54 
57 
58 
59  # set up conditions
60  from SCT_ConditionsAlgorithms.SCT_ConditionsAlgorithmsConfig import SCT_DetectorElementCondAlgCfg
61  result.merge(SCT_DetectorElementCondAlgCfg(flags))
62 
63  # # Then, add a tool that doesn't have its own configuration function. In
64  # # this example, no accumulator is returned, so no merge is necessary.
65  # from MyDomainPackage.MyDomainPackageConf import MyDomainTool
66  # myMonAlg.MyDomainTool = MyDomainTool()
67 
68  # Add a generic monitoring tool (a "group" in old language). The returned
69  # object here is the standard GenericMonitoringTool.
70  myMonGroup = helper.addGroup(
71  myMonAlg,
72  "SCTLorentzMonitor",
73  "SCT/GENERAL/"
74  )
75 
76 
78  N_BARRELS = 4
79  nSides = 2 # 0: Side 0, 1: Side 1
80  nSurfaces = 2 # 0: 100, 1: 111
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, # ; means alias
93  type="TProfile",
94  title=histTitle+";#phi to Wafer;Num of Strips",
95  path="lorentz", # path cannot be "".
96  xbins=360, xmin=-90., xmax=90.)
97 
98  myMonGroup.defineHistogram(varname=xVar+","+yVar+";"+histName + "_e0p5", # ; means alias
99  type="TProfile",
100  title=histTitle+"(|#eta| < 0.5);#phi to Wafer;Num of Strips",
101  path="lorentz", # path cannot be "".
102  xbins=360, xmin=-90., xmax=90.,
103  cutmask="isCentral")
104  nEndcaps = 2
105  nDisks = 9
106  nSides = 2 # 0: Side 0, 1: Side 1
107  nEta = 3 # outer, middle, inner
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, # ; means alias
130  type="TProfile",
131  title=histTitle+";#phi to Wafer;Num of Strips",
132  path="lorentz", # path cannot be "".
133  xbins=360, xmin=-90., xmax=90.)
134 
135 
141 
142  # # Otherwise, merge with result object and return
143  result.merge(helper.result())
144  return result
145 
python.JetAnalysisCommon.ComponentAccumulator
ComponentAccumulator
Definition: JetAnalysisCommon.py:302
python.TrkTrackSummaryToolConfig.InDetTrackSummaryToolCfg
def InDetTrackSummaryToolCfg(flags, name='InDetTrackSummaryTool', **kwargs)
Definition: TrkTrackSummaryToolConfig.py:22
python.InDetAssociationToolsConfig.InDetPRDtoTrackMapToolGangedPixelsCfg
def InDetPRDtoTrackMapToolGangedPixelsCfg(flags, name='PRDtoTrackMapToolGangedPixels', **kwargs)
Definition: InDetAssociationToolsConfig.py:29
SCTLorentzMonAlg.SCTLorentzMonAlgConfig
def SCTLorentzMonAlgConfig(flags)
Definition: SCTLorentzMonAlg.py:11
plotBeamSpotVxVal.range
range
Definition: plotBeamSpotVxVal.py:195
str
Definition: BTagTrackIpAccessor.cxx:11
python.SCT_ConditionsAlgorithmsConfig.SCT_DetectorElementCondAlgCfg
def SCT_DetectorElementCondAlgCfg(flags, name="SCT_DetectorElementCondAlg", **kwargs)
Definition: SCT_ConditionsAlgorithmsConfig.py:66