From c931d8bf5f62fd9701454489043d3c5b0107f99d Mon Sep 17 00:00:00 2001 From: Scott Snyder <scott.snyder@cern.ch> Date: Thu, 4 Dec 2014 10:10:16 +0100 Subject: [PATCH] Update SG names for EmTauRoI. (TriggerD3PDMaker-00-04-07) * Tagging TriggerD3PDMaker-00-04-07. * python/EmTauROID3PDObject.py: Update SG names. 2014-12-01 scott snyder <snyder@bnl.gov> * Tagging TriggerD3PDMaker-00-04-06. * python/TrigNavSlimming.py: Update for change in TrigEDMConfig. 2014-11-06 scott snyder <snyder@bnl.gov> * Tagging TriggerD3PDMaker-00-04-05. * src/TrigConfMetadataTool.cxx: Fix coverity warnings. 2014-10-21 Attila Krasznahorkay <Attila.Krasznahorkay@cern.ch> * Adding Tomasz's changes to TrigNavSlimming.py. * Tagging as TriggerD3PDMaker-00-04-04 2014-10-14 Joerg Stelzer * Adapt to changes in the CTP: PIT becomes TIP ... (Long ChangeLog diff - truncated) --- .../TriggerD3PDMaker/cmt/requirements | 1 + .../python/EmTauROID3PDObject.py | 56 +++-- .../python/MuonROID3PDObject.py | 34 ++-- .../python/TrigConfMetadata.py | 21 +- .../python/TrigNavSlimming.py | 37 +++- .../src/CTP_RDOFillerTool.cxx | 4 +- .../src/EmTau_ROIFillerTool.cxx | 87 -------- .../src/EmTau_ROIFillerTool.h | 68 ------- .../src/EmTau_ROIthrPatternFillerTool.h | 48 +++++ .../src/Muon_ROIFillerTool.cxx | 192 ++++++++---------- .../TriggerD3PDMaker/src/Muon_ROIFillerTool.h | 20 +- .../src/ROIthrPatternFillerTool.h | 70 +++++++ .../src/ROIthrPatternFillerTool.icc | 64 ++++++ .../src/TrigConfMetadataTool.cxx | 45 +++- .../components/TriggerD3PDMaker_entries.cxx | 34 +--- 15 files changed, 414 insertions(+), 367 deletions(-) delete mode 100644 PhysicsAnalysis/D3PDMaker/TriggerD3PDMaker/src/EmTau_ROIFillerTool.cxx delete mode 100644 PhysicsAnalysis/D3PDMaker/TriggerD3PDMaker/src/EmTau_ROIFillerTool.h create mode 100644 PhysicsAnalysis/D3PDMaker/TriggerD3PDMaker/src/EmTau_ROIthrPatternFillerTool.h create mode 100644 PhysicsAnalysis/D3PDMaker/TriggerD3PDMaker/src/ROIthrPatternFillerTool.h create mode 100644 PhysicsAnalysis/D3PDMaker/TriggerD3PDMaker/src/ROIthrPatternFillerTool.icc diff --git a/PhysicsAnalysis/D3PDMaker/TriggerD3PDMaker/cmt/requirements b/PhysicsAnalysis/D3PDMaker/TriggerD3PDMaker/cmt/requirements index bdad060d14e..e214ceead1f 100644 --- a/PhysicsAnalysis/D3PDMaker/TriggerD3PDMaker/cmt/requirements +++ b/PhysicsAnalysis/D3PDMaker/TriggerD3PDMaker/cmt/requirements @@ -24,6 +24,7 @@ use D3PDMakerUtils D3PDMakerUtils-* PhysicsAnalysis/D3PDMake private use StoreGate StoreGate-* Control use SGTools SGTools-* Control +use xAODTrigger xAODTrigger-* Event/xAOD use TrigT1Interfaces TrigT1Interfaces-* Trigger/TrigT1 use TrigT1Result TrigT1Result-* Trigger/TrigT1 use TrigConfInterfaces TrigConfInterfaces-* Trigger/TrigConfiguration diff --git a/PhysicsAnalysis/D3PDMaker/TriggerD3PDMaker/python/EmTauROID3PDObject.py b/PhysicsAnalysis/D3PDMaker/TriggerD3PDMaker/python/EmTauROID3PDObject.py index a90f304b562..d3b193a0218 100644 --- a/PhysicsAnalysis/D3PDMaker/TriggerD3PDMaker/python/EmTauROID3PDObject.py +++ b/PhysicsAnalysis/D3PDMaker/TriggerD3PDMaker/python/EmTauROID3PDObject.py @@ -1,6 +1,6 @@ # Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration -# $Id: EmTauROID3PDObject.py 500205 2012-05-11 10:17:25Z krasznaa $ +# $Id: EmTauROID3PDObject.py 633617 2014-12-04 10:10:16Z ssnyder $ # # D3PD object saving the LVL1 Em/Tau RoI information into the D3PD # @@ -8,24 +8,40 @@ from D3PDMakerCoreComps.D3PDObject import make_SGDataVector_D3PDObject import TriggerD3PDMaker import EventCommonD3PDMaker +import D3PDMakerCoreComps + EmTauROID3PDObject = \ - make_SGDataVector_D3PDObject( "LVL1_ROI", "LVL1_ROI", - "trig_L1_emtau_", "EmTauROID3PDObject", - default_getterClass = \ - TriggerD3PDMaker.EmTau_ROIGetterTool ) - -EmTauROID3PDObject.defineBlock( 0, "Kinematics", - EventCommonD3PDMaker.FourMomFillerTool, - WriteM = False, WritePt = False ) -EmTauROID3PDObject.defineBlock( 0, "ThrInfo", - TriggerD3PDMaker.EmTau_ROIFillerTool, - WriteThrInfo = True ) - -EmTauROID3PDObject.defineBlock( 1, "DecodedInfo", - TriggerD3PDMaker.EmTau_ROIFillerTool, - WriteDecodedInfo = True ) - -EmTauROID3PDObject.defineBlock( 2, "RoIWord", - TriggerD3PDMaker.EmTau_ROIFillerTool, - WriteRoIWord = True ) + make_SGDataVector_D3PDObject( 'xAOD::EmTauRoIContainer', + "HLT_xAOD__EmTauRoIContainer_L1TopoEM,LVL1EmTauRoIs", + "trig_L1_emtau_", "EmTauROID3PDObject") + +EmTauROID3PDObject.defineBlock ( + 0, 'Kinematics', + D3PDMakerCoreComps.AuxDataFillerTool, + Vars = ['eta', 'phi']) + +EmTauROID3PDObject.defineBlock ( + 0, 'ThrInfo', + D3PDMakerCoreComps.AuxDataFillerTool, + Vars = ['thrNames', 'thrValues']) + +EmTauROID3PDObject.defineBlock ( + 1, 'DecodedInfo', + D3PDMakerCoreComps.AuxDataFillerTool, + Vars = ['core', + 'EMClus = emClus', + 'tauClus', + 'EMIsol = emIsol', + 'hadIsol', + 'hadCore', + ]) + +EmTauROID3PDObject.defineBlock ( + 1, 'DecodedPatternInfo', + TriggerD3PDMaker.EmTau_ROIthrPatternFillerTool) + +EmTauROID3PDObject.defineBlock ( + 2, 'RoIWord', + D3PDMakerCoreComps.AuxDataFillerTool, + Vars = ['RoIWord = roiWord']) diff --git a/PhysicsAnalysis/D3PDMaker/TriggerD3PDMaker/python/MuonROID3PDObject.py b/PhysicsAnalysis/D3PDMaker/TriggerD3PDMaker/python/MuonROID3PDObject.py index 969c6e56325..f1a36fe5045 100644 --- a/PhysicsAnalysis/D3PDMaker/TriggerD3PDMaker/python/MuonROID3PDObject.py +++ b/PhysicsAnalysis/D3PDMaker/TriggerD3PDMaker/python/MuonROID3PDObject.py @@ -1,6 +1,6 @@ # Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration -# $Id: MuonROID3PDObject.py 500205 2012-05-11 10:17:25Z krasznaa $ +# $Id: MuonROID3PDObject.py 620244 2014-10-06 19:02:48Z ssnyder $ # # D3PD object saving the LVL1 muon RoI information into the D3PD # @@ -8,24 +8,26 @@ from D3PDMakerCoreComps.D3PDObject import make_SGDataVector_D3PDObject import TriggerD3PDMaker import EventCommonD3PDMaker +import D3PDMakerCoreComps MuonROID3PDObject = \ - make_SGDataVector_D3PDObject( "LVL1_ROI", "LVL1_ROI", - "trig_L1_mu_", "MuonROID3PDObject", - default_getterClass = \ - TriggerD3PDMaker.Muon_ROIGetterTool ) + make_SGDataVector_D3PDObject( "xAOD::MuonRoIContainer_v1", + "LVL1MuonRoIs", + "trig_L1_mu_", "MuonROID3PDObject") -MuonROID3PDObject.defineBlock( 0, "Kinematics", - EventCommonD3PDMaker.FourMomFillerTool, - WriteM = False ) -MuonROID3PDObject.defineBlock( 0, "ThrInfo", - TriggerD3PDMaker.Muon_ROIFillerTool, - WriteThrInfo = True ) +MuonROID3PDObject.defineBlock ( + 0, 'Kinematics', + D3PDMakerCoreComps.AuxDataFillerTool, + Vars = ['eta', 'phi']) +MuonROID3PDObject.defineBlock ( + 0, 'ThrInfo', + D3PDMakerCoreComps.AuxDataFillerTool, + Vars = ['thrName', 'thrValue']) +MuonROID3PDObject.defineBlock ( + 2, 'RoIWord', + D3PDMakerCoreComps.AuxDataFillerTool, + Vars = ['RoIWord = roiWord']) MuonROID3PDObject.defineBlock( 1, "DecodedInfo", - TriggerD3PDMaker.Muon_ROIFillerTool, - WriteDecodedInfo = True ) + TriggerD3PDMaker.Muon_ROIFillerTool ) -MuonROID3PDObject.defineBlock( 2, "RoIWord", - TriggerD3PDMaker.Muon_ROIFillerTool, - WriteRoIWord = True ) diff --git a/PhysicsAnalysis/D3PDMaker/TriggerD3PDMaker/python/TrigConfMetadata.py b/PhysicsAnalysis/D3PDMaker/TriggerD3PDMaker/python/TrigConfMetadata.py index a8b7fb01d04..bbc000a87c1 100644 --- a/PhysicsAnalysis/D3PDMaker/TriggerD3PDMaker/python/TrigConfMetadata.py +++ b/PhysicsAnalysis/D3PDMaker/TriggerD3PDMaker/python/TrigConfMetadata.py @@ -1,12 +1,12 @@ # Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration -# $Id: TrigConfMetadata.py 610590 2014-08-06 16:01:01Z tamartin $ +# $Id: TrigConfMetadata.py 618376 2014-09-24 15:33:35Z tamartin $ # # This module holds the code that should be used to add trigger configuration # metadata to the D3PD. # -def addTrigConfMetadata( d3pdalg = None, useTrigConfEventSummaries = False, doCostL2 = False, doCostEF = False, doCostHLT = False ): +def addTrigConfMetadata( d3pdalg = None, useTrigConfEventSummaries = False, doCostL2 = False, doCostEF = False, doCostHLT = False, saveKeys = True, tuplePath = "" ): """Helper function that adds the necessary tool(s) and service(s) to the job to save the trigger configuration metadata to the output D3PD @@ -56,9 +56,11 @@ def addTrigConfMetadata( d3pdalg = None, useTrigConfEventSummaries = False, doCo _d3pdToolName = "TrigConfMetadataTool" if not _d3pdToolName in [ t.name() for t in d3pdalg.MetadataTools ]: import TriggerD3PDMaker + if (tuplePath == ""): + tuplePath = d3pdalg.TuplePath _trigConfTool = TriggerD3PDMaker.TrigConfMetadataTool( _d3pdToolName, D3PDSvc = _d3pdSvc, - ConfigDir = d3pdalg.TuplePath + "Meta" ) + ConfigDir = tuplePath + "Meta" ) _trigConfTool.UseTrigConfEventSummaries = useTrigConfEventSummaries if useTrigConfEventSummaries: # Figure out if old or new style HLT if using CostMon to get correct storegate key @@ -82,12 +84,13 @@ def addTrigConfMetadata( d3pdalg = None, useTrigConfEventSummaries = False, doCo logger.info( "TrigConfMetadataTool was already added to the D3PD::MakerAlg" ) # Add the DB key filler object: - _dbKeysFillerName = "TrigDBKeysFiller" - if not hasattr( d3pdalg, _dbKeysFillerName ): - from TriggerD3PDMaker.TrigDBKeysD3PDObject import TrigDBKeysD3PDObject - d3pdalg += TrigDBKeysD3PDObject( 0 ) - else: - logger.info( "TrigDBKeysD3PDObject already added to the D3PD::MakerAlg" ) + if saveKeys == True: + _dbKeysFillerName = "TrigDBKeysFiller" + if not hasattr( d3pdalg, _dbKeysFillerName ): + from TriggerD3PDMaker.TrigDBKeysD3PDObject import TrigDBKeysD3PDObject + d3pdalg += TrigDBKeysD3PDObject( 0 ) + else: + logger.info( "TrigDBKeysD3PDObject already added to the D3PD::MakerAlg" ) # Restore the original logger if necessary: if "orig_logger" in dir(): logger = orig_logger diff --git a/PhysicsAnalysis/D3PDMaker/TriggerD3PDMaker/python/TrigNavSlimming.py b/PhysicsAnalysis/D3PDMaker/TriggerD3PDMaker/python/TrigNavSlimming.py index f221b1ed8b7..dd74ed2ab97 100644 --- a/PhysicsAnalysis/D3PDMaker/TriggerD3PDMaker/python/TrigNavSlimming.py +++ b/PhysicsAnalysis/D3PDMaker/TriggerD3PDMaker/python/TrigNavSlimming.py @@ -1,6 +1,6 @@ # Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration -# $Id: TrigNavSlimming.py 472954 2011-12-07 12:48:58Z krasznaa $ +# $Id: TrigNavSlimming.py 632512 2014-12-01 11:57:51Z ssnyder $ # # The singleton in this module can be used to slim the trigger navigation # in jobs running on MC AODs. MC AODs of the future (R18) will have their @@ -50,8 +50,8 @@ def singleton( cls ): # # @author Attila Krasznahorkay <Attila.Krasznahorkay@cern.ch> # -# $Revision: 472954 $ -# $Date: 2011-12-07 13:48:58 +0100 (Wed, 07 Dec 2011) $ +# $Revision: 632512 $ +# $Date: 2014-12-01 12:57:51 +0100 (Mon, 01 Dec 2014) $ @singleton class TrigNavSlimming( Configured ): @@ -88,10 +88,11 @@ class TrigNavSlimming( Configured ): # Construct the object/container names for which the navigation # should have references: - from TrigEDMConfig.TriggerEDM import getAODList + from TrigEDMConfig.TriggerEDM import getTriggerObjList, TriggerL2List, TriggerEFList, TriggerHLTList, TriggerResultsList + tlist = getTriggerObjList('AODFULL', [TriggerL2List, TriggerEFList, TriggerHLTList, TriggerResultsList]) from RecExConfig.ObjKeyStore import cfgKeyStore objlist = [] - for t,kset in getAODList( "AODFULL" ).iteritems(): + for t,kset in tlist.iteritems(): for k in kset: __log.debug( "Checking for object %s#%s" % ( t, k ) ) # Notice that we can't use the isInInput(...) function. @@ -107,11 +108,27 @@ class TrigNavSlimming( Configured ): __log.info( "Will retain references for objects: %s" % objlist ) # Set up the slimming algorithm: - from TrigNavTools.TrigNavToolsConf import HLT__TrigNavigationSlimming - slimmer = HLT__TrigNavigationSlimming() - slimmer.ReloadNavigation = True - slimmer.FeatureInclusionList = objlist - + from TrigNavTools.TrigNavToolsConf import HLT__TrigNavigationSlimming, TrigNavigationThinningTool, HLT__TrigNavigationSlimmingTool + + from AthenaServices.AthenaServicesConf import ThinningSvc + from AthenaCommon.AppMgr import ToolSvc, ServiceMgr + thinningSvc = ThinningSvc() + ServiceMgr += thinningSvc + navSlimmingTool = HLT__TrigNavigationSlimmingTool() + navSlimmingTool.Actions = ['DropFeatures', 'SyncThinning', 'Reload'] + navSlimmingTool.ThinningSvc = thinningSvc + navSlimmingTool.FeatureInclusionList = objlist + + + navThinningTool = TrigNavigationThinningTool() + navThinningTool.ActInPlace=True + navThinningTool.SlimmingTool = navSlimmingTool; + navThinningTool.ThinningSvc = thinningSvc + ToolSvc += navThinningTool + + slimmer = HLT__TrigNavigationSlimming() + slimmer.ThinningTool = navThinningTool + # Add it to the beginning of the algorithm sequence: self.__sequence.insert( 0, slimmer ) diff --git a/PhysicsAnalysis/D3PDMaker/TriggerD3PDMaker/src/CTP_RDOFillerTool.cxx b/PhysicsAnalysis/D3PDMaker/TriggerD3PDMaker/src/CTP_RDOFillerTool.cxx index 13b63fec344..6b27cb957f6 100644 --- a/PhysicsAnalysis/D3PDMaker/TriggerD3PDMaker/src/CTP_RDOFillerTool.cxx +++ b/PhysicsAnalysis/D3PDMaker/TriggerD3PDMaker/src/CTP_RDOFillerTool.cxx @@ -2,7 +2,7 @@ Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration */ -// $Id: CTP_RDOFillerTool.cxx 504000 2012-06-05 16:28:50Z ssnyder $ +// $Id: CTP_RDOFillerTool.cxx 621771 2014-10-14 16:50:32Z stelzer $ // Gaudi/Athena include(s): #include "AthenaKernel/errorcheck.h" @@ -48,7 +48,7 @@ namespace D3PD { *m_timeNanoSec = rdo.getTimeNanoSec(); *m_numberOfBunches = rdo.getNumberOfBunches(); *m_l1AcceptBunchPosition = rdo.getL1AcceptBunchPosition(); - *m_pitWords = rdo.getPITWords(); + *m_pitWords = rdo.getTIPWords(); // this was changed from PIT (Run1 = 160 internal trigger lines) to TIP (Run2 = 320 internal trigger lines + 192 direct inputs from L1Topo + ALFA) // joerg *m_tbpWords = rdo.getTBPWords(); *m_tapWords = rdo.getTAPWords(); *m_tavWords = rdo.getTAVWords(); diff --git a/PhysicsAnalysis/D3PDMaker/TriggerD3PDMaker/src/EmTau_ROIFillerTool.cxx b/PhysicsAnalysis/D3PDMaker/TriggerD3PDMaker/src/EmTau_ROIFillerTool.cxx deleted file mode 100644 index 7b1fd228151..00000000000 --- a/PhysicsAnalysis/D3PDMaker/TriggerD3PDMaker/src/EmTau_ROIFillerTool.cxx +++ /dev/null @@ -1,87 +0,0 @@ -/* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration -*/ - -// $Id: EmTau_ROIFillerTool.cxx 504000 2012-06-05 16:28:50Z ssnyder $ - -// Gaudi/Athena include(s): -#include "AthenaKernel/errorcheck.h" - -// Local include(s): -#include "EmTau_ROIFillerTool.h" - -namespace D3PD { - - EmTau_ROIFillerTool::EmTau_ROIFillerTool( const std::string& type, - const std::string& name, - const IInterface* parent ) - : BlockFillerTool< EmTau_ROI >( type, name, parent ) - { - // Avoid coverity warnings - m_writeThrInfo = true; - m_writeRoIWord = true; - m_writeDecodedInfo = true; - book().ignore(); - - declareProperty( "WriteThrInfo", m_writeThrInfo = false ); - declareProperty( "WriteRoIWord", m_writeRoIWord = false ); - declareProperty( "WriteDecodedInfo", m_writeDecodedInfo = false ); - - } - - StatusCode EmTau_ROIFillerTool::book() { - - if( m_writeThrInfo ) { - CHECK( addVariable( "thrNames", m_thrNames, - "Names of the passed thresholds" ) ); - CHECK( addVariable( "thrValues", m_thrValues, - "Values of the passed thresholds" ) ); - } - if( m_writeRoIWord ) { - CHECK( addVariable( "RoIWord", m_roiWord, - "32-bit RoI word produced by the L1Calo hardware" ) ); - } - if( m_writeDecodedInfo ) { - CHECK( addVariable( "core", m_core, - "ET of the RoI Core cluster (2x2 towers, EM+Had)" ) ); - CHECK( addVariable( "EMClus", m_emClus, - "Deposited ET of the \"EM cluster\"" ) ); - CHECK( addVariable( "tauClus", m_tauClus, - "Deposited ET of the \"tau cluster\"" ) ); - CHECK( addVariable( "EMIsol", m_emIsol, - "EM calorimeter isolation (outer ring of EM towers)" ) ); - CHECK( addVariable( "hadIsol", m_hadIsol, - "Hadron calorimeter isolation (outer ring of had towers)" ) ); - CHECK( addVariable( "hadCore", m_hadCore, - "ET deposited in the inner hadronic isolation region " - "(2x2 core)" ) ); - CHECK( addVariable( "thrPattern", m_thrPattern, - "Bit-pattern describing the passed thresholds" ) ); - } - - return StatusCode::SUCCESS; - } - - StatusCode EmTau_ROIFillerTool::fill( const EmTau_ROI& roi ) { - - if( m_writeThrInfo ) { - *m_thrNames = roi.getThresholdNames(); - *m_thrValues = roi.getThresholdValues(); - } - if( m_writeRoIWord ) { - *m_roiWord = roi.getROIWord(); - } - if( m_writeDecodedInfo ) { - *m_core = roi.getCore(); - *m_emClus = roi.getEMClus(); - *m_tauClus = roi.getTauClus(); - *m_emIsol = roi.getEMIsol(); - *m_hadIsol = roi.getHadIsol(); - *m_hadCore = roi.getHadCore(); - *m_thrPattern = roi.getThrPattern(); - } - - return StatusCode::SUCCESS; - } - -} // namespace D3PD diff --git a/PhysicsAnalysis/D3PDMaker/TriggerD3PDMaker/src/EmTau_ROIFillerTool.h b/PhysicsAnalysis/D3PDMaker/TriggerD3PDMaker/src/EmTau_ROIFillerTool.h deleted file mode 100644 index ca30b624553..00000000000 --- a/PhysicsAnalysis/D3PDMaker/TriggerD3PDMaker/src/EmTau_ROIFillerTool.h +++ /dev/null @@ -1,68 +0,0 @@ -// Dear emacs, this is -*- c++ -*- - -/* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration -*/ - -// $Id: EmTau_ROIFillerTool.h 280512 2010-02-19 16:37:46Z krasznaa $ -#ifndef TRIGGERD3PDMAKER_EMTAU_ROIFILLERTOOL_H -#define TRIGGERD3PDMAKER_EMTAU_ROIFILLERTOOL_H - -// STL include(s): -#include <string> - -// EDM include(s): -#include "AnalysisTriggerEvent/EmTau_ROI.h" - -// D3PD include(s): -#include "D3PDMakerUtils/BlockFillerTool.h" - -namespace D3PD { - - /** - * @short Filler tool for EmTau_ROI objects - * - * This filler tool can be used to save the properties of EmTau_ROI - * objects into the output D3PD. - * - * @author Attila Krasznahorkay Jr. - * - * $Revision: 280512 $ - * $Date: 2010-02-19 17:37:46 +0100 (Fri, 19 Feb 2010) $ - */ - class EmTau_ROIFillerTool : public BlockFillerTool< EmTau_ROI > { - - public: - /// Regular AlgTool constructor - EmTau_ROIFillerTool( const std::string& type, const std::string& name, - const IInterface* parent ); - - /// Function booking the variables in the output - virtual StatusCode book(); - /// Function filling the variables for the output - virtual StatusCode fill( const EmTau_ROI& roi ); - - private: - bool m_writeThrInfo; - bool m_writeRoIWord; - bool m_writeDecodedInfo; - - std::vector< std::string >* m_thrNames; - std::vector< float >* m_thrValues; - - uint32_t* m_roiWord; - - float* m_core; - float* m_emClus; - float* m_tauClus; - float* m_emIsol; - float* m_hadIsol; - float* m_hadCore; - - uint32_t* m_thrPattern; - - }; // class EmTau_ROIFillerTool - -} // namespace D3PD - -#endif // TRIGGERD3PDMAKER_EMTAU_ROIFILLERTOOL_H diff --git a/PhysicsAnalysis/D3PDMaker/TriggerD3PDMaker/src/EmTau_ROIthrPatternFillerTool.h b/PhysicsAnalysis/D3PDMaker/TriggerD3PDMaker/src/EmTau_ROIthrPatternFillerTool.h new file mode 100644 index 00000000000..80f1151f43d --- /dev/null +++ b/PhysicsAnalysis/D3PDMaker/TriggerD3PDMaker/src/EmTau_ROIthrPatternFillerTool.h @@ -0,0 +1,48 @@ +// This file's extension implies that it's C, but it's really -*- C++ -*-. + +/* + Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration +*/ + +// $Id$ +/** + * @file TriggerD3PDMaker/EmTau_ROIthrPatternFillerTool.h + * @author scott snyder <snyder@bnl.gov> + * @date Sep, 2014 + * @brief xxx + */ + + +#ifndef TRIGGERD3PDMAKER_EMTAU_ROITHRPATTERNFILLERTOOL_H +#define TRIGGERD3PDMAKER_EMTAU_ROITHRPATTERNFILLERTOOL_H + + +#include "ROIthrPatternFillerTool.h" + + +namespace D3PD { + + +class EmTau_ROIthrPatternFillerTool + : public ROIthrPatternFillerTool<xAOD::EmTauRoI> +{ +public: + /** + * @brief Standard Gaudi tool constructor. + * @param type The name of the tool type. + * @param name The tool name. + * @param parent The tool's Gaudi parent. + */ + EmTau_ROIthrPatternFillerTool (const std::string& type, + const std::string& name, + const IInterface* parent) + : ROIthrPatternFillerTool<xAOD::EmTauRoI> (type, name, parent) + { + } +}; + + +} // namespace D3PD + + +#endif // not TRIGGERD3PDMAKER_EMTAU_ROITHRPATTERNFILLERTOOL_H diff --git a/PhysicsAnalysis/D3PDMaker/TriggerD3PDMaker/src/Muon_ROIFillerTool.cxx b/PhysicsAnalysis/D3PDMaker/TriggerD3PDMaker/src/Muon_ROIFillerTool.cxx index 2a04b6dfe4d..53392e24fc7 100644 --- a/PhysicsAnalysis/D3PDMaker/TriggerD3PDMaker/src/Muon_ROIFillerTool.cxx +++ b/PhysicsAnalysis/D3PDMaker/TriggerD3PDMaker/src/Muon_ROIFillerTool.cxx @@ -2,7 +2,7 @@ Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration */ -// $Id: Muon_ROIFillerTool.cxx 504000 2012-06-05 16:28:50Z ssnyder $ +// $Id: Muon_ROIFillerTool.cxx 620244 2014-10-06 19:02:48Z ssnyder $ // Gaudi/Athena include(s): #include "AthenaKernel/errorcheck.h" @@ -10,120 +10,98 @@ // Local include(s): #include "Muon_ROIFillerTool.h" -namespace D3PD { - Muon_ROIFillerTool::Muon_ROIFillerTool( const std::string& type, - const std::string& name, - const IInterface* parent ) - : BlockFillerTool< Muon_ROI >( type, name, parent ) - { - // Avoid coverity warnings - m_writeThrInfo = true; - m_writeRoIWord = true; - m_writeDecodedInfo = true; - book().ignore(); +namespace D3PD { - declareProperty( "WriteThrInfo", m_writeThrInfo = false ); - declareProperty( "WriteRoIWord", m_writeRoIWord = false ); - declareProperty( "WriteDecodedInfo", m_writeDecodedInfo = false ); - } +Muon_ROIFillerTool::Muon_ROIFillerTool( const std::string& type, + const std::string& name, + const IInterface* parent ) + : BlockFillerTool< xAOD::MuonRoI >( type, name, parent ) +{ + + book().ignore(); // Avoid coverity warnings +} - StatusCode Muon_ROIFillerTool::book() { - if( m_writeThrInfo ) { - CHECK( addVariable( "thrName", m_thrName, - "Names of the passed thresholds" ) ); - } - if( m_writeRoIWord ) { - CHECK( addVariable( "RoIWord", m_roiWord, - "32-bit RoI word given by the LVL1 muon trigger" ) ); - } - if( m_writeDecodedInfo ) { - CHECK( addVariable( "thrNumber", m_thrNumber, - "Number of the highest threshold this RoI passed" ) ); - CHECK( addVariable( "RoINumber", m_roi, - "\"RoI\" (pad) number of the muon candidate" ) ); - CHECK( addVariable( "sectorAddress", m_sectorAddress, - "The encoded \"full\" sector address" ) ); - CHECK( addVariable( "firstCandidate", m_firstCandidate, - "True if the candidate had the highest pT in its sector" ) ); - CHECK( addVariable( "moreCandInRoI", m_moreCandInRoI, - "True if there were other muons detected in the same pad" ) ); - CHECK( addVariable( "moreCandInSector", m_moreCandInSector, - "True if there were >2 muons detected in the same sector" ) ); - CHECK( addVariable( "source", m_source, - "Muon candidate system ID (Barrel=0, Endcap=1, Forward=2)" ) ); - CHECK( addVariable( "hemisphere", m_hemisphere, - "Hemisphere of the muon candidate (Negative=0, Positive=1)" ) ); - CHECK( addVariable( "charge", m_charge, - "Charge of the muon candidate (Negative=0, Positive=1," - " Undefined=100)" ) ); - CHECK( addVariable( "vetoed", m_vetoed, - "True if the candidate was vetoed in the multiplicity sum" ) ); - } +StatusCode Muon_ROIFillerTool::book() +{ + CHECK( addVariable( "thrNumber", m_thrNumber, + "Number of the highest threshold this RoI passed" ) ); + CHECK( addVariable( "RoINumber", m_roi, + "\"RoI\" (pad) number of the muon candidate" ) ); + CHECK( addVariable( "sectorAddress", m_sectorAddress, + "The encoded \"full\" sector address" ) ); + CHECK( addVariable( "firstCandidate", m_firstCandidate, + "True if the candidate had the highest pT in its sector" ) ); + CHECK( addVariable( "moreCandInRoI", m_moreCandInRoI, + "True if there were other muons detected in the same pad" ) ); + CHECK( addVariable( "moreCandInSector", m_moreCandInSector, + "True if there were >2 muons detected in the same sector" ) ); + CHECK( addVariable( "source", m_source, + "Muon candidate system ID (Barrel=0, Endcap=1, Forward=2)" ) ); + CHECK( addVariable( "hemisphere", m_hemisphere, + "Hemisphere of the muon candidate (Negative=0, Positive=1)" ) ); + CHECK( addVariable( "charge", m_charge, + "Charge of the muon candidate (Negative=0, Positive=1," + " Undefined=100)" ) ); + CHECK( addVariable( "vetoed", m_vetoed, + "True if the candidate was vetoed in the multiplicity sum" ) ); - return StatusCode::SUCCESS; - } + return StatusCode::SUCCESS; +} - StatusCode Muon_ROIFillerTool::fill( const Muon_ROI& roi ) { - if( m_writeThrInfo ) { - *m_thrName = roi.getThrName(); - } - if( m_writeRoIWord ) { - *m_roiWord = roi.getROIWord(); - } - if( m_writeDecodedInfo ) { - *m_thrNumber = roi.getThrNumber(); - *m_roi = roi.getRoI(); - *m_sectorAddress = roi.getSectorAddress(); - *m_firstCandidate = roi.isFirstCandidate(); - *m_moreCandInRoI = roi.isMoreCandInRoI(); - *m_moreCandInSector = roi.isMoreCandInSector(); - switch( roi.getSource() ) { - case Muon_ROI::Barrel: - *m_source = 0; - break; - case Muon_ROI::Endcap: - *m_source = 1; - break; - case Muon_ROI::Forward: - *m_source = 2; - break; - default: - *m_source = -1; - break; - } - switch( roi.getHemisphere() ) { - case Muon_ROI::Negative: - *m_hemisphere = 0; - break; - case Muon_ROI::Positive: - *m_hemisphere = 1; - break; - default: - *m_hemisphere = -1; - break; - } - switch( roi.getCharge() ) { - case Muon_ROI::Neg: - *m_charge = 0; - break; - case Muon_ROI::Pos: - *m_charge = 1; - break; - case Muon_ROI::Undef: - *m_charge = 100; - break; - default: - *m_charge = -1; - break; - } - *m_vetoed = roi.isVetoed(); - } +StatusCode Muon_ROIFillerTool::fill( const xAOD::MuonRoI& roi ) +{ + *m_thrNumber = roi.getThrNumber(); + *m_roi = roi.getRoI(); + *m_sectorAddress = roi.getSectorAddress(); + *m_firstCandidate = roi.isFirstCandidate(); + *m_moreCandInRoI = roi.isMoreCandInRoI(); + *m_moreCandInSector = roi.isMoreCandInSector(); + switch( roi.getSource() ) { + case xAOD::MuonRoI::Barrel: + *m_source = 0; + break; + case xAOD::MuonRoI::Endcap: + *m_source = 1; + break; + case xAOD::MuonRoI::Forward: + *m_source = 2; + break; + default: + *m_source = -1; + break; + } + switch( roi.getHemisphere() ) { + case xAOD::MuonRoI::Negative: + *m_hemisphere = 0; + break; + case xAOD::MuonRoI::Positive: + *m_hemisphere = 1; + break; + default: + *m_hemisphere = -1; + break; + } + switch( roi.getCharge() ) { + case xAOD::MuonRoI::Neg: + *m_charge = 0; + break; + case xAOD::MuonRoI::Pos: + *m_charge = 1; + break; + case xAOD::MuonRoI::Undef: + *m_charge = 100; + break; + default: + *m_charge = -1; + break; + } + *m_vetoed = roi.isVetoed(); + return StatusCode::SUCCESS; +} - return StatusCode::SUCCESS; - } } // namespace D3PD diff --git a/PhysicsAnalysis/D3PDMaker/TriggerD3PDMaker/src/Muon_ROIFillerTool.h b/PhysicsAnalysis/D3PDMaker/TriggerD3PDMaker/src/Muon_ROIFillerTool.h index 085c65b7359..aa0df16967d 100644 --- a/PhysicsAnalysis/D3PDMaker/TriggerD3PDMaker/src/Muon_ROIFillerTool.h +++ b/PhysicsAnalysis/D3PDMaker/TriggerD3PDMaker/src/Muon_ROIFillerTool.h @@ -4,7 +4,7 @@ Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration */ -// $Id: Muon_ROIFillerTool.h 364692 2011-05-09 17:07:07Z krasznaa $ +// $Id: Muon_ROIFillerTool.h 620244 2014-10-06 19:02:48Z ssnyder $ #ifndef TRIGGERD3PDMAKER_MUON_ROIFILLERTOOL_H #define TRIGGERD3PDMAKER_MUON_ROIFILLERTOOL_H @@ -12,7 +12,7 @@ #include <string> // EDM include(s): -#include "AnalysisTriggerEvent/Muon_ROI.h" +#include "xAODTrigger/MuonRoI.h" // D3PD include(s): #include "D3PDMakerUtils/BlockFillerTool.h" @@ -27,10 +27,10 @@ namespace D3PD { * * @author Attila Krasznahorkay Jr. * - * $Revision: 364692 $ - * $Date: 2011-05-09 19:07:07 +0200 (Mon, 09 May 2011) $ + * $Revision: 620244 $ + * $Date: 2014-10-06 21:02:48 +0200 (Mon, 06 Oct 2014) $ */ - class Muon_ROIFillerTool : public BlockFillerTool< Muon_ROI > { + class Muon_ROIFillerTool : public BlockFillerTool< xAOD::MuonRoI > { public: /// Regular AlgTool constructor @@ -40,17 +40,9 @@ namespace D3PD { /// Function booking the variables in the output virtual StatusCode book(); /// Function filling the variables for the output - virtual StatusCode fill( const Muon_ROI& roi ); + virtual StatusCode fill( const xAOD::MuonRoI& roi ); private: - bool m_writeThrInfo; - bool m_writeRoIWord; - bool m_writeDecodedInfo; - - std::string* m_thrName; ///< The name of the highest threshold this RoI passed - - uint32_t* m_roiWord; ///< The original 32-bit RoI word given by the LVL1 muon trigger - short* m_thrNumber; ///< The value of the highest threshold this RoI passed short* m_roi; ///< The "RoI number" (position inside the sector) short* m_sectorAddress; ///< The full sector address diff --git a/PhysicsAnalysis/D3PDMaker/TriggerD3PDMaker/src/ROIthrPatternFillerTool.h b/PhysicsAnalysis/D3PDMaker/TriggerD3PDMaker/src/ROIthrPatternFillerTool.h new file mode 100644 index 00000000000..0cc4bdc9d56 --- /dev/null +++ b/PhysicsAnalysis/D3PDMaker/TriggerD3PDMaker/src/ROIthrPatternFillerTool.h @@ -0,0 +1,70 @@ +// This file's extension implies that it's C, but it's really -*- C++ -*-. + +/* + Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration +*/ + +// $Id$ +/** + * @file TriggerD3PDMaker/ROIthrPatternFillerTool.h + * @author scott snyder <snyder@bnl.gov> + * @date Sep, 2014 + * @brief xxx + */ + + +#ifndef TRIGGERD3PDMAKER_ROITHRPATTERNFILLERTOOL_H +#define TRIGGERD3PDMAKER_ROITHRPATTERNFILLERTOOL_H + + +#include "D3PDMakerUtils/BlockFillerTool.h" + + + +namespace D3PD { + + +template <class ROI> +class ROIthrPatternFillerTool + : public BlockFillerTool<ROI> +{ +public: + /** + * @brief Standard Gaudi tool constructor. + * @param type The name of the tool type. + * @param name The tool name. + * @param parent The tool's Gaudi parent. + */ + ROIthrPatternFillerTool (const std::string& type, + const std::string& name, + const IInterface* parent); + + + /// Book variables for this block. + virtual StatusCode book(); + + + /** + * @brief Fill one block --- type-safe version. + * @param p The input object. + * + * This is called once per object. The caller + * is responsible for arranging that all the pointers for booked variables + * are set appropriately upon entry. + */ + virtual StatusCode fill (const ROI& p); + + +private: + /// Variable: The pattern describing which thresholds were passed. + int* m_thrPattern; +}; + + +} + + +#include "ROIthrPatternFillerTool.icc" + + +#endif // not TRIGGERD3PDMAKER_ROITHRPATTERNFILLERTOOL_H diff --git a/PhysicsAnalysis/D3PDMaker/TriggerD3PDMaker/src/ROIthrPatternFillerTool.icc b/PhysicsAnalysis/D3PDMaker/TriggerD3PDMaker/src/ROIthrPatternFillerTool.icc new file mode 100644 index 00000000000..e05050f450b --- /dev/null +++ b/PhysicsAnalysis/D3PDMaker/TriggerD3PDMaker/src/ROIthrPatternFillerTool.icc @@ -0,0 +1,64 @@ +/* + Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration +*/ + +// $Id$ +/** + * @file TriggerD3PDMaker/ROIthrPatternFillerTool.icc + * @author scott snyder <snyder@bnl.gov> + * @date Sep, 2014 + * @brief xxx + */ + + +#include "xAODTrigger/EmTauRoI.h" +#include "AthenaKernel/errorcheck.h" + + +namespace D3PD { + + +/** + * @brief Standard Gaudi tool constructor. + * @param type The name of the tool type. + * @param name The tool name. + * @param parent The tool's Gaudi parent. + */ +template <class ROI> +ROIthrPatternFillerTool<ROI>::ROIthrPatternFillerTool (const std::string& type, + const std::string& name, + const IInterface* parent) + : BlockFillerTool<ROI> (type, name, parent) +{ + book().ignore(); // Avoid coverity warnings. +} + + +/** + * Book variables for this block. + */ +template <class ROI> +StatusCode ROIthrPatternFillerTool<ROI>::book() +{ + CHECK( this->addVariable ("thrPattern", m_thrPattern) ); + return StatusCode::SUCCESS; +} + + +/** + * @brief Fill one block --- type-safe version. + * @param p The input object. + * + * This is called once per object. The caller + * is responsible for arranging that all the pointers for booked variables + * are set appropriately upon entry. + */ +template <class ROI> +StatusCode ROIthrPatternFillerTool<ROI>::fill (const ROI& p) +{ + *m_thrPattern = p.thrPattern(); + return StatusCode::SUCCESS; +} + + +} // namespace D3PD diff --git a/PhysicsAnalysis/D3PDMaker/TriggerD3PDMaker/src/TrigConfMetadataTool.cxx b/PhysicsAnalysis/D3PDMaker/TriggerD3PDMaker/src/TrigConfMetadataTool.cxx index c5140c9b169..037376e3216 100644 --- a/PhysicsAnalysis/D3PDMaker/TriggerD3PDMaker/src/TrigConfMetadataTool.cxx +++ b/PhysicsAnalysis/D3PDMaker/TriggerD3PDMaker/src/TrigConfMetadataTool.cxx @@ -2,7 +2,7 @@ Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration */ -// $Id: TrigConfMetadataTool.cxx 603934 2014-06-27 11:30:32Z ssnyder $ +// $Id: TrigConfMetadataTool.cxx 626801 2014-11-07 06:28:07Z ssnyder $ // Athena/Gaudi include(s): #include "AthenaKernel/errorcheck.h" @@ -52,7 +52,48 @@ namespace D3PD { m_lvl1ConfigNameMap( 0 ), m_lvl1ConfigPSKMap( 0 ), m_hltConfigNameMap( 0 ), m_hltConfigPSKMap( 0 ), m_hltConfigRPSKMap( 0 ), m_hltConfigPTMap( 0 ), - m_hltConfigLowerChainNameMap( 0 ) { + m_hltConfigLowerChainNameMap( 0 ), + + m_chainN (nullptr), + m_chainID (nullptr), + m_chainCounter (nullptr), + m_chainName (nullptr), + m_chainLowerID (nullptr), + m_chainLowerIDs (nullptr), + m_chainLowerName (nullptr), + m_chainLowerCounter (nullptr), + m_chainLevel (nullptr), + m_chainPrescale (nullptr), + m_chainPassthrough (nullptr), + m_chainStreamNames (nullptr), + m_chainStreamPrescales (nullptr), + m_chainGroupNames (nullptr), + m_chainEBHypoNames (nullptr), + m_chainSigN (nullptr), + m_chainSigCounter (nullptr), + m_chainSigLogic (nullptr), + m_chainSigLabel (nullptr), + m_chainSigOutputTEn (nullptr), + m_chainSigOutputTEIndex (nullptr), + m_chainSigOutputTEs (nullptr), + m_seqN (nullptr), + m_seqID (nullptr), + m_seqIndex (nullptr), + m_seqName (nullptr), + m_seqTopoTEID (nullptr), + m_seqInputTEs (nullptr), + m_seqAlgN (nullptr), + m_seqAlgIndex (nullptr), + m_seqAlgPosition (nullptr), + m_seqAlgNameID (nullptr), + m_seqAlgTypeID (nullptr), + m_seqAlgName (nullptr), + m_seqAlgTypeName (nullptr), + m_confVarKey (nullptr), + m_confVarVal (nullptr), + m_confStringKey (nullptr), + m_confStringVal (nullptr) + { declareProperty( "ConfigDir", m_configDir = "/D3PD/d3pdMeta" ); declareProperty( "TrigConfigSvc", m_trigConfSvc ); diff --git a/PhysicsAnalysis/D3PDMaker/TriggerD3PDMaker/src/components/TriggerD3PDMaker_entries.cxx b/PhysicsAnalysis/D3PDMaker/TriggerD3PDMaker/src/components/TriggerD3PDMaker_entries.cxx index 15512d52c7a..814d6e62fe2 100644 --- a/PhysicsAnalysis/D3PDMaker/TriggerD3PDMaker/src/components/TriggerD3PDMaker_entries.cxx +++ b/PhysicsAnalysis/D3PDMaker/TriggerD3PDMaker/src/components/TriggerD3PDMaker_entries.cxx @@ -22,7 +22,7 @@ // LVL1 filler tools: #include "../Muon_ROIFillerTool.h" #include "../Jet_ROIFillerTool.h" -#include "../EmTau_ROIFillerTool.h" +#include "../EmTau_ROIthrPatternFillerTool.h" #include "../EmTau_ROIObjectDecisionFillerTool.h" #include "../JetET_ROIFillerTool.h" #include "../EnergySum_ROIFillerTool.h" @@ -53,7 +53,7 @@ DECLARE_NAMESPACE_TOOL_FACTORY( D3PD, EnergySum_ROIGetterTool ) DECLARE_NAMESPACE_TOOL_FACTORY( D3PD, Muon_ROIFillerTool ) DECLARE_NAMESPACE_TOOL_FACTORY( D3PD, Jet_ROIFillerTool ) -DECLARE_NAMESPACE_TOOL_FACTORY( D3PD, EmTau_ROIFillerTool ) +DECLARE_NAMESPACE_TOOL_FACTORY( D3PD, EmTau_ROIthrPatternFillerTool ) DECLARE_NAMESPACE_TOOL_FACTORY( D3PD, EmTau_ROIObjectDecisionFillerTool ) DECLARE_NAMESPACE_TOOL_FACTORY( D3PD, JetET_ROIFillerTool ) DECLARE_NAMESPACE_TOOL_FACTORY( D3PD, EnergySum_ROIFillerTool ) @@ -71,33 +71,3 @@ DECLARE_NAMESPACE_TOOL_FACTORY( D3PD, BunchStructureMetadataTool ) DECLARE_NAMESPACE_TOOL_FACTORY( D3PD, BunchConfigIDFillerTool ) DECLARE_NAMESPACE_TOOL_FACTORY( D3PD, TriggerKeyTool ) -DECLARE_FACTORY_ENTRIES( TriggerD3PDMaker ) { - DECLARE_NAMESPACE_TOOL( D3PD, TriggerBitFillerTool ) - - DECLARE_NAMESPACE_TOOL( D3PD, Muon_ROIGetterTool ) - DECLARE_NAMESPACE_TOOL( D3PD, Jet_ROIGetterTool ) - DECLARE_NAMESPACE_TOOL( D3PD, EmTau_ROIGetterTool ) - DECLARE_NAMESPACE_TOOL( D3PD, JetET_ROIGetterTool ) - DECLARE_NAMESPACE_TOOL( D3PD, EnergySum_ROIGetterTool ) - - DECLARE_NAMESPACE_TOOL( D3PD, Muon_ROIFillerTool ) - DECLARE_NAMESPACE_TOOL( D3PD, Jet_ROIFillerTool ) - DECLARE_NAMESPACE_TOOL( D3PD, EmTau_ROIFillerTool ) - DECLARE_NAMESPACE_TOOL( D3PD, EmTau_ROIObjectDecisionFillerTool ) - DECLARE_NAMESPACE_TOOL( D3PD, JetET_ROIFillerTool ) - DECLARE_NAMESPACE_TOOL( D3PD, EnergySum_ROIFillerTool ) - DECLARE_NAMESPACE_TOOL( D3PD, MuCTPI_RDOFillerTool ) - DECLARE_NAMESPACE_TOOL( D3PD, CTP_RDOFillerTool ) - - DECLARE_NAMESPACE_TOOL( D3PD, ChainEntryFillerTool) - DECLARE_NAMESPACE_TOOL( D3PD, CombLinksFillerTool) - - DECLARE_NAMESPACE_TOOL( D3PD, TrigConfMetadataTool ) - DECLARE_NAMESPACE_TOOL( D3PD, TrigDecisionFillerTool ) - DECLARE_NAMESPACE_TOOL( D3PD, TrigRoiDescriptorFillerTool ) - DECLARE_NAMESPACE_TOOL( D3PD, TrigDBKeysFillerTool ) - DECLARE_NAMESPACE_TOOL( D3PD, TrigOperationalInfoFillerTool ) - DECLARE_NAMESPACE_TOOL( D3PD, BunchStructureMetadataTool ) - DECLARE_NAMESPACE_TOOL( D3PD, BunchConfigIDFillerTool ) - DECLARE_NAMESPACE_TOOL( D3PD, TriggerKeyTool ) -} -- GitLab