ATLAS Offline Software
Functions
TRTCalibratorConfig Namespace Reference

Functions

def TRTCalibratorCfg (flags, name="TRTCalibratorTool", calTag='all', **kwargs)
 
def CaltagConfiguration (caltag, **kwargs)
 

Detailed Description

Define methods to TRT R-t calibration ntuple and obtain its constants 

Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration

Function Documentation

◆ CaltagConfiguration()

def TRTCalibratorConfig.CaltagConfiguration (   caltag,
**  kwargs 
)

Definition at line 44 of file TRTCalibratorConfig.py.

44 def CaltagConfiguration(caltag, **kwargs):
45  # caltag dependent stuff
46  if caltag == 'all': # Full TRT detector
47  kwargs.setdefault("Selstring",'_*_-_-_-_-_-_-')
48  kwargs.setdefault("NoHistograms",['TRT'])
49  kwargs.setdefault("CalibrateT0",['TRT'])
50  kwargs.setdefault("CalibrateRt",['TRT'])
51  kwargs.setdefault("PrintLog",['TRT'])
52  kwargs.setdefault("PrintT0Out",['TRT'])
53  kwargs.setdefault("PrintRtOut",['TRT'])
54  elif caltag == 'barrel': # Full barrel detector
55  kwargs.setdefault("Selstring",'_*_1_*_-_-_-_-')
56  kwargs.setdefault("NoHistograms",['TRT'])
57  kwargs.setdefault("CalibrateT0",['TRT','Detector','Layer'])
58  kwargs.setdefault("CalibrateRt",['TRT','Detector'])
59  kwargs.setdefault("PrintLog",['TRT','Detector','Layer'])
60  kwargs.setdefault("PrintT0Out",['Layer'])
61  kwargs.setdefault("PrintRtOut",['Layer'])
62  elif caltag == '-1': # C-side barrel
63  kwargs.setdefault("Selstring",'_*_-1_-_-_-_-_-')
64  kwargs.setdefault("NoHistograms",['TRT'])
65  kwargs.setdefault("CalibrateT0",['TRT','Detector'])
66  kwargs.setdefault("CalibrateRt",['TRT','Detector'])
67  kwargs.setdefault("PrintLog",['TRT','Detector'])
68  kwargs.setdefault("PrintT0Out",['TRT','Detector'])
69  kwargs.setdefault("PrintRtOut",['TRT','Detector'])
70  elif caltag == '-1_0': # First layer of the C-side barrel
71  kwargs.setdefault("Selstring",'_*_-1_0_*_*_*_*')
72  kwargs.setdefault("NoHistograms",['TRT','Detector','Chip','Straw'])
73  kwargs.setdefault("CalibrateT0",['TRT','Detector','Layer','Module','Board','Chip'])
74  kwargs.setdefault("CalibrateRt",['TRT','Detector'])
75  kwargs.setdefault("PrintLog",['TRT','Detector','Layer','Module','Board','Chip'])
76  kwargs.setdefault("PrintT0Out",['Layer','Module','Board','Chip','Straw'])
77  kwargs.setdefault("PrintRtOut",['Layer'])
78  elif caltag == '-1_1': # Second layer of the C-side barrel
79  kwargs.setdefault("Selstring",'_*_-1_1_*_*_*_*')
80  kwargs.setdefault("NoHistograms",['TRT','Detector','Chip','Straw'])
81  kwargs.setdefault("CalibrateT0",['TRT','Detector','Layer','Module','Board','Chip'])
82  kwargs.setdefault("CalibrateRt",['TRT','Detector'])
83  kwargs.setdefault("PrintLog",['TRT','Detector','Layer','Module','Board','Chip'])
84  kwargs.setdefault("PrintT0Out",['Layer','Module','Board','Chip','Straw'])
85  kwargs.setdefault("PrintRtOut",['Layer'])
86  elif caltag == '-1_2': # Third layer of the C-side barrel
87  kwargs.setdefault("Selstring",'_*_-1_2_*_*_*_*')
88  kwargs.setdefault("NoHistograms",['TRT','Detector','Chip','Straw'])
89  kwargs.setdefault("CalibrateT0",['TRT','Detector','Layer','Module','Board','Chip'])
90  kwargs.setdefault("CalibrateRt",['TRT','Detector'])
91  kwargs.setdefault("PrintLog",['TRT','Detector','Layer','Module','Board','Chip'])
92  kwargs.setdefault("PrintT0Out",['Layer','Module','Board','Chip','Straw'])
93  kwargs.setdefault("PrintRtOut",['Layer'])
94  elif caltag == '1': # A-side barrel
95  kwargs.setdefault("Selstring",'_*_1_-_-_-_-_-')
96  kwargs.setdefault("NoHistograms",['TRT'])
97  kwargs.setdefault("CalibrateT0",['TRT','Detector'])
98  kwargs.setdefault("CalibrateRt",['TRT','Detector'])
99  kwargs.setdefault("PrintLog",['TRT','Detector'])
100  kwargs.setdefault("PrintT0Out",['TRT','Detector'])
101  kwargs.setdefault("PrintRtOut",['TRT','Detector'])
102  elif caltag == '1_0': # First layer of the A-side barrel
103  kwargs.setdefault("Selstring",'_*_1_0_*_*_*_*')
104  kwargs.setdefault("NoHistograms",['TRT','Detector','Chip','Straw'])
105  kwargs.setdefault("CalibrateT0",['TRT','Detector','Layer','Module','Board','Chip'])
106  kwargs.setdefault("CalibrateRt",['TRT','Detector'])
107  kwargs.setdefault("PrintLog",['TRT','Detector','Layer','Module','Board','Chip'])
108  kwargs.setdefault("PrintT0Out",['Layer','Module','Board','Chip','Straw'])
109  kwargs.setdefault("PrintRtOut",['Layer'])
110  elif caltag == '1_1': # Second layer of the A-side barrel
111  kwargs.setdefault("Selstring",'_*_1_1_*_*_*_*')
112  kwargs.setdefault("NoHistograms",['TRT','Detector','Chip','Straw'])
113  kwargs.setdefault("CalibrateT0",['TRT','Detector','Layer','Module','Board','Chip'])
114  kwargs.setdefault("CalibrateRt",['TRT','Detector'])
115  kwargs.setdefault("PrintLog",['TRT','Detector','Layer','Module','Board','Chip'])
116  kwargs.setdefault("PrintT0Out",['Layer','Module','Board','Chip','Straw'])
117  kwargs.setdefault("PrintRtOut",['Layer'])
118  elif caltag == '1_2': # Third layer of the A-side barrel
119  kwargs.setdefault("Selstring",'_*_1_2_*_*_*_*')
120  kwargs.setdefault("NoHistograms",['TRT','Detector','Chip','Straw'])
121  kwargs.setdefault("CalibrateT0",['TRT','Detector','Layer','Module','Board','Chip'])
122  kwargs.setdefault("CalibrateRt",['TRT','Detector'])
123  kwargs.setdefault("PrintLog",['TRT','Detector','Layer','Module','Board','Chip'])
124  kwargs.setdefault("PrintT0Out",['Layer','Module','Board','Chip','Straw'])
125  kwargs.setdefault("PrintRtOut",['Layer'])
126  elif caltag == '2': # A-side End-cap
127  kwargs.setdefault("Selstring",'_*_2_-_-_-_-_-')
128  kwargs.setdefault("NoHistograms",['TRT'])
129  kwargs.setdefault("CalibrateT0",['TRT','Detector'])
130  kwargs.setdefault("CalibrateRt",['TRT','Detector'])
131  kwargs.setdefault("PrintLog",['TRT','Detector'])
132  elif caltag == '2_a': # First layer A-side End-cap
133  kwargs.setdefault("Selstring",'_*_2_0,1,2,3_*_*_*_*')
134  kwargs.setdefault("NoHistograms",['TRT','Detector','Chip','Straw'])
135  kwargs.setdefault("CalibrateT0",['TRT','Detector','Layer','Module','Board','Chip'])
136  kwargs.setdefault("CalibrateRt",['TRT','Detector'])
137  kwargs.setdefault("PrintLog",['TRT','Detector','Layer','Module','Board','Chip'])
138  kwargs.setdefault("PrintT0Out",['Layer','Module','Board','Chip','Straw'])
139  kwargs.setdefault("PrintRtOut",['Layer'])
140  elif caltag == '2_b': # Second layer A-side End-cap
141  kwargs.setdefault("Selstring",'_*_2_4,5,6,7_*_*_*_*')
142  kwargs.setdefault("NoHistograms",['TRT','Detector','Chip','Straw'])
143  kwargs.setdefault("CalibrateT0",['TRT','Detector','Layer','Module','Board','Chip'])
144  kwargs.setdefault("CalibrateRt",['TRT','Detector'])
145  kwargs.setdefault("PrintLog",['TRT','Detector','Layer','Module','Board','Chip'])
146  kwargs.setdefault("PrintT0Out",['Layer','Module','Board','Chip','Straw'])
147  kwargs.setdefault("PrintRtOut",['Layer'])
148  elif caltag == '2_c': # Third layer A-side End-cap
149  kwargs.setdefault("Selstring",'_*_2_8,9,10,11_*_*_*_*')
150  kwargs.setdefault("NoHistograms",['TRT','Detector','Chip','Straw'])
151  kwargs.setdefault("CalibrateT0",['TRT','Detector','Layer','Module','Board','Chip'])
152  kwargs.setdefault("CalibrateRt",['TRT','Detector'])
153  kwargs.setdefault("PrintLog",['TRT','Detector','Layer','Module','Board','Chip'])
154  kwargs.setdefault("PrintT0Out",['Layer','Module','Board','Chip','Straw'])
155  kwargs.setdefault("PrintRtOut",['Layer'])
156  elif caltag == '2_d': # Fourth layer A-side End-cap
157  kwargs.setdefault("Selstring",'_*_2_12,13_*_*_*_*')
158  kwargs.setdefault("NoHistograms",['TRT','Detector','Chip','Straw'])
159  kwargs.setdefault("CalibrateT0",['TRT','Detector','Layer','Module','Board','Chip'])
160  kwargs.setdefault("CalibrateRt",['TRT','Detector'])
161  kwargs.setdefault("PrintLog",['TRT','Detector','Layer','Module','Board','Chip'])
162  kwargs.setdefault("PrintT0Out",['Layer','Module','Board','Chip','Straw'])
163  kwargs.setdefault("PrintRtOut",['Layer'])
164  elif caltag == '-2': # C-side End-cap
165  kwargs.setdefault("Selstring",'_*_-2_-_-_-_-_-')
166  kwargs.setdefault("NoHistograms",['TRT'])
167  kwargs.setdefault("CalibrateT0",['TRT','Detector'])
168  kwargs.setdefault("CalibrateRt",['TRT','Detector'])
169  kwargs.setdefault("PrintLog",['TRT','Detector'])
170  elif caltag == '-2_a': # First layer C-side End-cap
171  kwargs.setdefault("Selstring",'_*_-2_0,1,2,3_*_*_*_*')
172  kwargs.setdefault("NoHistograms",['TRT','Detector','Chip','Straw'])
173  kwargs.setdefault("CalibrateT0",['TRT','Detector','Layer','Module','Board','Chip'])
174  kwargs.setdefault("CalibrateRt",['TRT','Detector'])
175  kwargs.setdefault("PrintLog",['TRT','Detector','Layer','Module','Board','Chip'])
176  kwargs.setdefault("PrintT0Out",['Layer','Module','Board','Chip','Straw'])
177  kwargs.setdefault("PrintRtOut",['Layer'])
178  elif caltag == '-2_b': # Second layer C-side End-cap
179  kwargs.setdefault("Selstring",'_*_-2_4,5,6,7_*_*_*_*')
180  kwargs.setdefault("NoHistograms",['TRT','Detector','Chip','Straw'])
181  kwargs.setdefault("CalibrateT0",['TRT','Detector','Layer','Module','Board','Chip'])
182  kwargs.setdefault("CalibrateRt",['TRT','Detector'])
183  kwargs.setdefault("PrintLog",['TRT','Detector','Layer','Module','Board','Chip'])
184  kwargs.setdefault("PrintT0Out",['Layer','Module','Board','Chip','Straw'])
185  kwargs.setdefault("PrintRtOut",['Layer'])
186  elif caltag == '-2_c': # Third layer C-side End-cap
187  kwargs.setdefault("Selstring",'_*_-2_8,9,10,11_*_*_*_*')
188  kwargs.setdefault("NoHistograms",['TRT','Detector','Chip','Straw'])
189  kwargs.setdefault("CalibrateT0",['TRT','Detector','Layer','Module','Board','Chip'])
190  kwargs.setdefault("CalibrateRt",['TRT','Detector'])
191  kwargs.setdefault("PrintLog",['TRT','Detector','Layer','Module','Board','Chip'])
192  kwargs.setdefault("PrintT0Out",['Layer','Module','Board','Chip','Straw'])
193  kwargs.setdefault("PrintRtOut",['Layer'])
194  elif caltag == '-2_d': # Fourth layer C-side End-cap
195  kwargs.setdefault("Selstring",'_*_-2_12,13_*_*_*_*')
196  kwargs.setdefault("NoHistograms",['TRT','Detector','Chip','Straw'])
197  kwargs.setdefault("CalibrateT0",['TRT','Detector','Layer','Module','Board','Chip'])
198  kwargs.setdefault("CalibrateRt",['TRT','Detector'])
199  kwargs.setdefault("PrintLog",['TRT','Detector','Layer','Module','Board','Chip'])
200  kwargs.setdefault("PrintT0Out",['Layer','Module','Board','Chip','Straw'])
201  kwargs.setdefault("PrintRtOut",['Layer'])
202 
203  return kwargs

