ATLAS Offline Software
ScanNtupleHandler.py
Go to the documentation of this file.
1 # Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
2 
3 #
4 # ScanNtupleHandler.py
5 #
6 # Definition of vdM scan ntuple
7 #
8 
9 from __future__ import print_function
10 # Utility to unpack BCID blobs
11 from CoolLumiUtilities.CoolBCIDData import LumiBCIDData
12 
13 from ROOT import TFile, TTree, gROOT, AddressOf
14 from array import array
15 
17 
18  def __init__(self):
19 
20  self.fileName = 'scan.root'
21  self.treeName = 'vdMScanData'
22  self.file = None
23  self.tree = None
24 
25  self.bcidData = LumiBCIDData()
26 
27  # Master list of tags to give to algorithms
28  self.algDict = dict()
29  self.algDict[0] = 'pref'
30  self.algDict[101] = 'lucidEvtAND'
31  self.algDict[102] = 'lucidEvtOR'
32  self.algDict[103] = 'lucidHitOR'
33  self.algDict[104] = 'lucidHitAND'
34  self.algDict[105] = 'lucidEvtA'
35  self.algDict[106] = 'lucidEvtC'
36 
37  self.algDict[111] = 'lucBiEvtAND'
38  self.algDict[112] = 'lucBiEvtOR'
39  self.algDict[113] = 'lucBiHitOR'
40  self.algDict[115] = 'lucBiEvtA'
41  self.algDict[116] = 'lucBiEvtC'
42 
43  self.algDict[121] = 'lucModEvtAND'
44  self.algDict[122] = 'lucModEvtOR'
45  self.algDict[123] = 'lucModHitOR'
46  self.algDict[124] = 'lucModHitAND'
47  self.algDict[125] = 'lucModEvtA'
48  self.algDict[126] = 'lucModEvtC'
49 
50  self.algDict[131] = 'lucBiPMTA1'
51  self.algDict[132] = 'lucBiPMTA5'
52  self.algDict[133] = 'lucBiPMTA9'
53  self.algDict[134] = 'lucBiPMTA13'
54  self.algDict[135] = 'lucBiPMTC1'
55  self.algDict[136] = 'lucBiPMTC5'
56  self.algDict[137] = 'lucBiPMTC9'
57  self.algDict[138] = 'lucBiPMTC13'
58 
59  self.algDict[151] = 'lucChA'
60  self.algDict[152] = 'lucChC'
61  self.algDict[153] = 'lucBiChA'
62  self.algDict[154] = 'lucBiChC'
63  self.algDict[155] = 'lucFibChA'
64  self.algDict[156] = 'lucFibChC'
65 
66  self.algDict[201] = 'bcmHEvtOR'
67  self.algDict[202] = 'bcmHEvtAND'
68  self.algDict[205] = 'bcmHORA'
69  self.algDict[206] = 'bcmHORC'
70 
71  self.algDict[211] = 'bcmVEvtOR'
72  self.algDict[212] = 'bcmVEvtAND'
73  self.algDict[215] = 'bcmVORA'
74  self.algDict[216] = 'bcmVORC'
75 
76  self.algDict[221] = 'bcmTEvtOR'
77  self.algDict[222] = 'bcmTEvtAND'
78  #self.algDict[225] = 'bcmTORA'
79  #self.algDict[226] = 'bcmTORC'
80 
81  self.algDict[231] = 'bcmHEarlyOR'
82  self.algDict[235] = 'bcmHEarlyA'
83  self.algDict[236] = 'bcmHEarlyC'
84 
85  self.algDict[241] = 'bcmVEarlyOR'
86  self.algDict[245] = 'bcmVEarlyA'
87  self.algDict[246] = 'bcmVEarlyC'
88 
89  self.algDict[301] = 'mbtsEvtOR'
90  self.algDict[302] = 'mbtsEvtAND'
91  self.algDict[303] = 'mbtsEvt2'
92 
93  self.algDict[501] = 'fcalA'
94  self.algDict[502] = 'fcalC'
95 
96  # Algorithms with bunch-by-bunch information
97  self.bbbAlgDict = dict()
98  self.bbbAlgDict[101] = 'lucidEvtAND'
99  self.bbbAlgDict[102] = 'lucidEvtOR'
100  self.bbbAlgDict[103] = 'lucidHitOR'
101  self.bbbAlgDict[104] = 'lucidHitAND'
102  self.bbbAlgDict[105] = 'lucidEvtA'
103  self.bbbAlgDict[106] = 'lucidEvtC'
104 
105  self.bbbAlgDict[111] = 'lucBiEvtAND'
106  self.bbbAlgDict[112] = 'lucBiEvtOR'
107  self.bbbAlgDict[113] = 'lucBiHitOR'
108  self.bbbAlgDict[114] = 'lucBiHitAND'
109  self.bbbAlgDict[115] = 'lucBiEvtA'
110  self.bbbAlgDict[116] = 'lucBiEvtC'
111 
112  self.bbbAlgDict[121] = 'lucModEvtAND'
113  self.bbbAlgDict[122] = 'lucModEvtOR'
114  self.bbbAlgDict[123] = 'lucModHitOR'
115  self.bbbAlgDict[125] = 'lucModEvtA'
116  self.bbbAlgDict[126] = 'lucModEvtC'
117 
118  self.bbbAlgDict[131] = 'lucBiPMTA1'
119  self.bbbAlgDict[132] = 'lucBiPMTA5'
120  self.bbbAlgDict[133] = 'lucBiPMTA9'
121  self.bbbAlgDict[134] = 'lucBiPMTA13'
122  self.bbbAlgDict[135] = 'lucBiPMTC1'
123  self.bbbAlgDict[136] = 'lucBiPMTC5'
124  self.bbbAlgDict[137] = 'lucBiPMTC9'
125  self.bbbAlgDict[138] = 'lucBiPMTC13'
126 
127  self.bbbAlgDict[151] = 'lucChA'
128  self.bbbAlgDict[152] = 'lucChC'
129  self.bbbAlgDict[153] = 'lucBiChA'
130  self.bbbAlgDict[154] = 'lucBiChC'
131  self.bbbAlgDict[155] = 'lucFibChA'
132  self.bbbAlgDict[156] = 'lucFibChC'
133 
134  self.bbbAlgDict[201] = 'bcmHEvtOR'
135  self.bbbAlgDict[202] = 'bcmHEvtAND'
136  self.bbbAlgDict[205] = 'bcmHORA'
137  self.bbbAlgDict[206] = 'bcmHORC'
138 
139  self.bbbAlgDict[211] = 'bcmVEvtOR'
140  self.bbbAlgDict[212] = 'bcmVEvtAND'
141  self.bbbAlgDict[215] = 'bcmVORA'
142  self.bbbAlgDict[216] = 'bcmVORC'
143 
144  self.bbbAlgDict[221] = 'bcmTEvtOR'
145  self.bbbAlgDict[222] = 'bcmTEvtAND'
146  #self.bbbAlgDict[225] = 'bcmTORA'
147  #self.bbbAlgDict[226] = 'bcmTORC'
148 
149  self.bbbAlgDict[231] = 'bcmHEarlyOR'
150  self.bbbAlgDict[235] = 'bcmHEarlyA'
151  self.bbbAlgDict[236] = 'bcmHEarlyC'
152 
153  self.bbbAlgDict[241] = 'bcmVEarlyOR'
154  self.bbbAlgDict[245] = 'bcmVEarlyA'
155  self.bbbAlgDict[246] = 'bcmVEarlyC'
156 
157  def open(self):
158  print('ScanNtupleHandler.open() called')
159 
160  self.file = TFile(self.fileName, 'recreate')
161  self.tree = TTree(self.treeName, self.treeName)
162 
163  def init(self):
164  print('ScanNtupleHandler.init() called')
165 
166  self.initScanData()
167  self.initBeamPosition()
168  self.initFillParams()
169  self.initLbdata()
170  self.initBunchData()
171  self.initBunchLumi()
172  self.initLumiData()
173  self.initLiveData()
174 
175  # Must pass data object as a reference where extracted COOL data can be found
176  # This relies on naming conventions, such as:
177  # data.scanData
178  # data.beamData
179  # data.fillData
180  # data.lbdataData
181  #
182  # Each of these should be a list of IObject values as returned by CoolDataReader
183  def fill(self, data):
184  print('ScanNtupleHandler.fill() called')
185 
186  nfilled = 0
187  # First we need to fill the scan data
188  for obj in data.scanData.data:
189 
190  # Make cuts here if desired?
191 
192  # Clear out the BCID object
193  self.bcidData.clear()
194 
195  # Fill the scan data
196  self.fillScanData(obj)
197 
198  # Now fill other data.
199  # Must match by IOV, so pass original scan data object, and the relevant data list
200 
201  # BEAMPOSITION
202  self.fillBeamPosition(obj, data.beamData.data)
203 
204  # FILLPARAMS
205  self.fillFillParams(obj, data.fillData.data)
206 
207  # LBDATA
208  self.fillLbdata(obj, data.lbdataData.data)
209 
210  # BUNCHDATA
211  self.fillBunchData(obj, data.bunchData.data)
212 
213  # BUNCHLUMI
214  self.fillBunchLumi(obj, data.bunchLumi.data)
215 
216  # LUMINOSITY
217  self.fillLumiData(obj, data.lumiData.data)
218 
219  self.tree.Fill()
220  nfilled += 1
221 
222  print('ScanNtupleHandler.fill() - filled', nfilled, 'entries')
223 
224  def close(self):
225  print('ScanNtupleHandler.close() called')
226 
227  self.file.Write()
228  self.file.Close()
229 
230  def initScanData(self):
231 
232  #
233  # Define SCANDATA tree
234  # Time is in ms
235  structStr = "struct ScanDataStruct {\
236  ULong64_t fStartTime;\
237  ULong64_t fEndTime;\
238  UInt_t fScanRun;\
239  UInt_t fScanLB;\
240  Float_t fStepProgress;\
241  Float_t fScanningIP;\
242  Float_t fAcquisitionFlag;\
243  Float_t fMovingBeam;\
244  Float_t fNominalSeparation;\
245  Float_t fScanInPlane;\
246  };"
247 
248  # Replace sizes if needed
249  gROOT.ProcessLine(structStr)
250  from ROOT import ScanDataStruct
251  self.scanDataStruct = ScanDataStruct()
252 
253  # l = 64 bit unsigned int, L = 64 bit signed int
254  self.tree.Branch('SCANDATA', self.scanDataStruct, 'StartTime/l:EndTime/l:ScanRun/i:ScanLB/i:StepProgress/F:ScanningIP/F:AcquisitionFlag/F:MovingBeam/F:NominalSeparation/F:ScanInPlane/F')
255 
256  # Pass an IObject object for a single ntuple entry
257  def fillScanData(self, obj):
258  self.scanDataStruct.fStartTime = obj.since() # Time in ns
259  self.scanDataStruct.fEndTime = obj.until() # Time in ns
260  self.scanDataStruct.fScanRun = obj.payload()['RunLB'] >> 32
261  self.scanDataStruct.fScanLB = obj.payload()['RunLB']&0xFFFFFFFF
262  self.scanDataStruct.fStepProgress = obj.payload()['StepProgress']
263  self.scanDataStruct.fScanningIP = obj.payload()['ScanningIP']
264  self.scanDataStruct.fAcquisitionFlag = obj.payload()['AcquisitionFlag']
265  self.scanDataStruct.fMovingBeam = obj.payload()['MovingBeam']
266  self.scanDataStruct.fNominalSeparation = obj.payload()['NominalSeparation']
267  self.scanDataStruct.fScanInPlane = obj.payload()['ScanInPlane']
268 
269  def initBeamPosition(self):
270 
271  #
272  # Define BEAMPOSITION tree
273  gROOT.ProcessLine("struct BeamPositionStruct {\
274  Float_t fB1PositionH;\
275  Float_t fB1PositionV;\
276  Float_t fB2PositionH;\
277  Float_t fB2PositionV;\
278  Float_t fB1AngleH;\
279  Float_t fB1AngleV;\
280  Float_t fB2AngleH;\
281  Float_t fB2AngleV;\
282  };")
283  from ROOT import BeamPositionStruct
284  self.beamPositionStruct = BeamPositionStruct()
285 
286  self.tree.Branch('BEAMPOSITION', self.beamPositionStruct, 'B1PositionH/F:B1PositionV/F:B2PositionH/F:B2PositionV/F:B1AngleH/F:B1AngleV/F:B2AngleH/F:B2AngleV/F')
287 
288  def fillBeamPosition(self, timeobj, data):
289 
290  # Must match by IOV
291  # These should match exactly, so just look for the same start time
292  found = False
293  for obj in data:
294  if timeobj.since() != obj.since(): continue
295 
296  found = True
297  self.beamPositionStruct.fB1PositionH = obj.payload()['B1_PositionAtIP_H']
298  self.beamPositionStruct.fB1PositionV = obj.payload()['B1_PositionAtIP_V']
299  self.beamPositionStruct.fB2PositionH = obj.payload()['B2_PositionAtIP_H']
300  self.beamPositionStruct.fB2PositionV = obj.payload()['B2_PositionAtIP_V']
301  self.beamPositionStruct.fB1AngleH = obj.payload()['B1_AngleAtIP_H']
302  self.beamPositionStruct.fB1AngleV = obj.payload()['B1_AngleAtIP_V']
303  self.beamPositionStruct.fB2AngleH = obj.payload()['B2_AngleAtIP_H']
304  self.beamPositionStruct.fB2AngleV = obj.payload()['B2_AngleAtIP_V']
305  break
306 
307  if not found:
308  print("scanNtupleHandler.fillBeamPosition - Didn't find beam position data to match scan data!")
309  self.beamPositionStruct.fB1PositionH = 0.
310  self.beamPositionStruct.fB1PositionV = 0.
311  self.beamPositionStruct.fB2PositionH = 0.
312  self.beamPositionStruct.fB2PositionV = 0.
313  self.beamPositionStruct.fB1AngleH = 0.
314  self.beamPositionStruct.fB1AngleV = 0.
315  self.beamPositionStruct.fB2AngleH = 0.
316  self.beamPositionStruct.fB2AngleV = 0.
317 
318 
319  def initFillParams(self):
320 
321  #
322  # Define FILLPARAMS tree
323  gROOT.ProcessLine("struct FillParamsStruct {\
324  Int_t fB1Bunches;\
325  Int_t fB1BCIDs[3564];\
326  Int_t fB2Bunches;\
327  Int_t fB2BCIDs[3564];\
328  Int_t fLuminousBunches;\
329  Int_t fLuminousBCIDs[3564];\
330  };")
331  from ROOT import FillParamsStruct
332  self.fillParamsStruct = FillParamsStruct()
333 
334  self.fillParamsStruct.fB1Bunches = 0
335  self.fillParamsStruct.fB2Bunches = 0
336  self.fillParamsStruct.fLuminousBunches = 0
337  # self.fB1BCIDs = array('i', 3564*[0])
338  # self.fB2BCIDs = array('i', 3564*[0])
339  # self.fLuminousBCIDs = array('i', 3564*[0])
340 
341  self.tree.Branch('FILLPARAMSB1', AddressOf(self.fillParamsStruct, 'fB1Bunches'), 'B1Bunches/I:B1BCIDs[B1Bunches]/I')
342  self.tree.Branch('FILLPARAMSB2', AddressOf(self.fillParamsStruct, 'fB2Bunches'), 'B2Bunches/I:B2BCIDs[B2Bunches]/I')
343  self.tree.Branch('FILLPARAMS', AddressOf(self.fillParamsStruct, 'fLuminousBunches'), 'LuminousBunches/I:LuminousBCIDs[LuminousBunches]/I')
344 
345  print('Defined FillParams data type')
346  #print 'type(fB1Bunches):', type(self.fillParamsStruct.fB1Bunches)
347  #print 'type(fB1BCIDs):', type(self.fillParamsStruct.fB1BCIDs)
348 
349  def fillFillParams(self, timeobj, data):
350 
351  # Must match by IOV
352  # FILLPARAMS is slow LHC data, so look for range that encloses start of timeobj IOV
353  found = False
354  for obj in data:
355  # Check that start of scan step is enclosed in object IOV
356  if timeobj.since() < obj.since(): continue
357  if timeobj.since() >= obj.until(): continue
358 
359  found = True
360  self.fillParamsStruct.fB1Bunches = obj.payload()['Beam1Bunches']
361  self.fillParamsStruct.fB2Bunches = obj.payload()['Beam2Bunches']
362  self.fillParamsStruct.fLuminousBunches = obj.payload()['LuminousBunches']
363 
364  # Now need to unpack the BCID blob
365  self.bcidData.fillMask(obj.payload())
366 
367  # Get the BCID lists and enter into ntuple arrays
368 
369  # self.fillParamsStruct.fB1BCIDs = array('i', list(self.bcidData.b1BCID))
370  i = 0
371  for bcid in self.bcidData.b1BCID:
372  self.fillParamsStruct.fB1BCIDs[i] = bcid
373  i += 1
374 
375  # self.fillParamsStruct.fB2BCIDs = array('i', list(self.bcidData.b2BCID))
376  i = 0
377  for bcid in self.bcidData.b2BCID:
378  self.fillParamsStruct.fB2BCIDs[i] = bcid
379  i += 1
380 
381  # self.fillParamsStruct.fLuminousBCIDs = array('i', list(self.bcidData.colBCID))
382  i = 0
383  for bcid in self.bcidData.colBCID:
384  self.fillParamsStruct.fLuminousBCIDs[i] = bcid
385  i += 1
386 
387  if not found:
388  print("scanNtupleHandler.fillFillParams - Didn't find FILLPARAMS data to match scan data!")
389  self.fillParamsStruct.fB1Bunches = 0
390  self.fillParamsStruct.fB2Bunches = 0
391  self.fillParamsStruct.fLuminousBunches = 0
392 
393  for i in range(3564):
394  self.fillParamsStruct.fB1BCIDs[i] = 0
395  self.fillParamsStruct.fB2BCIDs[i] = 0
396  self.fillParamsStruct.fLuminousBCIDs[i] = 0
397 
398  def initLbdata(self):
399 
400  #
401  # Define LBDATA tree
402  gROOT.ProcessLine("struct LbdataStruct {\
403  Float_t fB1IntensityBPTX;\
404  Float_t fB2IntensityBPTX;\
405  Float_t fB1IntensityAllBPTX;\
406  Float_t fB2IntensityAllBPTX;\
407  Float_t fB1IntensityBCT;\
408  Float_t fB2IntensityBCT;\
409  Float_t fB1IntensityAllBCT;\
410  Float_t fB2IntensityAllBCT;\
411  Float_t fB1IntensityAllDCCT;\
412  Float_t fB2IntensityAllDCCT;\
413  };")
414  from ROOT import LbdataStruct
415  self.lbdataStruct = LbdataStruct()
416 
417  self.tree.Branch('BPTX_LBDATA', AddressOf(self.lbdataStruct, 'fB1IntensityBPTX'), 'BPTX_B1Intensity/F:BPTX_B2Intensity/F:BPTX_B1IntensityAll/F:BPTX_B2IntensityAll/F')
418  self.tree.Branch('BCT_LBDATA', AddressOf(self.lbdataStruct, 'fB1IntensityBCT'), 'BCT_B1Intensity/F:BCT_B2Intensity/F:BCT_B1IntensityAll/F:BCT_B2IntensityAll/F')
419  self.tree.Branch('DCCT_LBDATA', AddressOf(self.lbdataStruct, 'fB1IntensityAllDCCT'), 'DCCT_B1IntensityAll/F:DCCT_B2IntensityAll/F')
420 
421  def fillLbdata(self, timeobj, data):
422 
423  # Must match by IOV
424  # LBDATA is fast data, so just match directly
425  foundBPTX = False
426  foundBCT = False
427  foundDCCT = False
428 
429  for obj in data:
430  if timeobj.since() != obj.since(): continue
431 
432  if obj.channelId() == 0:
433  foundBPTX = True
434 
435  self.lbdataStruct.fB1IntensityBPTX = obj.payload()['Beam1Intensity']
436  self.lbdataStruct.fB2IntensityBPTX = obj.payload()['Beam2Intensity']
437  self.lbdataStruct.fB1IntensityAllBPTX = obj.payload()['Beam1IntensityAll']
438  self.lbdataStruct.fB2IntensityAllBPTX = obj.payload()['Beam2IntensityAll']
439 
440  elif obj.channelId() == 1:
441  foundBCT = True
442 
443  self.lbdataStruct.fB1IntensityBCT = obj.payload()['Beam1Intensity']
444  self.lbdataStruct.fB2IntensityBCT = obj.payload()['Beam2Intensity']
445  self.lbdataStruct.fB1IntensityAllBCT = obj.payload()['Beam1IntensityAll']
446  self.lbdataStruct.fB2IntensityAllBCT = obj.payload()['Beam2IntensityAll']
447 
448  elif obj.channelId() == 2:
449  foundDCCT = True
450 
451  self.lbdataStruct.fB1IntensityAllDCCT = obj.payload()['Beam1IntensityAll']
452  self.lbdataStruct.fB2IntensityAllDCCT = obj.payload()['Beam2IntensityAll']
453 
454  else:
455  print('scanNtupleHandler.fillLbdata - Found unknown channel', obj.channelId(), '!')
456 
457  if foundBCT and foundBPTX and foundDCCT : break
458 
459 
460  if (not foundBPTX) and (not foundBCT) and (not foundDCCT):
461  print("scanNtupleHandler.fillLBdata - Couldn't find LBDATA!")
462  elif not foundBCT:
463  print("scanNtupleHandler.fillLBdata - Couldn't find BCT data in LBDATA!")
464  elif not foundBPTX:
465  print("scanNtupleHandler.fillLBdata - Couldn't find BPTX data in LBDATA!")
466  elif not foundDCCT:
467  print("scanNtupleHandler.fillLBdata - Couldn't find DCCT data in LBDATA!")
468 
469  if not foundBCT:
470  self.lbdataStruct.fB1IntensityBCT = 0.
471  self.lbdataStruct.fB2IntensityBCT = 0.
472  self.lbdataStruct.fB1IntensityAllBCT = 0.
473  self.lbdataStruct.fB2IntensityAllBCT = 0.
474 
475  if not foundBPTX:
476  self.lbdataStruct.fB1IntensityBPTX = 0.
477  self.lbdataStruct.fB2IntensityBPTX = 0.
478  self.lbdataStruct.fB1IntensityAllBPTX = 0.
479  self.lbdataStruct.fB2IntensityAllBPTX = 0.
480 
481  if not foundDCCT:
482  self.lbdataStruct.fB1IntensityAllDCCT = 0.
483  self.lbdataStruct.fB2IntensityAllDCCT = 0.
484 
485  def initBunchData(self):
486 
487  #
488  # Define BUNCHDATA tree
489  gROOT.ProcessLine("struct BunchDataStruct {\
490  UInt_t fValidBPTX;\
491  Float_t fB1BunchAverageBPTX;\
492  Float_t fB2BunchAverageBPTX;\
493  Int_t fB1BunchesBPTX;\
494  Int_t fB2BunchesBPTX;\
495  Float_t fB1BunchIntensitiesBPTX[3564];\
496  Int_t fB1BCIDsBPTX[3564];\
497  Float_t fB2BunchIntensitiesBPTX[3564];\
498  Int_t fB2BCIDsBPTX[3564];\
499  UInt_t fValidBCT;\
500  Float_t fB1BunchAverageBCT;\
501  Float_t fB2BunchAverageBCT;\
502  Int_t fB1BunchesBCT;\
503  Int_t fB2BunchesBCT;\
504  Int_t fB1BCIDsBCT[3564];\
505  Float_t fB1BunchIntensitiesBCT[3564];\
506  Int_t fB2BCIDsBCT[3564];\
507  Float_t fB2BunchIntensitiesBCT[3564];\
508  };")
509  from ROOT import BunchDataStruct
510  self.bunchDataStruct = BunchDataStruct()
511 
512  # Not sure why this is necessary
513  self.bunchDataStruct.fB1BunchesBPTX = 0
514  self.bunchDataStruct.fB2BunchesBPTX = 0
515  self.bunchDataStruct.fB1BunchesBCT = 0
516  self.bunchDataStruct.fB2BunchesBCT = 0
517 
518  self.tree.Branch('BCT_BUNCHDATA', AddressOf(self.bunchDataStruct, 'fValidBCT'), 'BCT_Valid/i:BCT_B1BunchAverage/F:BCT_B2BunchAverage/F:BCT_B1Bunches/I:BCT_B2Bunches/I')
519  self.tree.Branch('BCT_B1BCID', AddressOf(self.bunchDataStruct, 'fB1BCIDsBCT'), 'BCT_B1BCID[BCT_B1Bunches]/I')
520  self.tree.Branch('BCT_B2BCID', AddressOf(self.bunchDataStruct, 'fB2BCIDsBCT'), 'BCT_B2BCID[BCT_B2Bunches]/I')
521  self.tree.Branch('BCT_B1BunchIntensity', AddressOf(self.bunchDataStruct, 'fB1BunchIntensitiesBCT'), 'BCT_B1BunchIntensity[BCT_B1Bunches]/F')
522  self.tree.Branch('BCT_B2BunchIntensity', AddressOf(self.bunchDataStruct, 'fB2BunchIntensitiesBCT'), 'BCT_B2BunchIntensity[BCT_B2Bunches]/F')
523 
524  self.tree.Branch('BPTX_BUNCHDATA', AddressOf(self.bunchDataStruct, 'fValidBPTX'), 'BPTX_Valid/i:BPTX_B1BunchAverage/F:BPTX_B2BunchAverage/F:BPTX_B1Bunches/I:BPTX_B2Bunches/I')
525  self.tree.Branch('BPTX_B1BCID', AddressOf(self.bunchDataStruct, 'fB1BCIDsBPTX'), 'BPTX_B1BCID[BPTX_B1Bunches]/I')
526  self.tree.Branch('BPTX_B2BCID', AddressOf(self.bunchDataStruct, 'fB2BCIDsBPTX'), 'BPTX_B2BCID[BPTX_B2Bunches]/I')
527  self.tree.Branch('BPTX_B1BunchIntensity', AddressOf(self.bunchDataStruct, 'fB1BunchIntensitiesBPTX'), 'BPTX_B1BunchIntensity[BPTX_B1Bunches]/F')
528  self.tree.Branch('BPTX_B2BunchIntensity', AddressOf(self.bunchDataStruct, 'fB2BunchIntensitiesBPTX'), 'BPTX_B2BunchIntensity[BPTX_B2Bunches]/F')
529 
530 
531  def fillBunchData(self, timeobj, data):
532 
533  # Must match by IOV
534  # LBDATA is fast data, so just match directly
535  foundBPTX = False
536  foundBCT = False
537 
538  for obj in data:
539  if timeobj.since() != obj.since(): continue
540 
541  # Now need to unpack the BCID blob
542  self.bcidData.fillCurrents(obj.payload())
543 
544  if obj.channelId() == 0:
545  foundBPTX = True
546 
547  self.bunchDataStruct.fB1BunchAverageBPTX = obj.payload()['B1BunchAverage']
548  self.bunchDataStruct.fB2BunchAverageBPTX = obj.payload()['B2BunchAverage']
549  self.bunchDataStruct.fValidBPTX = obj.payload()['Valid']
550 
551  self.bunchDataStruct.fB1BunchesBPTX = len(self.bcidData.b1Curr)
552  # Following line causes problems?
553  # Try the brute force apprach again.
554  # self.bunchDataStruct.fB1BCIDsBPTX = array('i', self.bcidData.b1Curr.keys())
555  # self.bunchDataStruct.fB1BunchIntensitiesBPTX = array('f', self.bcidData.b1Curr.values())
556 
557  i = 0
558  for (bcid, val) in self.bcidData.b1Curr.iteritems():
559  self.bunchDataStruct.fB1BCIDsBPTX[i] = bcid
560  self.bunchDataStruct.fB1BunchIntensitiesBPTX[i] = val
561  i += 1
562 
563  self.bunchDataStruct.fB2BunchesBPTX = len(self.bcidData.b2Curr)
564  # self.bunchDataStruct.fB2BCIDsBPTX = array('i', self.bcidData.b2Curr.keys())
565  # self.bunchDataStruct.fB2BunchIntensitiesBPTX = array('f', self.bcidData.b2Curr.values())
566 
567  i = 0
568  for (bcid, val) in self.bcidData.b2Curr.iteritems():
569  self.bunchDataStruct.fB2BCIDsBPTX[i] = bcid
570  self.bunchDataStruct.fB2BunchIntensitiesBPTX[i] = val
571  i += 1
572 
573  elif obj.channelId() == 1:
574  foundBCT = True
575 
576  self.bunchDataStruct.fB1BunchAverageBCT = obj.payload()['B1BunchAverage']
577  self.bunchDataStruct.fB2BunchAverageBCT = obj.payload()['B2BunchAverage']
578  self.bunchDataStruct.fValidBCT = obj.payload()['Valid']
579 
580  self.bunchDataStruct.fB1BunchesBCT = len(self.bcidData.b1Curr)
581  #self.bunchDataStruct.fB1BCIDsBCT = array('i', self.bcidData.b1Curr.keys())
582  #self.bunchDataStruct.fB1BunchIntensitiesBCT = array('f', self.bcidData.b1Curr.values())
583 
584  i = 0
585  for (bcid, val) in self.bcidData.b1Curr.iteritems():
586  self.bunchDataStruct.fB1BCIDsBCT[i] = bcid
587  self.bunchDataStruct.fB1BunchIntensitiesBCT[i] = val
588  i += 1
589 
590  self.bunchDataStruct.fB2BunchesBCT = len(self.bcidData.b2Curr)
591  # self.bunchDataStruct.fB2BCIDsBCT = array('i', self.bcidData.b2Curr.keys())
592  # self.bunchDataStruct.fB2BunchIntensitiesBCT = array('f', self.bcidData.b2Curr.values())
593 
594  i = 0
595  for (bcid, val) in self.bcidData.b2Curr.iteritems():
596  self.bunchDataStruct.fB2BCIDsBCT[i] = bcid
597  self.bunchDataStruct.fB2BunchIntensitiesBCT[i] = val
598  i += 1
599 
600  else:
601  print('scanNtupleHandler.fillLbdata - Found unknown channel', obj.channelId(), '!')
602 
603  if foundBCT and foundBPTX: break
604 
605 
606  if (not foundBPTX) and (not foundBCT):
607  print("scanNtupleHandler.fillBunchData - Couldn't find BUNCHDATA!")
608  elif not foundBCT:
609  print("scanNtupleHandler.fillBunchData - Couldn't find BCT data in BUNCHDATA!")
610  elif not foundBPTX:
611  print("scanNtupleHandler.fillBunchData - Couldn't find BPTX data in BUNCHDATA!")
612 
613  if not foundBCT:
614  self.bunchDataStruct.fB1BunchAverageBCT = 0.
615  self.bunchDataStruct.fB2BunchAverageBCT = 0.
616  self.bunchDataStruct.fValidBCT = -1
617  self.bunchDataStruct.fB1BunchesBCT = 0
618  self.bunchDataStruct.fB2BunchesBCT = 0
619 
620  if not foundBPTX:
621  self.bunchDataStruct.fB1BunchAverageBPTX = 0.
622  self.bunchDataStruct.fB2BunchAverageBPTX = 0.
623  self.bunchDataStruct.fValidBPTX = -1
624  self.bunchDataStruct.fB1BunchesBPTX = 0
625  self.bunchDataStruct.fB2BunchesBPTX = 0
626 
627  # print 'BCT Avg:', self.bunchDataStruct.fB1BunchAverageBCT
628  # for i in range(self.bunchDataStruct.fB1BunchesBCT):
629  # print ' BCID:', self.bunchDataStruct.fB1BCIDsBCT[i], self.bunchDataStruct.fB2BunchIntensitiesBCT[i]
630 
631  def initBunchLumi(self):
632 
633  #
634  # Define BUNCHDATA tree
635  gROOT.ProcessLine("struct BunchLumiStruct {\
636  UInt_t fChannel;\
637  UInt_t fValid;\
638  Float_t fAverageRawInstLum;\
639  Int_t fLuminousBunches;\
640  Int_t fLuminousBCIDs[3564];\
641  Float_t fBunchRawInstLum[3564];\
642  };")
643  from ROOT import BunchLumiStruct
644 
645  self.bunchLumiStruct = dict()
646  self.fLuminousBCIDs = dict()
647  self.fBunchRawInstLum = dict()
648 
649  for (chId, algstr) in self.bbbAlgDict.iteritems():
650  print('scanNtupleHandler.initLumiData - initializing', algstr, 'as channel', chId)
651  self.bunchLumiStruct[chId] = BunchLumiStruct()
652  self.bunchLumiStruct[chId].fLuminousBunches = 0
653 
654  self.fLuminousBCIDs[chId] = array('i', 3564*[0])
655  self.fBunchRawInstLum[chId] = array('f', 3564*[0.])
656 
657  branchString1 = 'ALG_Channel/i:ALG_Valid/i:ALG_AverageRawInstLum/F:ALG_LuminousBunches/I'
658  branchString2 = 'ALG_LuminousBCIDs[ALG_LuminousBunches]/I'
659  branchString3 = 'ALG_BunchRawInstLum[ALG_LuminousBunches]/F'
660 
661  self.tree.Branch(algstr+'_BUNCHDATA', self.bunchLumiStruct[chId], branchString1.replace('ALG', algstr))
662  #self.tree.Branch(algstr+'_BCID', AddressOf(self.bunchLumiStruct[chId], 'fLuminousBCIDs'), branchString2.replace('ALG', algstr))
663  #self.tree.Branch(algstr+'_BunchRawInstLum', AddressOf(self.bunchLumiStruct[chId], 'fBunchRawInstLum'), branchString3.replace('ALG', algstr))
664  self.tree.Branch(algstr+'_BCID', self.fLuminousBCIDs[chId], branchString2.replace('ALG', algstr))
665  self.tree.Branch(algstr+'_BunchRawInstLum', self.fBunchRawInstLum[chId], branchString3.replace('ALG', algstr))
666 
667  def fillBunchLumi(self, timeobj, data):
668 
669  # Must match by IOV - exact match
670  # Keep track of every algorithm separately
671  foundAny = False
672 
673  found = dict()
674  for chId in self.bbbAlgDict.iterkeys():
675  found[chId] = False
676 
677  for obj in data:
678  if timeobj.since() != obj.since(): continue
679 
680  # Figure out which channel
681  chId = obj.channelId()
682  if chId not in self.bbbAlgDict:
683  print('scanNtupleHandler.fillBunchLumi - Unknown lumi channel', chId, '!')
684  continue
685 
686  foundAny = True
687 
688  # Unpack lumi blob
689  self.bcidData.fillRawLumi(obj.payload())
690 
691  found[chId] = True
692  self.bunchLumiStruct[chId].fChannel = obj.channelId()
693  self.bunchLumiStruct[chId].fValid = obj.payload()['Valid']
694  self.bunchLumiStruct[chId].fAverageRawInstLum = obj.payload()['AverageRawInstLum']
695 
696  self.bunchLumiStruct[chId].fLuminousBunches = len(self.bcidData.rawLumi)
697  #self.fLuminousBCIDs[chId] = array('i', self.bcidData.rawLumi.keys())
698  #self.fBunchRawInstLum[chId] = array('f', self.bcidData.rawLumi.values())
699  #if obj.channelId() == 102:
700  # print 'Channel: %d, Luminous bunches: %d' % (obj.channelId(), len(self.bcidData.rawLumi))
701 
702  i = 0
703  bcidList = self.bcidData.rawLumi.keys()
704  for bcid in sorted(bcidList):
705  val = self.bcidData.rawLumi[bcid]
706  self.fLuminousBCIDs[chId][i] = bcid
707  self.fBunchRawInstLum[chId][i] = val
708  i += 1
709 
710 # self.bunchLumiStruct[chId].fLuminousBCIDs[i] = bcid
711 # self.bunchLumiStruct[chId].fBunchRawInstLum[i] = val
712 
713  if not foundAny:
714  print('scanNtupleHandler.fillBunchLumi - Found no BUNCHLUMIS data to match IOV!')
715 
716  else:
717  for (chId, algstr) in self.bbbAlgDict.iteritems():
718  if not found[chId]:
719  print('scanNtupleHandler.fillBunchLumi - Found no BUNCHLUMIS data for', algstr, '!')
720 
721  for chId in self.bbbAlgDict.iterkeys():
722  if not found[chId]:
723  self.bunchLumiStruct[chId].fChannel = chId
724  self.bunchLumiStruct[chId].fValid = 0xFFFFFFFF
725  self.bunchLumiStruct[chId].fAverageRawInstLum = 0.
726  self.bunchLumiStruct[chId].fLuminousBunches = 0
727 
728  def initLumiData(self):
729  print('scanNtupleHandler.initLumiData() called')
730 
731  #
732  # Define LUMINOSITY tree
733  # Try to abstract this for different lumi algorithms
734  gROOT.ProcessLine("struct LumiDataStruct {\
735  UInt_t fChannel;\
736  Float_t fLBAvInstLumPhys;\
737  Float_t fLBAvEvtsPerBXPhys;\
738  Float_t fLBAvRawInstLumPhys;\
739  Float_t fLBAvInstLumAll;\
740  Float_t fLBAvRawInstLumAll;\
741  Float_t fLBAvEvtsPerBXAll;\
742  Float_t fLBAvOLCInstLum;\
743  Float_t fLBAvOLCRawInstLum;\
744  Float_t fLBAvOLCEvtsPerBX;\
745  UInt_t fNOrbPhys;\
746  UInt_t fNOrbAll;\
747  UInt_t fNOrbOLC;\
748  UInt_t fDetectorState;\
749  UInt_t fValid;\
750  };")
751  from ROOT import LumiDataStruct
752 
753  self.lumiStruct = dict()
754  for (chId, algstr) in self.algDict.iteritems():
755  print('scanNtupleHandler.initLumiData - initializing', algstr, 'as channel', chId)
756  self.lumiStruct[chId] = LumiDataStruct()
757  branchString = 'ALG_LumiChannel/i:ALG_LBAvInstLumPhys/F:ALG_LBAvEvtsPerBXPhys/F:ALG_LBAvRawInstLumPhys/F:ALG_LBAvInstLumAll/F:ALG_LBAvRawInstLumAll/F:ALG_LBAvEvtsPerBXAll/F:ALG_LBAvOLCInstLum/F:ALG_LBAvOLCRawInstLum/F:ALG_LBAvOLCEvtsPerBX/F:ALG_NOrbPhys/i:ALG_NOrbAll/i:ALG_NOrbOLC/i:ALG_DetectorState/i:ALG_LumiValid/i'
758 
759  self.tree.Branch(algstr+'_LUMI', self.lumiStruct[chId], branchString.replace('ALG', algstr))
760 
761  def fillLumiData(self, timeobj, data):
762 
763  # Must match by IOV - exact match
764  # Keep track of every algorithm separately
765  foundAny = False
766 
767  found = dict()
768  liveDict = dict()
769 
770  for chId in self.algDict.iterkeys():
771  found[chId] = False
772 
773  for obj in data:
774  if timeobj.since() != obj.since(): continue
775 
776  # Figure out which channel
777  chId = obj.channelId()
778  if chId == 5:
779  continue # Ignore CMS luminosity
780 
781  elif chId >= 50 and chId <=70:
782  liveDict[chId] = obj.payload()['LBAvOLCInstLum']
783  continue
784 
785  elif chId not in self.algDict:
786  print('scanNtupleHandler.fillLumiData - Unknown lumi channel', chId, '!')
787  continue
788 
789  foundAny = True
790 
791  # Fill the data for this algorithm
792  found[chId] = True
793  self.lumiStruct[chId].fChannel = obj.channelId()
794  self.lumiStruct[chId].fLBAvInstLumPhys = obj.payload()['LBAvInstLumPhys']
795  self.lumiStruct[chId].fLBAvEvtsPerBXPhys = obj.payload()['LBAvEvtsPerBXPhys']
796  self.lumiStruct[chId].fLBAvRawInstLumPhys = obj.payload()['LBAvRawInstLumPhys']
797  self.lumiStruct[chId].fLBAvInstLumAll = obj.payload()['LBAvInstLumAll']
798  self.lumiStruct[chId].fLBAvEvtsPerBXAll = obj.payload()['LBAvEvtsPerBXAll']
799  self.lumiStruct[chId].fLBAvRawInstLumAll = obj.payload()['LBAvRawInstLumAll']
800  self.lumiStruct[chId].fLBAvOLCInstLum = obj.payload()['LBAvOLCInstLum']
801  self.lumiStruct[chId].fLBAvOLCEvtsPerBX = obj.payload()['LBAvOLCEvtsPerBX']
802  self.lumiStruct[chId].fLBAvOLCRawInstLum = obj.payload()['LBAvOLCRawInstLum']
803  self.lumiStruct[chId].fDetectorState = obj.payload()['DetectorState']
804  try:
805  self.lumiStruct[chId].fNOrbPhys = obj.payload()['NOrbPhys']
806  self.lumiStruct[chId].fNOrbAll = obj.payload()['NOrbAll']
807  self.lumiStruct[chId].fNOrbOLC = obj.payload()['NOrbOLC']
808  except Exception as e:
809  print(e)
810  self.lumiStruct[chId].fNOrbPhys = 0
811  self.lumiStruct[chId].fNOrbAll = 0
812  self.lumiStruct[chId].fNOrbOLC = 0
813 
814  self.lumiStruct[chId].fValid = obj.payload()['Valid']
815 
816  if not foundAny:
817  print('scanNtupleHandler.fillLumiData - Found no LUMINOSITY data to match IOV!')
818 
819  else:
820  for (chId, algstr) in self.algDict.iteritems():
821  if not found[chId]:
822  print('scanNtupleHandler.fillLumiData - Found no LUMINOSITY data for', algstr, '!')
823 
824  for chId in self.algDict.iterkeys():
825  if not found[chId]:
826  self.lumiStruct[chId].fChannel = chId
827  self.lumiStruct[chId].fLBAvInstLumPhys = 0.
828  self.lumiStruct[chId].fLBAvEvtsPerBXPhys = 0.
829  self.lumiStruct[chId].fLBAvRawInstLumPhys = 0.
830  self.lumiStruct[chId].fLBAvInstLumAll = 0.
831  self.lumiStruct[chId].fLBAvEvtsPerBXAll = 0.
832  self.lumiStruct[chId].fLBAvRawInstLumAll = 0.
833  self.lumiStruct[chId].fLBAvOLCInstLum = 0.
834  self.lumiStruct[chId].fLBAvOLCEvtsPerBX = 0.
835  self.lumiStruct[chId].fLBAvOLCRawInstLum = 0.
836  self.lumiStruct[chId].fNOrbPhys = 0
837  self.lumiStruct[chId].fNOrbAll = 0
838  self.lumiStruct[chId].fNOrbOLC = 0
839  self.lumiStruct[chId].fDetectorState = 0
840  self.lumiStruct[chId].fValid = 0xFFFFFFFF
841 
842  # Fill the livefraction data (if present)
843  self.fillLive(liveDict, 50, 51, self.liveDataStruct.fRD0_Filled)
844  self.fillLive(liveDict, 54, 55, self.liveDataStruct.fMBTS_1_1)
845  self.fillLive(liveDict, 56, 57, self.liveDataStruct.fMBTS_2)
846  self.fillLive(liveDict, 58, 59, self.liveDataStruct.fEM12)
847  self.fillLive(liveDict, 60, 61, self.liveDataStruct.fRD0_BGRP9)
848  self.fillLive(liveDict, 62, 63, self.liveDataStruct.fMBTS_1_BGRP9)
849  self.fillLive(liveDict, 66, 67, self.liveDataStruct.fMBTS_2_BGRP9)
850 
851  print(self.liveDataStruct.fEM12)
852 
853  def fillLive(self, liveDict, denchan, numchan, dest):
854  num = liveDict.get(numchan, 0.)
855  den = liveDict.get(denchan, 0.)
856  if den > 0.:
857  dest = num/den
858  else:
859  dest = 0. # noqa: F841
860 
861  self.liveDataStruct.fRD0_Filled = 0.
862 
863 
864  def initLiveData(self):
865 
866  #
867  # Define LIVEDATA tree
868  gROOT.ProcessLine("struct LiveDataStruct {\
869  Float_t fRD0_Filled;\
870  Float_t fMBTS_1_1;\
871  Float_t fMBTS_2;\
872  Float_t fEM12;\
873  Float_t fRD0_BGRP9;\
874  Float_t fMBTS_1_BGRP9;\
875  Float_t fMBTS_2_BGRP9;\
876  };")
877  from ROOT import LiveDataStruct
878  self.liveDataStruct = LiveDataStruct()
879 
880  self.tree.Branch('LiveFractions', AddressOf(self.liveDataStruct, 'fRD0_Filled'), 'RD0_Filled/f,MBTS_1_1/f,MBTS_2/f,EM12/f,RD0_BGRP9/f,MBTS_1_BGRP9/f,MBTS_2_BGRP9/f')
881 
882 
python.ScanNtupleHandler.ScanNtupleHandler.bunchDataStruct
bunchDataStruct
Definition: ScanNtupleHandler.py:510
python.ScanNtupleHandler.ScanNtupleHandler.file
file
Definition: ScanNtupleHandler.py:22
python.Bindings.iteritems
iteritems
Definition: Control/AthenaPython/python/Bindings.py:820
python.ScanNtupleHandler.ScanNtupleHandler.fileName
fileName
Definition: ScanNtupleHandler.py:20
python.ScanNtupleHandler.ScanNtupleHandler.bcidData
bcidData
Definition: ScanNtupleHandler.py:25
python.ScanNtupleHandler.ScanNtupleHandler.initFillParams
def initFillParams(self)
Definition: ScanNtupleHandler.py:319
python.ScanNtupleHandler.ScanNtupleHandler.fillFillParams
def fillFillParams(self, timeobj, data)
Definition: ScanNtupleHandler.py:349
python.ScanNtupleHandler.ScanNtupleHandler.initLiveData
def initLiveData(self)
Definition: ScanNtupleHandler.py:864
python.ScanNtupleHandler.ScanNtupleHandler.lbdataStruct
lbdataStruct
Definition: ScanNtupleHandler.py:415
python.ScanNtupleHandler.ScanNtupleHandler.init
def init(self)
Definition: ScanNtupleHandler.py:163
python.ScanNtupleHandler.ScanNtupleHandler.fillScanData
def fillScanData(self, obj)
Definition: ScanNtupleHandler.py:257
python.ScanNtupleHandler.ScanNtupleHandler.initLumiData
def initLumiData(self)
Definition: ScanNtupleHandler.py:728
python.ScanNtupleHandler.ScanNtupleHandler.algDict
algDict
Definition: ScanNtupleHandler.py:28
python.ScanNtupleHandler.ScanNtupleHandler.open
def open(self)
Definition: ScanNtupleHandler.py:157
python.ScanNtupleHandler.ScanNtupleHandler.initLbdata
def initLbdata(self)
Definition: ScanNtupleHandler.py:398
python.ScanNtupleHandler.ScanNtupleHandler.scanDataStruct
scanDataStruct
Definition: ScanNtupleHandler.py:251
python.ScanNtupleHandler.ScanNtupleHandler.fillBunchLumi
def fillBunchLumi(self, timeobj, data)
Definition: ScanNtupleHandler.py:667
python.ScanNtupleHandler.ScanNtupleHandler.bbbAlgDict
bbbAlgDict
Definition: ScanNtupleHandler.py:97
python.ScanNtupleHandler.ScanNtupleHandler.bunchLumiStruct
bunchLumiStruct
Definition: ScanNtupleHandler.py:645
python.Bindings.iterkeys
iterkeys
Definition: Control/AthenaPython/python/Bindings.py:810
python.ScanNtupleHandler.ScanNtupleHandler.fillLive
def fillLive(self, liveDict, denchan, numchan, dest)
Definition: ScanNtupleHandler.py:853
python.ScanNtupleHandler.ScanNtupleHandler.initBeamPosition
def initBeamPosition(self)
Definition: ScanNtupleHandler.py:269
python.ScanNtupleHandler.ScanNtupleHandler.initBunchData
def initBunchData(self)
Definition: ScanNtupleHandler.py:485
python.ScanNtupleHandler.ScanNtupleHandler.fillLbdata
def fillLbdata(self, timeobj, data)
Definition: ScanNtupleHandler.py:421
plotBeamSpotVxVal.range
range
Definition: plotBeamSpotVxVal.py:195
python.ScanNtupleHandler.ScanNtupleHandler.fLuminousBCIDs
fLuminousBCIDs
Definition: ScanNtupleHandler.py:646
python.ScanNtupleHandler.ScanNtupleHandler.initScanData
def initScanData(self)
Definition: ScanNtupleHandler.py:230
DerivationFramework::TriggerMatchingUtils::sorted
std::vector< typename T::value_type > sorted(T begin, T end)
Helper function to create a sorted vector from an unsorted one.
python.ScanNtupleHandler.ScanNtupleHandler.tree
tree
Definition: ScanNtupleHandler.py:23
array
python.ScanNtupleHandler.ScanNtupleHandler.close
def close(self)
Definition: ScanNtupleHandler.py:224
python.ScanNtupleHandler.ScanNtupleHandler
Definition: ScanNtupleHandler.py:16
python.ScanNtupleHandler.ScanNtupleHandler.fill
def fill(self, data)
Definition: ScanNtupleHandler.py:183
python.ScanNtupleHandler.ScanNtupleHandler.__init__
def __init__(self)
Definition: ScanNtupleHandler.py:18
python.ScanNtupleHandler.ScanNtupleHandler.fillBunchData
def fillBunchData(self, timeobj, data)
Definition: ScanNtupleHandler.py:531
python.ScanNtupleHandler.ScanNtupleHandler.liveDataStruct
liveDataStruct
Definition: ScanNtupleHandler.py:878
python.ScanNtupleHandler.ScanNtupleHandler.fillBeamPosition
def fillBeamPosition(self, timeobj, data)
Definition: ScanNtupleHandler.py:288
python.ScanNtupleHandler.ScanNtupleHandler.initBunchLumi
def initBunchLumi(self)
Definition: ScanNtupleHandler.py:631
VKalVrtAthena::varHolder_detail::clear
void clear(T &var)
Definition: NtupleVars.h:48
python.ScanNtupleHandler.ScanNtupleHandler.beamPositionStruct
beamPositionStruct
Definition: ScanNtupleHandler.py:284
dbg::print
void print(std::FILE *stream, std::format_string< Args... > fmt, Args &&... args)
Definition: SGImplSvc.cxx:70
python.ScanNtupleHandler.ScanNtupleHandler.treeName
treeName
Definition: ScanNtupleHandler.py:21
python.ScanNtupleHandler.ScanNtupleHandler.lumiStruct
lumiStruct
Definition: ScanNtupleHandler.py:753
python.ScanNtupleHandler.ScanNtupleHandler.fillParamsStruct
fillParamsStruct
Definition: ScanNtupleHandler.py:332
python.ScanNtupleHandler.ScanNtupleHandler.fBunchRawInstLum
fBunchRawInstLum
Definition: ScanNtupleHandler.py:647
python.ScanNtupleHandler.ScanNtupleHandler.fillLumiData
def fillLumiData(self, timeobj, data)
Definition: ScanNtupleHandler.py:761