diff --git a/Trigger/TriggerSimulation/TrigSimTransforms/CMakeLists.txt b/Trigger/TriggerSimulation/TrigSimTransforms/CMakeLists.txt new file mode 100644 index 0000000000000000000000000000000000000000..4c7d4b412d0bd8d6b720e2682c9eb303584ea774 --- /dev/null +++ b/Trigger/TriggerSimulation/TrigSimTransforms/CMakeLists.txt @@ -0,0 +1,35 @@ +################################################################################ +# Package: TrigSimTransforms +################################################################################ + +# Declare the package name: +atlas_subdir( TrigSimTransforms ) + +# Declare the package's dependencies: +atlas_depends_on_subdirs( PRIVATE + Control/AthenaKernel + Control/SGTools + Control/StoreGate + Event/EventInfo + GaudiKernel + Trigger/TrigEvent/TrigCaloEvent + Trigger/TrigEvent/TrigInDetEvent + Trigger/TrigEvent/TrigMuonEvent + Trigger/TrigEvent/TrigParticle + Trigger/TrigEvent/TrigSteeringEvent ) + +# External dependencies: +find_package( ROOT COMPONENTS Core Tree MathCore Hist RIO pthread ) + +# Component(s) in the package: +atlas_add_component( TrigSimTransforms + src/*.cxx + src/components/*.cxx + INCLUDE_DIRS ${ROOT_INCLUDE_DIRS} + LINK_LIBRARIES ${ROOT_LIBRARIES} AthenaKernel SGTools StoreGateLib SGtests EventInfo GaudiKernel TrigCaloEvent TrigInDetEvent TrigMuonEvent TrigParticle TrigSteeringEvent ) + +# Install files from the package: +atlas_install_python_modules( python/*.py ) +atlas_install_joboptions( share/*.py ) +atlas_install_scripts( scripts/*.sh scripts/*.py ) + diff --git a/Trigger/TriggerSimulation/TrigSimTransforms/cmt/requirements b/Trigger/TriggerSimulation/TrigSimTransforms/cmt/requirements index 7ccba545801b2eedfdd978ec6a189e6a30ab8c5d..adc0607bc8d87d4fbbe602aac35b4ad77855e911 100644 --- a/Trigger/TriggerSimulation/TrigSimTransforms/cmt/requirements +++ b/Trigger/TriggerSimulation/TrigSimTransforms/cmt/requirements @@ -8,30 +8,19 @@ private use AtlasPolicy AtlasPolicy-* use GaudiInterface GaudiInterface-* External use AtlasROOT AtlasROOT-* External -use AthenaBaseComps AthenaBaseComps-* Control use StoreGate StoreGate-* Control use EventInfo EventInfo-* Event use AthenaKernel AthenaKernel-* Control use SGTools SGTools-* Control -use AtlasBoost AtlasBoost-* External - -# Trigger package(s): -use TrigConfigSvc TrigConfigSvc-* Trigger/TrigConfiguration -use TrigNavigation TrigNavigation-* Trigger/TrigEvent -use TrigDecisionTool TrigDecisionTool-* Trigger/TrigAnalysis # Trigger package(s): use TrigSteeringEvent TrigSteeringEvent-* Trigger/TrigEvent -use TrigConfHLTData TrigConfHLTData-* Trigger/TrigConfiguration -use TrigSteering TrigSteering-* Trigger/TrigSteer # Trigger event package(s): -use TrigT1Result TrigT1Result-* Trigger/TrigT1 use TrigMuonEvent TrigMuonEvent-* Trigger/TrigEvent use TrigParticle TrigParticle-* Trigger/TrigEvent use TrigInDetEvent TrigInDetEvent-* Trigger/TrigEvent use TrigCaloEvent TrigCaloEvent-* Trigger/TrigEvent -use TrigMissingEtEvent TrigMissingEtEvent-* Trigger/TrigEvent end_private @@ -40,10 +29,15 @@ library TrigSimTransforms *.cxx components/*.cxx apply_pattern component_library # Declare the job option(s): -#apply_pattern declare_joboptions files="Merging_test.py" apply_pattern declare_joboptions files="*.py" +# install the python module +apply_pattern declare_python_modules files="*.py" + + +#apply_pattern declare_job_transforms tfs='*.py' jo='*.py' public +apply_pattern declare_scripts files="-s=../scripts *.sh *.py" diff --git a/Trigger/TriggerSimulation/TrigSimTransforms/doc/RunCombinedTransform.txt b/Trigger/TriggerSimulation/TrigSimTransforms/doc/RunCombinedTransform.txt new file mode 100644 index 0000000000000000000000000000000000000000..9e535a20ea490e2f97bb4140a5188f56f90f6539 --- /dev/null +++ b/Trigger/TriggerSimulation/TrigSimTransforms/doc/RunCombinedTransform.txt @@ -0,0 +1,27 @@ +======================== + + 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/RunSingleTransforms.txt b/Trigger/TriggerSimulation/TrigSimTransforms/doc/RunSingleTransforms.txt new file mode 100644 index 0000000000000000000000000000000000000000..fb23cd35605ed632d435f81c9c197ac583620d52 --- /dev/null +++ b/Trigger/TriggerSimulation/TrigSimTransforms/doc/RunSingleTransforms.txt @@ -0,0 +1,68 @@ +======================== + + 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/__init__.py b/Trigger/TriggerSimulation/TrigSimTransforms/python/__init__.py new file mode 100755 index 0000000000000000000000000000000000000000..74583d364ec2ca794156596c7254d9b234a940c6 --- /dev/null +++ b/Trigger/TriggerSimulation/TrigSimTransforms/python/__init__.py @@ -0,0 +1,2 @@ +# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + diff --git a/Trigger/TriggerSimulation/TrigSimTransforms/python/rdo2bs_rodversion_setup.py b/Trigger/TriggerSimulation/TrigSimTransforms/python/rdo2bs_rodversion_setup.py new file mode 100755 index 0000000000000000000000000000000000000000..c6eec9d88a2537cba4845dd0a6f1664e2581607f --- /dev/null +++ b/Trigger/TriggerSimulation/TrigSimTransforms/python/rdo2bs_rodversion_setup.py @@ -0,0 +1,33 @@ +#!/usr/bin/env python + +# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + + +def rod_version_setup(trigger_release): + + from TrigSimTransforms.rodconfig import get_rod_config + + rodconfig = get_rod_config(trigger_release) + + # LAr setup + # taken from https://svnweb.cern.ch/trac/atlasoff/browser/Trigger/TriggerRelease/trunk/share/Trigger_topOptions_writeBS.py + lar_rodconfig = rodconfig["LAR"] + from AthenaCommon.AppMgr import ToolSvc + ToolSvc.LArRawDataContByteStreamTool.DSPRunMode = lar_rodconfig["DSPRunMode"] + ToolSvc.LArRawDataContByteStreamTool.RodBlockVersion = lar_rodconfig["RodBlockVersion"] + ToolSvc.LArRawDataContByteStreamTool.IncludeDigits = lar_rodconfig["IncludeDigits"] + + + + + + +def main(): + from TrigSimTransforms.rodconfig import get_rod_config + print get_rod_config("17.1.3.4") + return 0 + + +if __name__=="__main__": + import sys + sys.exit(main()) diff --git a/Trigger/TriggerSimulation/TrigSimTransforms/python/rodconfig.py b/Trigger/TriggerSimulation/TrigSimTransforms/python/rodconfig.py new file mode 100755 index 0000000000000000000000000000000000000000..bee9e51e3c984c06f4fb802b32e474e1432f9ae7 --- /dev/null +++ b/Trigger/TriggerSimulation/TrigSimTransforms/python/rodconfig.py @@ -0,0 +1,21 @@ +# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + +# this file provides lookup for the ROD versions of all sub-detectors by release + + + +rodconfig = {} + +rodconfig["17.1.3.4"] = {} + +rodconfig["17.1.3.4"]["LAR"] = {"DSPRunMode" : 4, "RodBlockVersion" : 9, "IncludeDigits" : True } + + +def get_rod_config(trigger_release): + """ + provides ROD version lookup for trigger release + + returns dictionary {"subdetector" -> version} + """ + + return rodconfig[trigger_release] diff --git a/Trigger/TriggerSimulation/TrigSimTransforms/python/trfArgs.py b/Trigger/TriggerSimulation/TrigSimTransforms/python/trfArgs.py new file mode 100644 index 0000000000000000000000000000000000000000..ee5d1a81e0d5446978642b94b21643eebc7f38f7 --- /dev/null +++ b/Trigger/TriggerSimulation/TrigSimTransforms/python/trfArgs.py @@ -0,0 +1,32 @@ +# 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/trfTrigSimUtils.py b/Trigger/TriggerSimulation/TrigSimTransforms/python/trfTrigSimUtils.py new file mode 100644 index 0000000000000000000000000000000000000000..31897db76701bb33423640bc4333606cb2688824 --- /dev/null +++ b/Trigger/TriggerSimulation/TrigSimTransforms/python/trfTrigSimUtils.py @@ -0,0 +1,53 @@ +# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + + +from PyJobTransforms.trfArgClasses import argFactory, argBSFile, argPOOLFile +from PyJobTransforms.trfExe import athenaExecutor + +## @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 = 'TRIGBStoRDO', skeletonFile = 'TrigSimTransforms/skeleton.TRIGBStoRDO.py', + substep = 'tb2tr', inData = [('BS_TRIG','RDO')], outData = ['RDO_TRIG'] + )) + + + +## @brief Add trigger simulation related arguments +def addTrigSimArguments(parser): + parser.defineArgGroup('Trigger', 'Trigger 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') + + parser.add_argument('--inputBS_OLDFile', + type = argFactory( argBSFile, io='input'), + help = 'Input BS file with legacy payload', + group = 'Trigger') + + parser.add_argument('--outputBS_TRIGFile', + type = argFactory( argBSFile, io='output'), + help = 'Output BS file after trigger simulation', + group = 'Trigger') + + parser.add_argument('--inputBS_TRIGFile', + type = argFactory( argBSFile, io='input'), + help = 'Input BS file with trigger data', + group = 'Trigger') + + parser.add_argument('--outputRDO_TRIGFile', + type = argFactory( argPOOLFile, io='output'), + help = 'Output RDO file after trigger and merging', + group = 'Trigger') + diff --git a/Trigger/TriggerSimulation/TrigSimTransforms/scripts/RDOtoBS_tf.py b/Trigger/TriggerSimulation/TrigSimTransforms/scripts/RDOtoBS_tf.py new file mode 100644 index 0000000000000000000000000000000000000000..78d902cb1a5fec38cb27d84e6186166fe9398367 --- /dev/null +++ b/Trigger/TriggerSimulation/TrigSimTransforms/scripts/RDOtoBS_tf.py @@ -0,0 +1,74 @@ +# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + +#------------------------------------------------------------------------------- +def add_RDOtoBS_args(parser): + import PyJobTransforms.trfArgClasses as trfArgClasses + + parser.defineArgGroup('RDOtoBS_trf', 'RDO to BS specific options') + + parser.add_argument('--inputRDOFile', group = 'RDOtoBS_trf', + nargs = '+', + type = trfArgClasses.argFactory( + trfArgClasses.argPOOLFile, + io = 'input', + runarg = True, + type = 'rdo' + ), + help = 'Input RDO file' + ) + + parser.add_argument('--outputBSFile', group = 'RDOtoBS_trf', + type = trfArgClasses.argFactory( + trfArgClasses.argBSFile, + io = 'output', + runarg = True, + type = 'bs' + ), + help = 'Output BS file' + ) + + parser.add_argument('--triggerConfig', group = 'RDOtoBS_trf', + type = trfArgClasses.argFactory( + trfArgClasses.argString, + runarg = True + ), + help = 'Trigger config to be used' + ) + +#------------------------------------------------------------------------------- +def get_transform(): + from PyJobTransforms.transform import transform + from PyJobTransforms.trfExe import athenaExecutor + trf = transform(executor = athenaExecutor( + name = 'RDOtoBS', + skeletonFile = 'TrigSimTransforms/skeleton.RDOtoBS.py', + substep = 'r2b', + )) + + from PyJobTransforms.trfArgs import addAthenaArguments + addAthenaArguments(trf.parser) + + add_RDOtoBS_args(trf.parser) + + return trf + +#------------------------------------------------------------------------------- +if __name__ == "__main__": + import sys + from PyJobTransforms.trfDecorators import stdTrfExceptionHandler, sigUsrStackTrace + + @stdTrfExceptionHandler + @sigUsrStackTrace + def main(): + trf = get_transform() + trf.parseCmdLineArgs(sys.argv[1:]) + trf.execute() + trf.generateReport() + + sys.exit(trf.exitCode) + + + + main() + +#------------------------------------------------------------------------------- diff --git a/Trigger/TriggerSimulation/TrigSimTransforms/scripts/TrigAndReco_tf.py b/Trigger/TriggerSimulation/TrigSimTransforms/scripts/TrigAndReco_tf.py new file mode 100755 index 0000000000000000000000000000000000000000..17cc97a03769f3b0ca75168a3386e97079a88922 --- /dev/null +++ b/Trigger/TriggerSimulation/TrigSimTransforms/scripts/TrigAndReco_tf.py @@ -0,0 +1,62 @@ +#! /usr/bin/env python + +# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + +## TrigAndReco_tf.py - Temporary transform to develop the . +# @version $Id: TrigAndReco_tf.py$ + +import sys +import time + +import logging + +# Setup core logging here +from PyJobTransforms.trfLogger import msg +msg.info('logging set in %s' % sys.argv[0]) + +from PyJobTransforms.transform import transform +from PyJobTransforms.trfExe import athenaExecutor +from PyJobTransforms.trfArgs import addAthenaArguments, addDetectorArguments, addTriggerArguments +from PyJobTransforms.trfDecorators import stdTrfExceptionHandler, sigUsrStackTrace +from RecJobTransforms.recTransformUtils import addAllRecoArgs, addRecoSubsteps + +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'] + +@stdTrfExceptionHandler +@sigUsrStackTrace +def main(): + + msg.info('This is %s' % sys.argv[0]) + + trf = getTransform() + trf.parseCmdLineArgs(sys.argv[1:]) + trf.execute() + trf.generateReport() + + msg.info("%s stopped at %s, trf exit code %d" % (sys.argv[0], time.asctime(), trf.exitCode)) + sys.exit(trf.exitCode) + +def getTransform(): + executorSet = set() + addRecoSubsteps(executorSet) + addTrigSimSubsteps(executorSet) + + 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.') + + addAthenaArguments(trf.parser) + addDetectorArguments(trf.parser) + addTriggerArguments(trf.parser) + addTrigSimArguments(trf.parser) + addAllRecoArgs(trf) + + return trf + + +if __name__ == '__main__': + main() diff --git a/Trigger/TriggerSimulation/TrigSimTransforms/scripts/getLegacySimulationTransforms.sh b/Trigger/TriggerSimulation/TrigSimTransforms/scripts/getLegacySimulationTransforms.sh new file mode 100755 index 0000000000000000000000000000000000000000..0331635d099826eb39edefd32fc44ad0d3b13513 --- /dev/null +++ b/Trigger/TriggerSimulation/TrigSimTransforms/scripts/getLegacySimulationTransforms.sh @@ -0,0 +1,6 @@ +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 -jo printRODVersions.py diff --git a/Trigger/TriggerSimulation/TrigSimTransforms/scripts/printRODVersions.py b/Trigger/TriggerSimulation/TrigSimTransforms/scripts/printRODVersions.py new file mode 100755 index 0000000000000000000000000000000000000000..1d3aa6915ade798006e1ca4c6c5de904e77e365d --- /dev/null +++ b/Trigger/TriggerSimulation/TrigSimTransforms/scripts/printRODVersions.py @@ -0,0 +1,85 @@ +#!/usr/bin/env python + +# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + +import sys +import eformat +from eformat import helper +from collections import defaultdict + +filename = sys.argv[1] +bsfile = eformat.istream(filename) +print "Read file %s with %i events" % (filename,bsfile.total_events) + +event = bsfile[0] + + +rob_by_subdet = defaultdict(list) +subdets = set() + +subdetsData = [ + 'LAR_EM_BARREL_A_SIDE', 'LAR_EM_BARREL_C_SIDE', 'LAR_EM_ENDCAP_A_SIDE', 'LAR_EM_ENDCAP_C_SIDE', 'LAR_FCAL_A_SIDE', 'LAR_FCAL_C_SIDE', 'LAR_HAD_ENDCAP_A_SIDE', 'LAR_HAD_ENDCAP_C_SIDE', + 'MUON_MDT_BARREL_A_SIDE', 'MUON_MDT_BARREL_C_SIDE', 'MUON_MDT_ENDCAP_A_SIDE', 'MUON_MDT_ENDCAP_C_SIDE', 'MUON_RPC_BARREL_A_SIDE', 'MUON_RPC_BARREL_C_SIDE', 'MUON_TGC_ENDCAP_A_SIDE', 'MUON_TGC_ENDCAP_C_SIDE', + 'PIXEL_BARREL', 'PIXEL_B_LAYER', 'PIXEL_DISK_SIDE', + 'SCT_BARREL_A_SIDE', 'SCT_BARREL_C_SIDE', 'SCT_ENDCAP_A_SIDE', 'SCT_ENDCAP_C_SIDE', + 'TDAQ_CALO_CLUSTER_PROC_DAQ', 'TDAQ_CALO_CLUSTER_PROC_ROI', 'TDAQ_CALO_JET_PROC_DAQ', 'TDAQ_CALO_JET_PROC_ROI', 'TDAQ_CALO_PREPROC', + 'TDAQ_CTP', + #'TDAQ_EVENT_FILTER', 'TDAQ_LVL2', + 'TDAQ_MUON_CTP_INTERFACE', + 'TILECAL_BARREL_A_SIDE', 'TILECAL_BARREL_C_SIDE', 'TILECAL_EXT_A_SIDE', 'TILECAL_EXT_C_SIDE', + 'TRT_BARREL_A_SIDE', 'TRT_BARREL_C_SIDE', 'TRT_ENDCAP_A_SIDE', 'TRT_ENDCAP_C_SIDE' + ] + + +first = True +for rob in event: + if first: + first = False + #help(rob) + #print dir(rob) + #print "ROB version",rob.version(),type(rob.version()) + #print "ROB minor version",rob.minor_version() + #print "ROD version",rob.rod_version() + #print "ROB source sub det ID", rob.rob_source_id().subdetector_id() + #print "ROB source sub det ID", dir(rob.rob_source_id().subdetector_id()) + #print "ROB header",rob.header_size_word(),rob.header() + #print "ROD header",len(rob.rod_header()), '[' + ", ".join(["0x%08x" % x for x in rob.rod_header()])+"]" + + # define the key for the dictionary in which we store ROD versions by subdetector + det = rob.rob_source_id().subdetector_group().name + split_index = 10 + if det in ['PIXEL','SCT','TRT','LAR','TILECAL']: + split_index = 1 + if det in ['MUON']: + split_index = 4 + if det in ['TDAQ']: + split_index = 10 + + subdet = rob.rob_source_id().subdetector_id().name + subdets.add(subdet) + key = '_'.join( subdet.split('_')[:split_index] ) + + rob_by_subdet[ key ] += [ rob ] + + + +# print + +width = max([len(s) for s in rob_by_subdet.keys()]+[15]) + 5 + +print "Detector%sROD version%s#ROBs" % (' ' * (width-8), ' ' * (14) ) +print "--------%s-----------%s-----" % ('-' * (width-8), '-' * (14) ) + +for subdet in sorted(rob_by_subdet.keys()): + + roblist = rob_by_subdet[subdet] + + robset = set(["%s" % rob.rod_version() for rob in roblist]) + + print "%-*s%-*s%i" % (width, subdet, 25, ", ".join(robset), len(roblist) ) + +subdet_missing = set(subdetsData) - subdets +if subdet_missing: + print "Missing the following sub detectors in the file:" + for sd in sorted(subdet_missing): + print " ",sd diff --git a/Trigger/TriggerSimulation/TrigSimTransforms/scripts/runLegacySimulation_combined.sh b/Trigger/TriggerSimulation/TrigSimTransforms/scripts/runLegacySimulation_combined.sh new file mode 100755 index 0000000000000000000000000000000000000000..b23e7031c73f0d9e270f847f7f7bbe74c94d5df7 --- /dev/null +++ b/Trigger/TriggerSimulation/TrigSimTransforms/scripts/runLegacySimulation_combined.sh @@ -0,0 +1,22 @@ +WORKDIR=${1:-rdo2trigger2esd} + +echo "Combined workdir: "$WORKDIR +rm -rf $WORKDIR +mkdir $WORKDIR +cd $WORKDIR + +export INPUTRDO="../digiRDO.pool.root" + +export OUTPUTRDO="trigRDO.pool.root" + +echo "Input file : "$INPUTRDO +echo +echo "Output: "$OUTPUTRDO +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 + diff --git a/Trigger/TriggerSimulation/TrigSimTransforms/scripts/runLegacySimulation_digitization.sh b/Trigger/TriggerSimulation/TrigSimTransforms/scripts/runLegacySimulation_digitization.sh new file mode 100755 index 0000000000000000000000000000000000000000..c6b02217deb50accdbaa32af7c6af97fd904bcf7 --- /dev/null +++ b/Trigger/TriggerSimulation/TrigSimTransforms/scripts/runLegacySimulation_digitization.sh @@ -0,0 +1,49 @@ +WORKDIR=${1:-digitization} + +echo "Digitization workdir: "$WORKDIR +rm -rf $WORKDIR +mkdir $WORKDIR +cd $WORKDIR + +INPUTDIR="/afs/cern.ch/work/s/stelzer/LegacySimWorkareaForWernerJoerg/hitfiles" +INPUTHITS="HITS.00857308._000585.pool.root.1" +INPUTMBLOWPT="HITS.743321._[001996,001997,001998,001999,002000].pool.root" +INPUTMBHIGHPT="HITS.743322._[005996,005997,005998,005999,006000].pool.root" + +OUTPUT="digiRDO.pool.root" + +DIGICON=OFLCOND-MC12-SDR-06 +DIGIGEO=ATLAS-GEO-20-00-01 + +echo "Input files dir: "$INPUTDIR +echo "Input hits : "$INPUTHITS +echo "Low pt minbias : "$INPUTMBLOWPT +echo "High pt minbias: "$INPUTMBHIGHPT +echo +echo "Output: "$OUTPUT +echo +echo "Conditions: "$DIGICON +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" diff --git a/Trigger/TriggerSimulation/TrigSimTransforms/scripts/runLegacySimulation_rdo2bs.sh b/Trigger/TriggerSimulation/TrigSimTransforms/scripts/runLegacySimulation_rdo2bs.sh new file mode 100755 index 0000000000000000000000000000000000000000..e445f142b2266f75a6f9c86b19d62b5839d9de4e --- /dev/null +++ b/Trigger/TriggerSimulation/TrigSimTransforms/scripts/runLegacySimulation_rdo2bs.sh @@ -0,0 +1,20 @@ +WORKDIR=${1:-rdo2bs} + +echo "Digitization workdir: "$WORKDIR +rm -rf $WORKDIR +mkdir $WORKDIR +cd $WORKDIR + +export INPUTRDO="../digiRDO.pool.root" + +export OUTPUTBS="digiBS.data" + +echo "Input file : "$INPUTRDO +echo "Output : "$OUTPUTBS +echo "Workdir : "$WORKDIR + +TrigAndReco_tf.py --inputRDOFile $INPUTRDO --outputBS_OLDFile $OUTPUTBS \ +--imf false \ +--triggerConfig 'all=MCRECO:DB:TRIGGERDBMC:325,142,266' \ +> log 2>&1 & + diff --git a/Trigger/TriggerSimulation/TrigSimTransforms/scripts/runLegacySimulation_trigsim.sh b/Trigger/TriggerSimulation/TrigSimTransforms/scripts/runLegacySimulation_trigsim.sh new file mode 100755 index 0000000000000000000000000000000000000000..7c44a3970ec273bf6c31a2756201028fd6d785c5 --- /dev/null +++ b/Trigger/TriggerSimulation/TrigSimTransforms/scripts/runLegacySimulation_trigsim.sh @@ -0,0 +1,34 @@ +WORKDIR=${1:-bs2trigbs} + +echo "Digitization workdir: "$WORKDIR +rm -rf $WORKDIR +mkdir $WORKDIR +cd $WORKDIR + +export INPUTBS="../tmpfiles/tmp.BS_OLD" + +export OUTPUTBS="trigBS.data" + +export DIGICON="OFLCOND-MC12b-SDR-01" +export DIGIGEO="ATLAS-GEO-21-02-02" + +echo "Input file : "$INPUTBS +echo "Output : "$OUTPUTBS +echo +echo "Conditions : "$DIGICON +echo "Geometry : "$DIGIGEO +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 + + + + diff --git a/Trigger/TriggerSimulation/TrigSimTransforms/share/athena_BStoBS.py b/Trigger/TriggerSimulation/TrigSimTransforms/share/athena_BStoBS.py deleted file mode 100644 index 99c801f18ec5d5aa3d550ce5552ab5d0fa35a00c..0000000000000000000000000000000000000000 --- a/Trigger/TriggerSimulation/TrigSimTransforms/share/athena_BStoBS.py +++ /dev/null @@ -1,443 +0,0 @@ -#------------------------------------------------------------------------------- -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 -#------------------------------------------------------------------------------- -log = logging.getLogger("BStoBS.py") -topSequence = AlgSequence() -#------------------------------------------------------------------------------- - -############################# -### SETTING TRIGGER FLAGS ### -############################# - -# Trying manual setup of L1 instead of automatic (throgh L1ConfigGetter). -TriggerFlags.doLVL1 = False -TriggerFlags.doLVL2 = True -TriggerFlags.doEF = True - -TriggerFlags.doTruth.set_Value_and_Lock(False) - -TriggerFlags.doHLTpersistency = True -TriggerFlags.writeBS = True -TriggerFlags.abortOnConfigurationError = True - - - -#TriggerFlags.triggerConfig = _trig # Expected to be set elsewhere - - -TriggerFlags.enableMonitoring = [] - -TriggerFlags.doID = True -TriggerFlags.doMuon = True -TriggerFlags.doCalo = True - -TriggerFlags.CosmicSlice.testCosmic = False - -#------------------------------------------------------------------------------- - -############################ -### SETTING ATHENA FLAGS ### -############################ - -athenaCommonFlags.isOnline.set_Value_and_Lock(False) - -globalflags.DetGeo = "atlas" -globalflags.DataSource = "geant4" - - -#globalflags.DetDescrVersion = _geo # Expected to be set elsewhere -#globalflags.ConditionsTag = _con # Expected to be set elsewhere - -globalflags.Luminosity = "zero" - - -from AthenaCommon.BeamFlags import jobproperties as beamJobProperties -beamJobProperties.Beam.beamType = 'collisions' - - -globalflags.InputFormat = "bytestream" -#athenaCommonFlags.BSRDOInput = [ _i ] # Expected to be set elsewhere - -#------------------------------------------------------------------------------- - -############################################ -### CONFIGUREING LVL1 SIMULATION BY HAND ### -############################################ - -from TrigConfigSvc.TrigConfigSvcConfig import LVL1ConfigSvc -LVL1ConfigSvc = LVL1ConfigSvc("LVL1ConfigSvc") -LVL1ConfigSvc.XMLFile = TriggerFlags.inputLVL1configFile() -LVL1ConfigSvc.CreateLegacyObjects=True - - -include ("TrigT1CaloByteStream/ReadLVL1CaloBS_jobOptions.py") -include ("TrigT1CaloSim/TrigT1CaloSimJobOptions.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 TrigT1CTP.TrigT1CTPConfig import CTPSimulationInReco -topSequence += CTPSimulationInReco("CTPSimulation") -topSequence.CTPSimulation.IsData = False - - - -from TrigT1RoIB.TrigT1RoIBConfig import RoIBuilder -topSequence += RoIBuilder("RoIBuilder") - -#------------------------------------------------------------------------------- - -################################## -### DO THE MAIN CONFIGURATION ### -################################## -# This used to be an include of a modified TriggerRelease/Trigger_topOptions_standalone.py - -#HLTOutputLevel = 3 -#include("TriggerRelease/Trigger_topOptions_standalone.py") - - -############################## -### SETTING DETECTOR FLAGS ### -############################## - -DetFlags.detdescr.ID_setOn() -DetFlags.detdescr.Muon_setOn() -DetFlags.detdescr.Calo_setOn() - -DetFlags.makeRIO.all_setOn() - - - - -from LArConditionsCommon.LArCondFlags import larCondFlags -larCondFlags.LoadElecCalib.set_Value_and_Lock(False) - -# Setup IOVDbSvc -from IOVDbSvc.CondDB import conddb -svcMgr.IOVDbSvc.GlobalTag=globalflags.ConditionsTag() - - -# Original comment: Setting detector geometry -include ("RecExCond/AllDet_detDescr.py") - - - -print "Hest:: not hasattr(svcMgr,'ByteStreamCnvSvc')", not hasattr(svcMgr,"ByteStreamCnvSvc") -if not hasattr(svcMgr,"ByteStreamCnvSvc"): - from ByteStreamCnvSvc import ReadByteStream - # Define the input - svcMgr.ByteStreamInputSvc.FullFileName = athenaCommonFlags.BSRDOInput() - theApp.ExtSvc += [ "ByteStreamCnvSvc"] - -# Online specific setup of BS converters -print "Hest:: ", "\"Online specific setup of BS converters\"" -include( "TriggerRelease/jobOfragment_ReadBS_standalone.py" ) - - - - - - -from InDetTrigRecExample.InDetTrigConfigConditions import \ - PixelConditionsSetup, SCT_ConditionsSetup, TRT_ConditionsSetup - - -print "Hest:: <id>ConditionsSetup(onlineMode=False) breaks something." -PixelConditionsSetup.config(useDCS=False, onlineMode=True, prefix='') -#PixelConditionsSetup.config(useDCS=False, onlineMode=False, prefix='') -PixelConditionsSetup.lock() -PixelConditionsSetup.createSvc() - -SCT_ConditionsSetup.config(useDCS=False, onlineMode=True, prefix='') -#SCT_ConditionsSetup.config(useDCS=False, onlineMode=False, prefix='') -SCT_ConditionsSetup.lock() -SCT_ConditionsSetup.createSvc() - -TRT_ConditionsSetup.config(useDCS=False, onlineMode=True, prefix='') -#TRT_ConditionsSetup.config(useDCS=False, onlineMode=False, prefix='') -TRT_ConditionsSetup.lock() -TRT_ConditionsSetup.createSvc() - -print "Unexplored/unknown include InDetRecCabling ?????" -include( "InDetRecExample/InDetRecCabling.py" ) - - - - - - -from CaloTools.CaloToolsConf import CaloCompactCellTool -svcMgr.ToolSvc += CaloCompactCellTool() - -#if TriggerFlags.doMuon(): -import MuonCnvExample.MuonCablingConfig -import MuonRecExample.MuonReadCalib - -include ("MuonRecExample/MuonRecLoadTools.py") - - -####################### -### MENUS AND STUFF ### -####################### - - -from TriggerMenuPython.GenerateMenu import GenerateMenu -g=GenerateMenu() -g.generate() - - - -from TrigConfigSvc.TrigConfigSvcConfig import SetupTrigConfigSvc - -_svc = SetupTrigConfigSvc() - -_svc.l1XmlFile = TriggerFlags.inputLVL1configFile() if TriggerFlags.readLVL1configFromXML() \ - else TriggerFlags.outputLVL1configFile() - -_svc.hltXmlFile = TriggerFlags.inputHLTconfigFile() if TriggerFlags.readHLTconfigFromXML() \ - else TriggerFlags.outputHLTconfigFile() - - - - - -try: - _svc.SetStates(["xml"]) -except: - log.error('Failed to set state of TrigConfigSvc to ["xml"]') -else: - log.info('State of TrigConfigSvc set to ["xml"]') - - - - -try: - _svc.InitialiseSvc() -except Exception, ex: - log.error( 'Failed to activate TrigConfigSvc: %r' % ex ) - - - -_sl = dict([(svc, getattr(svcMgr, svc)) for svc in ['LVL1ConfigSvc', 'HLTConfigSvc'] if svc in dir(svcMgr)]) - -if TriggerFlags.triggerDbConnection(): - from TrigConfigSvc.TrigConfigSvcUtils import interpretConnection - _conn_param = interpretConnection(TriggerFlags.triggerDbConnection(), resolveAlias=False) - - if "alias" in _conn_param: - for svc in _sl.values(): - svc.ConfigSource = 'DBLookUp' - svc.DBServer = _conn_param["alias"] - svc.DBUser = "" - else: - technology = _conn_param["techno"] - svcMgr.LVL1ConfigSvc.ConfigSource = technology - svcMgr.HLTConfigSvc.ConfigSource = technology - - if technology == 'sqlite': - for svc in _sl.values(): - svc.DBServer = _conn_param["filename"] - svc.DBUser = "dummy" - elif technology == 'oracle': - for svc in _sl.values(): - svc.DBServer = _conn_param["server"] - svc.DBAccount = _conn_param["schema"] - svc.DBUser = _conn_param["user"] - svc.DBPass = _conn_param["passwd"] - - svcMgr.LVL1ConfigSvc.DBSMKey = TriggerFlags.triggerDbKeys()[0] - svcMgr.LVL1ConfigSvc.DBLVL1PSKey = TriggerFlags.triggerDbKeys()[1] - svcMgr.LVL1ConfigSvc.DBBGSKey = TriggerFlags.triggerDbKeys()[3] - - svcMgr.HLTConfigSvc.DBSMKey = TriggerFlags.triggerDbKeys()[0] - svcMgr.HLTConfigSvc.DBHLTPSKey = TriggerFlags.triggerDbKeys()[2] - - -for n, svc in _sl.items(): - print "Hest:::", n, dir(svc) - print - - - -#l2algs, efalgs = ServiceMgr.HLTConfigSvc.getAlgorithmsByLevel() -#print l2algs -#print efalgs - - - - -from TriggerJobOpts.Lvl1TriggerGetter import Lvl1SimulationGetter -lvl1 = Lvl1SimulationGetter() - -from TriggerJobOpts.HLTTriggerGetter import HLTSimulationGetter -hlt = HLTSimulationGetter(g) - - - -#from TriggerJobOpts.TriggerConfigGetter import TriggerConfigGetter -#TriggerConfigGetter() - - -#from TriggerJobOpts.Lvl1TriggerOnlineGetter import Lvl1SimulationGetter -#from TriggerJobOpts.Lvl1TriggerGetter import Lvl1SimulationGetter -#lvl1 = Lvl1SimulationGetter() - - -rng = getattr(ToolSvc,'HLT::RandomScaler') -rng.useEventSeed = True -#EF gets an extra seed "hash-offset" of 1 to make it independent of L2 -rng.config(seed=int(TriggerFlags.doEF()), luxury=2) - -### End of the mess..... -############################### - -# Must make sure that no OutStream's have been declared -theApp.OutStream = [] - -# Enable Aditors (i.e. AlgContextAuditor to get algorithm stack in CoreDumpSvc) -theApp.AuditAlgorithms = True - - - - - - - - - -#------------------------------------------------------------------------------- - -######################################## -### POST CONFIGURE RERUNNING OF LVL1 ### -######################################## - -#Not tested if necessary -svcMgr.ByteStreamAddressProviderSvc.TypeNames += [ "MuCTPI_RIO/MUCTPI_RIO", "CTP_RIO/CTP_RIO" ] - - -#------------------------------------------------------------------------------- - -##################### -### Define output ### -##################### - -#athenaCommonFlags.BSRDOOutput = _o # Expected to be set elsewhere -from ByteStreamCnvSvc import WriteByteStream -StreamBSFileOutput = WriteByteStream.getStream("EventStorage","StreamBSFileOutput") -print "Hest: ", StreamBSFileOutput -print "Hest: ", StreamBSFileOutput.__class__ -StreamBSFileOutput.OutputFile = athenaCommonFlags.BSRDOOutput() -ServiceMgr.ByteStreamCnvSvc.IsSimulation = True - - -""" -# 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 += [ "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 ### -################### - -theApp.EvtMax = -1 - -svcMgr.StoreGateSvc.Dump = True - -print svcMgr - -#------------------------------------------------------------------------------- diff --git a/Trigger/TriggerSimulation/TrigSimTransforms/share/athena_BStoBS_Example.py b/Trigger/TriggerSimulation/TrigSimTransforms/share/athena_BStoBS_Example.py index 85e0038b18429c8f4ba965162d2094a391888e14..765c6872b21dc6a1be63f76fec72bb7bda9b1045 100644 --- a/Trigger/TriggerSimulation/TrigSimTransforms/share/athena_BStoBS_Example.py +++ b/Trigger/TriggerSimulation/TrigSimTransforms/share/athena_BStoBS_Example.py @@ -1,15 +1,16 @@ from AthenaCommon.AthenaCommonFlags import athenaCommonFlags -athenaCommonFlags.BSRDOInput.set_Value_and_Lock(["step2.x.RDOBS.data"]) -athenaCommonFlags.BSRDOOutput.set_Value_and_Lock("step3.x.RDOBS.data") +athenaCommonFlags.BSRDOInput.set_Value_and_Lock([os.getenv('INPUTBS',"digiBS.data")]) +athenaCommonFlags.BSRDOOutput.set_Value_and_Lock(os.getenv('OUTPUTBS',"trigBS.data")) from TriggerJobOpts.TriggerFlags import TriggerFlags TriggerFlags.triggerConfig.set_Value_and_Lock("MCRECO:MC_pp_v2_loose_mc_prescale") from AthenaCommon.GlobalFlags import globalflags -globalflags.DetDescrVersion = "ATLAS-GEO-18-01-01" -globalflags.ConditionsTag = "OFLCOND-MC12-SDR-06" +globalflags.ConditionsTag = os.getenv('DIGICON',"OFLCOND-MC12-SDR-06") +globalflags.DetDescrVersion = os.getenv('DIGIGEO',"ATLAS-GEO-18-01-01") + include("TrigSimTransforms/athena_BStoBS.py") diff --git a/Trigger/TriggerSimulation/TrigSimTransforms/share/athena_RDOtoBS.py b/Trigger/TriggerSimulation/TrigSimTransforms/share/athena_RDOtoBS.py index 1fba8687f1246dde824c13d9f8a8783e93fb6529..7a46d195632bb0d4f6b25318022f1107344417f2 100644 --- a/Trigger/TriggerSimulation/TrigSimTransforms/share/athena_RDOtoBS.py +++ b/Trigger/TriggerSimulation/TrigSimTransforms/share/athena_RDOtoBS.py @@ -1,25 +1,52 @@ +# this runs + + +## Algorithm AthSequencer/TopAlg: +## 'EventCounter/EventCounter', +## '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', +## 'LVL1::TrigT1MBTS/LVL1::TrigT1MBTS', +## 'MuonRdoToMuonDigit/MuonRdoToMuonDigit', +## 'TrigT1RPC/TrigT1RPC', +## 'LVL1TGCTrigger::LVL1TGCTrigger/LVL1TGCTrigger', +## 'LVL1MUCTPI::L1Muctpi/L1Muctpi', +## 'LVL1::TrigT1BCM/LVL1::TrigT1BCM', +## 'LVL1::TrigT1TRT/LVL1::TrigT1TRT', +## 'LVL1::TrigT1ZDC/LVL1::TrigT1ZDC', +## 'LVL1CTP::CTPSimulation/CTPSimulation', +## 'ROIB::RoIBuilder/RoIBuilder', +## 'JetGlobalEventSetup/JetGlobalEventSetup', +## 'JobInfo/JobInfo', +## 'CreateLumiBlockCollectionFromFile/CreateLumiBlockCollectionFromFile'] + + #------------------------------------------------------------------------------- -# Author: Gorm Galster <gorm.galster@cern.ch> +# Authors: Gorm Galster <gorm.galster@cern.ch> +# Joerg Stelzer <stelzer@cern.ch> # Date: ~ December, 2012 -# About: A job options file to convert a RDO fresh from digitization to a +# About: A job options file to convert a RDO from digitization to a # byte stream file. Apparently this seem to require the running of # L1 trigger. The L1 result is stripped (EventHeader info is NOT # stripped at this point) #------------------------------------------------------------------------------- -#from PyJobTransformsCore.runargs import RunArguments -#runArgs = RunArguments() -#runArgs.maxEvents = -1 -#------------------------------------------------------------------------------- + + try: include("PATJobTransforms/CommonSkeletonJobOptions.py") except NameError as e: if not str(e) == "name 'runArgs' is not defined": raise e + #------------------------------------------------------------------------------- from AthenaCommon.GlobalFlags import globalflags globalflags.DetGeo = "atlas" globalflags.DataSource = "geant4" -#globalflags.DetDescrVersion = _geo # Ecpected to be set elsewhere -#globalflags.ConditionsTag = _con # Ecpected to be set elsewhere #------------------------------------------------------------------------------- from AthenaCommon.AppMgr import ToolSvc @@ -27,84 +54,121 @@ from AthenaCommon.AppMgr import ToolSvc rec.doAOD.set_Value_and_Lock(False) rec.doESD.set_Value_and_Lock(False) -# As a 0th order, don't pretend to write *anything* +# Enable BS writing +rec.doWriteBS.set_Value_and_Lock(True) rec.doWriteBS = False rec.doWriteRDO = False rec.doWriteESD = False rec.doWriteAOD = False rec.doWriteTAG = False -rec.doWriteTAGCOM = False +rec.doWriteTAGCOM = False -# As a 0th order, don't pretend to read *anything* -rec.readRDO = False -rec.readESD = False -rec.readAOD = False -rec.readTAG = False +# Define input +rec.readRDO.set_Value_and_Lock(True) +rec.readESD = False +rec.readAOD = False +rec.readTAG = False +globalflags.InputFormat.set_Value_and_Lock('pool') -# Do trigger, damn it. +# Do trigger rec.doTrigger.set_Value_and_Lock(True) recAlgs.doTrigger.set_Value_and_Lock(True) # Config trigger -TriggerFlags.doLVL1.set_Value_and_Lock(True) +TriggerFlags.doLVL1.set_Value_and_Lock(True) # this should be disabled in the future TriggerFlags.doLVL2.set_Value_and_Lock(False) TriggerFlags.doEF.set_Value_and_Lock(False) #------------------------------------------------------------------------------- -#TriggerFlags.triggerConfig.set_Value_and_Lock(env["TRIGCONF"]) # Expected to be set elsewhere. TriggerFlags.configurationSourceList.set_Value_and_Lock(["xml"]) # Forget truth rec.doTruth.set_Value_and_Lock(False) -# Define input data -rec.readRDO.set_Value_and_Lock(True) -globalflags.InputFormat.set_Value_and_Lock('pool') -#athenaCommonFlags.PoolRDOInput.set_Value_and_Lock([_i]) # Expected to be set elsewhere +# Follow the "normal" reco +include("RecExCommon/RecExCommon_topOptions.py") -# Define output data -rec.doWriteBS.set_Value_and_Lock(True) -#athenaCommonFlags.BSRDOOutput.set_Value_and_Lock(_o) # Expected to be set elsewhere +theApp.EvtMax = runArgs.maxEvents +#theApp.SkipEvents = 7 +from TrigSimTransforms.rdo2bs_rodversion_setup import rod_version_setup -# Follow the "normal" reco -include("RecExCommon/RecExCommon_topOptions.py") +rod_version_setup("17.1.3.4") -theApp.EvtMax = -1 # Blacklist the following modules, they are not wanted at this point -_blacklist = ["CTP_RDO#*", "MuCTPI_RDO#*", "HLT::HLTResult#*", "ROIB::RoIBResult#*", ] -_blacklist += [ "DataVector<LVL1::TriggerTower>#TriggerTowers" ] -_blacklist += [ "LVL1::JEPBSCollection#JEPBSCollection" ] # -_blacklist += [ "LVL1::JEPRoIBSCollection#JEPRoIBSCollection" ] -_blacklist += [ "LVL1::CPBSCollection#CPBSCollection" ] # -_blacklist += [ "DataVector<LVL1::CPMRoI>#CPMRoIs" ] - -""" -_blacklist = [ "CTP_RDO#*" ] -_blacklist += [ "DataVector<LVL1::CMMCPHits>#*" ] -_blacklist += [ "DataVector<LVL1::CMMEtSums>#*" ] -_blacklist += [ "DataVector<LVL1::CMMJetHits>#*" ] -_blacklist += [ "DataVector<LVL1::CPMHits>#*" ] -_blacklist += [ "DataVector<LVL1::CPMRoI>#*" ] -_blacklist += [ "DataVector<LVL1::CPMTower>#*" ] -_blacklist += [ "DataVector<LVL1::JEMEtSums>#*" ] -_blacklist += [ "DataVector<LVL1::JEMHits>#*" ] -_blacklist += [ "DataVector<LVL1::JEMRoI>#*" ] -_blacklist += [ "DataVector<LVL1::JetElement>#*" ] -_blacklist += [ "HLT::HLTResult#*" ] -_blacklist += [ "LVL1::CMMRoI#*" ] -_blacklist += [ "LVL1::CPBSCollection#*" ] -_blacklist += [ "LVL1::JEPBSCollection#*" ] -_blacklist += [ "LVL1::JEPRoIBSCollection#*" ] -_blacklist += [ "MuCTPI_RDO#*" ] -_blacklist += [ "ROIB::RoIBResult#*" ] -""" -StreamBSFileOutput.ItemList = [f for f in StreamBSFileOutput.ItemList if f not in _blacklist] - +_blacklist = [] +#_blacklist += [ "CTP_RDO#*", "MuCTPI_RDO#*", "HLT::HLTResult#*", "ROIB::RoIBResult#*", ] +#_blacklist += [ "DataVector<LVL1::TriggerTower>#TriggerTowers" ] +#_blacklist += [ "LVL1::JEPBSCollection#JEPBSCollection" ] # +#_blacklist += [ "LVL1::JEPRoIBSCollection#JEPRoIBSCollection" ] +#_blacklist += [ "LVL1::CPBSCollection#CPBSCollection" ] # +#_blacklist += [ "DataVector<LVL1::CPMRoI>#CPMRoIs" ] + +## _blacklist = [ "CTP_RDO#*" ] +## _blacklist += [ "DataVector<LVL1::CMMCPHits>#*" ] +## _blacklist += [ "DataVector<LVL1::CMMEtSums>#*" ] +## _blacklist += [ "DataVector<LVL1::CMMJetHits>#*" ] +## _blacklist += [ "DataVector<LVL1::CPMHits>#*" ] +## _blacklist += [ "DataVector<LVL1::CPMRoI>#*" ] +## _blacklist += [ "DataVector<LVL1::CPMTower>#*" ] +## _blacklist += [ "DataVector<LVL1::JEMEtSums>#*" ] +## _blacklist += [ "DataVector<LVL1::JEMHits>#*" ] +## _blacklist += [ "DataVector<LVL1::JEMRoI>#*" ] +## _blacklist += [ "DataVector<LVL1::JetElement>#*" ] +## _blacklist += [ "HLT::HLTResult#*" ] +## _blacklist += [ "LVL1::CMMRoI#*" ] +## _blacklist += [ "LVL1::CPBSCollection#*" ] +## _blacklist += [ "LVL1::JEPBSCollection#*" ] +## _blacklist += [ "LVL1::JEPRoIBSCollection#*" ] +## _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 += [ "TileRawChannelContainer#*" ] +StreamBSFileOutput.ItemList += [ "TileTTL1Container#*" ] +StreamBSFileOutput.ItemList += [ "LVL1::MbtsCTP#*" ] del _blacklist +print "JOERG These collections are in StreamBSFileOutput" +for coll in StreamBSFileOutput.ItemList: + print " ",coll + + + +from ByteStreamCnvSvc.ByteStreamCnvSvcConf import ByteStreamEventStorageOutputSvc + +svcMgr.ByteStreamCnvSvc + # Gimme some good ol debug svcMgr.StoreGateSvc.Dump = True + +print "All Services:" +for svc in svcMgr.getChildren(): + print " ",svc + +from AthenaCommon.AppMgr import theApp +#theApp.EvtMax = 1 +#theApp.SkipEvents = 2 + +svcMgr.ByteStreamCnvSvc.OutputLevel = DEBUG + + +svcMgr.ByteStreamEventStorageOutputSvc.OutputLevel = DEBUG + +ToolSvc.LArRawDataContByteStreamTool.OutputLevel = VERBOSE +ToolSvc.LArRawDataContByteStreamTool.DSPRunMode = 4 +ToolSvc.LArRawDataContByteStreamTool.RodBlockVersion = 10 + +MessageSvc.debugLimit = 100000 +from AthenaCommon.AlgSequence import AlgSequence +topSequence = AlgSequence() + +print "Algorithms" +import AthenaCommon.Configurable as Configurable +Configurable.log.setLevel( INFO ) +print topSequence + diff --git a/Trigger/TriggerSimulation/TrigSimTransforms/share/athena_RDOtoBS_Example.py b/Trigger/TriggerSimulation/TrigSimTransforms/share/athena_RDOtoBS_Example.py index d3dcc1f71f94dbc570c82809b527ff2a452ab1b6..0052a3b05485eee3b3d9cac55c1424eb128c132e 100644 --- a/Trigger/TriggerSimulation/TrigSimTransforms/share/athena_RDOtoBS_Example.py +++ b/Trigger/TriggerSimulation/TrigSimTransforms/share/athena_RDOtoBS_Example.py @@ -1,15 +1,15 @@ - +import os from AthenaCommon.AthenaCommonFlags import athenaCommonFlags -athenaCommonFlags.PoolRDOInput.set_Value_and_Lock(["step1.x.RDO.pool.root"]) -athenaCommonFlags.BSRDOOutput.set_Value_and_Lock("step2.x.RDOBS.data") +athenaCommonFlags.PoolRDOInput.set_Value_and_Lock([ os.getenv('INPUTRDO',"../digiRDO.pool.root") ]) +athenaCommonFlags.BSRDOOutput.set_Value_and_Lock( os.getenv('OUTPUTBS',"digiBS.data") ) from TriggerJobOpts.TriggerFlags import TriggerFlags TriggerFlags.triggerConfig.set_Value_and_Lock("MCRECO:MC_pp_v2_loose_mc_prescale") from AthenaCommon.GlobalFlags import globalflags -globalflags.DetDescrVersion = "ATLAS-GEO-18-01-01" -globalflags.ConditionsTag = "OFLCOND-MC12-SDR-06" +globalflags.ConditionsTag = os.getenv('DIGICON',"OFLCOND-MC12-SDR-06") +globalflags.DetDescrVersion = os.getenv('DIGIGEO',"ATLAS-GEO-18-01-01") include("TrigSimTransforms/athena_RDOtoBS.py") diff --git a/Trigger/TriggerSimulation/TrigSimTransforms/share/skeleton.BStoTRIGBS.fails.py b/Trigger/TriggerSimulation/TrigSimTransforms/share/skeleton.BStoTRIGBS.fails.py new file mode 100644 index 0000000000000000000000000000000000000000..ea53c9a07c09635f014c2ee7363b788fd75d9f9e --- /dev/null +++ b/Trigger/TriggerSimulation/TrigSimTransforms/share/skeleton.BStoTRIGBS.fails.py @@ -0,0 +1,517 @@ + + +## 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 + +# runargs ------------------------------------------------------------------------------- + + +# setting input and output from runArgs +athenaCommonFlags.BSRDOInput.set_Value_and_Lock( runArgs.inputBS_OLDFile ) +athenaCommonFlags.BSRDOOutput.set_Value_and_Lock( runArgs.outputBS_TRIGFile ) + +# setting trigger configuration from runArgs +TriggerFlags.triggerConfig.set_Value_and_Lock( runArgs.triggerConfig ) + +globalflags.DetDescrVersion = runArgs.geometryVersion +globalflags.ConditionsTag = runArgs.conditionsTag + + + + + + +topSequence = AlgSequence() + +##################################################### +# +# Setting trigger flags +# +##################################################### + + +# Trying manual setup of L1 instead of automatic (throgh L1ConfigGetter). +TriggerFlags.doLVL1 = False +TriggerFlags.doLVL2 = True +TriggerFlags.doEF = True + +TriggerFlags.doTruth.set_Value_and_Lock(False) + +TriggerFlags.doHLTpersistency = True +TriggerFlags.writeBS = True +TriggerFlags.abortOnConfigurationError = True + +TriggerFlags.enableMonitoring = [] + +TriggerFlags.doID = True +TriggerFlags.doMuon = True +TriggerFlags.doCalo = True + +TriggerFlags.CosmicSlice.testCosmic = False + +#------------------------------------------------------------------------------- + +##################################################### +# +# Athena flags +# +##################################################### + + +athenaCommonFlags.isOnline.set_Value_and_Lock(False) + +globalflags.DetGeo = "atlas" +globalflags.DataSource = "geant4" +globalflags.Luminosity = "zero" + + +from AthenaCommon.BeamFlags import jobproperties as beamJobProperties +beamJobProperties.Beam.beamType = 'collisions' +globalflags.InputFormat = "bytestream" + +#------------------------------------------------------------------------------- + +##################################################### +# +# LVL1 simulation +# +##################################################### + +from TrigConfigSvc.TrigConfigSvcConfig import LVL1ConfigSvc +LVL1ConfigSvc = LVL1ConfigSvc("LVL1ConfigSvc") +LVL1ConfigSvc.XMLFile = TriggerFlags.inputLVL1configFile() +#LVL1ConfigSvc.CreateLegacyObjects=True + + + + +include ("TrigT1CaloByteStream/ReadLVL1CaloBS_jobOptions.py") +include ("TrigT1CaloSim/TrigT1CaloSimJobOptions.py" ) + +print "JOERG after including T1Calo simulation" +print topSequence.getChildren() + +toRemove = [c for c in topSequence.getChildren() if c.name()=='TriggerTowerMaker'] +for x in toRemove: + topSequence.remove(x) + +print "JOERG after removing TriggerTowerMaker" +print topSequence.getChildren() + +from TrigT1MBTS.TrigT1MBTSConf import LVL1__TrigT1MBTS +topSequence += LVL1__TrigT1MBTS() + +from TrigT1BCM.TrigT1BCMConf import LVL1__TrigT1BCM +topSequence += LVL1__TrigT1BCM() + +from TrigT1Lucid.TrigT1LucidConf import LVL1__TrigT1Lucid +topSequence += LVL1__TrigT1Lucid() + +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 TrigT1CTP.TrigT1CTPConfig import CTPSimulationInReco +topSequence += CTPSimulationInReco("CTPSimulation") +topSequence.CTPSimulation.IsData = False + + + +from TrigT1RoIB.TrigT1RoIBConfig import RoIBuilder +topSequence += RoIBuilder("RoIBuilder") + +#------------------------------------------------------------------------------- + +################################## +### DO THE MAIN CONFIGURATION ### +################################## +# This used to be an include of a modified TriggerRelease/Trigger_topOptions_standalone.py + +#HLTOutputLevel = 3 +#include("TriggerRelease/Trigger_topOptions_standalone.py") + + +############################## +### SETTING DETECTOR FLAGS ### +############################## + +DetFlags.detdescr.ID_setOn() +DetFlags.detdescr.Muon_setOn() +DetFlags.detdescr.Calo_setOn() + +DetFlags.makeRIO.all_setOn() + + + + +from LArConditionsCommon.LArCondFlags import larCondFlags +larCondFlags.LoadElecCalib.set_Value_and_Lock(False) + +# Setup IOVDbSvc +from IOVDbSvc.CondDB import conddb +svcMgr.IOVDbSvc.GlobalTag=globalflags.ConditionsTag() + + +# Original comment: Setting detector geometry +include ("RecExCond/AllDet_detDescr.py") + +if not hasattr(svcMgr,"ByteStreamCnvSvc"): + from ByteStreamCnvSvc import ReadByteStream + # Define the input + svcMgr.ByteStreamInputSvc.FullFileName = athenaCommonFlags.BSRDOInput() + theApp.ExtSvc += [ "ByteStreamCnvSvc"] + +# Online specific setup of BS converters +include( "TriggerRelease/jobOfragment_ReadBS_standalone.py" ) + + + +from InDetTrigRecExample.InDetTrigConfigConditions import \ + PixelConditionsSetup, SCT_ConditionsSetup, TRT_ConditionsSetup + + +PixelConditionsSetup.config(useDCS=False, onlineMode=True, prefix='') +#PixelConditionsSetup.config(useDCS=False, onlineMode=False, prefix='') +PixelConditionsSetup.lock() +PixelConditionsSetup.createSvc() + +SCT_ConditionsSetup.config(useDCS=False, onlineMode=True, prefix='') +#SCT_ConditionsSetup.config(useDCS=False, onlineMode=False, prefix='') +SCT_ConditionsSetup.lock() +SCT_ConditionsSetup.createSvc() + +TRT_ConditionsSetup.config(useDCS=False, onlineMode=True, prefix='') +#TRT_ConditionsSetup.config(useDCS=False, onlineMode=False, prefix='') +TRT_ConditionsSetup.lock() +TRT_ConditionsSetup.createSvc() + +include( "InDetRecExample/InDetRecCabling.py" ) + + + + + + +from CaloTools.CaloToolsConf import CaloCompactCellTool +svcMgr.ToolSvc += CaloCompactCellTool() + +#if TriggerFlags.doMuon(): + +from MuonByteStream.MuonByteStreamFlags import muonByteStreamFlags +muonByteStreamFlags.RpcDataType = 'atlas' +muonByteStreamFlags.MdtDataType = 'atlas' +muonByteStreamFlags.TgcDataType = 'atlas' + +import MuonCnvExample.MuonCablingConfig +import MuonRecExample.MuonReadCalib + +include ("MuonRecExample/MuonRecLoadTools.py") + + +####################### +### MENUS AND STUFF ### +####################### + + +from TriggerMenuPython.GenerateMenu import GenerateMenu +GenerateMenu().generate() + + + +from TrigConfigSvc.TrigConfigSvcConfig import SetupTrigConfigSvc + +_svc = SetupTrigConfigSvc() + +_svc.l1XmlFile = TriggerFlags.inputLVL1configFile() if TriggerFlags.readLVL1configFromXML() \ + else TriggerFlags.outputLVL1configFile() + +_svc.hltXmlFile = TriggerFlags.inputHLTconfigFile() if TriggerFlags.readHLTconfigFromXML() \ + else TriggerFlags.outputHLTconfigFile() + + + + + +try: + _svc.SetStates(["xml"]) +except: + log.error('Failed to set state of TrigConfigSvc to ["xml"]') +else: + log.info('State of TrigConfigSvc set to ["xml"]') + + + + +try: + _svc.InitialiseSvc() +except Exception, ex: + log.error( 'Failed to activate TrigConfigSvc: %r' % ex ) + + + +_sl = dict([(svc, getattr(svcMgr, svc)) for svc in ['LVL1ConfigSvc', 'HLTConfigSvc'] if svc in dir(svcMgr)]) + +if TriggerFlags.triggerDbConnection(): + from TrigConfigSvc.TrigConfigSvcUtils import interpretConnection + _conn_param = interpretConnection(TriggerFlags.triggerDbConnection(), resolveAlias=False) + + if "alias" in _conn_param: + for svc in _sl.values(): + svc.ConfigSource = 'DBLookUp' + svc.DBServer = _conn_param["alias"] + svc.DBUser = "" + else: + technology = _conn_param["techno"] + svcMgr.LVL1ConfigSvc.ConfigSource = technology + svcMgr.HLTConfigSvc.ConfigSource = technology + + if technology == 'sqlite': + for svc in _sl.values(): + svc.DBServer = _conn_param["filename"] + svc.DBUser = "dummy" + elif technology == 'oracle': + for svc in _sl.values(): + svc.DBServer = _conn_param["server"] + svc.DBAccount = _conn_param["schema"] + svc.DBUser = _conn_param["user"] + svc.DBPass = _conn_param["passwd"] + + svcMgr.LVL1ConfigSvc.DBSMKey = TriggerFlags.triggerDbKeys()[0] + svcMgr.LVL1ConfigSvc.DBLVL1PSKey = TriggerFlags.triggerDbKeys()[1] + svcMgr.LVL1ConfigSvc.DBBGSKey = TriggerFlags.triggerDbKeys()[3] + + svcMgr.HLTConfigSvc.DBSMKey = TriggerFlags.triggerDbKeys()[0] + svcMgr.HLTConfigSvc.DBHLTPSKey = TriggerFlags.triggerDbKeys()[2] + + +for n, svc in _sl.items(): + log.info("Service %s %r" % (n, dir(svc)) ) + + + +from TriggerJobOpts.Lvl1TriggerGetter import Lvl1SimulationGetter +lvl1 = Lvl1SimulationGetter() + +from TriggerJobOpts.HLTTriggerGetter import HLTSimulationGetter +hlt = HLTSimulationGetter() + + + +rng = getattr(ToolSvc,'HLT::RandomScaler') +rng.useEventSeed = True +#EF gets an extra seed "hash-offset" of 1 to make it independent of L2 +rng.config(seed=int(TriggerFlags.doEF()), luxury=2) + +### End of the mess..... +############################### + + + + + +# Must make sure that no OutStream's have been declared +theApp.OutStream = [] + +# Enable Aditors (i.e. AlgContextAuditor to get algorithm stack in CoreDumpSvc) +theApp.AuditAlgorithms = True + + + +#------------------------------------------------------------------------------- + +######################################## +# +# POST CONFIGURE RERUNNING OF LVL1 +# +######################################## + +# Not tested if necessary +svcMgr.ByteStreamAddressProviderSvc.TypeNames += [ "MuCTPI_RIO/MUCTPI_RIO", "CTP_RIO/CTP_RIO" ] + + +#------------------------------------------------------------------------------- + +######################################## +# +# Define output +# +######################################## + +#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 + + + +### # 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 += [ "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 ### +################### + +theApp.EvtMax = runArgs.maxEvents + +svcMgr.StoreGateSvc.Dump = True + +print svcMgr + +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 + + +from AthenaCommon.AlgSequence import AlgSequence +topSequence = AlgSequence() + +print "Joerg Algorithms" +import AthenaCommon.Configurable as Configurable +Configurable.log.setLevel( INFO ) +print topSequence.getChildren() +print topSequence + + + +from TrigSteerMonitor.TrigSteerMonitorConf import TrigChainMoni +chainMoni = TrigChainMoni() +chainMoni.OutputLevel=VERBOSE +topSequence.TrigSteer_L2.MonTools += [chainMoni] +topSequence.TrigSteer_EF.MonTools += [chainMoni] + + +#------------------------------------------------------------------------------- + +log.info("="*20 + " End of BStoTRIGBS " + "="*20) diff --git a/Trigger/TriggerSimulation/TrigSimTransforms/share/skeleton.BStoTRIGBS.py b/Trigger/TriggerSimulation/TrigSimTransforms/share/skeleton.BStoTRIGBS.py new file mode 100644 index 0000000000000000000000000000000000000000..e2d630679e6f5cdd843cc550f724bad0d8bc9390 --- /dev/null +++ b/Trigger/TriggerSimulation/TrigSimTransforms/share/skeleton.BStoTRIGBS.py @@ -0,0 +1,599 @@ + + +## 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 +theTileHitVecToCnt=TileHitVecToCnt() +theTileHitVecToCnt.TileHitVectors=["TileHitVec"] +theTileHitVecToCnt.TileInfoName="TileInfo" +theTileHitVecToCnt.RndmEvtOverlay = True +# +## sets output key +theTileHitVecToCnt.TileHitContainer= "TileHitCnt" +from Digitization.DigitizationFlags import jobproperties +theTileHitVecToCnt.RndmSvc=jobproperties.Digitization.rndmSvc() +jobproperties.Digitization.rndmSeedList.addSeed("Tile_HitVecToCnt", 4789899, 989240512) + +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_TRIGFile ) + +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( "auto" ) + + +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 new file mode 100644 index 0000000000000000000000000000000000000000..c544650b41a244b8e89b308826018d59f800d526 --- /dev/null +++ b/Trigger/TriggerSimulation/TrigSimTransforms/share/skeleton.RDOtoBS.py @@ -0,0 +1,25 @@ +import logging +log = logging.getLogger("RDOtoBS") + +log.info("="*20 + "Beginning of RDOtoBS" + "="*20) + +# Input and output +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 ) + +# Trigger configuration +from TriggerJobOpts.TriggerFlags import TriggerFlags +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" + +include("TrigSimTransforms/athena_RDOtoBS.py") + + +log.info("="*20 + "End of RDOtoBS" + "="*20) diff --git a/Trigger/TriggerSimulation/TrigSimTransforms/share/skeleton.TRIGBStoRDO.py b/Trigger/TriggerSimulation/TrigSimTransforms/share/skeleton.TRIGBStoRDO.py new file mode 100644 index 0000000000000000000000000000000000000000..b5e41f9de8ff8bc3edfe4e21465259ed53fe6ddb --- /dev/null +++ b/Trigger/TriggerSimulation/TrigSimTransforms/share/skeleton.TRIGBStoRDO.py @@ -0,0 +1,9 @@ + +from AthenaCommon.AthenaCommonFlags import athenaCommonFlags +# input +athenaCommonFlags.PoolRDOInput = runArgs.inputRDOFile +athenaCommonFlags.BSRDOInput = runArgs.inputBS_TRIGFile +# output +athenaCommonFlags.PoolRDOOutput = runArgs.outputRDO_TRIGFile + +include("TrigSimTransforms/MergingEventLoopMgr_TriggerBSandRDOtoRDO.py") diff --git a/Trigger/TriggerSimulation/TrigSimTransforms/src/MergingEventLoopMgr.cxx b/Trigger/TriggerSimulation/TrigSimTransforms/src/MergingEventLoopMgr.cxx index ee3160e33305bf41e8af4fc646959fd47b2ed466..119eaad1d103cb41dc207660e34c062fa7c49e0f 100644 --- a/Trigger/TriggerSimulation/TrigSimTransforms/src/MergingEventLoopMgr.cxx +++ b/Trigger/TriggerSimulation/TrigSimTransforms/src/MergingEventLoopMgr.cxx @@ -65,11 +65,11 @@ * Define some dummy class in some protected/controled namespace to avoid * clashing with the intended behaviour of the function. */ -namespace TrigSim { - namespace Backdoor { - class DSfromSG; // DetectoreStore from StoreGate - } -} +// namespace TrigSim { +// namespace Backdoor { +// class DSfromSG; // DetectoreStore from StoreGate +// } +// } /* * I found the following templated function suitable: * @@ -80,10 +80,10 @@ namespace TrigSim { * In the function definition one can of cause access private data members, but * we will still have to respect the function prototype: */ -template <> -TrigSim::Backdoor::DSfromSG* StoreGateSvc::retrieve<TrigSim::Backdoor::DSfromSG>() { - return (TrigSim::Backdoor::DSfromSG *) m_pStore; -} +// template <> +// TrigSim::Backdoor::DSfromSG* StoreGateSvc::retrieve<TrigSim::Backdoor::DSfromSG>() { +// return (TrigSim::Backdoor::DSfromSG *) m_pStore; +// } /* * Usage will be: * @@ -471,10 +471,11 @@ namespace TrigSim { * but for current purposes, events lines up nicely */ - if(pPrimEvt->event_ID()->event_number() != pSecEvt->event_ID()->event_number() + if( pPrimEvt == 0 || pSecEvt == 0 + || pPrimEvt->event_ID()->event_number() != pSecEvt->event_ID()->event_number() || pPrimEvt->event_ID()->run_number() != pSecEvt->event_ID()->run_number()) { - m_log << MSG::ERROR << "EventInfo for primary and secondary differs. This scenario has NOT been counted for (yet)." + m_log << MSG::ERROR << "EventInfo for primary and secondary differs or could not be retreived. This scenario has NOT been counted for (yet)." << endreq; sc = StatusCode::FAILURE; break; @@ -655,10 +656,9 @@ namespace TrigSim { /* * Get DataStore handles */ - SG::DataStore *primDataStore = (SG::DataStore *)m_primEvtStore->retrieve<Backdoor::DSfromSG>(); - SG::DataStore *secDataStore = (SG::DataStore *)m_secEvtStore->retrieve<Backdoor::DSfromSG>(); + // SG::DataStore *primDataStore = (SG::DataStore *)m_primEvtStore->retrieve<Backdoor::DSfromSG>(); + // SG::DataStore *secDataStore = (SG::DataStore *)m_secEvtStore->retrieve<Backdoor::DSfromSG>(); - /* * Setup sharing of the primary proxies @@ -674,7 +674,8 @@ namespace TrigSim { //<< " Proxy is " << (it->second->isValid() ? "" : "NOT ") << "valid" << endreq; - sc = secDataStore->addToStore(it->second->address()->clID(), it->second); + // sc = secDataStore->addToStore(it->second->address()->clID(), it->second); + sc = m_secEvtStore->addToStore(it->second->address()->clID(), it->second); if(sc.isFailure()) break; } @@ -697,7 +698,8 @@ namespace TrigSim { //<< " Proxy is " << (it->second->isValid() ? "" : "NOT ") << "valid" << endreq; - sc = primDataStore->addToStore(it->second->address()->clID(), it->second); + // sc = primDataStore->addToStore(it->second->address()->clID(), it->second); + sc = m_primEvtStore->addToStore(it->second->address()->clID(), it->second); if(sc.isFailure()) break; }