From 7d7d1ffd90a2b48ff57f1da23ecc809fc1f9e31e Mon Sep 17 00:00:00 2001 From: Scott Snyder <scott.snyder@cern.ch> Date: Sun, 27 May 2012 22:03:53 +0200 Subject: [PATCH] Coverity warning fixes. (TrigMissingETD3PDMaker-00-00-10) --- .../TrigMissingETD3PDMaker/cmt/requirements | 22 +++++ .../python/TrigMETD3PD.py | 87 ++++++++++++++++ .../python/TrigMETD3PDObject.py | 25 +++++ .../TrigMissingETD3PDMaker/python/__init__.py | 22 +++++ .../share/makeTrigMETD3PD.py | 41 ++++++++ .../src/TrigMissingETBaseFillerTool.cxx | 82 ++++++++++++++++ .../src/TrigMissingETBaseFillerTool.h | 56 +++++++++++ .../src/TrigMissingETComponentFillerTool.cxx | 98 +++++++++++++++++++ .../src/TrigMissingETComponentFillerTool.h | 59 +++++++++++ .../src/TrigMissingETGetterTool.h | 45 +++++++++ .../TrigMissingETD3PDMaker_entries.cxx | 27 +++++ .../TrigMissingETD3PDMaker_load.cxx | 7 ++ 12 files changed, 571 insertions(+) create mode 100644 PhysicsAnalysis/D3PDMaker/TrigMissingETD3PDMaker/cmt/requirements create mode 100644 PhysicsAnalysis/D3PDMaker/TrigMissingETD3PDMaker/python/TrigMETD3PD.py create mode 100644 PhysicsAnalysis/D3PDMaker/TrigMissingETD3PDMaker/python/TrigMETD3PDObject.py create mode 100644 PhysicsAnalysis/D3PDMaker/TrigMissingETD3PDMaker/python/__init__.py create mode 100644 PhysicsAnalysis/D3PDMaker/TrigMissingETD3PDMaker/share/makeTrigMETD3PD.py create mode 100644 PhysicsAnalysis/D3PDMaker/TrigMissingETD3PDMaker/src/TrigMissingETBaseFillerTool.cxx create mode 100644 PhysicsAnalysis/D3PDMaker/TrigMissingETD3PDMaker/src/TrigMissingETBaseFillerTool.h create mode 100644 PhysicsAnalysis/D3PDMaker/TrigMissingETD3PDMaker/src/TrigMissingETComponentFillerTool.cxx create mode 100644 PhysicsAnalysis/D3PDMaker/TrigMissingETD3PDMaker/src/TrigMissingETComponentFillerTool.h create mode 100644 PhysicsAnalysis/D3PDMaker/TrigMissingETD3PDMaker/src/TrigMissingETGetterTool.h create mode 100644 PhysicsAnalysis/D3PDMaker/TrigMissingETD3PDMaker/src/components/TrigMissingETD3PDMaker_entries.cxx create mode 100644 PhysicsAnalysis/D3PDMaker/TrigMissingETD3PDMaker/src/components/TrigMissingETD3PDMaker_load.cxx diff --git a/PhysicsAnalysis/D3PDMaker/TrigMissingETD3PDMaker/cmt/requirements b/PhysicsAnalysis/D3PDMaker/TrigMissingETD3PDMaker/cmt/requirements new file mode 100644 index 000000000000..ae9213c255a0 --- /dev/null +++ b/PhysicsAnalysis/D3PDMaker/TrigMissingETD3PDMaker/cmt/requirements @@ -0,0 +1,22 @@ +package TrigMissingETD3PDMaker + +author Attila Krasznahorkay <Attila.Krasznahorkay@cern.ch> +author Diego Casadei <Diego.Casadei@cern.ch> + +# Basic Gaudi/Athena package(s): +use AtlasPolicy AtlasPolicy-* + + +private +use GaudiInterface GaudiInterface-* External +use AthenaKernel AthenaKernel-* Control +use TrigMissingEtEvent TrigMissingEtEvent-* Trigger/TrigEvent +use D3PDMakerUtils D3PDMakerUtils-* PhysicsAnalysis/D3PDMaker +use TriggerD3PDMaker TriggerD3PDMaker-* PhysicsAnalysis/D3PDMaker +end_private + +library TrigMissingETD3PDMaker *.cxx components/*.cxx +apply_pattern component_library + +apply_pattern declare_python_modules files="*.py" +apply_pattern declare_joboptions files="*.py" diff --git a/PhysicsAnalysis/D3PDMaker/TrigMissingETD3PDMaker/python/TrigMETD3PD.py b/PhysicsAnalysis/D3PDMaker/TrigMissingETD3PDMaker/python/TrigMETD3PD.py new file mode 100644 index 000000000000..4f2e478a86c3 --- /dev/null +++ b/PhysicsAnalysis/D3PDMaker/TrigMissingETD3PDMaker/python/TrigMETD3PD.py @@ -0,0 +1,87 @@ +# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + +# $Id: TrigMETD3PD.py 487405 2012-03-08 17:28:58Z krasznaa $ +# + +# Some common import(s): +from AthenaCommon.AlgSequence import AlgSequence + +## +# @short Function adding the Trigger MET information to the D3PD +# +# The idea here is that one could add all the HLT MET information to his/her +# D3PD with something like this: +# +# <code> +# from TrigMissingETD3PDMaker.TrigMETD3PD import TrigMETD3PDObjects +# TrigMETD3PDObjects( myd3pdalg, 2 ) +# </code> +# +# $Revision: 487405 $ +# $Date: 2012-03-08 18:28:58 +0100 (Thu, 08 Mar 2012) $ +# +def TrigMETD3PDObjects( alg, level = 10 ): + + # The LVL1 information: + from TriggerD3PDMaker.EnergySumROID3PDObject import EnergySumROID3PDObject + alg += EnergySumROID3PDObject( level, prefix = "trig_L1_esum_" ) + + # The LVL2 information: + from TrigMissingETD3PDMaker.TrigMETD3PDObject import TrigMETD3PDObject + alg += TrigMETD3PDObject( level, prefix = "trig_L2_met_", + sgkey = "HLT_T2MissingET" ) + + # The New LVL2 FEB information: + from RecExConfig.ObjKeyStore import cfgKeyStore + if cfgKeyStore.isInInputFile( "TrigMissingETContainer", "HLT_L2MissingET_FEB" ): + alg += TrigMETD3PDObject( level, prefix = "trig_L2_feb_met_", + sgkey = "HLT_L2MissingET_FEB" ) + pass + + # The EF information: + alg += TrigMETD3PDObject( level, prefix = "trig_EF_met_", + sgkey = "HLT_TrigEFMissingET" ) + if cfgKeyStore.isInInputFile( "TrigMissingETContainer", + "HLT_TrigEFMissingET_FEB" ): + alg += TrigMETD3PDObject( level, prefix = "trig_EF_feb_met_", + sgkey = "HLT_TrigEFMissingET_FEB" ) + pass + if cfgKeyStore.isInInputFile( "TrigMissingETContainer", + "HLT_TrigEFMissingET_topocl" ): + alg += TrigMETD3PDObject( level, prefix = "trig_EF_topocl_met_", + sgkey = "HLT_TrigEFMissingET_topocl" ) + pass + + # The jet ETsum info: + if cfgKeyStore.isInInputFile( "TrigMissingETContainer", + "HLT_L2JetEtSum" ): + alg += TrigMETD3PDObject( level, prefix = "trig_L2_jetetsum_", + sgkey = "HLT_L2JetEtSum" ) + pass + if cfgKeyStore.isInInputFile( "TrigMissingETContainer", + "HLT_EFJetEtSum" ): + alg += TrigMETD3PDObject( level, prefix = "trig_EF_jetetsum_", + sgkey = "HLT_EFJetEtSum" ) + pass + + return alg + +## +# @short Function creating the MET trigger D3PD +# +# This function can be used in a top jobOption to create the trigger MET +# D3PD. +# +# $Revision: 487405 $ +# $Date: 2012-03-08 18:28:58 +0100 (Thu, 08 Mar 2012) $ +# +def TrigMETD3PD( fname, level = 10, tname = "met", sequence = AlgSequence() ): + + # Create a D3PD maker algorithm: + import D3PDMakerCoreComps + alg = D3PDMakerCoreComps.MakerAlg( tname, seq = sequence, file = fname ) + + # Add all the blocks to the D3PD: + TrigMETD3PDObjects( alg, level ) + + return alg diff --git a/PhysicsAnalysis/D3PDMaker/TrigMissingETD3PDMaker/python/TrigMETD3PDObject.py b/PhysicsAnalysis/D3PDMaker/TrigMissingETD3PDMaker/python/TrigMETD3PDObject.py new file mode 100644 index 000000000000..ee3cfebc6da0 --- /dev/null +++ b/PhysicsAnalysis/D3PDMaker/TrigMissingETD3PDMaker/python/TrigMETD3PDObject.py @@ -0,0 +1,25 @@ +# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + +# $Id: TrigMETD3PDObject.py 338101 2010-12-20 14:57:28Z krasznaa $ +# +# D3PD object saving information about the HLT missing-Et reconstruction. +# Picks up the TrigMissingET objects directly from StoreGate. Default +# parameters only save the information about the default LVL2 MET +# reconstruction. The user should configure it specifically in the job +# itself. +# + +from D3PDMakerCoreComps.D3PDObject import D3PDObject +from D3PDMakerCoreComps.D3PDObject import make_SG_D3PDObject +import TrigMissingETD3PDMaker + +TrigMETD3PDObject = make_SG_D3PDObject( "TrigMissingETContainer", + "HLT_T2MissingET", + "trig_L2_met_", + "TrigMETD3PDObject" ) + +TrigMETD3PDObject.defineBlock( 0, "BasicInfo", + TrigMissingETD3PDMaker.TrigMissingETBaseFillerTool ) + +TrigMETD3PDObject.defineBlock( 0, "ComponentInfo", + TrigMissingETD3PDMaker.TrigMissingETComponentFillerTool ) diff --git a/PhysicsAnalysis/D3PDMaker/TrigMissingETD3PDMaker/python/__init__.py b/PhysicsAnalysis/D3PDMaker/TrigMissingETD3PDMaker/python/__init__.py new file mode 100644 index 000000000000..4c23b5ca47a3 --- /dev/null +++ b/PhysicsAnalysis/D3PDMaker/TrigMissingETD3PDMaker/python/__init__.py @@ -0,0 +1,22 @@ +# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + +# $Id: __init__.py 278517 2010-02-10 16:46:44Z krasznaa $ +# +# @file TrigMissingETD3PDMaker/python/__init__.py +# @author scott snyder <snyder@bnl.gov> +# @date Sep, 2009 +# @brief Define shortcuts for referencing configurables in this package. +# +# With this, instead of writing +# +# TrigMissingETD3PDMaker.TrigMissingETD3PDMakerConf.D3PD__TrigMissingETBaseFillerTool +# +# we can write +# +# TrigMissingETD3PDMaker.TrigMissingETBaseFillerTool +# + +import TrigMissingETD3PDMakerConf +for k, v in TrigMissingETD3PDMakerConf.__dict__.items(): + if k.startswith ('D3PD__'): + globals()[k[6:]] = v diff --git a/PhysicsAnalysis/D3PDMaker/TrigMissingETD3PDMaker/share/makeTrigMETD3PD.py b/PhysicsAnalysis/D3PDMaker/TrigMissingETD3PDMaker/share/makeTrigMETD3PD.py new file mode 100644 index 000000000000..bf337f8f23ff --- /dev/null +++ b/PhysicsAnalysis/D3PDMaker/TrigMissingETD3PDMaker/share/makeTrigMETD3PD.py @@ -0,0 +1,41 @@ +# $Id: makeTrigMETD3PD.py 295662 2010-04-27 08:24:34Z krasznaa $ +# +# This is a simple top level jobO for creating "the" trigger MET D3PD from +# the specified AOD/ESD file(s). +# + +# Set the input file name(s): +from AthenaCommon.AthenaCommonFlags import athenaCommonFlags +athenaCommonFlags.FilesInput.set_Value_and_Lock( [ + "AOD.pool.root" + ] ) + +# Set the number of events to process: +athenaCommonFlags.EvtMax.set_Value_and_Lock( 100 ) + +# Set up what the RecExCommon job should and shouldn't do: +from RecExConfig.RecFlags import rec +rec.AutoConfiguration = [ "everything" ] +rec.doCBNT.set_Value_and_Lock( False ) +rec.doWriteESD.set_Value_and_Lock( False ) +rec.doWriteAOD.set_Value_and_Lock( False ) +rec.doWriteTAG.set_Value_and_Lock( False ) +rec.doESD.set_Value_and_Lock( False ) +rec.doAOD.set_Value_and_Lock( False ) +rec.doDPD.set_Value_and_Lock( False ) +rec.doHist.set_Value_and_Lock( False ) +rec.doPerfMon.set_Value_and_Lock( False ) +rec.doForwardDet.set_Value_and_Lock( False ) + +# Let RecExCommon set everything up: +include( "RecExCommon/RecExCommon_topOptions.py" ) + +# Read some parameters from the command line: +if not "level" in dir(): + level = 10 +if not "OutputName" in dir(): + OutputName = "trig_met_d3pd_level%d.root" % level + +# Now add the D3PD maker to the job: +from TrigMissingETD3PDMaker.TrigMETD3PD import TrigMETD3PD +alg = TrigMETD3PD( OutputName, level ) diff --git a/PhysicsAnalysis/D3PDMaker/TrigMissingETD3PDMaker/src/TrigMissingETBaseFillerTool.cxx b/PhysicsAnalysis/D3PDMaker/TrigMissingETD3PDMaker/src/TrigMissingETBaseFillerTool.cxx new file mode 100644 index 000000000000..73493d4d99db --- /dev/null +++ b/PhysicsAnalysis/D3PDMaker/TrigMissingETD3PDMaker/src/TrigMissingETBaseFillerTool.cxx @@ -0,0 +1,82 @@ +/* + Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration +*/ + +// $Id: TrigMissingETBaseFillerTool.cxx 502729 2012-05-27 21:54:40Z ssnyder $ + +// Gaudi/Athena include(s): +#include "AthenaKernel/errorcheck.h" + +// EDM include(s): +#include "TrigMissingEtEvent/TrigMissingET.h" + +// Local include(s): +#include "TrigMissingETBaseFillerTool.h" + +namespace D3PD { + + TrigMissingETBaseFillerTool::TrigMissingETBaseFillerTool( const std::string& type, + const std::string& name, + const IInterface* parent ) + : BlockFillerTool< TrigMissingETContainer >( type, name, parent ) + { + book().ignore(); // Avoid coverity warnings. + } + + /** + * Here the output variables are declared to the D3PDMaker framework. + */ + StatusCode TrigMissingETBaseFillerTool::book() { + + CHECK( addVariable( "MEx", m_ex ) ); + CHECK( addVariable( "MEy", m_ey ) ); + CHECK( addVariable( "MEz", m_ez ) ); + CHECK( addVariable( "sumEt", m_sumEt ) ); + CHECK( addVariable( "sumE", m_sumE ) ); + + CHECK( addVariable( "flag", m_flag ) ); + + return StatusCode::SUCCESS; + } + + /** + * Here the output variables are filled with the information coming from a + * TrigMissingET object. + */ + StatusCode TrigMissingETBaseFillerTool::fill( const TrigMissingETContainer& met ) { + + // Fill the variables with dummy values: + *m_ex = -99999999.9; + *m_ey = -99999999.9; + *m_ez = -99999999.9; + *m_sumEt = -99999999.9; + *m_sumE = -99999999.9; + + *m_flag = 0x80000000; + + // If the container is empty, leave the dummy values in the variables: + if( ! met.size() ) { + REPORT_MESSAGE( MSG::DEBUG ) << "TrigMET container is empty!"; + return StatusCode::SUCCESS; + } + + // Issue a warning if there are more than 1 objects in the container. + // This should not happen if the HLT is working correctly. + if( met.size() > 1 ) { + REPORT_MESSAGE( MSG::WARNING ) << "TrigMET container has multiple objects!"; + REPORT_MESSAGE( MSG::WARNING ) << "Check with trigger experts!"; + } + + // Fill the variables with the correct values: + *m_ex = met.front()->ex(); + *m_ey = met.front()->ey(); + *m_ez = met.front()->ez(); + *m_sumEt = met.front()->sumEt(); + *m_sumE = met.front()->sumE(); + + *m_flag = met.front()->getFlag(); + + return StatusCode::SUCCESS; + } + +} // namespace D3PD diff --git a/PhysicsAnalysis/D3PDMaker/TrigMissingETD3PDMaker/src/TrigMissingETBaseFillerTool.h b/PhysicsAnalysis/D3PDMaker/TrigMissingETD3PDMaker/src/TrigMissingETBaseFillerTool.h new file mode 100644 index 000000000000..60597feaee82 --- /dev/null +++ b/PhysicsAnalysis/D3PDMaker/TrigMissingETD3PDMaker/src/TrigMissingETBaseFillerTool.h @@ -0,0 +1,56 @@ +// Dear emacs, this is -*- c++ -*- + +/* + Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration +*/ + +// $Id: TrigMissingETBaseFillerTool.h 278740 2010-02-11 14:32:52Z krasznaa $ +#ifndef TRIGMISSINGETD3PDMAKER_TRIGMISSINGETBASEFILLERTOOL_H +#define TRIGMISSINGETD3PDMAKER_TRIGMISSINGETBASEFILLERTOOL_H + +// EDM include(s): +#include "TrigMissingEtEvent/TrigMissingETContainer.h" + +// D3PD include(s): +#include "D3PDMakerUtils/BlockFillerTool.h" + +namespace D3PD { + + /** + * @short Filler tool saving basic information about missing-ET objects + * + * This tool saves the bare minimum of information about the + * missing-ET reconstructed in the HLT. + * + * @author Attila Krasznahorkay Jr. + * @author Diego Casadei + * + * $Revision: 278740 $ + * $Date: 2010-02-11 15:32:52 +0100 (Thu, 11 Feb 2010) $ + */ + class TrigMissingETBaseFillerTool : public BlockFillerTool< TrigMissingETContainer > { + + public: + /// Regular AlgTool constructor + TrigMissingETBaseFillerTool( const std::string& type, const std::string& name, + const IInterface* parent ); + + /// Function declaring the output variables + virtual StatusCode book(); + /// Function filling the output variables + virtual StatusCode fill( const TrigMissingETContainer& met ); + + private: + float* m_ex; ///< X component of missing energy vector + float* m_ey; ///< Y component of missing energy vector + float* m_ez; ///< Z component of missing energy vector + float* m_sumEt; ///< Sum of |Et| + float* m_sumE; ///< Sum of |E| + + int* m_flag; ///< Event flag: 0 (default) means OK + + }; // class TrigMissingETBaseFillerTool + +} // namespace D3PD + +#endif // TRIGMISSINGETD3PDMAKER_TRIGMISSINGETBASEFILLERTOOL_H diff --git a/PhysicsAnalysis/D3PDMaker/TrigMissingETD3PDMaker/src/TrigMissingETComponentFillerTool.cxx b/PhysicsAnalysis/D3PDMaker/TrigMissingETD3PDMaker/src/TrigMissingETComponentFillerTool.cxx new file mode 100644 index 000000000000..095cd964fe0c --- /dev/null +++ b/PhysicsAnalysis/D3PDMaker/TrigMissingETD3PDMaker/src/TrigMissingETComponentFillerTool.cxx @@ -0,0 +1,98 @@ +/* + Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration +*/ + +// $Id: TrigMissingETComponentFillerTool.cxx 502729 2012-05-27 21:54:40Z ssnyder $ + +// Gaudi/Athena include(s): +#include "AthenaKernel/errorcheck.h" + +// EDM include(s): +#include "TrigMissingEtEvent/TrigMissingET.h" + +// Local include(s): +#include "TrigMissingETComponentFillerTool.h" + +namespace D3PD { + + TrigMissingETComponentFillerTool::TrigMissingETComponentFillerTool( const std::string& type, + const std::string& name, + const IInterface* parent ) + : BlockFillerTool< TrigMissingETContainer >( type, name, parent ) + { + book().ignore(); // Avoid coverity warnings. + } + + /** + * Here the output variables are declared to the D3PDMaker framework. + */ + StatusCode TrigMissingETComponentFillerTool::book() { + + CHECK( addVariable( "nameOfComponent", m_name ) ); + CHECK( addVariable( "MExComponent", m_ex ) ); + CHECK( addVariable( "MEyComponent", m_ey ) ); + CHECK( addVariable( "MEzComponent", m_ez ) ); + CHECK( addVariable( "sumEtComponent", m_sumEt ) ); + CHECK( addVariable( "sumEComponent", m_sumE ) ); + CHECK( addVariable( "componentCalib0", m_calib0 ) ); + CHECK( addVariable( "componentCalib1", m_calib1 ) ); + CHECK( addVariable( "sumOfSigns", m_sumOfSigns ) ); + CHECK( addVariable( "usedChannels", m_usedChannels ) ); + CHECK( addVariable( "status", m_status ) ); + + return StatusCode::SUCCESS; + } + + /** + * Here the output variables are filled with the information coming from a + * TrigMissingET object. + */ + StatusCode TrigMissingETComponentFillerTool::fill( const TrigMissingETContainer& met ) { + + // Clear the vectors: + m_name->clear(); + m_ex->clear(); + m_ey->clear(); + m_ez->clear(); + m_sumEt->clear(); + m_sumE->clear(); + m_calib0->clear(); + m_calib1->clear(); + m_sumOfSigns->clear(); + m_usedChannels->clear(); + m_status->clear(); + + // If the container is empty, leave the dummy values in the variables: + if( ! met.size() ) { + REPORT_MESSAGE( MSG::DEBUG ) << "TrigMET container is empty!"; + return StatusCode::SUCCESS; + } + + // Issue a warning if there are more than 1 objects in the container. + // This should not happen if the HLT is working correctly. + if( met.size() > 1 ) { + REPORT_MESSAGE( MSG::WARNING ) << "TrigMET container has multiple objects!"; + REPORT_MESSAGE( MSG::WARNING ) << "Check with trigger experts!"; + } + + // Fill the variables with the correct values: + for( unsigned int i = 0; i < met.front()->getNumOfComponents(); ++i ) { + + m_name->push_back( met.front()->getNameOfComponent( i ) ); + m_ex->push_back( met.front()->getExComponent( i ) ); + m_ey->push_back( met.front()->getEyComponent( i ) ); + m_ez->push_back( met.front()->getEzComponent( i ) ); + m_sumEt->push_back( met.front()->getSumEtComponent( i ) ); + m_sumE->push_back( met.front()->getSumEComponent( i ) ); + m_calib0->push_back( met.front()->getComponentCalib0( i ) ); + m_calib1->push_back( met.front()->getComponentCalib1( i ) ); + m_sumOfSigns->push_back( met.front()->getSumOfSigns( i ) ); + m_usedChannels->push_back( met.front()->getUsedChannels( i ) ); + m_status->push_back( met.front()->getStatus( i ) ); + + } + + return StatusCode::SUCCESS; + } + +} // namespace D3PD diff --git a/PhysicsAnalysis/D3PDMaker/TrigMissingETD3PDMaker/src/TrigMissingETComponentFillerTool.h b/PhysicsAnalysis/D3PDMaker/TrigMissingETD3PDMaker/src/TrigMissingETComponentFillerTool.h new file mode 100644 index 000000000000..0f6812eb2ef9 --- /dev/null +++ b/PhysicsAnalysis/D3PDMaker/TrigMissingETD3PDMaker/src/TrigMissingETComponentFillerTool.h @@ -0,0 +1,59 @@ +// Dear emacs, this is -*- c++ -*- + +/* + Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration +*/ + +// $Id: TrigMissingETComponentFillerTool.h 278740 2010-02-11 14:32:52Z krasznaa $ +#ifndef TRIGMISSINGETD3PDMAKER_TRIGMISSINGETCOMPONENTFILLERTOOL_H +#define TRIGMISSINGETD3PDMAKER_TRIGMISSINGETCOMPONENTFILLERTOOL_H + +// EDM include(s): +#include "TrigMissingEtEvent/TrigMissingETContainer.h" + +// D3PD include(s): +#include "D3PDMakerUtils/BlockFillerTool.h" + +namespace D3PD { + + /** + * @short Filler tool saving the components of the missing-ET objects + * + * This tool saves the components of the HLT missing-ET calculation. + * + * @author Attila Krasznahorkay Jr. + * @author Diego Casadei + * + * $Revision: 278740 $ + * $Date: 2010-02-11 15:32:52 +0100 (Thu, 11 Feb 2010) $ + */ + class TrigMissingETComponentFillerTool : public BlockFillerTool< TrigMissingETContainer > { + + public: + /// Regular AlgTool constructor + TrigMissingETComponentFillerTool( const std::string& type, const std::string& name, + const IInterface* parent ); + + /// Function declaring the output variables + virtual StatusCode book(); + /// Function filling the output variables + virtual StatusCode fill( const TrigMissingETContainer& met ); + + private: + std::vector< std::string >* m_name; ///< Name of component + std::vector< float >* m_ex; ///< Ex from component + std::vector< float >* m_ey; ///< Ey from component + std::vector< float >* m_ez; ///< Ez from component + std::vector< float >* m_sumEt; ///< Sum of |Et| from component + std::vector< float >* m_sumE; ///< Sum of |E| from component + std::vector< float >* m_calib0; ///< Constant term for calibration of component + std::vector< float >* m_calib1; ///< Scale for calibration of component + std::vector< short >* m_sumOfSigns; ///< Sum of energy signs for calibration of comp. + std::vector< unsigned short >* m_usedChannels; ///< Number of used channels in component + std::vector< short >* m_status; ///< Status flag for component + + }; // class TrigMissingETComponentFillerTool + +} // namespace D3PD + +#endif // TRIGMISSINGETD3PDMAKER_TRIGMISSINGETCOMPONENTFILLERTOOL_H diff --git a/PhysicsAnalysis/D3PDMaker/TrigMissingETD3PDMaker/src/TrigMissingETGetterTool.h b/PhysicsAnalysis/D3PDMaker/TrigMissingETD3PDMaker/src/TrigMissingETGetterTool.h new file mode 100644 index 000000000000..94a805f747fd --- /dev/null +++ b/PhysicsAnalysis/D3PDMaker/TrigMissingETD3PDMaker/src/TrigMissingETGetterTool.h @@ -0,0 +1,45 @@ +// Dear emacs, this is -*- c++ -*- + +/* + Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration +*/ + +// $Id: TrigMissingETGetterTool.h 278517 2010-02-10 16:46:44Z krasznaa $ +#ifndef TRIGMISSINGETD3PDMAKER_TRIGMISSINGETGETTERTOOL_H +#define TRIGMISSINGETD3PDMAKER_TRIGMISSINGETGETTERTOOL_H + +// EDM include(s): +#include "TrigMissingEtEvent/TrigMissingET.h" + +// D3PD include(s): +#include "TriggerD3PDMaker/TriggerObjectGetterTool.h" + +namespace D3PD { + + /** + * @short Tool retrieving TrigMissingET objects from specific HLT chains + * + * This is just here in "experimental mode". By default the TrigMissingET + * objects are picked up from StoreGate directly. But this tool allows us + * to select TrigMissingET objects only from specific HLT chains. + * + * @author Attila Krasznahorkay Jr. + * @author Diego Casadei + * + * $Revision: 278517 $ + * $Date: 2010-02-10 17:46:44 +0100 (Wed, 10 Feb 2010) $ + */ + class TrigMissingETGetterTool : + public TriggerObjectGetterTool< TrigMissingET > { + + public: + /// Regular AlgTool constructor + TrigMissingETGetterTool( const std::string& type, const std::string& name, + const IInterface* parent ) + : TriggerObjectGetterTool< TrigMissingET >( type, name, parent ) {} + + }; // class TrigMissingETGetterTool + +} // namespace D3PD + +#endif // TRIGMISSINGETD3PDMAKER_TRIGMISSINGETGETTERTOOL_H diff --git a/PhysicsAnalysis/D3PDMaker/TrigMissingETD3PDMaker/src/components/TrigMissingETD3PDMaker_entries.cxx b/PhysicsAnalysis/D3PDMaker/TrigMissingETD3PDMaker/src/components/TrigMissingETD3PDMaker_entries.cxx new file mode 100644 index 000000000000..1a2d8f810962 --- /dev/null +++ b/PhysicsAnalysis/D3PDMaker/TrigMissingETD3PDMaker/src/components/TrigMissingETD3PDMaker_entries.cxx @@ -0,0 +1,27 @@ +// $Id: TrigMissingETD3PDMaker_entries.cxx 278740 2010-02-11 14:32:52Z krasznaa $ + +// Gaudi/Athena include(s): +#include "GaudiKernel/DeclareFactoryEntries.h" + +// Local include(s): +#include "../TrigMissingETBaseFillerTool.h" +#include "../TrigMissingETComponentFillerTool.h" + +#include "../TrigMissingETGetterTool.h" + +// +// Declare the components of the package: +// +DECLARE_NAMESPACE_TOOL_FACTORY( D3PD, TrigMissingETBaseFillerTool ) +DECLARE_NAMESPACE_TOOL_FACTORY( D3PD, TrigMissingETComponentFillerTool ) + +DECLARE_NAMESPACE_TOOL_FACTORY( D3PD, TrigMissingETGetterTool ) + +DECLARE_FACTORY_ENTRIES( TrigMissingETD3PDMaker ) { + + DECLARE_NAMESPACE_TOOL( D3PD, TrigMissingETBaseFillerTool ) + DECLARE_NAMESPACE_TOOL( D3PD, TrigMissingETComponentFillerTool ) + + DECLARE_NAMESPACE_TOOL( D3PD, TrigMissingETGetterTool ) + +} diff --git a/PhysicsAnalysis/D3PDMaker/TrigMissingETD3PDMaker/src/components/TrigMissingETD3PDMaker_load.cxx b/PhysicsAnalysis/D3PDMaker/TrigMissingETD3PDMaker/src/components/TrigMissingETD3PDMaker_load.cxx new file mode 100644 index 000000000000..0bb1301d03f1 --- /dev/null +++ b/PhysicsAnalysis/D3PDMaker/TrigMissingETD3PDMaker/src/components/TrigMissingETD3PDMaker_load.cxx @@ -0,0 +1,7 @@ +// $Id: TrigMissingETD3PDMaker_load.cxx 278517 2010-02-10 16:46:44Z krasznaa $ + +// Gaudi/Athena include(s): +#include "GaudiKernel/LoadFactoryEntries.h" + +// Declare the library to the framework: +LOAD_FACTORY_ENTRIES( TrigMissingETD3PDMaker ) -- GitLab