diff --git a/Trigger/TrigHypothesis/TrigEgammaHypo/python/TrigEgammaFastCaloHypoTool.py b/Trigger/TrigHypothesis/TrigEgammaHypo/python/TrigEgammaFastCaloHypoTool.py index e79e14e6ce19aac36a3fd37e83631332e58fc89c..9a0a46f38e1e15e6323b0050baf5656d7df2ebe1 100644 --- a/Trigger/TrigHypothesis/TrigEgammaHypo/python/TrigEgammaFastCaloHypoTool.py +++ b/Trigger/TrigHypothesis/TrigEgammaHypo/python/TrigEgammaFastCaloHypoTool.py @@ -1,9 +1,7 @@ # Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration from AthenaCommon.SystemOfUnits import GeV -from AthenaCommon.Include import Include -# flake8: noqa -from AthenaCommon.AthenaCommonFlags import athenaCommonFlags +from AthenaCommon.AthenaCommonFlags import athenaCommonFlags from TriggerJobOpts.TriggerFlags import TriggerFlags from TrigEgammaHypo.TrigL2CaloHypoCutDefs import L2CaloCutMaps from AthenaMonitoringKernel.GenericMonitoringTool import GenericMonitoringTool,defineHistogram @@ -17,12 +15,11 @@ log = logging.getLogger('TrigEgammaFastCaloHypoTool') def _GetPath( cand, sel, basepath = 'RingerSelectorTools/TrigL2_20180903_v9' ): - logger = logging.getLogger("TrigMultiVarHypo.GetPath") from TriggerMenu.egamma.EgammaSliceFlags import EgammaSliceFlags if EgammaSliceFlags.ringerVersion(): basepath = EgammaSliceFlags.ringerVersion() - logger.info('TrigMultiVarHypo version: %s', basepath) - if not sel in _possibleSel.keys(): + log.debug('_GetPath: TrigMultiVarHypo version: %s', basepath) + if sel not in _possibleSel.keys(): raise RuntimeError( "Bad selection name: %s" % sel ) if 'e' in cand: constant = basepath+'/'+ 'TrigL2CaloRingerElectron{SEL}Constants.root'.format(SEL=_possibleSel[sel]) @@ -125,7 +122,7 @@ def _IncTool(name, cand, threshold, sel): tool.CARCOREthr = L2CaloCutMaps( threshold ).MapsCARCOREthr[sel] tool.CAERATIOthr = L2CaloCutMaps( threshold ).MapsCAERATIOthr[sel] - elif sel in _possibleSel.keys() and not "noringer" in name and cand=="e": + elif sel in _possibleSel.keys() and "noringer" not in name and cand=="e": tool.UseRinger = True pconstants, pthresholds = _GetPath( cand, sel ) tool.ConstantsCalibPath = pconstants diff --git a/Trigger/TrigHypothesis/TrigEgammaHypo/python/TrigEgammaFastElectronHypoTool.py b/Trigger/TrigHypothesis/TrigEgammaHypo/python/TrigEgammaFastElectronHypoTool.py index abbc46d60ad1938286433b9dcb9c92ae31307542..9962a8780f1f457a15d1268159cf0877e590bdf0 100644 --- a/Trigger/TrigHypothesis/TrigEgammaHypo/python/TrigEgammaFastElectronHypoTool.py +++ b/Trigger/TrigHypothesis/TrigEgammaHypo/python/TrigEgammaFastElectronHypoTool.py @@ -1,13 +1,10 @@ -# Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration +# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration from AthenaCommon.SystemOfUnits import GeV from AthenaCommon.Logging import logging -from AthenaCommon.Include import Include -# flake8: noqa from AthenaMonitoringKernel.GenericMonitoringTool import GenericMonitoringTool - log = logging.getLogger('TrigEgammaFastElectronHypoTool') def TrigEgammaFastElectronHypoToolFromDict( chainDict ): diff --git a/Trigger/TrigHypothesis/TrigEgammaHypo/python/TrigEgammaFastPhotonHypoTool.py b/Trigger/TrigHypothesis/TrigEgammaHypo/python/TrigEgammaFastPhotonHypoTool.py index 2bdbe772d45406dbebf1dbe2ddb2d8aef0784900..b59a4fb95b528a19896b414e27c4f4e1a5a8d36a 100644 --- a/Trigger/TrigHypothesis/TrigEgammaHypo/python/TrigEgammaFastPhotonHypoTool.py +++ b/Trigger/TrigHypothesis/TrigEgammaHypo/python/TrigEgammaFastPhotonHypoTool.py @@ -1,9 +1,7 @@ -# Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration +# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration from AthenaCommon.SystemOfUnits import GeV -from AthenaCommon.Include import Include -# flake8: noqa from AthenaMonitoringKernel.GenericMonitoringTool import GenericMonitoringTool from AthenaCommon.Logging import logging log = logging.getLogger('TrigEgammaFastPhotonHypoTool') diff --git a/Trigger/TrigHypothesis/TrigEgammaHypo/src/TrigEgammaFastCaloHypoToolInc.cxx b/Trigger/TrigHypothesis/TrigEgammaHypo/src/TrigEgammaFastCaloHypoToolInc.cxx index 371cef4379a2b2a1f0fc11d3d6f812847995a1ba..4ae71228f7686a8dcef3bb1c074d648249b8e337 100644 --- a/Trigger/TrigHypothesis/TrigEgammaHypo/src/TrigEgammaFastCaloHypoToolInc.cxx +++ b/Trigger/TrigHypothesis/TrigEgammaHypo/src/TrigEgammaFastCaloHypoToolInc.cxx @@ -18,29 +18,25 @@ TrigEgammaFastCaloHypoToolInc::TrigEgammaFastCaloHypoToolInc( const std::string& const IInterface* parent ) : base_class( type, name, parent ), m_selectorTool(), - m_lumiBlockMuTool("LumiBlockMuTool/LumiBlockMuTool"), - m_decisionId( HLT::Identifier::fromToolName( name ) ) + m_decisionId( HLT::Identifier::fromToolName( name ) ) { -declareProperty("LumiBlockMuTool", m_lumiBlockMuTool, "Luminosity Tool" ); } StatusCode TrigEgammaFastCaloHypoToolInc::initialize() { -ATH_MSG_DEBUG("Name: "<<name()<<" UseRinger: "<<m_useRinger); + ATH_MSG_DEBUG("Name: "<<name()<<" UseRinger: "<<m_useRinger); -if (m_useRinger){ - m_selectorTool.setConstantsCalibPath( m_constantsCalibPath ); - m_selectorTool.setThresholdsCalibPath( m_thresholdsCalibPath ); + if (m_useRinger){ + m_selectorTool.setConstantsCalibPath( m_constantsCalibPath ); + m_selectorTool.setThresholdsCalibPath( m_thresholdsCalibPath ); + + if(m_selectorTool.initialize().isFailure()) + return StatusCode::FAILURE; + + if (m_lumiBlockMuTool.retrieve().isFailure()) + return StatusCode::FAILURE; + } - if(m_selectorTool.initialize().isFailure()) - return StatusCode::FAILURE; - - if (m_lumiBlockMuTool.retrieve().isFailure()) - return StatusCode::FAILURE; - - ATH_MSG_INFO("TrigEgammaFastCaloRingerHypo initialization completed successfully."); - -} ATH_MSG_DEBUG( "Initialization completed successfully" ); ATH_MSG_DEBUG( "AcceptAll = " << ( m_acceptAll==true ? "True" : "False" ) ); ATH_MSG_DEBUG( "EtaBins = " << m_etabin ); @@ -84,8 +80,6 @@ if (m_useRinger){ -TrigEgammaFastCaloHypoToolInc::~TrigEgammaFastCaloHypoToolInc(){} - int TrigEgammaFastCaloHypoToolInc::findCutIndex( float eta ) const { const float absEta = std::abs(eta); @@ -401,4 +395,4 @@ bool TrigEgammaFastCaloHypoToolInc::decide_ringer ( const ITrigEgammaFastCaloHyp total_time.stop(); return accept; -} \ No newline at end of file +} diff --git a/Trigger/TrigHypothesis/TrigEgammaHypo/src/TrigEgammaFastCaloHypoToolInc.h b/Trigger/TrigHypothesis/TrigEgammaHypo/src/TrigEgammaFastCaloHypoToolInc.h index 700726b977b70f6f745d86b4e7fdb4d73e6bf3d9..40e058f142dea1d6628e272b591cbddc2c990200 100644 --- a/Trigger/TrigHypothesis/TrigEgammaHypo/src/TrigEgammaFastCaloHypoToolInc.h +++ b/Trigger/TrigHypothesis/TrigEgammaHypo/src/TrigEgammaFastCaloHypoToolInc.h @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration */ #ifndef TRIGEGAMMAHYPO_TRIGEGAMMAFASTCALOHYPOTOOLINC_H #define TRIGEGAMMAHYPO_TRIGEGAMMAFASTCALOHYPOTOOLINC_H 1 @@ -30,7 +30,6 @@ class TrigEgammaFastCaloHypoToolInc : public extends<AthAlgTool, ITrigEgammaFast const std::string& name, const IInterface* parent ); - virtual ~TrigEgammaFastCaloHypoToolInc(); virtual StatusCode initialize() override; virtual StatusCode decide( std::vector<ITrigEgammaFastCaloHypoTool::FastClusterInfo>& input ) const override; @@ -43,7 +42,7 @@ class TrigEgammaFastCaloHypoToolInc : public extends<AthAlgTool, ITrigEgammaFast private: Ringer::RingerSelectorTool m_selectorTool; - ToolHandle<ILumiBlockMuTool> m_lumiBlockMuTool; + ToolHandle<ILumiBlockMuTool> m_lumiBlockMuTool{this, "LumiBlockMuTool", "LumiBlockMuTool/LumiBlockMuTool", "Luminosity Tool"}; Gaudi::Property<std::string> m_constantsCalibPath{this, "ConstantsCalibPath", "", "Constants Calib Path"}; Gaudi::Property<std::string> m_thresholdsCalibPath{this, "ThresholdsCalibPath", "", "Thresholds Calib Path"}; HLT::Identifier m_decisionId; diff --git a/Trigger/TrigHypothesis/TrigEgammaHypo/src/TrigEgammaPrecisionElectronHypoToolInc.cxx b/Trigger/TrigHypothesis/TrigEgammaHypo/src/TrigEgammaPrecisionElectronHypoToolInc.cxx index 2aa52f195167ddd5bbe0615639b5cafcfc7f8fd2..02401d56b06a680bb434c318b47081bae71f06be 100644 --- a/Trigger/TrigHypothesis/TrigEgammaHypo/src/TrigEgammaPrecisionElectronHypoToolInc.cxx +++ b/Trigger/TrigHypothesis/TrigEgammaHypo/src/TrigEgammaPrecisionElectronHypoToolInc.cxx @@ -17,11 +17,9 @@ TrigEgammaPrecisionElectronHypoToolInc::TrigEgammaPrecisionElectronHypoToolInc( const std::string& name, const IInterface* parent ) : base_class( type, name, parent ), - m_decisionId( HLT::Identifier::fromToolName( name ) ) - { - declareProperty("ElectronLHSelector" ,m_egammaElectronLHTool ); - declareProperty("RelPtConeCut" ,m_RelPtConeCut=-999.); - } + m_decisionId( HLT::Identifier::fromToolName( name ) ) { +} + StatusCode TrigEgammaPrecisionElectronHypoToolInc::initialize() { ATH_MSG_DEBUG( "Initialization completed successfully" ); @@ -55,10 +53,6 @@ StatusCode TrigEgammaPrecisionElectronHypoToolInc::initialize() { } - -TrigEgammaPrecisionElectronHypoToolInc::~TrigEgammaPrecisionElectronHypoToolInc(){} - - bool TrigEgammaPrecisionElectronHypoToolInc::decide( const ITrigEgammaPrecisionElectronHypoTool::ElectronInfo& input,const EventContext& ctx) const { bool pass = false; diff --git a/Trigger/TrigHypothesis/TrigEgammaHypo/src/TrigEgammaPrecisionElectronHypoToolInc.h b/Trigger/TrigHypothesis/TrigEgammaHypo/src/TrigEgammaPrecisionElectronHypoToolInc.h index 9fadd88163ae845e1ef0316a994a460f6d7cb56a..5375c5b6c9191c519fab00c778caae5bd598d02b 100644 --- a/Trigger/TrigHypothesis/TrigEgammaHypo/src/TrigEgammaPrecisionElectronHypoToolInc.h +++ b/Trigger/TrigHypothesis/TrigEgammaHypo/src/TrigEgammaPrecisionElectronHypoToolInc.h @@ -31,7 +31,6 @@ class TrigEgammaPrecisionElectronHypoToolInc : public extends<AthAlgTool, ITrigE const std::string& name, const IInterface* parent ); - virtual ~TrigEgammaPrecisionElectronHypoToolInc(); virtual StatusCode initialize() override; virtual StatusCode decide( std::vector<ITrigEgammaPrecisionElectronHypoTool::ElectronInfo>& input, const EventContext& ctx) const override; @@ -45,15 +44,11 @@ class TrigEgammaPrecisionElectronHypoToolInc : public extends<AthAlgTool, ITrigE Gaudi::Property< std::vector<float> > m_eTthr { this, "ETthr", {}, "ET Threshold" }; Gaudi::Property< float > m_detacluster { this, "dETACLUSTERthr", 0. , "" }; Gaudi::Property< float > m_dphicluster { this, "dPHICLUSTERthr", 0. , "" }; + Gaudi::Property< float > m_RelPtConeCut { this, "RelPtConeCut", -999., "Track isolation cut" }; ToolHandle< GenericMonitoringTool > m_monTool { this, "MonTool", "", "Monitoring tool" }; + ToolHandle<IAsgElectronLikelihoodTool> m_egammaElectronLHTool{ this, "ElectronLHSelector", "", "Likelihood tool" }; - /*Likelihood tool*/ - ToolHandle<IAsgElectronLikelihoodTool> m_egammaElectronLHTool; - - /* TRack isolation cut */ - float m_RelPtConeCut; - /*Luminosity info*/ SG::ReadDecorHandleKey<xAOD::EventInfo> m_avgMuKey { this, "averageInteractionsPerCrossingKey", "EventInfo.averageInteractionsPerCrossing", "Decoration for Average Interaction Per Crossing" }; int findCutIndex( float eta ) const; diff --git a/Trigger/TrigHypothesis/TrigEgammaHypo/src/TrigEgammaPrecisionPhotonHypoToolInc.cxx b/Trigger/TrigHypothesis/TrigEgammaHypo/src/TrigEgammaPrecisionPhotonHypoToolInc.cxx index fa119ef3cf7224e6aa1f86339e29c77115e7e165..a0dcf56176593faf9d8ff5b87942f28ed77a958b 100644 --- a/Trigger/TrigHypothesis/TrigEgammaHypo/src/TrigEgammaPrecisionPhotonHypoToolInc.cxx +++ b/Trigger/TrigHypothesis/TrigEgammaHypo/src/TrigEgammaPrecisionPhotonHypoToolInc.cxx @@ -16,10 +16,8 @@ TrigEgammaPrecisionPhotonHypoToolInc::TrigEgammaPrecisionPhotonHypoToolInc( cons const IInterface* parent ) : base_class( type, name, parent ), m_decisionId( HLT::Identifier::fromToolName( name ) ) { - declareProperty("PhotonIsEMSelector" ,m_egammaPhotonCutIDTool ); - declareProperty("RelEtConeCut" ,m_RelEtConeCut=-999.); +} - } StatusCode TrigEgammaPrecisionPhotonHypoToolInc::initialize() { ATH_MSG_DEBUG( "Initialization completed successfully" ); @@ -57,8 +55,6 @@ StatusCode TrigEgammaPrecisionPhotonHypoToolInc::initialize() { } -TrigEgammaPrecisionPhotonHypoToolInc::~TrigEgammaPrecisionPhotonHypoToolInc(){} - bool TrigEgammaPrecisionPhotonHypoToolInc::decide( const ITrigEgammaPrecisionPhotonHypoTool::PhotonInfo& input ) const { bool pass = false; diff --git a/Trigger/TrigHypothesis/TrigEgammaHypo/src/TrigEgammaPrecisionPhotonHypoToolInc.h b/Trigger/TrigHypothesis/TrigEgammaHypo/src/TrigEgammaPrecisionPhotonHypoToolInc.h index 8f91562e18858ec9221dfa954b452a94d4f07005..c66149fe90212f248272376c2501cfc8ab0c9fbe 100644 --- a/Trigger/TrigHypothesis/TrigEgammaHypo/src/TrigEgammaPrecisionPhotonHypoToolInc.h +++ b/Trigger/TrigHypothesis/TrigEgammaHypo/src/TrigEgammaPrecisionPhotonHypoToolInc.h @@ -29,7 +29,6 @@ class TrigEgammaPrecisionPhotonHypoToolInc : public extends<AthAlgTool, ITrigEga const std::string& name, const IInterface* parent ); - virtual ~TrigEgammaPrecisionPhotonHypoToolInc(); virtual StatusCode initialize() override; virtual StatusCode decide( std::vector<ITrigEgammaPrecisionPhotonHypoTool::PhotonInfo>& input ) const override; @@ -43,13 +42,11 @@ class TrigEgammaPrecisionPhotonHypoToolInc : public extends<AthAlgTool, ITrigEga Gaudi::Property< std::vector<float> > m_etabin { this, "EtaBins", {} , "Bins of eta" }; //!< selection variable for PRECISION calo selection:eta bins Gaudi::Property< std::vector<float> > m_eTthr { this, "ETthr", {}, "ET Threshold" }; Gaudi::Property< float > m_detacluster { this, "dETACLUSTERthr", 0. , "" }; - Gaudi::Property< float > m_dphicluster { this, "dPHICLUSTERthr", 0. , "" }; - - /* Calo isolation cut */ - float m_RelEtConeCut; + Gaudi::Property< float > m_dphicluster { this, "dPHICLUSTERthr", 0. , "" }; + Gaudi::Property< float > m_RelEtConeCut { this, "RelEtConeCut", -999. , "Calo isolation cut" }; ToolHandle< GenericMonitoringTool > m_monTool { this, "MonTool", "", "Monitoring tool" }; - ToolHandle<IAsgPhotonIsEMSelector> m_egammaPhotonCutIDTool; + ToolHandle< IAsgPhotonIsEMSelector > m_egammaPhotonCutIDTool { this, "PhotonIsEMSelector", "" }; /*Luminosity info*/ SG::ReadDecorHandleKey<xAOD::EventInfo> m_avgMuKey { this, "averageInteractionsPerCrossingKey", "EventInfo.averageInteractionsPerCrossing", "Decoration for Average Interaction Per Crossing" }; diff --git a/Trigger/TrigHypothesis/TrigMultiVarHypo/TrigMultiVarHypo/tools/RingerSelectorTool.h b/Trigger/TrigHypothesis/TrigMultiVarHypo/TrigMultiVarHypo/tools/RingerSelectorTool.h index e9b27b5cba31905774dfe7e259367bf7b5e76d5a..f92de1635f402777359431e4b3839faf5177df63 100644 --- a/Trigger/TrigHypothesis/TrigMultiVarHypo/TrigMultiVarHypo/tools/RingerSelectorTool.h +++ b/Trigger/TrigHypothesis/TrigMultiVarHypo/TrigMultiVarHypo/tools/RingerSelectorTool.h @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration */ #ifndef TRIGMULTIVARHYPO_RINGERSELECTORTOOL_H #define TRIGMULTIVARHYPO_RINGERSELECTORTOOL_H @@ -34,9 +34,6 @@ namespace Ringer{ /// Standard constructor RingerSelectorTool(); - /// Standard destructor - ~RingerSelectorTool(); - StatusCode initialize(); StatusCode finalize(); diff --git a/Trigger/TrigHypothesis/TrigMultiVarHypo/TrigMultiVarHypo/tools/common/RingerReader.h b/Trigger/TrigHypothesis/TrigMultiVarHypo/TrigMultiVarHypo/tools/common/RingerReader.h index d936779394e17c3befd7b37030a64f57c2af584f..3b2b0f90c561a840e355b6060d1016ddfbb5f6b0 100644 --- a/Trigger/TrigHypothesis/TrigMultiVarHypo/TrigMultiVarHypo/tools/common/RingerReader.h +++ b/Trigger/TrigHypothesis/TrigMultiVarHypo/TrigMultiVarHypo/tools/common/RingerReader.h @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration */ #ifndef TRIGMULTIVARHYPO_RINGERREADER_H @@ -30,9 +30,7 @@ namespace Ringer{ public: /* constructor */ RingerReader( std::string ); - /* destructor */ - ~RingerReader(); - + /* use this methods to retrieve the tools from the archieve */ bool retrieve(std::string &, std::vector<std::shared_ptr<Ringer::IModel>> &); bool retrieve(std::string &, std::vector<std::shared_ptr<Ringer::IThresholds>> &); diff --git a/Trigger/TrigHypothesis/TrigMultiVarHypo/src/tools/RingerSelectorTool.cxx b/Trigger/TrigHypothesis/TrigMultiVarHypo/src/tools/RingerSelectorTool.cxx index cd363bfc9e520d1e8b1bc5ef013253bea9bb283a..c7b9a774864a153bcf888dd0ea641a0fd68b8864 100644 --- a/Trigger/TrigHypothesis/TrigMultiVarHypo/src/tools/RingerSelectorTool.cxx +++ b/Trigger/TrigHypothesis/TrigMultiVarHypo/src/tools/RingerSelectorTool.cxx @@ -1,6 +1,6 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration */ @@ -22,12 +22,6 @@ RingerSelectorTool::RingerSelectorTool(): {;} -RingerSelectorTool::~RingerSelectorTool() -{ - ATH_MSG_INFO("Finalizing this tool...."); -} - - StatusCode RingerSelectorTool::initialize() { if(!m_thresholdsCalibPath.empty()){ @@ -55,17 +49,15 @@ StatusCode RingerSelectorTool::initialize() m_removeOutputTansigTF=m_reader.removeOutputTansigTF(); } - // Use Norm1 as default for rings normalization only! - for(unsigned i=0; i<m_discriminators.size();++i) m_preprocs.push_back( std::make_shared< Ringer::Norm1 > (-999.,999.,-999.,999.,-999.,999.,true)); - - + for(unsigned i=0; i<m_discriminators.size();++i) { + m_preprocs.push_back( std::make_shared< Ringer::Norm1 > (-999.,999.,-999.,999.,-999.,999.,true)); + } - ATH_MSG_INFO("Using the activation function in the last layer? " << (m_removeOutputTansigTF ? "No":"Yes") ); - ATH_MSG_INFO("Using the Correction? " << (m_doPileupCorrection ? "Yes":"No") ); - ATH_MSG_INFO("Using lumi threshold equal: " << m_lumiCut ); - ATH_MSG_INFO("Initialization completed successfully." ); + ATH_MSG_DEBUG("Using the activation function in the last layer? " << (m_removeOutputTansigTF ? "No":"Yes") ); + ATH_MSG_DEBUG("Using the Correction? " << (m_doPileupCorrection ? "Yes":"No") ); + ATH_MSG_DEBUG("Using lumi threshold equal: " << m_lumiCut ); return StatusCode::SUCCESS; } diff --git a/Trigger/TrigHypothesis/TrigMultiVarHypo/src/tools/common/RingerReader.cxx b/Trigger/TrigHypothesis/TrigMultiVarHypo/src/tools/common/RingerReader.cxx index d64f223813d32512205618849add0a8ab6f4ec0d..e2031b745311ba5d7b87a21cd13b9e200148a826 100644 --- a/Trigger/TrigHypothesis/TrigMultiVarHypo/src/tools/common/RingerReader.cxx +++ b/Trigger/TrigHypothesis/TrigMultiVarHypo/src/tools/common/RingerReader.cxx @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration */ #include <vector> @@ -46,11 +46,6 @@ RingerReader::RingerReader(std::string name): } -// ======================================================================== - -RingerReader::~RingerReader() -{;} - // ======================================================================== template <class T> void RingerReader::InitBranch(TTree* fChain, std::string branch_name, T* param){ @@ -112,7 +107,6 @@ bool RingerReader::retrieve( std::string &calibPath, std::vector< std::shared_pt for(unsigned l=0; l<m_nodes->size(); l++) tfnames.push_back("tanh"); // This is default for this version discriminators.push_back( std::make_shared<MultiLayerPerceptron>(*m_nodes,*m_weights,*m_bias,tfnames,m_etBins->at(0), m_etBins->at(1),m_etaBins->at(0),m_etaBins->at(1), -999., 999.) ); - ATH_MSG_INFO( "Added new discriminator into the list." ); }catch(std::bad_alloc &){ ATH_MSG_ERROR("Can not alloc cutDefs on memory." ); return false; @@ -161,7 +155,6 @@ bool RingerReader::retrieve( std::string &calibPath, std::vector< std::shared_pt try{ if(m_useConvLayer->at(0)){ - ATH_MSG_INFO( "Alloc Convolutional Neural Object into the stack..." ); /* To be include in the future discriminators.push_back(new ConvMultiLayerPerceptron( // Dense layers @@ -188,7 +181,6 @@ bool RingerReader::retrieve( std::string &calibPath, std::vector< std::shared_pt } - ATH_MSG_INFO( "Added new discriminator into the list." ); }catch(std::bad_alloc &){ ATH_MSG_ERROR( "Can not alloc cutDefs on memory." ); return false; @@ -302,7 +294,7 @@ bool RingerReader::retrieve( std::string &calibPath, std::vector< std::shared_pt file.Close(); ATH_MSG_INFO( "Config file version : " << version ); - ATH_MSG_INFO( "Total of cutDefs retrievied is : " << cutDefs.size() ); + ATH_MSG_INFO( "Total of cutDefs retrieved is : " << cutDefs.size() ); ATH_MSG_INFO( "Using pileup correction : " << (m_doPileupCorrection?"Yes":"No") ); ATH_MSG_INFO( "Using lumi cut : " << (m_lumiCut) ); ATH_MSG_INFO( "RemoveOutputTansigTF? : " << (m_removeOutputTansigTF?"Yes":"No") ); diff --git a/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Egamma/EgammaDefs.py b/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Egamma/EgammaDefs.py index 33ac0be2f0a921871b1688c231761346544ab7fd..58392cf43a9e055f27ca8d0c7d7e6e4acdea2ebe 100644 --- a/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Egamma/EgammaDefs.py +++ b/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Egamma/EgammaDefs.py @@ -5,6 +5,12 @@ #---------------------------------------------------------------- from TrigEDMConfig.TriggerEDMRun3 import recordable +from AthenaCommon.Logging import logging +from AthenaCommon import CfgMgr +from ROOT import egammaPID +from ElectronPhotonSelectorTools.ConfiguredAsgPhotonIsEMSelectors import ConfiguredAsgPhotonIsEMSelector + +mlog = logging.getLogger ('EgammaDefs') class TrigEgammaKeys(object): """Static class to collect all string manipulation in Electron sequences """ @@ -26,16 +32,13 @@ class TrigEgammaKeys_GSF(object): outputTrackKey_GSF = 'HLT_IDTrkTrack_Electron_GSF' outputTrackParticleKey_GSF = recordable('HLT_IDTrack_Electron_GSF') +# Print configuration once: +mlog.info("TrigEgammaPidTools version %s", TrigEgammaKeys.pidVersion) def TrigElectronSelectors(sel): - import logging - - mlog = logging.getLogger ('EgammaDefs') # Configure the LH selectors - from AthenaCommon import CfgMgr #TrigEgammaKeys.pidVersion.set_On() - mlog.info("TrigEgammaPidTools version %s", TrigEgammaKeys.pidVersion) ConfigFilePath = 'ElectronPhotonSelectorTools/trigger/'+TrigEgammaKeys.pidVersion SelectorNames = { @@ -51,33 +54,23 @@ def TrigElectronSelectors(sel): 'lhmedium':'ElectronLikelihoodMediumTriggerConfig.conf', 'lhtight':'ElectronLikelihoodTightTriggerConfig.conf', } - - mlog.info('Configuring electron PID tools...') if sel not in SelectorNames: mlog.error('No selector defined for working point %s for electrons :-( ', sel) return else: - mlog.info('Configuring electron PID for %s', sel) + mlog.debug('Configuring electron PID for %s', sel) SelectorTool=CfgMgr.AsgElectronLikelihoodTool(SelectorNames[sel]) SelectorTool.ConfigFile = ConfigFilePath + '/' + ElectronToolConfigFile[sel] SelectorTool.usePVContainer = False SelectorTool.skipDeltaPoverP = True - from AthenaCommon.AppMgr import ToolSvc - ToolSvc += SelectorTool return SelectorTool def TrigPhotonSelectors(sel): - import logging - - mlog = logging.getLogger ('EgammaDefs') - # Configure the IsEM selectors - from ElectronPhotonSelectorTools.ConfiguredAsgPhotonIsEMSelectors import ConfiguredAsgPhotonIsEMSelector - from ROOT import egammaPID - + SelectorNames = { 'loose' : 'LoosePhotonSelector', 'medium' : 'MediumPhotonSelector', @@ -99,20 +92,17 @@ def TrigPhotonSelectors(sel): 'tight' : egammaPID.PhotonTight, } - mlog.info('Configuring photon PID tools...') if sel not in SelectorNames: mlog.error('No selector defined for working point %s for photons :-( ', sel) return else: - mlog.info('Configuring photon PID for %s', sel) + mlog.debug('Configuring photon PID for %s', sel) SelectorTool = ConfiguredAsgPhotonIsEMSelector(SelectorNames[sel], SelectorPID[sel]) ConfigFilePath = 'ElectronPhotonSelectorTools/trigger/'+TrigEgammaKeys.pidVersion ConfigFile = ConfigFilePath + '/' + PhotonToolConfigFile[sel] - mlog.info('Configuration file: %s', ConfigFile) + mlog.debug('Configuration file: %s', ConfigFile) SelectorTool.ConfigFile = ConfigFile SelectorTool.ForceConvertedPhotonPID = True SelectorTool.isEMMask = PhotonIsEMBits[sel] - from AthenaCommon.AppMgr import ToolSvc - ToolSvc += SelectorTool return SelectorTool