ATLAS Offline Software
EventInfoD3PDObject.py
Go to the documentation of this file.
1 # Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
2 #
3 # @file EventCommonD3PDMaker/python/EventInfoD3PDObject.py
4 # @author scott snyder <snyder@bnl.gov>
5 # @date Aug, 2009
6 # @brief Define EventInfo D3PD object.
7 #
8 
9 
10 from D3PDMakerCoreComps.D3PDObject import make_SG_D3PDObject
11 from D3PDMakerConfig.D3PDMakerFlags import D3PDMakerFlags
12 from AthenaConfiguration.ComponentFactory import CompFactory
13 
14 D3PD = CompFactory.D3PD
15 
16 
17 # Create the object type.
18 EventInfoD3PDObject = make_SG_D3PDObject( 'xAOD::EventInfo_v1',
19  D3PDMakerFlags.EventInfoSGKey,
20  '',
21  'EventInfoD3PDObject' )
22 
23 
24 
26 
27 # Event ID information.
28 EventInfoD3PDObject.defineBlock (
29  0, 'eventID',
30  D3PD.AuxDataFillerTool, #D3PDMakerCoreComps
31  Vars = ['RunNumber = runNumber',
32  'EventNumber = eventNumber',
33  'timestamp = timeStamp',
34  'timestamp_ns = timeStampNSOffset',
35  'lbn = lumiBlock',
36  'bcid',
37  'detmask0 = detectorMask0',
38  'detmask1 = detectorMask1',
39  ])
40 
41 EventInfoD3PDObject.defineBlock (
42  0, 'eventMu',
43  D3PD.AuxDataFillerTool, #D3PDMakerCoreComps
44  Vars = ['actualIntPerXing = actualInteractionsPerCrossing',
45  'averageIntPerXing = averageInteractionsPerCrossing',
46  ])
47 
48 # Since this filler tool only fills MC specific info at the moment:
49 if D3PDMakerFlags.DoTruth:
50  EventInfoD3PDObject.defineBlock (
51  0, 'eventType',
52  D3PD.AuxDataFillerTool, #D3PDMakerCoreComps
53  Vars = ['mc_channel_number = mcChannelNumber',
54  'mc_event_number = mcEventNumber',
55  ])
56  EventInfoD3PDObject.defineBlock (0, 'eventWeight',
57  #EventCommonD3PDMaker
59 
60 EventInfoD3PDObject.defineBlock (
61  1, 'eventFlags',
62  D3PD.AuxDataFillerTool, #D3PDMakerCoreComps
63  Vars = ['pixelFlags',
64  'sctFlags',
65  'trtFlags',
66  'larFlags',
67  'tileFlags',
68  'muonFlags',
69  'fwdFlags = forwardDetFlags',
70  'coreFlags',
71  'backgroundFlags',
72  'lumiFlags',
73  ])
74 EventInfoD3PDObject.defineBlock (1, 'eventErrorState',
75  #EventCommonD3PDMaker
77 
78 # The trigger information is only interesting for data events, so let's only
79 # add it for those:
80 if not D3PDMakerFlags.DoTruth:
81  EventInfoD3PDObject.defineBlock (2, 'eventTrigInfo',
82  #EventCommonD3PDMaker
84  Streams = [ "Egamma", "Muons", "JetTauEtmiss" ])
85 
86 # The event type flags should only be saved at a higher detail level:
87 EventInfoD3PDObject.defineBlock (5, 'eventTypeFlags',
88  #EventCommonD3PDMaker
D3PD::AuxDataFillerTool
Copy aux data to D3PD.
Definition: AuxDataFillerTool.h:35
python.D3PDObject.make_SG_D3PDObject
def make_SG_D3PDObject(default_typeName, default_sgkey, default_prefix, default_object_name=None, default_allowMissing=False, default_getterClass=D3PD.SGObjGetterTool, allow_args=[])
Definition: D3PDObject.py:646
D3PD::EventWeightFillerTool
Block filler tool for the event weight from EventInfo.
Definition: EventWeightFillerTool.h:27
D3PD::EventErrorStateFillerTool
Block filler tool for event error state from EventInfo.
Definition: EventErrorStateFillerTool.h:33
D3PD::EventTrigInfoFillerTool
Tool writing the stream decisions to D3PDs.
Definition: EventTrigInfoFillerTool.h:36
D3PD::EventTypeFillerTool
Block filler tool for the event type from EventInfo.
Definition: EventTypeFillerTool.h:30