From 36bed949d8e3915d471eeceb961303a445f4439e Mon Sep 17 00:00:00 2001 From: Andy Salnikov <salnikov@slac.stanford.edu> Date: Tue, 21 Jun 2016 13:28:05 +0200 Subject: [PATCH] fix for digitization script; docs improvement (TrigSimTransforms-00-00-06) * Add command line options for BS output versions * Add new script for merge step * TrigSimTransforms-00-00-05 2016-06-10 Andy Salnikov * First somewhat-working three-step transform for Legacy Trigger * Still very experimental, will do more cleaning and tag later Former-commit-id: bee296703386c55c561d4b5a9982e55b5cfab236 --- .../doc/RunCombinedTransform.txt | 27 - .../doc/RunLegacyTransforms.md | 124 ++++ .../doc/RunSingleTransforms.txt | 68 -- .../TrigSimTransforms/python/trfArgs.py | 32 - .../TrigSimTransforms/python/trfTrigSimExe.py | 60 ++ .../python/trfTrigSimUtils.py | 82 ++- .../scripts/TrigAndReco_tf.py | 5 +- .../scripts/getLegacySimulationTransforms.sh | 4 +- .../scripts/runLegacySimulation_combined.sh | 59 +- .../runLegacySimulation_digitization.sh | 41 +- .../scripts/runLegacySimulation_merge.sh | 31 + .../scripts/runLegacySimulation_rdo2bs.sh | 29 +- .../scripts/runLegacySimulation_trigsim.sh | 38 +- ...ergingEventLoopMgr_TriggerBSandRDOtoRDO.py | 2 +- .../TrigSimTransforms/share/athena_RDOtoBS.py | 9 +- .../share/skeleton.BStoTRIGBS.py | 9 +- .../share/skeleton.BStoTRIGBS.py.r21 | 600 ++++++++++++++++++ .../share/skeleton.RDOtoBS.py | 18 +- .../share/skeleton.TRIGBStoRDO.py | 10 +- .../src/MergingEventLoopMgr.cxx | 8 +- 20 files changed, 1024 insertions(+), 232 deletions(-) delete mode 100644 Trigger/TriggerSimulation/TrigSimTransforms/doc/RunCombinedTransform.txt create mode 100644 Trigger/TriggerSimulation/TrigSimTransforms/doc/RunLegacyTransforms.md delete mode 100644 Trigger/TriggerSimulation/TrigSimTransforms/doc/RunSingleTransforms.txt delete mode 100644 Trigger/TriggerSimulation/TrigSimTransforms/python/trfArgs.py create mode 100644 Trigger/TriggerSimulation/TrigSimTransforms/python/trfTrigSimExe.py create mode 100755 Trigger/TriggerSimulation/TrigSimTransforms/scripts/runLegacySimulation_merge.sh create mode 100644 Trigger/TriggerSimulation/TrigSimTransforms/share/skeleton.BStoTRIGBS.py.r21 diff --git a/Trigger/TriggerSimulation/TrigSimTransforms/doc/RunCombinedTransform.txt b/Trigger/TriggerSimulation/TrigSimTransforms/doc/RunCombinedTransform.txt deleted file mode 100644 index 9e535a20ea4..00000000000 --- a/Trigger/TriggerSimulation/TrigSimTransforms/doc/RunCombinedTransform.txt +++ /dev/null @@ -1,27 +0,0 @@ -======================== - - PREPARATION - -======================== - -# setup MC production release (currently still using a nightly) - -asetup MCProd,17.7.X.Y.Z-VAL,gcc46,Sun -pkgco.py -A TrigSimTransforms -(cd Trigger/TriggerSimulation/TrigSimTransforms/cmt; make) - - -# then pick an arbitrary place to work and link the file - -mkdir -p combined -cd combined -ln -sf /afs/cern.ch/work/s/stelzer/LegacySimWorkareaForWernerJoerg/digitizedRDO/digiRDO.pool.root - -======================== - - RUNNING - -======================== - -runLegacySimulation_combined.sh - diff --git a/Trigger/TriggerSimulation/TrigSimTransforms/doc/RunLegacyTransforms.md b/Trigger/TriggerSimulation/TrigSimTransforms/doc/RunLegacyTransforms.md new file mode 100644 index 00000000000..00e6c99feaa --- /dev/null +++ b/Trigger/TriggerSimulation/TrigSimTransforms/doc/RunLegacyTransforms.md @@ -0,0 +1,124 @@ +PREPARATION +=========== + +Use one of the two options for running trnaforms, either run directly from +release, or checkout (newer) transform version locally. + + +To use transforms from release +------------------------------ + +If you want to use transforms from release setup AtlasProduction release: + + asetup AtlasProduction,devval,rel_1 + +Then pick an arbitrary place to work: + + mkdir -p develop; cd develop + + +To check out transforms locally +------------------------------- + +Alternatively if you want to update transforms which are in `TrigSimTransforms` +package, check it out and build (with cmake): + + mkdir -p legacysim/source; cd legacysim/source + + # setup release and test area + asetup AtlasProduction,devval,rel_1,here + + # checkout package + svnco TrigSimTransforms + cd .. + + # usually build directory is called "build" but some tools are + # still broken if you don't call it InstallArea + mkdir InstallArea; cd InstallArea + cmake ../source + make + + # update environment for test area + source $CMTCONFIG/setup.sh + + # go to working directory + cd .. + mkdir -p run; cd run + + +Running individual transform steps +================================== + +Now we can run any of the transforms, as long as the input is available. + + +Digitization step +----------------- + +* Input: always available on afs, or check and update the script to change defaults. +* Output: `./digitization/` directory by default, file name is `digiRDO.pool.root`. + +To run it: + + get_files -scripts runLegacySimulation_digitization.sh + # modify script if necessary + ./runLegacySimulation_digitization.sh + + +RDO to BS step +-------------- + +* Input: `digitization/digiRDO.pool.root`. +* Output: `./rdo2bs/` directory by default, file name is `digiBS.data`. + +To run it: + + get_files -scripts runLegacySimulation_rdo2bs.sh + # modify script if necessary + ./runLegacySimulation_rdo2bs.sh + +To check the ROD versions in produced output: + + printRODVersions.py rdo2bs/digiBS.data + + +Trigger Simulation step +----------------------- + +* Input: `./rdo2bs/digiBS.data`. +* Output: `./bs2trigbs/` directory by default, file name is `trigBS.data` + +To run it: + + get_files -scripts runLegacySimulation_trigsim.sh + # modify script if necessary + ./runLegacySimulation_trigsim.sh + + +RDO+BS merging step +------------------- + +* Input: `digitization/digiRDO.pool.root` and `./bs2trigbs/trigBS.data`. +* Output: `./trigbs2rdo/` directory by default, file name is `trigRDO.pool.root`. + +To run it: + + get_files -scripts runLegacySimulation_merge.sh + # modify script if necessary + ./runLegacySimulation_merge.sh + + +Running three-step transform +============================ + +Separate script will run three of the above steps in one go: RDO to BS, Trigger +Simulation, and RDO+BS merge. + +* Input: check `runLegacySimulation_combined.sh`, modify if necessary +* Output: `./rdo2trigger2rdo/` directory by default, file name is `trigRDO.pool.root` + +To run it: + + get_files -scripts runLegacySimulation_combined.sh + # modify script if necessary + ./runLegacySimulation_combined.sh diff --git a/Trigger/TriggerSimulation/TrigSimTransforms/doc/RunSingleTransforms.txt b/Trigger/TriggerSimulation/TrigSimTransforms/doc/RunSingleTransforms.txt deleted file mode 100644 index fb23cd35605..00000000000 --- a/Trigger/TriggerSimulation/TrigSimTransforms/doc/RunSingleTransforms.txt +++ /dev/null @@ -1,68 +0,0 @@ -======================== - - PREPARATION - -======================== - -# setup AtlasProduction release - -asetup 17.2.1.4 -cmt co Trigger/TriggerSimulation/TrigSimTransforms -cd Trigger/TriggerSimulation/TrigSimTransforms/cmt -make - -# then pick an arbitrary place to work - -mkdir -p develop -cd develop - -# get the transforms (they are symlinked, so you can edit directly) - -getLegacySimulationTransforms.sh - - -======================== - - RUNNING - -======================== - -# now we can run any of the transforms, as long as the input is available - - ------------------------- - Digitization ------------------------- -## input: -# always available on afs - -## run: -./runLegacySimulation_digitization.sh [outputdir] - - ------------------------- - RDO -> BS ------------------------- -## input: -ln -sf digitization/digiRDO.pool.root -# or -ln -sf /afs/cern.ch/work/s/stelzer/LegacySimWorkareaForWernerJoerg/digitizedRDO/digiRDO.pool.root - -## run: -./runLegacySimulation_rdo2bs.sh [outputdir] - -## checking the ROD versions -ipython printRODVersions.py rdobs/digiBS.data - - ------------------------- - Trigger Simulation ------------------------- -## input: -mv rdobs rdobs_success -ln -sf rdobs_success/digiBS.data - -## run: -./runLegacySimulation_trigsim.sh [outputdir] - - diff --git a/Trigger/TriggerSimulation/TrigSimTransforms/python/trfArgs.py b/Trigger/TriggerSimulation/TrigSimTransforms/python/trfArgs.py deleted file mode 100644 index ee5d1a81e0d..00000000000 --- a/Trigger/TriggerSimulation/TrigSimTransforms/python/trfArgs.py +++ /dev/null @@ -1,32 +0,0 @@ -# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration - - - -import PyJobTransforms.trfArgClasses as trfArgClasses -from PyJobTransforms.trfArgClasses import argFactory - -## @brief Add trigger simulation related arguments -def addTriggerArguments(parser, addTrigFilter=True): - parser.defineArgGroup('Trigger', 'Trigger Related Options') - - # input and output - parser.add_argument('--outputRDO_TRIGFile', - type=trfArgClasses.argFactory(trfArgClasses.argPOOLFile, io='output'), - help='Output RDO file after trigger and merging', - group='Trigger') - - # configuration - parser.add_argument('--triggerConfig', - type=argFactory(trfArgClasses.argument), - metavar='substep:triggerConf', - help='Trigger configuration string', - group='Trigger') - - - if addTrigFilter: - - parser.add_argument('--trigFilterList', - type=argFactory(trfArgClasses.argList), nargs="+", - help='Trigger filter list (multiple values can be given separately or split on commas; only understood in RAWtoESD)', - group='Trigger') - diff --git a/Trigger/TriggerSimulation/TrigSimTransforms/python/trfTrigSimExe.py b/Trigger/TriggerSimulation/TrigSimTransforms/python/trfTrigSimExe.py new file mode 100644 index 00000000000..6b09a3dea98 --- /dev/null +++ b/Trigger/TriggerSimulation/TrigSimTransforms/python/trfTrigSimExe.py @@ -0,0 +1,60 @@ +# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + +""" +Executor classes specific to Trigger simulation +""" + +import logging +import os +import shutil + +from PyJobTransforms.trfExe import athenaExecutor + +msg = logging.getLogger(__name__) + + +class athenaExecutorJO(athenaExecutor): + """ + Special Athena executor which uses few JO files from current environment. + + This is useful when running athen from the release which is different + from current release but which needs JO files from current release. + """ + + def _prepAthenaCommandLine(self): + + def _findInPath(relName, searchpath): + """ Find anf return file name in a search path """ + for dir in searchpath: + path = os.path.join(dir, relName) + if os.path.exists(path): + return path + return None + + joFiles = [] + if 'copyJO' in self.conf.argdict: + joFiles = self.conf.argdict['copyJO'].returnMyValue(name=self._name, substep=self._substep, + first=self.conf.firstExecutor) + msg.info('Will try to copy JO files to local directory: %s', joFiles) + else: + msg.info('self.conf.argdict: %s', self.conf.argdict) + + # copy JO files to a special directory + searchpath = os.environ.get('JOBOPTSEARCHPATH', '').split(os.pathsep) + joDirName = None + for jo in joFiles: + joPath = _findInPath(jo, searchpath) + if not joPath: + raise OSError('Failed to find {} in $JOBOPTSEARCHPATH'.format(jo)) + + joDirName = 'jobOptions.' + self._name + dst = os.path.join(joDirName, jo) + os.makedirs(os.path.dirname(dst)) + shutil.copyfile(joPath, dst) + + # call base class to construct athena command line + athenaExecutor._prepAthenaCommandLine(self) + + # adjust command line to set $JOBOPTSEARCHPATH + if joDirName: + self._cmd.insert(0, 'JOBOPTSEARCHPATH="' + joDirName + ':$JOBOPTSEARCHPATH"') diff --git a/Trigger/TriggerSimulation/TrigSimTransforms/python/trfTrigSimUtils.py b/Trigger/TriggerSimulation/TrigSimTransforms/python/trfTrigSimUtils.py index 31897db7670..538a433568a 100644 --- a/Trigger/TriggerSimulation/TrigSimTransforms/python/trfTrigSimUtils.py +++ b/Trigger/TriggerSimulation/TrigSimTransforms/python/trfTrigSimUtils.py @@ -1,53 +1,73 @@ # Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration +""" +Module whichde defines transform steps and arguments specific +to Trigger simulation. +""" -from PyJobTransforms.trfArgClasses import argFactory, argBSFile, argPOOLFile +from PyJobTransforms.trfArgClasses import argFactory, argBSFile, argPOOLFile, argSubstep, argSubstepList from PyJobTransforms.trfExe import athenaExecutor +from .trfTrigSimExe import athenaExecutorJO -## @brief Add trigger simulation substeps +# # @brief Add trigger simulation substeps def addTrigSimSubsteps(executorSet): - executorSet.add( athenaExecutor( name = 'RDOtoBS', skeletonFile = 'TrigSimTransforms/skeleton.RDOtoBS.py', - substep = 'r2b', inData = ['RDO'], outData = ['BS_OLD'] - )) - - executorSet.add( athenaExecutor( name = 'BStoTRIGBS', skeletonFile = 'TrigSimTransforms/skeleton.BStoTRIGBS.py', - substep = 'b2tb', inData = ['BS_OLD'], outData = ['BS_TRIG'] - )) + executorSet.add(athenaExecutor(name='RDOtoBSOLD', skeletonFile='TrigSimTransforms/skeleton.RDOtoBS.py', + substep='r2bo', inData=['RDO'], outData=['BS_OLD'] + )) - executorSet.add( athenaExecutor( name = 'TRIGBStoRDO', skeletonFile = 'TrigSimTransforms/skeleton.TRIGBStoRDO.py', - substep = 'tb2tr', inData = [('BS_TRIG','RDO')], outData = ['RDO_TRIG'] + executorSet.add(athenaExecutorJO(name='BStoTRIGBS', skeletonFile='TrigSimTransforms/skeleton.BStoTRIGBS.py', + substep='b2tb', inData=['BS_OLD'], outData=['BS_TRIG_OLD'] )) + executorSet.add(athenaExecutor(name='TRIGBStoRDO', skeletonFile='TrigSimTransforms/skeleton.TRIGBStoRDO.py', + substep='tb2tr', inData=[('BS_TRIG_OLD', 'RDO')], outData=['RDO_TRIG_OLD'] + )) -## @brief Add trigger simulation related arguments +# # @brief Add trigger simulation related arguments def addTrigSimArguments(parser): - parser.defineArgGroup('Trigger', 'Trigger Related Options') + parser.defineArgGroup('LegacyTrigger', 'Legacy Trigger Simulation Related Options') # input and output parser.add_argument('--outputBS_OLDFile', - type = argFactory( argBSFile, io='output'), - help = 'Output BS file after transforming to legacy payload', - group = 'Trigger') + type=argFactory(argBSFile, io='output'), + help='Output BS file after transforming to legacy payload', + group='LegacyTrigger') parser.add_argument('--inputBS_OLDFile', - type = argFactory( argBSFile, io='input'), - help = 'Input BS file with legacy payload', - group = 'Trigger') + type=argFactory(argBSFile, io='input'), + help='Input BS file with legacy payload', + group='LegacyTrigger') + + parser.add_argument('--outputBS_TRIG_OLDFile', + type=argFactory(argBSFile, io='output'), + help='Output BS file after legacy trigger simulation', + group='LegacyTrigger') - parser.add_argument('--outputBS_TRIGFile', - type = argFactory( argBSFile, io='output'), - help = 'Output BS file after trigger simulation', - group = 'Trigger') + parser.add_argument('--inputBS_TRIG_OLDFile', + type=argFactory(argBSFile, io='input'), + help='Input BS file with legacy trigger data', + group='LegacyTrigger') - parser.add_argument('--inputBS_TRIGFile', - type = argFactory( argBSFile, io='input'), - help = 'Input BS file with trigger data', - group = 'Trigger') + parser.add_argument('--outputRDO_TRIG_OLDFile', + type=argFactory(argPOOLFile, io='output'), + help='Output RDO file after legacy trigger simulation and merging with RDO', + group='LegacyTrigger') - parser.add_argument('--outputRDO_TRIGFile', - type = argFactory( argPOOLFile, io='output'), - help = 'Output RDO file after trigger and merging', - group = 'Trigger') + parser.add_argument('--copyJO', group = 'LegacyTrigger', + type=argFactory(argSubstepList, splitter=','), nargs='+', + metavar='substep:PATH,PATH,...', + help='Specifies one or more JO files to copy from current release, ' + 'can be used with steps specifying different release') + parser.add_argument('--outputBSEformatVersion', group='LegacyTrigger', + type=argFactory(argSubstep), nargs='+', + metavar='substep:VERSION', + help='Specifies eformat version name for ByteStream output, use "run1" to ' + 'produce run1-compatible output.') + parser.add_argument('--outputBSEventStorageVersion', group='LegacyTrigger', + type=argFactory(argSubstep), nargs='+', + metavar='substep:VERSION', + help='Specifies EventStorage version name for ByteStream output, use "run1" to ' + 'produce run1-compatible output.') diff --git a/Trigger/TriggerSimulation/TrigSimTransforms/scripts/TrigAndReco_tf.py b/Trigger/TriggerSimulation/TrigSimTransforms/scripts/TrigAndReco_tf.py index 17cc97a0376..010a635cab2 100755 --- a/Trigger/TriggerSimulation/TrigSimTransforms/scripts/TrigAndReco_tf.py +++ b/Trigger/TriggerSimulation/TrigSimTransforms/scripts/TrigAndReco_tf.py @@ -24,7 +24,8 @@ import PyJobTransforms.trfArgClasses as trfArgClasses from TrigSimTransforms.trfTrigSimUtils import addTrigSimSubsteps, addTrigSimArguments -ListOfDefaultPositionalKeys=['--AFPOn', '--ALFAOn', '--AddCaloDigi', '--DBRelease', '--DataRunNumber', '--FwdRegionOn', '--LucidOn', '--ZDCOn', '--amiConfig', '--amiMetadataTag', '--asetup', '--athena', '--athenaopts', '--autoConfiguration', '--beamType', '--bunchSpacing', '--checkEventCount', '--command', '--conditionsTag', '--digiRndmSvc', '--digiSeedOffset1', '--digiSeedOffset2', '--doAllNoise', '--env', '--eventAcceptanceEfficiency', '--execOnly', '--geometryVersion', '--ignoreErrors', '--ignoreFilters', '--ignorePatterns', '--inputAODFile', '--inputBSFile', '--inputBeamGasHitsFile', '--inputBeamHaloHitsFile', '--inputCavernHitsFile', '--inputESDFile', '--inputEVNTFile', '--inputHITSFile', '--inputHighPtMinbiasHitsFile', '--inputLowPtMinbiasHitsFile', '--inputNTUP_COMMONFile', '--inputRDOFile', '--jobNumber', '--maxEvents', '--noimf', '--notcmalloc', '--numberOfBeamGas', '--numberOfBeamHalo', '--numberOfCavernBkg', '--numberOfHighPtMinBias', '--numberOfLowPtMinBias', '--outputAODFile', '--outputAOD_SKIMFile', '--outputD2AODM_WMUNUFile', '--outputD2AODM_ZEEFile', '--outputD2AODM_ZMUMUFile', '--outputD2AOD_DIONIAFile', '--outputD2AOD_DIPHOFile', '--outputD2AOD_H4LFile', '--outputD2AOD_WENUFile', '--outputD2AOD_ZEEFile', '--outputD2ESDM_TRKJETFile', '--outputD2ESD_DIPHOFile', '--outputD2ESD_JPSIUPSMMFile', '--outputD2ESD_WENUFile', '--outputD2ESD_WMUNUFile', '--outputD2ESD_ZMMFile', '--outputDAODM_HIGHMJJFile', '--outputDAODM_SGLEMFile', '--outputDAODM_SGLMUFile', '--outputDAODM_SGLPHFile', '--outputDAODM_SGLTAUFile', '--outputDAOD_2EMFile', '--outputDAOD_2L2QHSG2File', '--outputDAOD_2LHSG2File', '--outputDAOD_2MUFile', '--outputDAOD_2PHFile', '--outputDAOD_4LHSG2File', '--outputDAOD_EGLOOSEFile', '--outputDAOD_ELLOOSE18File', '--outputDAOD_ELLOOSEFile', '--outputDAOD_EMJETFile', '--outputDAOD_EMMETFile', '--outputDAOD_EMMUFile', '--outputDAOD_EMTAUFile', '--outputDAOD_H4LBREMRECFile', '--outputDAOD_HIGHMDIJETFile', '--outputDAOD_HSG1File', '--outputDAOD_HSG2File', '--outputDAOD_HWWFile', '--outputDAOD_JETMETFile', '--outputDAOD_JPSIMUMUFile', '--outputDAOD_MUFile', '--outputDAOD_MUJETFile', '--outputDAOD_MUMETFile', '--outputDAOD_MUTAUFile', '--outputDAOD_ONIAMUMUFile', '--outputDAOD_PHLOOSEFile', '--outputDAOD_REDFile', '--outputDAOD_RNDMFile', '--outputDAOD_SKIMELFile', '--outputDAOD_SUSYEGAMMAFile', '--outputDAOD_SUSYJETSFile', '--outputDAOD_SUSYMUONSFile', '--outputDAOD_TAUJETFile', '--outputDAOD_TESTFile', '--outputDAOD_UPSIMUMUFile', '--outputDAOD_ZEEGAMMAFile', '--outputDAOD_ZMUMUGAMMAFile', '--outputDESDM_ALLCELLSFile', '--outputDESDM_BEAMSPOTFile', '--outputDESDM_EGAMMAFile', '--outputDESDM_METFile', '--outputDESDM_MUONFile', '--outputDESDM_RPVLLCCFile', '--outputDESDM_RPVLLFile', '--outputDESDM_TRACKFile', '--outputDESD_CALJETFile', '--outputDESD_CALOCOMMFile', '--outputDESD_COLLCANDFile', '--outputDESD_CTLFWJETFile', '--outputDESD_EGTAUCOMMFile', '--outputDESD_EMCLUSCOMMFile', '--outputDESD_FWJETFile', '--outputDESD_HIRAREFile', '--outputDESD_IDCOMMFile', '--outputDESD_IDPROJCOMMFile', '--outputDESD_MBIASFile', '--outputDESD_MUONCOMMFile', '--outputDESD_ONIAMUMUHIFile', '--outputDESD_PHOJETFile', '--outputDESD_PIXELCOMMFile', '--outputDESD_PRESCALEDFile', '--outputDESD_RANDOMCOMMFile', '--outputDESD_RPCCOMMFile', '--outputDESD_SCTCOMMFile', '--outputDESD_SGLELFile', '--outputDESD_SGLMUFile', '--outputDESD_SKIMELFile', '--outputDESD_TGCCOMMFile', '--outputDESD_TILECOMMFile', '--outputDRAW_IDPROJCOMMFile', '--outputDRAW_WENUFile', '--outputDRAW_WMUNUFile', '--outputDRAW_ZEEFile', '--outputDRAW_ZMUMUFile', '--outputESDFile', '--outputHISTFile', '--outputHIST_AODFile', '--outputNTUPREDFile', '--outputNTUP_2L2QHSG2File', '--outputNTUP_2LHSG2File', '--outputNTUP_4LHSG2File', '--outputNTUP_BKGDFile', '--outputNTUP_BTAGD3PDFile', '--outputNTUP_BTAGEFFFile', '--outputNTUP_BTAGFULLFile', '--outputNTUP_BTAGGHOSTFile', '--outputNTUP_BTAGSLIMFile', '--outputNTUP_CLUSTERCORRECTIONFile', '--outputNTUP_COMMONFile', '--outputNTUP_EGAMMAFile', '--outputNTUP_EMBHHDNFile', '--outputNTUP_EMBHHIMFile', '--outputNTUP_EMBHHUPFile', '--outputNTUP_EMBLHDNFile', '--outputNTUP_EMBLHIMFile', '--outputNTUP_EMBLHUPFile', '--outputNTUP_EMBLLDNFile', '--outputNTUP_EMBLLIMFile', '--outputNTUP_EMBLLUPFile', '--outputNTUP_ENHBIASFile', '--outputNTUP_FASTMONFile', '--outputNTUP_HECNOISEFile', '--outputNTUP_HIFile', '--outputNTUP_HIGHMULTFile', '--outputNTUP_HSG2File', '--outputNTUP_HSG5GAMHFile', '--outputNTUP_HSG5GAMZFile', '--outputNTUP_HSG5WHFile', '--outputNTUP_HSG5WHQFile', '--outputNTUP_HSG5WHUFile', '--outputNTUP_HSG5ZBBFile', '--outputNTUP_HSG5ZHLLFile', '--outputNTUP_HSG5ZHLLUFile', '--outputNTUP_HSG5ZHMETFile', '--outputNTUP_HSG5ZHMETUFile', '--outputNTUP_IDVTXFile', '--outputNTUP_IDVTXLUMIFile', '--outputNTUP_JETMETEMCLFile', '--outputNTUP_JETMETFULLFile', '--outputNTUP_JETMETFile', '--outputNTUP_JETMETWZFile', '--outputNTUP_L1CALOFile', '--outputNTUP_L1CALOPROBFile', '--outputNTUP_L1TGCFile', '--outputNTUP_LARNOISEFile', '--outputNTUP_MCPFile', '--outputNTUP_MINBIASFile', '--outputNTUP_MUFASTFile', '--outputNTUP_MUONCALIBFile', '--outputNTUP_MUONFile', '--outputNTUP_PHOTONFile', '--outputNTUP_PHYSICSFile', '--outputNTUP_PROMPTPHOTFile', '--outputNTUP_SCTFile', '--outputNTUP_SMBKGEFile', '--outputNTUP_SMBKGMUFile', '--outputNTUP_SMDILEPFile', '--outputNTUP_SMDYEEFile', '--outputNTUP_SMDYMUMUFile', '--outputNTUP_SMLIGHTFile', '--outputNTUP_SMQCDFile', '--outputNTUP_SMTRILEPFile', '--outputNTUP_SMWENUFile', '--outputNTUP_SMWENUJJFile', '--outputNTUP_SMWMUNUFile', '--outputNTUP_SMWMUNUJJFile', '--outputNTUP_SMWZFile', '--outputNTUP_SMWZSOFTFile', '--outputNTUP_SMZEEFile', '--outputNTUP_SMZMUMUFile', '--outputNTUP_SUSY01LEPFile', '--outputNTUP_SUSY23LEPFile', '--outputNTUP_SUSY34LEPFile', '--outputNTUP_SUSYBOOSTFile', '--outputNTUP_SUSYFile', '--outputNTUP_SUSYLEPTAUFile', '--outputNTUP_SUSYLLPFile', '--outputNTUP_SUSYRAZORFile', '--outputNTUP_SUSYSKIMFile', '--outputNTUP_SUSYTAGFile', '--outputNTUP_SUSYTRUTHFile', '--outputNTUP_TAUFULLFile', '--outputNTUP_TAUFile', '--outputNTUP_TAUMEDIUMFile', '--outputNTUP_TAUSMALLFile', '--outputNTUP_TOPBOOSTFile', '--outputNTUP_TOPEJETFile', '--outputNTUP_TOPELFile', '--outputNTUP_TOPFile', '--outputNTUP_TOPJETFile', '--outputNTUP_TOPMUFile', '--outputNTUP_TPHSG2File', '--outputNTUP_TRIGBJETFile', '--outputNTUP_TRIGFile', '--outputNTUP_TRIGMUFile', '--outputNTUP_TRKVALIDFile', '--outputNTUP_TRTFile', '--outputNTUP_TRUTHFile', '--outputNTUP_WPRIMEENFile', '--outputNTUP_WPRIMEMNFile', '--outputNTUP_WZFile', '--outputNTUP_ZPRIMEEEFile', '--outputNTUP_ZPRIMEMMFile', '--outputRDOFile', '--outputTAGFile', '--pileupFinalBunch', '--pileupInitialBunch', '--postExec', '--postInclude', '--preExec', '--preInclude', '--reductionConf', '--reportName', '--runNumber', '--samplingFractionDbTag', '--showGraph', '--showPath', '--showSteps', '--skipEvents', '--skipFileValidation', '--skipInputFileValidation', '--skipOutputFileValidation', '--testPileUpConfig', '--tmpRDO', '--triggerConfig'] +ListOfDefaultPositionalKeys=['--AMIConfig', '--AMITag', '--DBRelease', '--argJSON', '--asetup', '--athena', '--athenaMPEventsBeforeFork', '--athenaMPMergeTargetSize', '--athenaMPStrategy', '--athenaMPUseEventOrders', '--athenaopts', '--attempt', '--autoConfiguration', '--beamType', '--checkEventCount', '--command', '--conditionsTag', '--copyJO', '--dumpJSON', '--dumpPickle', '--env', '--eventAcceptanceEfficiency', '--execOnly', '--fileValidation', '--geometryVersion', '--ignoreErrors', '--ignoreFiles', '--ignorePatterns', '--imf', '--inputAODFile', '--inputBSFile', '--inputBS_OLDFile', '--inputBS_TRIG_OLDFile', '--inputDRAW_EMUFile', '--inputDRAW_ZEEFile', '--inputDRAW_ZMUMUFile', '--inputESDFile', '--inputEVNTFile', '--inputFileValidation', '--inputNTUP_COMMONFile', '--inputRDOFile', '--inputRDO_FTKFile', '--inputRDO_TRIGFile', '--jobid', '--maxEvents', '--outputAODFile', '--outputAOD_RPRFile', '--outputAOD_SKIMFile', '--outputBSFile', '--outputBS_OLDFile', '--outputBS_TRIG_OLDFile', '--outputDAODFile', '--outputDAOD_HSG2File', '--outputDAOD_IDNCBFile', '--outputDAOD_IDPIXLUMIFile', '--outputDAOD_IDTIDEFile', '--outputDAOD_IDTRKLUMIFile', '--outputDAOD_IDTRKVALIDFile', '--outputDAOD_L1CALO1File', '--outputDAOD_L1CALO2File', '--outputDAOD_L1CALO3File', '--outputDAOD_RPVLLFile', '--outputDAOD_SCTVALIDFile', '--outputDESDM_ALLCELLSFile', '--outputDESDM_CALJETFile', '--outputDESDM_EGAMMAFile', '--outputDESDM_EXOTHIPFile', '--outputDESDM_IDALIGNFile', '--outputDESDM_MCPFile', '--outputDESDM_PHOJETFile', '--outputDESDM_SGLELFile', '--outputDESDM_SLTTMUFile', '--outputDESDM_TILEMUFile', '--outputDESDM_ZMUMUFile', '--outputDESD_DEDXFile', '--outputDNTUPFile', '--outputDRAW_EGJPSIFile', '--outputDRAW_EGZFile', '--outputDRAW_EMUFile', '--outputDRAW_RPVLLFile', '--outputDRAW_TAUMUHFile', '--outputDRAW_ZMUMUFile', '--outputESDFile', '--outputFileValidation', '--outputHISTFile', '--outputHIST_AODFile', '--outputNTUP_ENHBIASFile', '--outputNTUP_FASTMONFile', '--outputNTUP_FastCaloSimFile', '--outputNTUP_HECNOISEFile', '--outputNTUP_HIGHMULTFile', '--outputNTUP_LARNOISEFile', '--outputNTUP_MCPScaleFile', '--outputNTUP_MCPTPFile', '--outputNTUP_MUONCALIBFile', '--outputNTUP_PROMPTPHOTFile', '--outputNTUP_SCTFile', '--outputNTUP_SUSYTRUTHFile', '--outputNTUP_TRKVALIDFile', '--outputNTUP_TRTFile', '--outputNTUP_TRUTHFile', '--outputNTUP_WZFile', '--outputRDO_TRIGFile', '--outputRDO_TRIG_OLDFile', '--outputTAGFile', '--outputTXT_JIVEXMLTGZFile', '--parallelFileValidation', '--passThrough', '--postExec', '--postInclude', '--preExec', '--preInclude', '--reductionConf', '--reportName', '--reportType', '--runNumber', '--showGraph', '--showPath', '--showSteps', '--skipEvents', '--steering', '--taskid', '--tcmalloc', '--topOptions', '--trigFilterList', '--trigStream', '--triggerConfig', '--valgrind', '--valgrindDefaultOpts', '--valgrindExtraOpts', '--valid'] + @stdTrfExceptionHandler @sigUsrStackTrace @@ -47,7 +48,7 @@ def getTransform(): trf = transform(executor = executorSet, description = 'General purpose ATLAS reconstruction transform, which also supports' ' digitisation. Inputs can be HITS, RDO, BS, ESD or AOD, with outputs of RDO, ESD, AOD or DPDs.' - ' See https://twiki.cern.ch/twiki/bin/viewauth/Atlas/RecoTf for more details.') + ' See https://twiki.cern.ch/twiki/bin/view/AtlasComputing/RecoTf for more details.') addAthenaArguments(trf.parser) addDetectorArguments(trf.parser) diff --git a/Trigger/TriggerSimulation/TrigSimTransforms/scripts/getLegacySimulationTransforms.sh b/Trigger/TriggerSimulation/TrigSimTransforms/scripts/getLegacySimulationTransforms.sh index 0331635d099..aa00e9580aa 100755 --- a/Trigger/TriggerSimulation/TrigSimTransforms/scripts/getLegacySimulationTransforms.sh +++ b/Trigger/TriggerSimulation/TrigSimTransforms/scripts/getLegacySimulationTransforms.sh @@ -2,5 +2,7 @@ echo "Getting trigger simulation transforms" get_files -symlink -scripts runLegacySimulation_digitization.sh get_files -symlink -scripts runLegacySimulation_rdo2bs.sh get_files -symlink -scripts runLegacySimulation_trigsim.sh +get_files -symlink -scripts runLegacySimulation_merge.sh +get_files -symlink -scripts runLegacySimulation_combined.sh -get_files -symlink -jo printRODVersions.py +get_files -symlink -scripts printRODVersions.py diff --git a/Trigger/TriggerSimulation/TrigSimTransforms/scripts/runLegacySimulation_combined.sh b/Trigger/TriggerSimulation/TrigSimTransforms/scripts/runLegacySimulation_combined.sh index b23e7031c73..284ff12dcbd 100755 --- a/Trigger/TriggerSimulation/TrigSimTransforms/scripts/runLegacySimulation_combined.sh +++ b/Trigger/TriggerSimulation/TrigSimTransforms/scripts/runLegacySimulation_combined.sh @@ -1,22 +1,59 @@ -WORKDIR=${1:-rdo2trigger2esd} +#!/bin/sh +# +# Script which runs three-step legacy trigger simulation: +# 1. RDO to BS conversion +# 2. Trigger simulation on BS file using some legacy release +# producing BS_OLD output file +# 3. Merging of RDO and BS_OLD file into output RDO +# + +WORKDIR=${1:-rdo2trigger2rdo} echo "Combined workdir: "$WORKDIR rm -rf $WORKDIR mkdir $WORKDIR cd $WORKDIR -export INPUTRDO="../digiRDO.pool.root" +#INPUTRDO='root://eosatlas//eos/atlas/atlascerngroupdisk/trig-daq/validation/test_data/valid3.110401.PowhegPythia_P2012_ttbar_nonallhad.recon.RDO.e3099_s2579_r6164_tid05062245_00/RDO.05062245._000003.pool.root.1' +#INPUTRDO='root://eosatlas//eos/atlas/atlascerngroupdisk/trig-daq/validation/test_data/mc12_8TeV.208002.Pythia8B_AU2_CTEQ6L1_pp_Jpsimu6mu6.recon.RDO.e1331_a159_a190_tid01180650_00/RDO.01180650._000002.pool.root.1' +INPUTRDO=/afs/cern.ch/work/s/stelzer/LegacySimWorkareaForWernerJoerg/digitizedRDO/digiRDO.pool.root + +OUTPUTRDO="trigRDO.pool.root" + +CONDTAG="all:OFLCOND-MC12b-SDR-01" + +GEOMTAG="all:ATLAS-GEO-21-02-02" -export OUTPUTRDO="trigRDO.pool.root" +TRIGCONFIG='default=MCRECO:MC_pp_v6' +TRIGCONFIG_OLD='b2tb=MCRECO:DB:TRIGGERDBMC:325,142,266' + +ASETUP="b2tb:17.2.11.2,slc5" +COPYJO="b2tb:TrigSimTransforms/skeleton.BStoTRIGBS.py" -echo "Input file : "$INPUTRDO echo -echo "Output: "$OUTPUTRDO +echo "Input RDO file : "$INPUTRDO +echo "Output : "$OUTPUTRDO +echo +echo "Conditions : "$CONDTAG +echo "Geometry : "$GEOMTAG +echo "Trigger : "$TRIGCONFIG $TRIGCONFIG_OLD echo -TrigAndReco_tf.py --inputRDOFile $INPUTRDO --outputRDO_TRIGFile $OUTPUTRDO \ ---imf false \ ---asetup "b2tb:--testarea=/afs/cern.ch/user/s/stelzer/legacySimulation/SimRelease AtlasProduction,17.2.11.2,slc5" --triggerConfig 'all=MCRECO:DB:TRIGGERDBMC:325,142,266' \ ---geometryVersion "b2tb:ATLAS-GEO-21-02-02" --conditionsTag "b2tb:OFLCOND-MC12b-SDR-01" \ -2>&1 | tee log - +# +# Note --ignoreErrors option, some (or all steps) are still producing ERROR +# messages which are not fatal but need futher work on configuration to avoid +# them, once all ERROR messages are suppressed this otion can be removed +# +TrigAndReco_tf.py \ + --inputRDOFile $INPUTRDO \ + --outputRDO_TRIG_OLDFile $OUTPUTRDO \ + --triggerConfig $TRIGCONFIG $TRIGCONFIG_OLD \ + --geometryVersion $GEOMTAG \ + --conditionsTag $CONDTAG \ + --asetup "$ASETUP" \ + --copyJO "$COPYJO" \ + --outputBSEformatVersion "r2bo:run1" \ + --outputBSEventStorageVersion "r2bo:run1" \ + --imf false \ + --ignoreErrors true \ + > log 2>&1 diff --git a/Trigger/TriggerSimulation/TrigSimTransforms/scripts/runLegacySimulation_digitization.sh b/Trigger/TriggerSimulation/TrigSimTransforms/scripts/runLegacySimulation_digitization.sh index c6b02217deb..fbe9454e9b6 100755 --- a/Trigger/TriggerSimulation/TrigSimTransforms/scripts/runLegacySimulation_digitization.sh +++ b/Trigger/TriggerSimulation/TrigSimTransforms/scripts/runLegacySimulation_digitization.sh @@ -27,23 +27,24 @@ echo "Geometry : "$DIGIGEO echo -DigiMReco_trf.py \ - inputHitsFile="$INPUTDIR/$INPUTHITS" \ - maxEvents="50" \ - skipEvents="50" \ - preInclude_h2r="Digitization/ForceUseOfPileUpTools.py,SimulationJobOptions/preInclude.PileUpBunchTrains2011Config8_DigitConfig.py,RunDependentSimData/configLumi_mc12_v1.py" \ - preExec_h2r="from LArROD.LArRODFlags import larRODFlags;larRODFlags.doOFCPileupOptimization.set_Value_and_Lock(True);larRODFlags.NumberOfCollisions.set_Value_and_Lock(20);larRODFlags.UseDelta.set_Value_and_Lock(3);from Digitization.DigitizationFlags import digitizationFlags;digitizationFlags.overrideMetadata+=[\"SimLayout\",\"PhysicsList\"]" \ - RunNumber="126940" \ - autoConfiguration="everything" \ - conditionsTag="$DIGICON" \ - geometryVersion="$DIGIGEO" \ - outputRDOFile="$OUTPUT" \ - numberOfLowPtMinBias="39.954664" \ - numberOfHighPtMinBias="0.045336" \ - LowPtMinbiasHitsFile="$INPUTDIR/$INPUTMBLOWPT" \ - DataRunNumber="-1" \ - jobNumber="1200" \ - digiSeedOffset1="1200" \ - digiSeedOffset2="1200" \ - HighPtMinbiasHitsFile="$INPUTDIR/$INPUTMBHIGHPT" \ - digiRndmSvc="AtDSFMTGenSvc" +Reco_tf.py \ + --inputHITSFile="$INPUTDIR/$INPUTHITS" \ + --maxEvents="50" \ + --skipEvents="50" \ + --runNumber="126940" \ + --preInclude="h2r:Digitization/ForceUseOfPileUpTools.py,SimulationJobOptions/preInclude.PileUpBunchTrains2011Config8_DigitConfig.py,RunDependentSimData/configLumi_mc12_v1.py" \ + --preExec="h2r:from LArROD.LArRODFlags import larRODFlags;larRODFlags.doOFCPileupOptimization.set_Value_and_Lock(True);larRODFlags.NumberOfCollisions.set_Value_and_Lock(20);larRODFlags.UseDelta.set_Value_and_Lock(3);from Digitization.DigitizationFlags import digitizationFlags;digitizationFlags.overrideMetadata+=[\"SimLayout\",\"PhysicsList\"];from GeoModelSvc.GeoModelSvcConf import GeoModelSvc;GeoModelSvc = GeoModelSvc();GeoModelSvc.IgnoreTagSupport = True;GeoModelSvc.IgnoreTagDifference = True" \ + --autoConfiguration="everything" \ + --conditionsTag="$DIGICON" \ + --geometryVersion="$DIGIGEO" \ + --outputRDOFile="$OUTPUT" \ + --numberOfLowPtMinBias="39.954664" \ + --numberOfHighPtMinBias="0.045336" \ + --inputLowPtMinbiasHitsFile="$INPUTDIR/$INPUTMBLOWPT" \ + --DataRunNumber="-1" \ + --jobNumber="1200" \ + --digiSeedOffset1="1200" \ + --digiSeedOffset2="1200" \ + --inputHighPtMinbiasHitsFile="$INPUTDIR/$INPUTMBHIGHPT" \ + --digiRndmSvc="AtDSFMTGenSvc" \ + > log 2>&1 diff --git a/Trigger/TriggerSimulation/TrigSimTransforms/scripts/runLegacySimulation_merge.sh b/Trigger/TriggerSimulation/TrigSimTransforms/scripts/runLegacySimulation_merge.sh new file mode 100755 index 00000000000..2c20f7a1100 --- /dev/null +++ b/Trigger/TriggerSimulation/TrigSimTransforms/scripts/runLegacySimulation_merge.sh @@ -0,0 +1,31 @@ +#!/bin/sh +# +# Script which runs three-step legacy trigger simulation: +# 1. RDO to BS conversion +# 2. Trigger simulation on BS file using some legacy release +# producing BS_OLD output file +# 3. Merging of RDO and BS_OLD file into output RDO +# + +WORKDIR=${1:-trigbs2rdo} + +echo "Merge workdir : "$WORKDIR +rm -rf $WORKDIR && mkdir $WORKDIR && cd $WORKDIR + +#INPUTRDO='root://eosatlas//eos/atlas/atlascerngroupdisk/trig-daq/validation/test_data/mc12_8TeV.208002.Pythia8B_AU2_CTEQ6L1_pp_Jpsimu6mu6.recon.RDO.e1331_a159_a190_tid01180650_00/RDO.01180650._000002.pool.root.1' +INPUTRDO='../digitization/digiRDO.pool.root' +INPUTBS='../bs2trigbs/trigBS.data' + +OUTPUTRDO="trigRDO.pool.root" + +echo +echo "Input RDO file : "$INPUTRDO +echo "Input BS file : "$INPUTBS +echo "Output : "$OUTPUTRDO +echo + +TrigAndReco_tf.py \ + --inputBS_TRIG_OLDFile $INPUTBS \ + --inputRDOFile $INPUTRDO \ + --outputRDO_TRIG_OLDFile $OUTPUTRDO \ + > log 2>&1 diff --git a/Trigger/TriggerSimulation/TrigSimTransforms/scripts/runLegacySimulation_rdo2bs.sh b/Trigger/TriggerSimulation/TrigSimTransforms/scripts/runLegacySimulation_rdo2bs.sh index e445f142b22..648fa9cffd7 100755 --- a/Trigger/TriggerSimulation/TrigSimTransforms/scripts/runLegacySimulation_rdo2bs.sh +++ b/Trigger/TriggerSimulation/TrigSimTransforms/scripts/runLegacySimulation_rdo2bs.sh @@ -1,3 +1,5 @@ +#!/bin/sh + WORKDIR=${1:-rdo2bs} echo "Digitization workdir: "$WORKDIR @@ -5,16 +7,29 @@ rm -rf $WORKDIR mkdir $WORKDIR cd $WORKDIR -export INPUTRDO="../digiRDO.pool.root" +#INPUTRDO='root://eosatlas//eos/atlas/atlascerngroupdisk/trig-daq/validation/test_data/valid3.110401.PowhegPythia_P2012_ttbar_nonallhad.recon.RDO.e3099_s2579_r6164_tid05062245_00/RDO.05062245._000003.pool.root.1' +#INPUTRDO='root://eosatlas//eos/atlas/atlascerngroupdisk/trig-daq/validation/test_data/mc12_8TeV.208002.Pythia8B_AU2_CTEQ6L1_pp_Jpsimu6mu6.recon.RDO.e1331_a159_a190_tid01180650_00/RDO.01180650._000002.pool.root.1' +INPUTRDO='../digitization/digiRDO.pool.root' +OUTPUTBS="digiBS.data" -export OUTPUTBS="digiBS.data" +TRIGCONFIG='all=MCRECO:MC_pp_v6' +#TRIGCONFIG='all=MCRECO:DB:TRIGGERDBMC:325,142,266' +CONDTAG="OFLCOND-MC12-SDR-06" +GEOMTAG="ATLAS-GEO-18-01-01" echo "Input file : "$INPUTRDO echo "Output : "$OUTPUTBS -echo "Workdir : "$WORKDIR +echo "Workdir : "$WORKDIR +echo +echo "Conditions : "$CONDTAG +echo "Geometry : "$GEOMTAG TrigAndReco_tf.py --inputRDOFile $INPUTRDO --outputBS_OLDFile $OUTPUTBS \ ---imf false \ ---triggerConfig 'all=MCRECO:DB:TRIGGERDBMC:325,142,266' \ -> log 2>&1 & - + --imf false \ + --maxEvents 100 \ + --triggerConfig $TRIGCONFIG \ + --geometryVersion "r2bo:$GEOMTAG" \ + --conditionsTag "r2bo:$CONDTAG" \ + --outputBSEformatVersion "r2bo:run1" \ + --outputBSEventStorageVersion "r2bo:run1" \ + > log 2>&1 diff --git a/Trigger/TriggerSimulation/TrigSimTransforms/scripts/runLegacySimulation_trigsim.sh b/Trigger/TriggerSimulation/TrigSimTransforms/scripts/runLegacySimulation_trigsim.sh index 7c44a3970ec..0198ef2327c 100755 --- a/Trigger/TriggerSimulation/TrigSimTransforms/scripts/runLegacySimulation_trigsim.sh +++ b/Trigger/TriggerSimulation/TrigSimTransforms/scripts/runLegacySimulation_trigsim.sh @@ -1,34 +1,38 @@ +#!/bin/sh + WORKDIR=${1:-bs2trigbs} -echo "Digitization workdir: "$WORKDIR +echo "Simulation workdir: "$WORKDIR rm -rf $WORKDIR mkdir $WORKDIR cd $WORKDIR -export INPUTBS="../tmpfiles/tmp.BS_OLD" +INPUTBS="../rdo2bs/digiBS.data" -export OUTPUTBS="trigBS.data" +OUTPUTBS="trigBS.data" -export DIGICON="OFLCOND-MC12b-SDR-01" -export DIGIGEO="ATLAS-GEO-21-02-02" +DIGICON="OFLCOND-MC12b-SDR-01" +DIGIGEO="ATLAS-GEO-21-02-02" +#DIGICON="OFLCOND-RUN12-SDR-25" +#DIGIGEO="ATLAS-R2-2015-02-01-00" +TRIGCONFIG='all=MCRECO:DB:TRIGGERDBMC:325,142,266' +#ASETUP="b2tb:--testarea=/afs/cern.ch/user/s/salnikov/work/public/LegacySimulation/17.2.11.2 AtlasProduction,17.2.11.2,slc5" +ASETUP="b2tb:17.2.11.2,slc5" echo "Input file : "$INPUTBS echo "Output : "$OUTPUTBS echo echo "Conditions : "$DIGICON echo "Geometry : "$DIGIGEO +echo "Trigger : "$TRIGCONFIG echo -#get_files -jo TrigSimTransforms/athena_BStoBS_Example.py - -#athena.py athena_BStoBS_Example.py 2>&1 > BStoTrigBS.log - -TrigAndReco_tf.py --inputBS_OLDFile $INPUTBS --outputBS_TRIGFile $OUTPUTBS \ ---imf false \ ---asetup "b2tb:--testarea=/afs/cern.ch/user/s/stelzer/legacySimulation/SimRelease AtlasProduction,17.2.11.2,slc5" --triggerConfig 'all=MCRECO:DB:TRIGGERDBMC:325,142,266' \ ---geometryVersion "b2tb:ATLAS-GEO-21-02-02" --conditionsTag "b2tb:OFLCOND-MC12b-SDR-01" \ -> log 2>&1 - - - +test -n "$ASETUP" && ASETUP="--asetup \"$ASETUP\"" +eval TrigAndReco_tf.py --inputBS_OLDFile $INPUTBS --outputBS_TRIG_OLDFile $OUTPUTBS \ + --imf false \ + --triggerConfig $TRIGCONFIG \ + --geometryVersion "b2tb:$DIGIGEO" --conditionsTag "b2tb:$DIGICON" \ + --copyJO "b2tb:TrigSimTransforms/skeleton.BStoTRIGBS.py" \ + $ASETUP \ + > log 2>&1 diff --git a/Trigger/TriggerSimulation/TrigSimTransforms/share/MergingEventLoopMgr_TriggerBSandRDOtoRDO.py b/Trigger/TriggerSimulation/TrigSimTransforms/share/MergingEventLoopMgr_TriggerBSandRDOtoRDO.py index a6da8211380..d1a6808d3cb 100644 --- a/Trigger/TriggerSimulation/TrigSimTransforms/share/MergingEventLoopMgr_TriggerBSandRDOtoRDO.py +++ b/Trigger/TriggerSimulation/TrigSimTransforms/share/MergingEventLoopMgr_TriggerBSandRDOtoRDO.py @@ -174,7 +174,7 @@ svcMgr.AthenaPoolCnvSvc.PoolAttributes += [ "DEFAULT_BUFFERSIZE = '32000'" ] svcMgr.AthenaPoolCnvSvc.PoolAttributes += [ "ContainerName = 'TTree=POOLContainer'; TREE_AUTO_FLUSH = '0'" ] svcMgr.AthenaSealSvc.CheckDictionary = True -svcMgr.AthenaSealSvc.CheckDictAtInit = True +#svcMgr.AthenaSealSvc.CheckDictAtInit = True from OutputStreamAthenaPool.OutputStreamAthenaPool import AthenaPoolOutputStream diff --git a/Trigger/TriggerSimulation/TrigSimTransforms/share/athena_RDOtoBS.py b/Trigger/TriggerSimulation/TrigSimTransforms/share/athena_RDOtoBS.py index 7a46d195632..61caf0feea3 100644 --- a/Trigger/TriggerSimulation/TrigSimTransforms/share/athena_RDOtoBS.py +++ b/Trigger/TriggerSimulation/TrigSimTransforms/share/athena_RDOtoBS.py @@ -96,7 +96,6 @@ from TrigSimTransforms.rdo2bs_rodversion_setup import rod_version_setup rod_version_setup("17.1.3.4") - # Blacklist the following modules, they are not wanted at this point _blacklist = [] #_blacklist += [ "CTP_RDO#*", "MuCTPI_RDO#*", "HLT::HLTResult#*", "ROIB::RoIBResult#*", ] @@ -125,11 +124,12 @@ _blacklist = [] ## _blacklist += [ "MuCTPI_RDO#*" ] ## _blacklist += [ "ROIB::RoIBResult#*" ] -StreamBSFileOutput.ItemList = [f for f in StreamBSFileOutput.ItemList if f not in _blacklist] #+ [ "TileTTL1Container#TileTTL1Cnt", "LArTTL1Container#LArTTL1EM", "LArTTL1Container#LArTTL1HAD" ] +StreamBSFileOutput.ItemList = [f for f in StreamBSFileOutput.ItemList if f not in _blacklist] +# + [ "TileTTL1Container#TileTTL1Cnt", "LArTTL1Container#LArTTL1EM", "LArTTL1Container#LArTTL1HAD" ] StreamBSFileOutput.ItemList += [ "TileRawChannelContainer#*" ] -StreamBSFileOutput.ItemList += [ "TileTTL1Container#*" ] -StreamBSFileOutput.ItemList += [ "LVL1::MbtsCTP#*" ] +# StreamBSFileOutput.ItemList += [ "TileTTL1Container#*" ] +# StreamBSFileOutput.ItemList += [ "LVL1::MbtsCTP#*" ] del _blacklist print "JOERG These collections are in StreamBSFileOutput" @@ -170,5 +170,6 @@ topSequence = AlgSequence() print "Algorithms" import AthenaCommon.Configurable as Configurable Configurable.log.setLevel( INFO ) +print svcMgr print topSequence diff --git a/Trigger/TriggerSimulation/TrigSimTransforms/share/skeleton.BStoTRIGBS.py b/Trigger/TriggerSimulation/TrigSimTransforms/share/skeleton.BStoTRIGBS.py index e2d630679e6..64f6e2a1688 100644 --- a/Trigger/TriggerSimulation/TrigSimTransforms/share/skeleton.BStoTRIGBS.py +++ b/Trigger/TriggerSimulation/TrigSimTransforms/share/skeleton.BStoTRIGBS.py @@ -135,8 +135,9 @@ theTileRawChannelToTTL1.TileRawChannelContainer = "TileRawChannelCnt" theTileRawChannelToTTL1.TileTTL1Container = "TileTTL1Cnt" theTileRawChannelToTTL1.maskBadChannels = True -from TrigT1MBTS.TrigT1MBTSConf import LVL1__TrigT1MBTS -topSequence += LVL1__TrigT1MBTS() +# this causes "dupe ignored" error message +# from TrigT1MBTS.TrigT1MBTSConf import LVL1__TrigT1MBTS +# topSequence += LVL1__TrigT1MBTS() topSequence.DoBCM = True topSequence.DoBPTX = True @@ -148,7 +149,7 @@ ConfigureFromListOfKeys(rec.AutoConfiguration()) # setting input and output from runArgs athenaCommonFlags.BSRDOInput.set_Value_and_Lock( runArgs.inputBS_OLDFile ) -athenaCommonFlags.BSRDOOutput.set_Value_and_Lock( runArgs.outputBS_TRIGFile ) +athenaCommonFlags.BSRDOOutput.set_Value_and_Lock( runArgs.outputBS_TRIG_OLDFile ) athenaCommonFlags.FilesInput = runArgs.inputBS_OLDFile globalflags.InputFormat = 'bytestream' @@ -540,7 +541,7 @@ MessageSvc.Format = "% F%48W%S%7W%R%T %0W%M" MessageSvc.debugLimit = 100000 -topSequence.TrigSteer_L2.muFast_900GeV.AthenaMonTools = PrivateToolHandleArray(['TrigGenericMonitoringTool/TrigmuFastValidationMonitoring','TrigGenericMonitoringTool/TrigmuFastOnlineMonitoring','TrigGenericMonitoringTool/TrigmuFastCosmicMonitoring','TrigTimeHistTool/Time']) +topSequence.TrigSteer_L2.muFast_900GeV.AthenaMonTools = PrivateToolHandleArray(['TrigGenericMonitoringTool/TrigmuFastOnlineMonitoring', 'TrigGenericMonitoringTool/TrigmuFastCosmicMonitoring', 'TrigTimeHistTool/Time']) defaultOptions = {} defaultOptions['setModifiers']=[#Common modifiers for MC and data diff --git a/Trigger/TriggerSimulation/TrigSimTransforms/share/skeleton.BStoTRIGBS.py.r21 b/Trigger/TriggerSimulation/TrigSimTransforms/share/skeleton.BStoTRIGBS.py.r21 new file mode 100644 index 00000000000..2adbc50164e --- /dev/null +++ b/Trigger/TriggerSimulation/TrigSimTransforms/share/skeleton.BStoTRIGBS.py.r21 @@ -0,0 +1,600 @@ + + +## AthAlgSeq INFO Member list: +## LVL1::TriggerTowerMaker/TriggerTowerMaker, +## LVL1::CPMTowerMaker/CPMTowerMaker, +## LVL1::JetElementMaker/JetElementMaker, +## LVL1::EmTauTrigger/EmTauTrigger, +## LVL1::JetTrigger/JetTrigger, +## LVL1::EnergyTrigger/EnergyTrigger, +## LVL1::ROD/ROD, +## LVL1::CPCMMMaker/CPCMMMaker, +## LVL1::JEPCMMMaker/JEPCMMMaker, +## LVL1MUCTPI::L1Muctpi/L1Muctpi_on_RDO, +## LVL1CTP::CTPSimulation/CTPSimulation, +## ROIB::RoIBuilder/RoIBuilder, +## JetGlobalEventSetup, +## HLT::TrigSteer/TrigSteer_L2, +## HLT::TrigSteer/TrigSteer_EF, +## TrigDec::TrigDecisionMaker/TrigDecMaker, +## TrigInDetTrackTruthMaker, +## HLT::StreamTrigNavSlimming/TrigSlimmerStreamAOD_FeaturesDrop, +## HLT::StreamTrigNavSlimming/TrigSlimmerStreamAOD_L2Drop, +## HLT::StreamTrigNavSlimming/TrigSlimmerStreamESD_FeaturesDrop, +## HLT::StreamTrigNavSlimming/TrigSlimmerStreamESD_L2Drop + + +import logging +log = logging.getLogger("skeleton.BStoTRIGBS") +log.info("="*20 + " Start of BStoTRIGBS " + "="*20) + +# import ------------------------------------------------------------------------------- + +from AthenaCommon.AlgSequence import AlgSequence +from AthenaCommon.AppMgr import theApp, ServiceMgr, ToolSvc +from AthenaCommon.Include import include +from AthenaCommon.Logging import logging +from AthenaCommon.AthenaCommonFlags import athenaCommonFlags +from AthenaCommon.GlobalFlags import globalflags +from AthenaCommon.DetFlags import DetFlags +from TriggerJobOpts.TriggerFlags import TriggerFlags + +from AthenaCommon.GlobalFlags import jobproperties,JobProperty +from InDetTrigRecExample.InDetTrigFlags import InDetTrigJobProperties +from InDetRecExample.InDetJobProperties import InDetJobProperties +from InDetTrigRecExample.InDetTrigFlags import InDetTrigFlags +from InDetRecExample.InDetJobProperties import InDetFlags + +from InDetTrigRecExample.InDetTrigJobProperties import * + +from ByteStreamCnvSvc import ReadByteStream + +from GaudiKernel.GaudiHandles import \ +GaudiHandle,GaudiHandleArray,\ +PublicToolHandle,PublicToolHandleArray,\ +PrivateToolHandle,PrivateToolHandleArray,\ +ServiceHandle + +# runargs ------------------------------------------------------------------------------- + +globalflags.DetDescrVersion.set_Value_and_Lock(runArgs.geometryVersion) +globalflags.ConditionsTag.set_Value_and_Lock( runArgs.conditionsTag ) + +theApp.Dlls += [ "TrigT1RPCRecRoiSvc" ] +#theApp.ExtSvc += ["LVL1RPC::RPCRecRoiSvc"] + + +include ("TrigT1CaloByteStream/ReadLVL1CaloBS_jobOptions.py") +topSequence = AlgSequence() +include( "LArTools/LArTools_jobOptions.py" ) + +from TrigT1Muctpi.TrigT1MuctpiConfig import L1Muctpi_on_RDO +topSequence += L1Muctpi_on_RDO() +topSequence.L1Muctpi_on_RDO.CTPOutputLocID = "/Run/L1MuCTPItoCTPLocation" +topSequence.L1Muctpi_on_RDO.RoIOutputLocID = "/Run/L1MuCTPItoRoIBLocation" +topSequence.L1Muctpi_on_RDO.OverlapStrategyName = "NULL" + +from TileRecAlgs.TileRecAlgsConf import TileRawChannelToHit +theTileRawChannelToHit=TileRawChannelToHit() + +# Take TileRawChannel and convert to TTL1 +# Configure TileRawChannelToHit here +# Check TileRecAlgs_jobOptions.py for full configurability +theTileRawChannelToHit.TileRawChannelContainer="TileRawChannelCnt" +theTileRawChannelToHit.TileInfoName="TileInfo" +theTileRawChannelToHit.UseSamplFract = False + +# sets output key +theTileRawChannelToHit.TileHitContainer="TileHitVec" +topSequence += theTileRawChannelToHit + +from TileSimAlgs.TileSimAlgsConf import TileHitVecToCnt, TileHitVecToCntTool +theTileHitVecToCntTool = TileHitVecToCntTool() +theTileHitVecToCntTool.TileHitVectors = ["TileHitVec"] +theTileHitVecToCntTool.TileInfoName = "TileInfo" +theTileHitVecToCntTool.RndmEvtOverlay = True +# +## sets output key +theTileHitVecToCntTool.TileHitContainer = "TileHitCnt" +from Digitization.DigitizationFlags import jobproperties +theTileHitVecToCntTool.RndmSvc = jobproperties.Digitization.rndmSvc() +jobproperties.Digitization.rndmSeedList.addSeed("Tile_HitVecToCnt", 4789899, 989240512) + +theTileHitVecToCnt = TileHitVecToCnt() +topSequence += theTileHitVecToCnt + +from TileSimAlgs.TileSimAlgsConf import TileHitToTTL1 +theTileHitToTTL1=TileHitToTTL1() +theTileHitToTTL1.TileHitContainer = "TileHitCnt" + +from Digitization.DigitizationFlags import jobproperties +theTileHitToTTL1.RndmSvc=jobproperties.Digitization.rndmSvc() +jobproperties.Digitization.rndmSeedList.addSeed("theTile_HitToTTL1", 2789801, 189245514) + +topSequence += theTileHitToTTL1 +# end computation of TileRawChannel to TTL1 + +from MuonByteStream.MuonByteStreamFlags import muonByteStreamFlags +muonByteStreamFlags.RpcDataType = 'atlas' +muonByteStreamFlags.MdtDataType = 'atlas' +muonByteStreamFlags.TgcDataType = 'atlas' + +from MuonCnvExample.MuonCnvFlags import muonCnvFlags +if hasattr(muonCnvFlags,'RpcCablingMode'): + muonCnvFlags.RpcCablingMode.set_Value_and_Lock('new') + +# from TrigmuFast.TrigmuFastConfig import TrigmuFastConfig +# theTrigmuFast900GeV = TrigmuFastConfig('900GeV') +# theTrigmuFast900GeV.DomuFastESD = False +# theTrigmuFast900GeV.ROBmapperFile = "AtlasRoiROBmap.data" +# theTrigmuFast900GeV.BackExtrapolator = PublicToolHandle('TrigMuonBackExtrapolator/MisalignedBackExtrapolator') + +from TileRecAlgs.TileRecAlgsConf import TileRawChannelToTTL1 +theTileRawChannelToTTL1 = TileRawChannelToTTL1() + +theTileRawChannelToTTL1.TileRawChannelContainer = "TileRawChannelCnt" +theTileRawChannelToTTL1.TileTTL1Container = "TileTTL1Cnt" +theTileRawChannelToTTL1.maskBadChannels = True + +from TrigT1MBTS.TrigT1MBTSConf import LVL1__TrigT1MBTS +topSequence += LVL1__TrigT1MBTS() + +topSequence.DoBCM = True +topSequence.DoBPTX = True +topSequence.DoLUCID = True + +from RecExConfig.AutoConfiguration import ConfigureFromListOfKeys +ConfigureFromListOfKeys(rec.AutoConfiguration()) + + +# setting input and output from runArgs +athenaCommonFlags.BSRDOInput.set_Value_and_Lock( runArgs.inputBS_OLDFile ) +athenaCommonFlags.BSRDOOutput.set_Value_and_Lock(runArgs.outputBS_TRIG_OLDFile) + +athenaCommonFlags.FilesInput = runArgs.inputBS_OLDFile +globalflags.InputFormat = 'bytestream' +globalflags.DataSource = 'geant4' +if hasattr(runArgs,"maxEvents"): athenaCommonFlags.EvtMax.set_Value_and_Lock( runArgs.maxEvents ) +if hasattr(runArgs,"skipEvents"): athenaCommonFlags.SkipEvents.set_Value_and_Lock( runArgs.skipEvents ) + +print '################################################' +print runArgs.triggerConfig + +print '########### DetFlags before ###############' +DetFlags.Print() +DetFlags.detdescr.all_setOn() +DetFlags.all_setOn() +include ("RecExCond/AllDet_detDescr.py") +print '########### DetFlags after ###############' +DetFlags.Print() +include.block("RecExCond/RecExCommon_flags.py") +TriggerFlags.doID=True +TriggerFlags.doMuon=True +TriggerFlags.doCalo=True +TriggerFlags.doCalo=True +TriggerFlags.writeBS=True +#TriggerFlags.doID(): +from InDetTrigRecExample.InDetTrigConfigConditions import \ + PixelConditionsSetup, SCT_ConditionsSetup, TRT_ConditionsSetup +# +PixelConditionsSetup.config(useDCS=False, onlineMode=True, prefix='') +PixelConditionsSetup.lock() +PixelConditionsSetup.createSvc() +SCT_ConditionsSetup.config(useDCS=False, onlineMode=True, prefix='') +SCT_ConditionsSetup.lock() +SCT_ConditionsSetup.createSvc() +TRT_ConditionsSetup.config(useDCS=False, onlineMode=True, prefix='') +TRT_ConditionsSetup.lock() +TRT_ConditionsSetup.createSvc() + +include( "InDetRecExample/InDetRecCabling.py" ) + +DetFlags.detdescr.Calo_setOn() +from LArConditionsCommon.LArCondFlags import larCondFlags +larCondFlags.LoadElecCalib.set_Value_and_Lock(False) +from CaloTools.CaloToolsConf import CaloCompactCellTool +svcMgr.ToolSvc += CaloCompactCellTool() +from LArByteStream.LArByteStreamConfig import LArRawDataContByteStreamToolConfig +svcMgr.ToolSvc+=LArRawDataContByteStreamToolConfig(InitializeForWriting=True) + +from MuonCnvExample.MuonCnvFlags import muonCnvFlags +muonCnvFlags.RpcCablingMode.set_Value_and_Lock( "new" ) +muonCnvFlags.MdtCablingMode.set_Value_and_Lock("new") + + +TriggerFlags.triggerConfig.set_Value_and_Lock( runArgs.triggerConfig ) + +# from TriggerJobOpts.TriggerGetter import TriggerGetter +# triggerGetter = TriggerGetter() + +#print 'Print topSequence ',topSequence +#print 'topSequence type ',type(topSequence) + +# Enable Aditors (i.e. AlgContextAuditor to get algorithm stack in CoreDumpSvc) +theApp.AuditAlgorithms = True + + + +#------------------------------------------------------------------------------- + +######################################## +# +# POST CONFIGURE RERUNNING OF LVL1 +# +######################################## + +theApp.Dlls += [ "LArByteStream" ] +theApp.Dlls += [ "LArRawUtils", "LArROD" ] +theApp.Dlls += [ "TileByteStream" ] +theApp.Dlls += [ "TrigT1ResultByteStream" ] + +# Not tested if necessary +if not hasattr( svcMgr, "ByteStreamAddressProviderSvc" ): + from ByteStreamCnvSvcBase.ByteStreamCnvSvcBaseConf import ByteStreamAddressProviderSvc + svcMgr += ByteStreamAddressProviderSvc() + +svcMgr.ByteStreamAddressProviderSvc.TypeNames += [ "ROIB::RoIBResult/RoIBResult", "CTP_RDO/CTP_RDO", "MuCTPI_RIO/MUCTPI_RIO", "CTP_RIO/CTP_RIO", +"PixelRDO_Container/PixelRDOs", +"SCT_RDO_Container/SCT_RDOs", +"TRT_RDO_Container/TRT_RDOs", +"LArRawChannelContainer/LArRawChannels", +"LArHitContainer/LArHitEMB", +"TileRawChannelContainer/TileRawChannelCnt", +"RpcPadContainer/RPCPAD", +"MdtCsmContainer/MDTCSM", +"TgcRdoContainer/TGCRDO", +"CscRawDataContainer/CSCRDO", +"LArTTL1Container/LArTTL1EM", +"LArTTL1Container/LArTTL1HAD", +"TileTTL1Container/TileTTL1Cnt", +"TileTTL1Container/TileTTL1MBTS", +"ROIB::RoIBResult/RoIBResult", +"MuCTPI_RDO/MUCTPI_RDO", +"CTP_RDO/CTP_RDO", +"MuCTPI_RIO/MUCTPI_RIO", +"CTP_RIO/CTP_RIO", +"LVL1::MbtsCTP/Run/L1MBTSAtoCTPLocation", +"LVL1::MbtsCTP/Run/L1MBTSCtoCTPLocation" +] + +svcMgr.ByteStreamAddressProviderSvc.TypeNames += [ + "LArRawChannelContainer/LArRawChannels", + "TileRawChannelContainer/TileRawChannelCnt", + "ROIB::RoIBResult/RoIBResult", + "MuCTPI_RDO/MUCTPI_RDO", + "CTP_RDO/CTP_RDO" + ] + +#include( "LArL1Sim/LArL1Sim_G4_jobOptions.py" ) +##protectedInclude( "TrigT1CaloSim/TrigT1CaloSimJobOptions_TTL1.py" ) +#from TrigT1CaloSim.TrigT1CaloSimConf import LVL1__TriggerTowerMaker +#from TrigT1CaloSim.TrigT1CaloSimConf import LVL1__CPMTowerMaker +#from TrigT1CaloSim.TrigT1CaloSimConf import LVL1__JetElementMaker +#from TrigT1CaloSim.TrigT1CaloSimConf import LVL1__EmTauTrigger +#from TrigT1CaloSim.TrigT1CaloSimConf import LVL1__JetTrigger +#from TrigT1CaloSim.TrigT1CaloSimConf import LVL1__EnergyTrigger +#from TrigT1CaloSim.TrigT1CaloSimConf import LVL1__CPCMMMaker +#from TrigT1CaloSim.TrigT1CaloSimConf import LVL1__JEPCMMMaker +#from TrigT1CaloSim.TrigT1CaloSimConf import LVL1__ROD +#from TrigT1CaloSim.TrigT1CaloSimConf import LVL1__Tester +#from TrigT1CaloSim.TrigT1CaloSimConf import LVL1__DumpTriggerObjects + +# +## switch neighbour initialisation off (default = true = perform init.) +##DetDescrCnvSvc.DoInitNeighbours = FALSE +# +## The following are properties for LArL1Sim: +## +## -------------------------------------------------------- +## ............ declare the used top algo. +## -------------------------------------------------------- +## +## -------------------------------------------------------- +## ............ Algorithms Private Options +## -------------------------------------------------------- +## +## +## .................. sub-detector hit containers +## +## +#LArTTL1Maker = Algorithm( "LArTTL1Maker" ) +#LArTTL1Maker.SubDetectors = "LAr_All" +## .................. set the TTL1 container name +## +#LArTTL1Maker.EmTTL1ContainerName = "LArTTL1EM" +#LArTTL1Maker.HadTTL1ContainerName = "LArTTL1HAD" + +#------------------------------------------------------------------------------- + +######################################## +# +# Define output +# +######################################## + +include( "LArDetDescr/LArDetDescr_joboptions.py" ) +include( "CaloIdCnv/CaloIdCnv_joboptions.py" ) +include( "LArIdCnv/LArIdCnv_joboptions.py" ) +include ("CaloDetMgrDetDescrCnv/CaloDetMgrDetDescrCnv_joboptions.py") +include( "TileIdCnv/TileIdCnv_jobOptions.py" ) +include( "TileConditions/TileConditions_jobOptions.py" ) +include( "CaloDetMgrDetDescrCnv/CaloDetMgrDetDescrCnv_joboptions.py" ) + +#athenaCommonFlags.BSRDOOutput = _o # Expected to be set elsewhere +from ByteStreamCnvSvc import WriteByteStream +StreamBSFileOutput = WriteByteStream.getStream("EventStorage","StreamBSFileOutput") +StreamBSFileOutput.OutputFile = athenaCommonFlags.BSRDOOutput() +ServiceMgr.ByteStreamCnvSvc.IsSimulation = True +ServiceMgr.ByteStreamCnvSvc.InitCnvs += [ +"LArRawChannelContainer", +#"LArRawChannelCollection", +"TileRawChannelContainer", +"RpcPadContainer", +"MdtCsmContainer", +"TgcRdoContainer", +"CscRawDataContainer", +"LArTTL1Container", +"TileTTL1Container", +"LArHitContainer", +"DataVector<LVL1::TriggerTower>#*", +"DataVector<LVL1::CPMTower>#*", +"DataVector<LVL1::JetElement>#*", +"DataVector<LVL1::CPMHits>#*", +"DataVector<LVL1::CPMRoI>#*", +"DataVector<LVL1::CMMCPHits>#*", +"DataVector<LVL1::CMMJetHits>#*", +"DataVector<LVL1::CMMEtSums>#*", +"DataVector<LVL1::JEMHits>#*", +"DataVector<LVL1::JEMRoI>#*", +"DataVector<LVL1::JEMEtSums>#*", +"LVL1::CMMRoI#*", +"DataVector<LVL1::CMMEtSums>", +"DataVector<LVL1::JEMRoI>", +"LVL1::MbtsCTP" +] + +StreamBSFileOutput.ItemList += [ "LArTTL1Container#*" ] + +# Taken from storegate dump +StreamBSFileOutput.ItemList += [ "CTP_RDO#*" ] +#StreamBSFileOutput.ItemList += [ "CTP_RIO#*" ] # No RIO +StreamBSFileOutput.ItemList += [ "CscDigitContainer#*" ] # Not relevant +StreamBSFileOutput.ItemList += [ "CscRawDataContainer#*" ] # Not relevant +StreamBSFileOutput.ItemList += [ "DataHeader#*" ] # Not relevant +#StreamBSFileOutput.ItemList += [ "DataVector< LVL1::RecEnergyRoI >#*" ] # No converter +StreamBSFileOutput.ItemList += [ "DataVector<LVL1::CMMCPHits>#*" ] +StreamBSFileOutput.ItemList += [ "DataVector<LVL1::CMMEtSums>#*" ] +StreamBSFileOutput.ItemList += [ "DataVector<LVL1::CMMJetHits>#*" ] +StreamBSFileOutput.ItemList += [ "DataVector<LVL1::CPMHits>#*" ] +StreamBSFileOutput.ItemList += [ "DataVector<LVL1::CPMRoI>#CPMRoIs" ] # Chosen by data address +StreamBSFileOutput.ItemList += [ "DataVector<LVL1::CPMTower>#CPMTowers" ] # Chosen by data address +#StreamBSFileOutput.ItemList += [ "DataVector<LVL1::EmTauROI>#*" ] # No converter +StreamBSFileOutput.ItemList += [ "DataVector<LVL1::JEMEtSums>#*" ] +StreamBSFileOutput.ItemList += [ "DataVector<LVL1::JEMHits>#*" ] +StreamBSFileOutput.ItemList += [ "DataVector<LVL1::JEMRoI>#JEMRoIs" ] # Chosen by data address +StreamBSFileOutput.ItemList += [ "DataVector<LVL1::JetElement>#*" ] +#StreamBSFileOutput.ItemList += [ "DataVector<LVL1::JetROI>#*" ] # No converter +#StreamBSFileOutput.ItemList += [ "DataVector<LVL1::TriggerTower>#TriggerTowers" ] # Chosen by data address +#StreamBSFileOutput.ItemList += [ "DataVector<LVL1CTP::SlinkWord>#*" ] # No converter +#StreamBSFileOutput.ItemList += [ "DataVector<TrigMissingET>#*" ] # No converter +StreamBSFileOutput.ItemList += [ "EventInfo#*" ] # Not relevant +StreamBSFileOutput.ItemList += [ "HLT::HLTResult#*" ] +#StreamBSFileOutput.ItemList += [ "HLT::TrigEDMSizes#*" ] # No converter +StreamBSFileOutput.ItemList += [ "InDet::PixelClusterContainer#*" ] # Not relevant +StreamBSFileOutput.ItemList += [ "InDet::SCT_ClusterContainer#*" ] # Not relevant +StreamBSFileOutput.ItemList += [ "InDet::SiClusterContainer#*" ] # Not relevant +StreamBSFileOutput.ItemList += [ "InDet::TRT_DriftCircleContainer#*" ] # Not relevant +StreamBSFileOutput.ItemList += [ "InDetBSErrContainer#*" ] # Not relevant +#StreamBSFileOutput.ItemList += [ "L1MUINT::MuCTPIToRoIBSLink#*" ] # No converter +StreamBSFileOutput.ItemList += [ "LArRawChannelContainer#*" ] # Not relevant +StreamBSFileOutput.ItemList += [ "LVL1::CMMRoI#*" ] +StreamBSFileOutput.ItemList += [ "LVL1::CPBSCollection#*" ] +#StreamBSFileOutput.ItemList += [ "LVL1::EmTauCTP#*" ] # No converter +#StreamBSFileOutput.ItemList += [ "LVL1::EnergyCTP#*" ] # No converter +#StreamBSFileOutput.ItemList += [ "LVL1::EnergyRoI#*" ] # No converter +StreamBSFileOutput.ItemList += [ "LVL1::JEPBSCollection#*" ] +StreamBSFileOutput.ItemList += [ "LVL1::JEPRoIBSCollection#*" ] +#StreamBSFileOutput.ItemList += [ "LVL1::JetCTP#*" ] # No converter +#StreamBSFileOutput.ItemList += [ "LVL1::JetEtRoI#*" ] # No converter +#StreamBSFileOutput.ItemList += [ "LVL1::MuCTPICTP#*" ] # No converter +#StreamBSFileOutput.ItemList += [ "LVL1CTP::CTPSLink#*" ] # No converter +#StreamBSFileOutput.ItemList += [ "LVL1CTP::Lvl1Result#*" ] # No converter +StreamBSFileOutput.ItemList += [ "MdtCsmContainer#*" ] # Not relevant +StreamBSFileOutput.ItemList += [ "MdtDigitContainer#*" ] # Not relevant +StreamBSFileOutput.ItemList += [ "MuCTPI_RDO#MUCTPI_RDO+" ] +#StreamBSFileOutput.ItemList += [ "MuCTPI_RIO#*" ] # No RIO +#StreamBSFileOutput.ItemList += [ "ROIB::RecRoIBResult#*" ] # No RIO +#StreamBSFileOutput.ItemList += [ "ROIB::RoIBResult#*" ] +StreamBSFileOutput.ItemList += [ "2771#*" ] +StreamBSFileOutput.ItemList += [ "RpcDigitContainer#*" ] # Not relevant +StreamBSFileOutput.ItemList += [ "RpcPadContainer#*" ] # Not relevant +StreamBSFileOutput.ItemList += [ "RpcSectorLogicContainer#*" ] # Not relevant +#StreamBSFileOutput.ItemList += [ "SpacePointContainer#*" ] # No converter +StreamBSFileOutput.ItemList += [ "TRT_BSErrContainer#*" ] # Not relevant +StreamBSFileOutput.ItemList += [ "TRT_BSIdErrContainer#*" ] # Not relevant +StreamBSFileOutput.ItemList += [ "TgcDigitContainer#*" ] # Not relevant +StreamBSFileOutput.ItemList += [ "TgcRdoContainer#*" ] # Not relevant +StreamBSFileOutput.ItemList += [ "TileCellIDC#*" ] # Not relevant +StreamBSFileOutput.ItemList += [ "TileRawChannelContainer#*" ] # Not relevant +#StreamBSFileOutput.ItemList += [ "TrigDec::TrigDecision#*" ] # No converter +StreamBSFileOutput.ItemList += [ "TrigInDetTrackTruthMap#*" ] # Not relevant +#StreamBSFileOutput.ItemList += [ "TrigMissingETContainer#*" ] # No converter +#StreamBSFileOutput.ItemList += [ "TrigOperationalInfoCollection#*" ] # No converter +StreamBSFileOutput.ItemList += [ "std::vector<unsigned int>#*" ] # Not relevant + +# LVL1 +StreamBSFileOutput.ItemList = [ "ROIB::RoIBResult#*" ] +StreamBSFileOutput.ItemList += [ "DataVector<LVL1::TriggerTower>#TriggerTowers" ] +StreamBSFileOutput.ItemList += [ "LVL1::JEPBSCollection#JEPBSCollection" ] +StreamBSFileOutput.ItemList += [ "LVL1::JEPRoIBSCollection#JEPRoIBSCollection" ] +StreamBSFileOutput.ItemList += [ "LVL1::CPBSCollection#CPBSCollection" ] +StreamBSFileOutput.ItemList += [ "DataVector<LVL1::CPMRoI>#CPMRoIs" ] + +# LVL2 +StreamBSFileOutput.ItemList += [ "HLT::HLTResult#HLTResult_L2" ] +StreamBSFileOutput.ItemList += [ "HLT::HLTResult#HLTResult_EF" ] + + + +StreamBSFileOutput.ItemList += [ "CTP_RDO#CTP_RDO" ] +StreamBSFileOutput.ItemList += [ "MuCTPI_RDO#MUCTPI_RDO+" ] + + +#------------------------------------------------------------------------------- + +################### +### POST CONFIG ### +################### + + +# svcMgr.RPCcablingServerSvc.Atlas = True +# svcMgr.RPCcablingServerSvc.useMuonRPC_CablingSvc = True +# svcMgr.TGCcablingServerSvc.forcedUse = True + +for i in topSequence.getChildren(): + #print "child type ",i.getName(), '\n' + if "TrigSteer_L2" in i.getName(): + for j in i.getAllChildren(): + #print "TrigSteer_L2 child ", j.getName(), "\n" + if "muFast" in j.getType(): + #print "muFast algo ",j.getName(), " ",j.getFullName(), "\n" + j.DomuFastESD = False + j.DetMaskCheck = False + +theApp.EvtMax = runArgs.maxEvents + +print '######################## Storegate dump ########################' +svcMgr.StoreGateSvc.Dump = True +print '######################## End of Storegate dump ########################' + +print svcMgr + +svcMgr.ByteStreamInputSvc.FullFileName = athenaCommonFlags.BSRDOInput() + +#svcMgr.ByteStreamCnvSvc.OutputLevel = DEBUG + +#print "Joerg All Services:" +#for svc in svcMgr.getChildren(): +# print " ",svc +# if "CnvSvc" in svc.name(): +# svc.OutputLevel = VERBOSE +# if "InputSvc" in svc.name(): +# svc.OutputLevel = VERBOSE + + + +svcMgr.ByteStreamEventStorageOutputSvc.OutputLevel = DEBUG +svcMgr.IOVDbSvc.GlobalTag=globalflags.ConditionsTag() + +#if hasattr(svcMgr,"EventSelector"): +# svcMgr.EventSelector.SkipEvents = runArgs.skipEvents + +#svcMgr.MuonRPC_CablingSvc.RPCTriggerRoadsfromCool = True + +from AthenaCommon.AlgSequence import AlgSequence +topSequence = AlgSequence() +# topSequence.TriggerTowerMaker.CellType = 2 +# topSequence.TriggerTowerMaker.TriggerTowerLocation = "TriggerTowers2" + +#print "Joerg Algorithms" +import AthenaCommon.Configurable as Configurable +Configurable.log.setLevel( INFO ) +#print topSequence.getChildren() +#print topSequence + +# svcMgr.ToolSvc.TrigDataAccess.OutputLevel = DEBUG +# svcMgr.ToolSvc.TrigDataAccess.TileROD_Decoder.VerboseOutput = True +from TileByteStream.TileByteStreamConf import TileROD_Decoder +ToolSvc += TileROD_Decoder() +ToolSvc.TileROD_Decoder.VerboseOutput = True + +from AthenaCommon.AppMgr import ServiceMgr as svcMgr +#print svcMgr +#print "all services" +#for i in svcMgr.getAllChildren(): +# print i," ", i.getName()," ",i.getType(),"\n" +# if "RPCcablingServerSvc" in i.getType(): +# print "RPCcablingServerSvc properties ", i.getProperties() +# if "MuonRPC_CablingSvc" in i.getType(): +# print "MuonRPC_CablingSvc properties ", i.getProperties() +# if "ToolSvc" in i.getName(): +# for j in i.getAllChildren(): +# print "tool service ",j.getName(),"\n" +# if "RPCCablingDbTool" in j.getName(): +# print "RPCCablingDbTool options ",j.getProperties() +# if "TrigDataAccess" in j.getName(): +# print "TrigDataAccess options ",j.getProperties() +# if "LArRawDataContByteStreamTool" in j.getName(): +# j.OutputLevel = DEBUG +# print "LArRawDataContByteStreamTool options ",j.getProperties() + + + +# from TrigSteerMonitor.TrigSteerMonitorConf import TrigChainMoni +# chainMoni = TrigChainMoni() +# chainMoni.OutputLevel=VERBOSE +# topSequence.TrigSteer_L2.MonTools += [chainMoni] +# topSequence.TrigSteer_EF.MonTools += [chainMoni] + +MessageSvc = svcMgr.MessageSvc +MessageSvc.Format = "% F%48W%S%7W%R%T %0W%M" +MessageSvc.debugLimit = 100000 + + +# topSequence.TrigSteer_L2.muFast_900GeV.AthenaMonTools = PrivateToolHandleArray(['TrigGenericMonitoringTool/TrigmuFastValidationMonitoring','TrigGenericMonitoringTool/TrigmuFastOnlineMonitoring','TrigGenericMonitoringTool/TrigmuFastCosmicMonitoring','TrigTimeHistTool/Time']) + +defaultOptions = {} +defaultOptions['setModifiers']=[#Common modifiers for MC and data + 'noLArCalibFolders', + 'ForceMuonDataType', + 'useNewRPCCabling', + 'enableCostMonitoring', + 'enableCoherentPS', + 'useOracle', + 'detailedErrorStreams', + 'optimizeChainOrder', + 'enableHotIDMasking', + 'softTRTsettings', + 'openThresholdRPCCabling', + #special streaming setup + 'enable7BitL1TTStreaming'] + +modifierList=[] +import TriggerRelease.Modifiers +try: # Temporary backwards compatible hack + from TrigConfigSvc.TrigConfMetaData import TrigConfMetaData + meta = TrigConfMetaData() +except: + log.warning("TrigConfigSvc.TrigConfMetaData not available in this release") + meta = None + +from AthenaServices.AthenaServicesConf import AtRanluxGenSvc +atlux = AtRanluxGenSvc() +atlux.Seeds = ['TriggerTowerMaker_Pedestal 8594832 5736213', 'TriggerTowerMaker_Digitization 8631309 4492432', 'CTPSimulation 1979283043 1924452189', 'ToolSvc.HLT::RandomScaler 1857585203 1857585203', 'TrigSteer_L2.OPIScaler 1857585203 1857585203', 'TrigSteer_L2.TrigCostExecL2.TrigCostScaler 1857585203 1857585203', 'TrigSteer_L2.TrigCostAthenaL2.TrigCostScaler 1857585203 1857585203', 'TrigSteer_EF.OPIScaler 1857585203 1857585203', 'TrigSteer_EF.TrigCostExecEF.TrigCostScaler 1857585203 1857585203', 'TrigSteer_EF.TrigCostAthenaEF.TrigCostScaler 1857585203 1857585203'] +ServiceMgr += atlux + +for i in svcMgr.getAllChildren(): + if "AtRanluxGenSvc" in i.getType(): + print "Setting AtRanluxGenSvc","\n" + i.Seeds = ['TriggerTowerMaker_Pedestal 8594832 5736213', 'TriggerTowerMaker_Digitization 8631309 4492432', 'CTPSimulation 1979283043 1924452189', 'ToolSvc.HLT::RandomScaler 1857585203 1857585203', 'TrigSteer_L2.OPIScaler 1857585203 1857585203', 'TrigSteer_L2.TrigCostExecL2.TrigCostScaler 1857585203 1857585203', 'TrigSteer_L2.TrigCostAthenaL2.TrigCostScaler 1857585203 1857585203', 'TrigSteer_EF.OPIScaler 1857585203 1857585203', 'TrigSteer_EF.TrigCostExecEF.TrigCostScaler 1857585203 1857585203', 'TrigSteer_EF.TrigCostAthenaEF.TrigCostScaler 1857585203 1857585203'] + +setModifiers = [] +for mod in dir(TriggerRelease.Modifiers): + if not hasattr(getattr(TriggerRelease.Modifiers,mod),'preSetup'): continue + if mod in dir(): #allow turning on and off modifiers by variable of same name + if globals()[mod]: + if not mod in setModifiers: + setModifiers+=[mod] + else: + if mod in setModifiers: setModifiers.remove(mod) + if mod in setModifiers: + modifierList+=[getattr(TriggerRelease.Modifiers,mod)()] + if meta: meta.Modifiers += [mod] # store in trig conf meta data + setModifiers.remove(mod) + +if setModifiers: + log.error('Unknown modifier(s): '+str(setModifiers)) + +#------------------------------------------------------------------------------- + +log.info("="*20 + " End of BStoTRIGBS " + "="*20) diff --git a/Trigger/TriggerSimulation/TrigSimTransforms/share/skeleton.RDOtoBS.py b/Trigger/TriggerSimulation/TrigSimTransforms/share/skeleton.RDOtoBS.py index c544650b41a..62c6c45d9d1 100644 --- a/Trigger/TriggerSimulation/TrigSimTransforms/share/skeleton.RDOtoBS.py +++ b/Trigger/TriggerSimulation/TrigSimTransforms/share/skeleton.RDOtoBS.py @@ -8,7 +8,7 @@ from AthenaCommon.AthenaCommonFlags import athenaCommonFlags athenaCommonFlags.PoolRDOInput.set_Value_and_Lock( runArgs.inputRDOFile ) athenaCommonFlags.BSRDOOutput.set_Value_and_Lock( runArgs.outputBS_OLDFile ) athenaCommonFlags.EvtMax = -1 -athenaCommonFlags.SkipEvents.set_Value_and_Lock( runArgs.skipEvents ) +if hasattr(runArgs, "skipEvents"): athenaCommonFlags.SkipEvents.set_Value_and_Lock(runArgs.skipEvents) # Trigger configuration from TriggerJobOpts.TriggerFlags import TriggerFlags @@ -16,8 +16,20 @@ TriggerFlags.triggerConfig.set_Value_and_Lock(runArgs.triggerConfig) # Detector geometry and conditions data from AthenaCommon.GlobalFlags import globalflags -globalflags.DetDescrVersion = "ATLAS-GEO-18-01-01" -globalflags.ConditionsTag = "OFLCOND-MC12-SDR-06" +globalflags.DetDescrVersion.set_Value_and_Lock(runArgs.geometryVersion) +globalflags.ConditionsTag.set_Value_and_Lock(runArgs.conditionsTag) + +from ByteStreamCnvSvc.ByteStreamCnvSvcConf import ByteStreamEventStorageOutputSvc +if hasattr(runArgs, "outputBSEformatVersion"): + ByteStreamEventStorageOutputSvc.EformatVersion = runArgs.outputBSEformatVersion +if hasattr(runArgs, "outputBSEventStorageVersion"): + ByteStreamEventStorageOutputSvc.EventStorageVersion = runArgs.outputBSEventStorageVersion + +# disable check of geometry tags +from GeoModelSvc.GeoModelSvcConf import GeoModelSvc +GeoModelSvc = GeoModelSvc() +GeoModelSvc.IgnoreTagSupport = True +GeoModelSvc.IgnoreTagDifference = True include("TrigSimTransforms/athena_RDOtoBS.py") diff --git a/Trigger/TriggerSimulation/TrigSimTransforms/share/skeleton.TRIGBStoRDO.py b/Trigger/TriggerSimulation/TrigSimTransforms/share/skeleton.TRIGBStoRDO.py index b5e41f9de8f..3612e5d4d97 100644 --- a/Trigger/TriggerSimulation/TrigSimTransforms/share/skeleton.TRIGBStoRDO.py +++ b/Trigger/TriggerSimulation/TrigSimTransforms/share/skeleton.TRIGBStoRDO.py @@ -2,8 +2,14 @@ from AthenaCommon.AthenaCommonFlags import athenaCommonFlags # input athenaCommonFlags.PoolRDOInput = runArgs.inputRDOFile -athenaCommonFlags.BSRDOInput = runArgs.inputBS_TRIGFile +athenaCommonFlags.BSRDOInput = runArgs.inputBS_TRIG_OLDFile # output -athenaCommonFlags.PoolRDOOutput = runArgs.outputRDO_TRIGFile +athenaCommonFlags.PoolRDOOutput = runArgs.outputRDO_TRIG_OLDFile + +# disable check of geometry tags +from GeoModelSvc.GeoModelSvcConf import GeoModelSvc +GeoModelSvc = GeoModelSvc() +GeoModelSvc.IgnoreTagSupport = True +GeoModelSvc.IgnoreTagDifference = True include("TrigSimTransforms/MergingEventLoopMgr_TriggerBSandRDOtoRDO.py") diff --git a/Trigger/TriggerSimulation/TrigSimTransforms/src/MergingEventLoopMgr.cxx b/Trigger/TriggerSimulation/TrigSimTransforms/src/MergingEventLoopMgr.cxx index 119eaad1d10..ee785b11b4a 100644 --- a/Trigger/TriggerSimulation/TrigSimTransforms/src/MergingEventLoopMgr.cxx +++ b/Trigger/TriggerSimulation/TrigSimTransforms/src/MergingEventLoopMgr.cxx @@ -577,7 +577,7 @@ namespace TrigSim { proxyContainerPopulate(m_secEvtStore->proxies(), &secProxyMap, secProxyNames); - /* + /* m_log << MSG::DEBUG << "Got " << secProxyNames->size()<< " secondary proxies." << endreq; for(std::set<std::string>::iterator it = secProxyNames->begin(); @@ -587,7 +587,7 @@ namespace TrigSim { << endreq; } */ - + /* * Make a blacklist and start by filling it with the intersecting proxies @@ -670,6 +670,8 @@ namespace TrigSim { for(std::map<std::string, SG::DataProxy *>::iterator it = primProxyMap.begin(); it != primProxyMap.end(); ++it) { + if (! it->second->address()) continue; + m_log << MSG::INFO << "Adding primary proxy '" << it->first << "' to secondary data store." //<< " Proxy is " << (it->second->isValid() ? "" : "NOT ") << "valid" << endreq; @@ -694,6 +696,8 @@ namespace TrigSim { for(std::map<std::string, SG::DataProxy *>::iterator it = secProxyMap.begin(); it != secProxyMap.end(); ++it) { + if (! it->second->address()) continue; + m_log << MSG::INFO << "Adding secondary proxy '" << it->first << "' to primary data store." //<< " Proxy is " << (it->second->isValid() ? "" : "NOT ") << "valid" << endreq; -- GitLab