ATLAS Offline Software
recTransformUtils.py
Go to the documentation of this file.
1 # Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
2 
3 
4 
5 import logging
6 msg = logging.getLogger(__name__)
7 
8 import PyJobTransforms.trfArgClasses as trfArgClasses
9 
10 from PyJobTransforms.trfExe import athenaExecutor, DQMergeExecutor
11 from PyJobTransforms.trfArgs import addPrimaryDPDArguments, addExtraDPDTypes
12 
13 
14 def addCommonRecTrfArgs(parser):
15  parser.defineArgGroup('Common Reco', 'Common Reconstruction Options')
16  parser.add_argument('--autoConfiguration', group='Common Reco', type=trfArgClasses.argFactory(trfArgClasses.argList),
17  help='Autoconfiguration settings (whitespace or comma separated)', nargs='+', metavar='AUTOCONFKEY')
18  parser.add_argument('--trigStream', group='Common Reco', type=trfArgClasses.argFactory(trfArgClasses.argList),
19  help='Trigger stream setting')
20  parser.add_argument('--topOptions', group='Common Reco', type=trfArgClasses.argFactory(trfArgClasses.argSubstep),
21  nargs="+", help='Alternative top options file for reconstruction (can be substep specific)',
22  metavar="substep:TOPOPTIONS")
23  parser.add_argument('--valid', group='Common Reco', type=trfArgClasses.argFactory(trfArgClasses.argBool),
24  help='Enable decorations for AOD that allow for enhanced physics validation', metavar='BOOL')
25 
26 
28  parser.defineArgGroup('Reco Files', 'Reconstruction file options')
29  parser.add_argument('--inputBSFile', nargs='+',
31  help='Input bytestream file', group='Reco Files')
32  parser.add_argument('--inputDRAW_ZMUMUFile', nargs='+',
34  help='Input skimmed Z->mumu bytestream', group='Reco Files')
35  parser.add_argument('--inputDRAW_ZEEFile', nargs='+',
37  help='Input skimmed Z->ee bytestream', group='Reco Files')
38  parser.add_argument('--inputDRAW_EMUFile', nargs='+',
40  help='Input skimmed e+mu bytestream', group='Reco Files')
41  parser.add_argument('--outputBSFile',
43  help='Output bytestream file', group='Reco Files')
44  parser.add_argument('--inputRDOFile', nargs='+',
46  help='Input RDO file', group='Reco Files')
47  parser.add_argument('--inputESDFile', nargs='+',
49  help='Input ESD file', group='Reco Files')
50  parser.add_argument('--outputESDFile',
52  help='Output ESD file', group='Reco Files')
53  parser.add_argument('--outputRDO_TRIGFile',
55  help='Output RDO_TRIG file', group='Reco Files')
56  parser.add_argument('--inputRDO_TRIGFile',
58  help='Input RDO_TRIG file', group='Reco Files')
59  parser.add_argument('--inputAODFile', nargs='+',
61  help='Input AOD file', group='Reco Files')
62  parser.add_argument('--outputAODFile',
64  help='Output AOD file', group='Reco Files')
65  parser.add_argument('--outputAOD_RPRFile',
67  help='Output AOD (reprocessed) file', group='Reco Files')
68  parser.add_argument('--outputAOD_SKIMFile',
70  help='Output skimmed AOD file', group='Reco Files')
71  parser.add_argument('--outputHISTFile',
73  help='Output DQ monitoring file', group='Reco Files')
74  parser.add_argument('--outputHIST_AODFile',
75  type=trfArgClasses.argFactory(trfArgClasses.argHISTFile, io='output', countable=False),
76  help='Output DQ monitoring file', group='Reco Files')
77  parser.add_argument('--inputEVNTFile', nargs='+',
79  help='Input EVNT file for NTUP_TRUTH making', group='Reco Files')
80  parser.add_argument('--outputTXT_JIVEXMLTGZFile',
81  type = trfArgClasses.argFactory(trfArgClasses.argFile, io = 'output'),
82  help = 'Output JiveXML.tgz file', group = 'Reco Files')
83  parser.add_argument('--outputDAOD_TLAFile', nargs='+',
85  help='Output DAOD_TLA file', group='Reco Files')
86  parser.add_argument('--outputDAOD_TLAFTAGPEBFile', nargs='+',
88  help='Output DAOD_TLAFTAGPEB file', group='Reco Files')
89  parser.add_argument('--outputDAOD_TLAEGAMPEBFile', nargs='+',
91  help='Output DAOD_TLAEGAMPEB file', group='Reco Files')
92  parser.add_argument('--outputRDO_PUFile', nargs='+',
94  help='Output RDO pileup tracks file', group='Reco Files')
95 
96 
99 def addRecoSubsteps(executorSet):
100  executorSet.add(athenaExecutor(name = 'RDOtoBS',
101  substep = 'r2b', inData = ['RDO'], outData = ['BS']))
102  executorSet.add(athenaExecutor(name = 'RDOtoRDOTrigger', skeletonFile = 'RecJobTransforms/skeleton.RDOtoRDOtrigger.py', # needs to keep legacy for older releases
103  skeletonCA = 'RecJobTransforms.RDOtoRDO_TRIG_Skeleton',
104  substep = 'r2t', inData = ['RDO'], outData = ['RDO_TRIG']))
105  executorSet.add(athenaExecutor(name = 'RAWtoALL',
106  skeletonCA = 'RecJobTransforms.RAWtoALL_Skeleton',
107  substep = 'r2a', inData = ['BS', 'RDO', 'DRAW_ZMUMU', 'DRAW_ZEE', 'DRAW_EMU', 'DRAW_RPVLL'],
108  outData = ['ESD', 'AOD', 'HIST_R2A', 'TXT_JIVEXMLTGZ'],))
109  executorSet.add(athenaExecutor(name = 'PUTracking',
110  skeletonCA = 'RecJobTransforms.PUTracks_Skeleton',
111  substep = 'r2rpu', inData = ['RDO'],
112  outData = ['RDO_PU'],))
113  executorSet.add(athenaExecutor(name = 'RAWtoDAODTLA',
114  skeletonCA = 'RecJobTransforms.RAWtoDAOD_TLA_Skeleton',
115  substep = 'r2tla', inData = ['BS'], outData = ['DAOD_TLA'], ))
116  executorSet.add(athenaExecutor(name = 'RAWtoDAODTLAFTAGPEB',
117  skeletonCA = 'RecJobTransforms.RAWtoDAOD_TLA_Skeleton',
118  substep = 'r2TLAFTAGPEB', inData = ['BS'], outData = ['DAOD_TLAFTAGPEB'], ))
119  executorSet.add(athenaExecutor(name = 'RAWtoDAODTLAEGAMPEB',
120  skeletonCA = 'RecJobTransforms.RAWtoDAOD_TLA_Skeleton',
121  substep = 'r2TLAEGAMPEB', inData = ['BS'], outData = ['DAOD_TLAEGAMPEB'], ))
122  executorSet.add(DQMergeExecutor(name = 'DQHistogramMerge', inData = [('HIST_ESD_INT', 'HIST_AOD_INT'), 'HIST_R2A', 'HIST_AOD'], outData = ['HIST']))
123  executorSet.add(athenaExecutor(name = 'AODtoHIST',
124  skeletonCA = 'RecJobTransforms.AODtoHIST_Skeleton',
125  substep = 'a2h', inData = ['AOD'], outData = ['HIST_AOD'],))
126 
127 
128 
130 def addAllRecoArgs(trf):
131  addCommonRecTrfArgs(trf.parser)
132  addStandardRecoFiles(trf.parser)
133  addPrimaryDPDArguments(trf.parser, transform = trf)
134  addExtraDPDTypes(trf.parser, transform = trf)
python.trfArgs.addExtraDPDTypes
def addExtraDPDTypes(parser, pick=None, transform=None, multipleOK=False, NTUPMergerArgs=False)
Add additional DPD arguments.
Definition: trfArgs.py:440
python.trfArgClasses.argPOOLFile
POOL file class.
Definition: trfArgClasses.py:1425
python.trfArgClasses.argHISTFile
Data quality histogram file class.
Definition: trfArgClasses.py:1643
python.trfArgClasses.argRDOFile
Definition: trfArgClasses.py:1565
PyJobTransforms.trfArgClasses
Transform argument class definitions.
python.recTransformUtils.addRecoSubsteps
def addRecoSubsteps(executorSet)
Add reconstruction substeps to a set object.
Definition: recTransformUtils.py:99
python.recTransformUtils.addStandardRecoFiles
def addStandardRecoFiles(parser)
Definition: recTransformUtils.py:27
python.recTransformUtils.addCommonRecTrfArgs
def addCommonRecTrfArgs(parser)
Definition: recTransformUtils.py:14
python.trfArgClasses.argList
List of string arguments.
Definition: trfArgClasses.py:348
python.trfArgClasses.argFactory
Factory class used to generate argument class instances for argparse.
Definition: trfArgClasses.py:31
python.trfArgClasses.argBool
Boolean type argument.
Definition: trfArgClasses.py:317
python.trfArgClasses.argBSFile
ByteStream file class.
Definition: trfArgClasses.py:1358
python.trfArgClasses.argFile
File argument class.
Definition: trfArgClasses.py:522
PyJobTransforms.trfExe
Transform execution functions.
python.recTransformUtils.addAllRecoArgs
def addAllRecoArgs(trf)
The standard suite of reconstruction specific arguments.
Definition: recTransformUtils.py:130
python.trfArgClasses.argSubstep
Base class for substep arguments.
Definition: trfArgClasses.py:1926
python.trfArgs.addPrimaryDPDArguments
def addPrimaryDPDArguments(parser, pick=None, transform=None, multipleOK=False)
Add primary DPD arguments.
Definition: trfArgs.py:268