◆ TRTCalibratorCfg()

def TRTCalibratorConfig.TRTCalibratorCfg (   flags,
  name = "TRTCalibratorTool",
  calTag = 'all',
**  kwargs 
)

Definition at line 9 of file TRTCalibratorConfig.py.

9 def TRTCalibratorCfg(flags, name="TRTCalibratorTool", calTag='all', **kwargs) :
10 
11  acc = ComponentAccumulator()
12  kwargs.setdefault("MinRt",10000)
13  kwargs.setdefault("MinT0",500)
14  kwargs.setdefault("Hittuple","merge.root")
15  kwargs.setdefault("RtRel","basic")
16  kwargs.setdefault("RtBinning","t")
17  kwargs.setdefault("UseP0" ,True)
18  kwargs.setdefault("FloatP3",True)
19  kwargs.setdefault("T0Offset",0.0)
20  kwargs.setdefault("DoShortStrawCorrection",False)
21  kwargs.setdefault("DoArXenonSep",True)
22  kwargs.setdefault("TrtManagerLocation","TRT")
23 
24  kwargs.update(CaltagConfiguration(calTag))
25 
26  if "TRTStrawSummaryTool" not in kwargs:
27  from TRT_ConditionsServices.TRT_ConditionsServicesConfig import TRT_StrawStatusSummaryToolCfg
28  kwargs.setdefault("TRTStrawSummaryTool", acc.popToolsAndMerge(TRT_StrawStatusSummaryToolCfg(flags)))
29 
30  if "NeighbourSvc" not in kwargs:
31  from TRT_ConditionsServices.TRT_ConditionsServicesConfig import TRT_StrawNeighbourSvcCfg
32  kwargs.setdefault("NeighbourSvc", acc.getPrimaryAndMerge(TRT_StrawNeighbourSvcCfg(flags)))
33 
34  if "TRTCalDbTool" not in kwargs:
35  from TRT_ConditionsServices.TRT_ConditionsServicesConfig import TRT_CalDbToolCfg
36  kwargs.setdefault("TRTCalDbTool", acc.popToolsAndMerge(TRT_CalDbToolCfg(flags)))
37 
38  acc.setPrivateTools(CompFactory.TRTCalibrator(name, **kwargs))
39  return acc
40 
41 
42 
43 
python.JetAnalysisCommon.ComponentAccumulator
ComponentAccumulator
Definition: JetAnalysisCommon.py:302
TRTCalibratorConfig.CaltagConfiguration
def CaltagConfiguration(caltag, **kwargs)
Definition: TRTCalibratorConfig.py:44
python.TRT_ConditionsServicesConfig.TRT_StrawStatusSummaryToolCfg
def TRT_StrawStatusSummaryToolCfg(flags, name="TRT_StrawStatusSummaryTool", forceLegacyAccess=False, **kwargs)
Definition: TRT_ConditionsServicesConfig.py:23
TRTCalibratorConfig.TRTCalibratorCfg
def TRTCalibratorCfg(flags, name="TRTCalibratorTool", calTag='all', **kwargs)
Definition: TRTCalibratorConfig.py:9
python.TRT_ConditionsServicesConfig.TRT_StrawNeighbourSvcCfg
def TRT_StrawNeighbourSvcCfg(flags, name="TRT_StrawNeighbourSvc", **kwargs)
Definition: TRT_ConditionsServicesConfig.py:42
python.TRT_ConditionsServicesConfig.TRT_CalDbToolCfg
def TRT_CalDbToolCfg(flags, name="TRT_CalDbTool", **kwags)
Definition: TRT_ConditionsServicesConfig.py:9