ATLAS Offline Software
Overlay_tf.py
Go to the documentation of this file.
1 #!/usr/bin/env python
2 
3 # Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
4 
5 """
6 Run overlay between either presampled MC background RDO or zero-bias data RDO and hard scatter HITS
7 """
8 
9 import sys
10 import time
11 
12 from PyJobTransforms.trfDecorators import stdTrfExceptionHandler, sigUsrStackTrace
13 from PyJobTransforms.trfArgs import addAthenaArguments, addDetectorArguments, addTriggerArguments
14 from PyJobTransforms.transform import transform
15 
16 # Setup core logging here
17 from PyJobTransforms.trfLogger import msg
18 msg.info('logging set in %s', sys.argv[0])
19 
20 
21 # Prodsys hack...
22 ListOfDefaultPositionalKeys = ['--AMIConfig', '--AMITag', '--AddCaloDigi', '--CA', '--DBRelease', '--PileUpPresampling', '--argJSON', '--asetup', '--athena', '--athenaMPEventsBeforeFork', '--athenaMPMergeTargetSize', '--athenaMPStrategy', '--athenaMPUseEventOrders', '--athenaopts', '--attempt', '--beamType', '--checkEventCount', '--command', '--conditionsTag', '--detectors', '--digiRndmSvc', '--digiSeedOffset1', '--digiSeedOffset2', '--digiSteeringConf', '--doAllNoise', '--dumpJSON', '--dumpPickle', '--env', '--eventAcceptanceEfficiency', '--eventService', '--execOnly', '--fileValidation', '--geometryVersion', '--ignoreErrors', '--ignoreFiles',
23  '--ignorePatterns', '--imf', '--inputBS_SKIMFile', '--inputFileValidation', '--inputHITSFile', '--inputRDO_BKGFile', '--jobid', '--maxEvents', '--multiprocess', '--multithreaded', '--outputFileValidation', '--outputRDOFile', '--outputRDO_FILTFile', '--outputRDO_SGNLFile', '--parallelFileValidation', '--postExec', '--postInclude', '--preExec', '--preInclude', '--reportName', '--reportType', '--runNumber', '--samplingFractionDbTag', '--sharedWriter', '--showGraph', '--showPath', '--showSteps', '--skipEvents', '--steering', '--taskid', '--tcmalloc', '--triggerConfig', '--valgrind', '--valgrindDefaultOpts', '--valgrindExtraOpts']
24 
25 
26 @stdTrfExceptionHandler
27 @sigUsrStackTrace
28 def main():
29  msg.info('This is %s', sys.argv[0])
30 
31  trf = getTransform()
32  trf.parseCmdLineArgs(sys.argv[1:])
33  trf.execute()
34  trf.generateReport()
35 
36  msg.info('%s stopped at %s, trf exit code %d',
37  sys.argv[0], time.asctime(), trf.exitCode)
38  sys.exit(trf.exitCode)
39 
40 
42  executor_set = set()
43  from OverlayConfiguration.OverlayTransformHelpers import addOverlayArguments, addOverlaySubstep
44  addOverlaySubstep(executor_set)
45  trf = transform(executor=executor_set,
46  description='ATLAS Overlay transform. Inputs must be HITS. Outputs must be RDO.')
47  addAthenaArguments(trf.parser)
48  addDetectorArguments(trf.parser)
49  addTriggerArguments(trf.parser, addTrigFilter=False)
50  addOverlayArguments(trf.parser)
51  return trf
52 
53 
54 if __name__ == '__main__':
55  main()
python.trfArgs.addDetectorArguments
def addDetectorArguments(parser)
Options related to the setup of the ATLAS detector (used in simulation and digitisation as well as re...
Definition: trfArgs.py:229
python.trfArgs.addTriggerArguments
def addTriggerArguments(parser, addTrigFilter=True)
Add trigger related arguments.
Definition: trfArgs.py:515
Overlay_tf.getTransform
def getTransform()
Definition: Overlay_tf.py:41
Overlay_tf.main
def main()
Definition: Overlay_tf.py:28
python.OverlayTransformHelpers.addOverlayArguments
def addOverlayArguments(parser, in_reco_chain=False)
Definition: OverlayTransformHelpers.py:49
python.trfArgs.addAthenaArguments
def addAthenaArguments(parser, maxEventsDefaultSubstep='first', addValgrind=True, addPerfMon=True, addVTune=True)
Options related to running athena in general TODO: Some way to mask certain options (perExec,...
Definition: trfArgs.py:59
python.OverlayTransformHelpers.addOverlaySubstep
def addOverlaySubstep(executor_set, in_reco_chain=False)
Definition: OverlayTransformHelpers.py:61
Amg::transform
Amg::Vector3D transform(Amg::Vector3D &v, Amg::Transform3D &tr)
Transform a point from a Trasformation3D.
Definition: GeoPrimitivesHelpers.h:156
CxxUtils::set
constexpr std::enable_if_t< is_bitmask_v< E >, E & > set(E &lhs, E rhs)
Convenience function to set bits in a class enum bitmask.
Definition: bitmask.h:232
PyJobTransforms.trfLogger
Logging configuration for ATLAS job transforms.
PyJobTransforms.transform
Main package for new style ATLAS job transforms.