From 2ca38916bfaeeaf1340a6a471efe3c7ebceee2bf Mon Sep 17 00:00:00 2001 From: Denis Damazio <damazio@mail.cern.ch> Date: Tue, 16 Feb 2021 08:22:04 +0100 Subject: [PATCH 1/9] deleting a number of packages and files associated with Legacy (Run2) software not anymore compatible with Run3 --- .../TrigCaloRec/FullCaloCellContMaker.h | 82 - .../TrigCaloRec/RoIFCalEmCellContMaker.h | 60 - .../TrigCaloRec/RoIFCalHadCellContMaker.h | 60 - .../TrigCaloRec/RoILArEMCellContMaker.h | 62 - .../TrigCaloRec/RoILArHadCellContMaker.h | 61 - .../TrigCaloRec/RoITileCellContMaker.h | 61 - .../TrigCaloRec/TrigCaloCellMaker.h | 118 -- .../TrigCaloRec/src/FullCaloCellContMaker.cxx | 339 ---- .../src/RoIFCalEmCellContMaker.cxx | 158 -- .../src/RoIFCalHadCellContMaker.cxx | 152 -- .../TrigCaloRec/src/RoILArEMCellContMaker.cxx | 145 -- .../src/RoILArHadCellContMaker.cxx | 154 -- .../TrigCaloRec/src/RoITileCellContMaker.cxx | 148 -- .../TrigCaloRec/src/TrigCaloCellMaker.cxx | 511 ------ .../src/components/TrigCaloRec_entries.cxx | 14 - .../TrigL2MissingET/ATLAS_CHECK_THREAD_SAFETY | 1 - .../TrigL2MissingET/CMakeLists.txt | 16 - .../TrigL2MissingET/doc/packagedoc.h | 50 - .../python/TrigL2MissingETConfig.py | 68 - .../python/TrigL2MissingETMonitoring.py | 191 -- .../TrigL2MissingET/src/T2CaloMissingET.cxx | 614 ------- .../TrigL2MissingET/src/T2CaloMissingET.h | 122 -- .../TrigL2MissingET/src/T2MissingET.cxx | 699 -------- .../TrigL2MissingET/src/T2MissingET.h | 194 --- .../components/TrigL2MissingET_entries.cxx | 6 - .../TrigL2MissingET/src/febmapL2.h | 1542 ----------------- .../TrigT2CaloCommon/IAlgToolCalo.h | 230 --- .../TrigT2CaloCommon/T2CaloBase.h | 93 - .../python/TrigT2CaloCommonConfig.py | 28 - .../TrigT2CaloCommon/src/IAlgToolCalo.cxx | 408 ----- .../TrigT2CaloCommon/src/T2CaloBase.cxx | 185 -- .../components/TrigT2CaloCommon_entries.cxx | 2 - .../TrigT2CaloEgamma/src/EgammaAllFex.cxx | 180 -- .../TrigT2CaloEgamma/src/EgammaAllFex.h | 97 -- .../TrigT2CaloEgamma/src/EgammaEmEnFex.cxx | 243 --- .../TrigT2CaloEgamma/src/EgammaEmEnFex.h | 68 - .../TrigT2CaloEgamma/src/EgammaHadEnFex.cxx | 262 --- .../TrigT2CaloEgamma/src/EgammaHadEnFex.h | 67 - .../TrigT2CaloEgamma/src/EgammaSamp1Fex.cxx | 428 ----- .../TrigT2CaloEgamma/src/EgammaSamp1Fex.h | 53 - .../TrigT2CaloEgamma/src/EgammaSamp2Fex.cxx | 515 ------ .../TrigT2CaloEgamma/src/EgammaSamp2Fex.h | 111 -- .../TrigT2CaloEgamma/src/RingerFex.cxx | 539 ------ .../TrigT2CaloEgamma/src/RingerFex.h | 239 --- .../TrigT2CaloEgamma/src/T2CaloEgamma.cxx | 516 ------ .../TrigT2CaloEgamma/src/T2CaloEgamma.h | 114 -- .../components/TrigT2CaloEgamma_entries.cxx | 14 - .../TrigT2MinBias/src/T2MbtsFex.cxx | 315 ---- .../TrigT2MinBias/src/T2MbtsFex.h | 101 -- .../TrigT2MinBias/src/T2MbtsHypo.cxx | 186 -- .../TrigT2MinBias/src/T2MbtsHypo.h | 58 - .../TrigT2MinBias/src/T2ZdcFex.cxx | 220 --- .../TrigT2MinBias/src/T2ZdcFex.h | 88 - .../TrigT2MinBias/src/T2ZdcHypo.cxx | 230 --- .../TrigT2MinBias/src/T2ZdcHypo.h | 95 - .../src/components/TrigT2MinBias_entries.cxx | 8 - .../TrigCaloMonitoring/HLTCaloFEBTool.h | 81 - .../TrigCaloMonitoring/src/HLTCaloFEBTool.cxx | 1085 ------------ .../components/TrigCaloMonitoring_entries.cxx | 2 - 59 files changed, 12489 deletions(-) delete mode 100755 Trigger/TrigAlgorithms/TrigCaloRec/TrigCaloRec/FullCaloCellContMaker.h delete mode 100644 Trigger/TrigAlgorithms/TrigCaloRec/TrigCaloRec/RoIFCalEmCellContMaker.h delete mode 100644 Trigger/TrigAlgorithms/TrigCaloRec/TrigCaloRec/RoIFCalHadCellContMaker.h delete mode 100644 Trigger/TrigAlgorithms/TrigCaloRec/TrigCaloRec/RoILArEMCellContMaker.h delete mode 100644 Trigger/TrigAlgorithms/TrigCaloRec/TrigCaloRec/RoILArHadCellContMaker.h delete mode 100755 Trigger/TrigAlgorithms/TrigCaloRec/TrigCaloRec/RoITileCellContMaker.h delete mode 100755 Trigger/TrigAlgorithms/TrigCaloRec/TrigCaloRec/TrigCaloCellMaker.h delete mode 100755 Trigger/TrigAlgorithms/TrigCaloRec/src/FullCaloCellContMaker.cxx delete mode 100644 Trigger/TrigAlgorithms/TrigCaloRec/src/RoIFCalEmCellContMaker.cxx delete mode 100644 Trigger/TrigAlgorithms/TrigCaloRec/src/RoIFCalHadCellContMaker.cxx delete mode 100644 Trigger/TrigAlgorithms/TrigCaloRec/src/RoILArEMCellContMaker.cxx delete mode 100644 Trigger/TrigAlgorithms/TrigCaloRec/src/RoILArHadCellContMaker.cxx delete mode 100755 Trigger/TrigAlgorithms/TrigCaloRec/src/RoITileCellContMaker.cxx delete mode 100755 Trigger/TrigAlgorithms/TrigCaloRec/src/TrigCaloCellMaker.cxx delete mode 100644 Trigger/TrigAlgorithms/TrigL2MissingET/ATLAS_CHECK_THREAD_SAFETY delete mode 100644 Trigger/TrigAlgorithms/TrigL2MissingET/CMakeLists.txt delete mode 100644 Trigger/TrigAlgorithms/TrigL2MissingET/doc/packagedoc.h delete mode 100755 Trigger/TrigAlgorithms/TrigL2MissingET/python/TrigL2MissingETConfig.py delete mode 100755 Trigger/TrigAlgorithms/TrigL2MissingET/python/TrigL2MissingETMonitoring.py delete mode 100644 Trigger/TrigAlgorithms/TrigL2MissingET/src/T2CaloMissingET.cxx delete mode 100644 Trigger/TrigAlgorithms/TrigL2MissingET/src/T2CaloMissingET.h delete mode 100755 Trigger/TrigAlgorithms/TrigL2MissingET/src/T2MissingET.cxx delete mode 100755 Trigger/TrigAlgorithms/TrigL2MissingET/src/T2MissingET.h delete mode 100644 Trigger/TrigAlgorithms/TrigL2MissingET/src/components/TrigL2MissingET_entries.cxx delete mode 100644 Trigger/TrigAlgorithms/TrigL2MissingET/src/febmapL2.h delete mode 100644 Trigger/TrigAlgorithms/TrigT2CaloCommon/TrigT2CaloCommon/IAlgToolCalo.h delete mode 100644 Trigger/TrigAlgorithms/TrigT2CaloCommon/TrigT2CaloCommon/T2CaloBase.h delete mode 100644 Trigger/TrigAlgorithms/TrigT2CaloCommon/src/IAlgToolCalo.cxx delete mode 100644 Trigger/TrigAlgorithms/TrigT2CaloCommon/src/T2CaloBase.cxx delete mode 100644 Trigger/TrigAlgorithms/TrigT2CaloEgamma/src/EgammaAllFex.cxx delete mode 100644 Trigger/TrigAlgorithms/TrigT2CaloEgamma/src/EgammaAllFex.h delete mode 100644 Trigger/TrigAlgorithms/TrigT2CaloEgamma/src/EgammaEmEnFex.cxx delete mode 100644 Trigger/TrigAlgorithms/TrigT2CaloEgamma/src/EgammaEmEnFex.h delete mode 100644 Trigger/TrigAlgorithms/TrigT2CaloEgamma/src/EgammaHadEnFex.cxx delete mode 100644 Trigger/TrigAlgorithms/TrigT2CaloEgamma/src/EgammaHadEnFex.h delete mode 100644 Trigger/TrigAlgorithms/TrigT2CaloEgamma/src/EgammaSamp1Fex.cxx delete mode 100644 Trigger/TrigAlgorithms/TrigT2CaloEgamma/src/EgammaSamp1Fex.h delete mode 100644 Trigger/TrigAlgorithms/TrigT2CaloEgamma/src/EgammaSamp2Fex.cxx delete mode 100644 Trigger/TrigAlgorithms/TrigT2CaloEgamma/src/EgammaSamp2Fex.h delete mode 100644 Trigger/TrigAlgorithms/TrigT2CaloEgamma/src/RingerFex.cxx delete mode 100644 Trigger/TrigAlgorithms/TrigT2CaloEgamma/src/RingerFex.h delete mode 100644 Trigger/TrigAlgorithms/TrigT2CaloEgamma/src/T2CaloEgamma.cxx delete mode 100755 Trigger/TrigAlgorithms/TrigT2CaloEgamma/src/T2CaloEgamma.h delete mode 100644 Trigger/TrigAlgorithms/TrigT2MinBias/src/T2MbtsFex.cxx delete mode 100644 Trigger/TrigAlgorithms/TrigT2MinBias/src/T2MbtsFex.h delete mode 100644 Trigger/TrigAlgorithms/TrigT2MinBias/src/T2MbtsHypo.cxx delete mode 100644 Trigger/TrigAlgorithms/TrigT2MinBias/src/T2MbtsHypo.h delete mode 100644 Trigger/TrigAlgorithms/TrigT2MinBias/src/T2ZdcFex.cxx delete mode 100644 Trigger/TrigAlgorithms/TrigT2MinBias/src/T2ZdcFex.h delete mode 100644 Trigger/TrigAlgorithms/TrigT2MinBias/src/T2ZdcHypo.cxx delete mode 100644 Trigger/TrigAlgorithms/TrigT2MinBias/src/T2ZdcHypo.h delete mode 100644 Trigger/TrigMonitoring/TrigCaloMonitoring/TrigCaloMonitoring/HLTCaloFEBTool.h delete mode 100644 Trigger/TrigMonitoring/TrigCaloMonitoring/src/HLTCaloFEBTool.cxx diff --git a/Trigger/TrigAlgorithms/TrigCaloRec/TrigCaloRec/FullCaloCellContMaker.h b/Trigger/TrigAlgorithms/TrigCaloRec/TrigCaloRec/FullCaloCellContMaker.h deleted file mode 100755 index 2d981ec0238d..000000000000 --- a/Trigger/TrigAlgorithms/TrigCaloRec/TrigCaloRec/FullCaloCellContMaker.h +++ /dev/null @@ -1,82 +0,0 @@ -/* - Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration -*/ - -#ifndef TRIGCALOREC_FULLCALOCELLCONTMAKER_H -#define TRIGCALOREC_FULLCALOCELLCONTMAKER_H -/************************************************************* - - NAME: FullCaloCellContMaker - PACKAGE: Trigger/TrigAlgorithms/TrigCaloRec - - AUTHORS: C. Santamarina - CREATED: June 12, 2007 - - PURPOSE: Fill an RoI CellContainer with the cells of the - Liquid Argon Electromagnetic Calorimeter using the - new unpacking prepared for L2 -********************************************************************/ - -#include "TrigCaloRec/IAlgToolEFCalo.h" - -#include "TrigT2CaloCommon/ITrigDataAccess.h" - -#include "CaloInterface/ICalorimeterNoiseTool.h" - -#include "AthenaMonitoring/IMonitorToolBase.h" - -#include "CxxUtils/checker_macros.h" -ATLAS_NO_CHECK_FILE_THREAD_SAFETY; // legacy trigger code - -class FullCaloCellContMaker : public IAlgToolEFCalo { - public: - // Constructor - FullCaloCellContMaker(const std::string & type, - const std::string & name, - const IInterface* parent); - // Destructor - virtual ~FullCaloCellContMaker(); - - // AlgTool stages - StatusCode initialize(); - StatusCode finalize(); - using IAlgToolEFCalo::execute; - StatusCode execute(CaloCellContainer &pCaloCellContainer); - - - StatusCode addFullLArCells(CaloCellContainer &pCaloCellContainer, DETID detectorID, bool prepare); - StatusCode addFullTileCells(CaloCellContainer &pCaloCellContainer, /* int sampling,*/ bool prepare); - StatusCode addFullDetCells(CaloCellContainer &pCaloCellContainer); - - private: - - ITrigDataAccess *m_data; - - ToolHandle<ICalorimeterNoiseTool> m_noiseTool; - - // properties for constant calibration - //double const_cal_em; - //double const_cal_had; - //bool m_useFullColl; - - LArTT_Selector<LArCellCont>::const_iterator m_iBegin; - LArTT_Selector<LArCellCont>::const_iterator m_iEnd; - LArTT_Selector<LArCellCont>::const_iterator m_it; - - // configurable for noise suppression on LAr cells and TileCal - int m_do_LArCells_noise_suppression; //<! 0 (1) -> no (yes) - int m_do_TileCells_noise_suppression; //<! 0 (1) -> no (yes) - - float m_cutvalue; - - TileCellCollection::const_iterator m_itBegin; - TileCellCollection::const_iterator m_itEnd; - TileCellCollection::const_iterator m_itt; - CaloCellContainer::const_iterator m_icBegin; - CaloCellContainer::const_iterator m_icEnd; - CaloCellContainer::const_iterator m_itc; - - bool m_absEinSigma; - bool m_twogaussiannoise; -}; -#endif diff --git a/Trigger/TrigAlgorithms/TrigCaloRec/TrigCaloRec/RoIFCalEmCellContMaker.h b/Trigger/TrigAlgorithms/TrigCaloRec/TrigCaloRec/RoIFCalEmCellContMaker.h deleted file mode 100644 index 93f82153fdac..000000000000 --- a/Trigger/TrigAlgorithms/TrigCaloRec/TrigCaloRec/RoIFCalEmCellContMaker.h +++ /dev/null @@ -1,60 +0,0 @@ -/* - Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration -*/ - -#ifndef TRIGCALOREC_ROIFCALEMCELLCONTMAKER_H -#define TRIGCALOREC_ROIFCALEMCELLCONTMAKER_H -/******************************************************************** - - NAME: RoIFCalEmCellContMaker - PACKAGE: Trigger/TrigAlgorithms/TrigCaloRec - - AUTHORS: M.Campanelli / C. Santamarina - CREATED: Feb 19, 2008 - - PURPOSE: Fill an RoI CellContainer with the cells of the - Forward Electromagnetic Calorimeter using the - new unpacking prepared for L2 -********************************************************************/ - -#include "TrigCaloRec/IAlgToolEFCalo.h" - -#include "TrigT2CaloCommon/ITrigDataAccess.h" - -#include "CaloInterface/ICalorimeterNoiseTool.h" - -#include "IRegionSelector/IRoiDescriptor.h" - -#include "CxxUtils/checker_macros.h" -ATLAS_NO_CHECK_FILE_THREAD_SAFETY; // legacy trigger code - -class RoIFCalEmCellContMaker : public IAlgToolEFCalo { - public: - // Constructor - RoIFCalEmCellContMaker(const std::string & type, - const std::string & name, - const IInterface* parent); - // Destructor - virtual ~RoIFCalEmCellContMaker(); - - // AlgTool stages - StatusCode initialize(); - StatusCode finalize(); - using IAlgToolEFCalo::execute; - StatusCode execute(CaloCellContainer &pCaloCellContainer, - const IRoiDescriptor& roi ); - - private: - - //IT2GeometryTool *m_geometryTool; - ITrigDataAccess *m_data; - - ToolHandle<ICalorimeterNoiseTool> m_noiseTool; - int m_do_LArCells_noise_suppression; //<! 0 (1) -> no (yes) - float m_cutvalue; - - LArTT_Selector<LArCellCont>::const_iterator m_iBegin; - LArTT_Selector<LArCellCont>::const_iterator m_iEnd; - -}; -#endif diff --git a/Trigger/TrigAlgorithms/TrigCaloRec/TrigCaloRec/RoIFCalHadCellContMaker.h b/Trigger/TrigAlgorithms/TrigCaloRec/TrigCaloRec/RoIFCalHadCellContMaker.h deleted file mode 100644 index e60662323589..000000000000 --- a/Trigger/TrigAlgorithms/TrigCaloRec/TrigCaloRec/RoIFCalHadCellContMaker.h +++ /dev/null @@ -1,60 +0,0 @@ -/* - Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration -*/ - -#ifndef TRIGCALOREC_ROIFCALHADCELLCONTMAKER_H -#define TRIGCALOREC_ROIFCALHADCELLCONTMAKER_H -/******************************************************************** - - NAME: RoIFCalHadCellContMaker - PACKAGE: Trigger/TrigAlgorithms/TrigCaloRec - - AUTHORS: M.Campanelli/C. Santamarina - CREATED: Feb 19, 2008 - - PURPOSE: Fill an RoI CellContainer with the cells of the - Forward Hadron Calorimeter using the - new unpacking prepared for L2 -********************************************************************/ - -#include "TrigCaloRec/IAlgToolEFCalo.h" - -#include "TrigT2CaloCommon/ITrigDataAccess.h" - -#include "CaloInterface/ICalorimeterNoiseTool.h" - -#include "IRegionSelector/IRoiDescriptor.h" - -#include "CxxUtils/checker_macros.h" -ATLAS_NO_CHECK_FILE_THREAD_SAFETY; // legacy trigger code - -class RoIFCalHadCellContMaker : public IAlgToolEFCalo { - public: - // Constructor - RoIFCalHadCellContMaker(const std::string & type, - const std::string & name, - const IInterface* parent); - // Destructor - virtual ~RoIFCalHadCellContMaker(); - - // AlgTool stages - StatusCode initialize(); - StatusCode finalize(); - using IAlgToolEFCalo::execute; - StatusCode execute(CaloCellContainer &pCaloCellContainer, - const IRoiDescriptor& roi ); - - private: - - //IT2GeometryTool *m_geometryTool; - ITrigDataAccess *m_data; - - ToolHandle<ICalorimeterNoiseTool> m_noiseTool; - int m_do_LArCells_noise_suppression; //<! 0 (1) -> no (yes) - float m_cutvalue; - - LArTT_Selector<LArCellCont>::const_iterator m_iBegin; - LArTT_Selector<LArCellCont>::const_iterator m_iEnd; - -}; -#endif diff --git a/Trigger/TrigAlgorithms/TrigCaloRec/TrigCaloRec/RoILArEMCellContMaker.h b/Trigger/TrigAlgorithms/TrigCaloRec/TrigCaloRec/RoILArEMCellContMaker.h deleted file mode 100644 index d48fb5811d84..000000000000 --- a/Trigger/TrigAlgorithms/TrigCaloRec/TrigCaloRec/RoILArEMCellContMaker.h +++ /dev/null @@ -1,62 +0,0 @@ -/* - Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration -*/ - -#ifndef TRIGCALOREC_ROILAREMCELLCONTMAKER_H -#define TRIGCALOREC_ROILAREMCELLCONTMAKER_H -/******************************************************************** - - NAME: RoILArEMCellContMaker - PACKAGE: Trigger/TrigAlgorithms/TrigCaloRec - - AUTHORS: C. Santamarina - CREATED: June 12, 2007 - - PURPOSE: Fill an RoI CellContainer with the cells of the - Liquid Argon Electromagnetic Calorimeter using the - new unpacking prepared for L2 -********************************************************************/ - -#include "TrigCaloRec/IAlgToolEFCalo.h" - -#include "TrigT2CaloCommon/ITrigDataAccess.h" - -#include "CaloInterface/ICalorimeterNoiseTool.h" - -#include "IRegionSelector/IRoiDescriptor.h" - -#include "CxxUtils/checker_macros.h" -ATLAS_NO_CHECK_FILE_THREAD_SAFETY; // legacy trigger code - -class RoILArEMCellContMaker : public IAlgToolEFCalo { - - public: - // Constructor - RoILArEMCellContMaker(const std::string & type, - const std::string & name, - const IInterface* parent); - // Destructor - virtual ~RoILArEMCellContMaker(); - - // AlgTool stages - StatusCode initialize(); - StatusCode finalize(); - using IAlgToolEFCalo::execute; - StatusCode execute(CaloCellContainer &pCaloCellContainer, - const IRoiDescriptor& roi ); - - private: - - //IT2GeometryTool *m_geometryTool; - ITrigDataAccess *m_data; - - ToolHandle<ICalorimeterNoiseTool> m_noiseTool; - int m_do_LArCells_noise_suppression; //<! 0 (1) -> no (yes) - float m_cutvalue; - bool m_absEinSigma; - - LArTT_Selector<LArCellCont>::const_iterator m_iBegin; - LArTT_Selector<LArCellCont>::const_iterator m_iEnd; - -}; -#endif diff --git a/Trigger/TrigAlgorithms/TrigCaloRec/TrigCaloRec/RoILArHadCellContMaker.h b/Trigger/TrigAlgorithms/TrigCaloRec/TrigCaloRec/RoILArHadCellContMaker.h deleted file mode 100644 index 8793827d6ec8..000000000000 --- a/Trigger/TrigAlgorithms/TrigCaloRec/TrigCaloRec/RoILArHadCellContMaker.h +++ /dev/null @@ -1,61 +0,0 @@ -/* - Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration -*/ - -#ifndef TRIGCALOREC_ROILARHADCELLCONTMAKER_H -#define TRIGCALOREC_ROILARHADCELLCONTMAKER_H -/******************************************************************** - - NAME: RoILArHadCellContMaker - PACKAGE: Trigger/TrigAlgorithms/TrigCaloRec - - AUTHORS: C. Santamarina - CREATED: June 12, 2007 - - PURPOSE: Fill an RoI CellContainer with the cells of the - Liquid Argon Electromagnetic Calorimeter using the - new unpacking prepared for L2 -********************************************************************/ - -#include "TrigCaloRec/IAlgToolEFCalo.h" - -#include "TrigT2CaloCommon/ITrigDataAccess.h" - -#include "CaloInterface/ICalorimeterNoiseTool.h" - -#include "IRegionSelector/IRoiDescriptor.h" - -#include "CxxUtils/checker_macros.h" -ATLAS_NO_CHECK_FILE_THREAD_SAFETY; // legacy trigger code - -class RoILArHadCellContMaker : public IAlgToolEFCalo { - public: - // Constructor - RoILArHadCellContMaker(const std::string & type, - const std::string & name, - const IInterface* parent); - // Destructor - virtual ~RoILArHadCellContMaker(); - - // AlgTool stages - StatusCode initialize(); - StatusCode finalize(); - using IAlgToolEFCalo::execute; - StatusCode execute(CaloCellContainer &pCaloCellContainer, - const IRoiDescriptor& roi ); - - private: - - //IT2GeometryTool *m_geometryTool; - ITrigDataAccess *m_data; - - ToolHandle<ICalorimeterNoiseTool> m_noiseTool; - int m_do_LArCells_noise_suppression; //<! 0 (1) -> no (yes) - float m_cutvalue; - bool m_absEinSigma; - - LArTT_Selector<LArCellCont>::const_iterator m_iBegin; - LArTT_Selector<LArCellCont>::const_iterator m_iEnd; - -}; -#endif diff --git a/Trigger/TrigAlgorithms/TrigCaloRec/TrigCaloRec/RoITileCellContMaker.h b/Trigger/TrigAlgorithms/TrigCaloRec/TrigCaloRec/RoITileCellContMaker.h deleted file mode 100755 index c48ac60ccf9e..000000000000 --- a/Trigger/TrigAlgorithms/TrigCaloRec/TrigCaloRec/RoITileCellContMaker.h +++ /dev/null @@ -1,61 +0,0 @@ -/* - Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration -*/ - -#ifndef TRIGCALOREC_ROITILECELLCONTMAKER_H -#define TRIGCALOREC_ROITILECELLCONTMAKER_H -/******************************************************************** - - NAME: RoITileCellContMaker - PACKAGE: Trigger/TrigAlgorithms/TrigCaloRec - - AUTHORS: C. Santamarina - CREATED: June 12, 2007 - - PURPOSE: Fill an RoI CellContainer with the cells of the Tile - Calorimeter using the new unpacking prepared for L2 -********************************************************************/ - -#include "TrigCaloRec/IAlgToolEFCalo.h" - -#include "TrigT2CaloCommon/ITrigDataAccess.h" - -#include "CaloInterface/ICalorimeterNoiseTool.h" - -#include "IRegionSelector/IRoiDescriptor.h" - -#include "CxxUtils/checker_macros.h" -ATLAS_NO_CHECK_FILE_THREAD_SAFETY; // legacy trigger code - -class RoITileCellContMaker : public IAlgToolEFCalo { - public: - // Constructor - RoITileCellContMaker(const std::string & type, - const std::string & name, - const IInterface* parent); - // Destructor - virtual ~RoITileCellContMaker(); - - // AlgTool stages - StatusCode initialize(); - StatusCode finalize(); - using IAlgToolEFCalo::execute; - StatusCode execute(CaloCellContainer &pCaloCellContainer, - const IRoiDescriptor& roi ); - - private: - BooleanProperty m_CheckCellWithinRoI; - - //IT2GeometryTool *m_geometryTool; - ITrigDataAccess *m_data; - ToolHandle<ICalorimeterNoiseTool> m_noiseTool; - int m_do_TileCells_noise_suppression; //<! 0 (1) -> no (yes) - float m_cutvalue; - bool m_absEinSigma; - bool m_twogaussiannoise; - - TileCellCollection::const_iterator m_iBegin; - TileCellCollection::const_iterator m_iEnd; - -}; -#endif diff --git a/Trigger/TrigAlgorithms/TrigCaloRec/TrigCaloRec/TrigCaloCellMaker.h b/Trigger/TrigAlgorithms/TrigCaloRec/TrigCaloRec/TrigCaloCellMaker.h deleted file mode 100755 index a11302af3902..000000000000 --- a/Trigger/TrigAlgorithms/TrigCaloRec/TrigCaloRec/TrigCaloCellMaker.h +++ /dev/null @@ -1,118 +0,0 @@ -// Hi Emacs ! this is -*- C++ -*- - -/* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration -*/ - -/******************************************************************** - * - * NAME: TrigCaloCellMaker - * PACKAGE: Trigger/TrigAlgorithms/TrigCaloRec - * - * AUTHOR: P.A. Delsart - * CREATED: August 2006 - * - *********************************************************************/ -#ifndef TRIGCALOREC_TRIGCALOCELLMAKER_H -#define TRIGCALOREC_TRIGCALOCELLMAKER_H - -#include "TrigInterfaces/FexAlgo.h" -#include "CaloEvent/CaloCellContainer.h" -#include "TrigCaloRec/IAlgToolEFCalo.h" - -class IAlgToolEFCalo; -class ICaloCellMakerTool; -class TrigCaloQuality; -class ITrigDataAccess; - -class TrigCaloCellMaker : public HLT::FexAlgo { - - public: - - /** constructor */ - TrigCaloCellMaker(const std::string& name, ISvcLocator* pSvcLocator); - - /** destructor */ - ~TrigCaloCellMaker(); - - /** HLT method to initialize */ - HLT::ErrorCode hltInitialize(); - - /** HLT method to finalize */ - HLT::ErrorCode hltFinalize(); - - /** HLT method to execute FEX algo on a given TE. - input is the Triger Element (TE) from the previous algorithm in - the configuration chain, the output is the result from the - TrigCaloCellMaker execution. **/ - HLT::ErrorCode hltExecute(const HLT::TriggerElement* inputTE, - HLT::TriggerElement* outputTE); - - /** code to pre-fetch ROBs now that we do this in - * in this algorithm */ - using HLT::FexAlgo::prepareRobRequests; - HLT::ErrorCode prepareRobRequests(const HLT::TriggerElement* inputTE ); - - private: - - /** Calorimeter second sampling eta granularity. */ - static const double m_detas2; - - /** Calorimeter second sampling phi granularity. */ - static const double m_dphis2; - - /** RoI window size in units of EM calo 2nd sampling cells */ - int m_neta, m_nphi; - - /** EF Calorimeter tools for calorimeter data unpacking. */ - ToolHandleArray<IAlgToolEFCalo> m_tcrAlgTools; - - /** Prescale factor for persistency **/ - unsigned int m_persistencyPSF; - std::string m_persistencyKey; - unsigned int m_counter; - - /** Offline Tool names for CellContainer ordering and checking. */ - std::vector<std::string> m_containerToolNames; - - /** Offline Tool pointers for CellContainer ordering and checking. */ - //ToolHandleArray<ICaloCellMakerTool> m_containerTools; // pointers to tools - std::vector<ICaloCellMakerTool*> m_containerTools; // pointers to tools - - /** Pointers to timers */ - std::vector<TrigTimer*> m_timer; - - /** Need access to prefetch */ - ToolHandle<ITrigDataAccess> m_data; - - /** Produced Calorimeter Cell Container. */ - CaloCellContainer* m_caloCellContainer; - - // monitored variables - - /** Cell Container size (for monitoring purpouses). */ - double m_CellContainerSize; - - /** data preparation error */ - unsigned int m_conversionError[6]; - TrigCaloQuality * m_trigCaloQuality; - - double m_EtaL2, m_PhiL2; - bool m_fullScanEnabled; - - bool m_trustRoiLimits; - - bool m_createRoiForID; - - double m_etaWidthForID; - double m_phiWidthForID; - - std::vector<uint32_t> m_vec_robs; - - -//public: -// -// inline CaloCellContainer* GetCellContainer() const {return pCaloCellContainer;} - -}; -#endif diff --git a/Trigger/TrigAlgorithms/TrigCaloRec/src/FullCaloCellContMaker.cxx b/Trigger/TrigAlgorithms/TrigCaloRec/src/FullCaloCellContMaker.cxx deleted file mode 100755 index 2d63792add36..000000000000 --- a/Trigger/TrigAlgorithms/TrigCaloRec/src/FullCaloCellContMaker.cxx +++ /dev/null @@ -1,339 +0,0 @@ -/* - Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration -*/ - -// ******************************************************************** -// -// NAME: FullCaloCellContMaker.cxx -// PACKAGE: Trigger/TrigAlgorithms/TrigCaloRec -// -// AUTHOR: C. Santamarina/B. Brelier -// -// ******************************************************************** - -#include "GaudiKernel/MsgStream.h" -#include "CaloGeoHelpers/CaloSampling.h" - -#include "TrigCaloRec/FullCaloCellContMaker.h" -#include "CaloEvent/CaloCellContainer.h" - - -#include "TrigT2CaloCommon/Calo_Def.h" -#include "GaudiKernel/ListItem.h" -#include "GaudiKernel/IToolSvc.h" -//#include "CaloDetDescr/CaloDetDescrElement.h" -// noise suppression -//#include "CaloDetDescr/CaloDetDescrManager.h" -//#include <Identifier/HWIdentifier.h> -#include "CaloInterface/ICalorimeterNoiseTool.h" - -#include "AthenaMonitoring/IMonitorToolBase.h" - -#include <math.h> - -ATLAS_NO_CHECK_FILE_THREAD_SAFETY; // legacy trigger code - -FullCaloCellContMaker::FullCaloCellContMaker(const std::string & type, const std::string & name, -// const IInterface* parent): IAlgToolEFCalo(type, name, parent), -// m_timersvc("TrigTimerSvc","FullCaloCellContMaker"){ - const IInterface* parent): IAlgToolEFCalo(type, name, parent), - m_data(NULL) -{ - - declareProperty("DoLArCellsNoiseSuppression", m_do_LArCells_noise_suppression = 0); - declareProperty("DoTileCellsNoiseSuppression", m_do_TileCells_noise_suppression = 0); - //declareProperty("TrigTimerSvc",m_timersvc,"TrigTimerSvc"); - declareProperty("CaloNoiseTool",m_noiseTool,"Tool Handle for noise tool"); - declareProperty("CutValue",m_cutvalue = 2,"Cell accepted if e>m_cutvalue*larcellnoise"); - declareProperty("AbsEinSigma",m_absEinSigma = 0,"0=asymmetric noise-sigma cut(default)"); - declareProperty("TwoGaussianNoise",m_twogaussiannoise = false,"false=do not use double gaussian description for tile(default)"); -} - - -// -FullCaloCellContMaker::~FullCaloCellContMaker(){ -} - -StatusCode FullCaloCellContMaker::initialize(){ - - - if (toolSvc()->retrieveTool("TrigDataAccess", m_data).isFailure()) { - return StatusCode::FAILURE; - } - - std::cout << name() << " m_do_LArCells_noise_suppression set to " << (m_do_LArCells_noise_suppression ? "true" : "false") << std::endl; - std::cout << name() << " m_do_TileCells_noise_suppression set to " << (m_do_TileCells_noise_suppression ? "true" : "false") << std::endl; - - if(m_do_LArCells_noise_suppression!=0 || m_do_TileCells_noise_suppression!=0 ) { - if(m_noiseTool.retrieve().isFailure()){ - ATH_MSG_WARNING("Unable to find CaloNoiseTool"); - - return StatusCode::FAILURE; - } - // if ( m_do_TileCells_noise_suppression!=0 ) { - std::cout << name() << " Two-Gaussian noise for Tile set to " << (m_twogaussiannoise ? "true" : "false") << std::endl; - std::cout << name() << " Asbolute E in sigma set to " << (m_absEinSigma ? "true" : "false") << std::endl; - // } - } else { - m_noiseTool.disable(); - } - - if( service( "TrigTimerSvc", m_timersvc).isFailure() ) { - std::cout << ": Unable to locate TrigTimer Service" << std::endl; - } - - // Initialize timing service - - if (m_timersvc) { - m_timer.push_back( m_timersvc->addItem("FullCalo_Total")); - m_timer.push_back( m_timersvc->addItem("FullCalo_TTEM")); - m_timer.push_back( m_timersvc->addItem("FullCalo_TTHEC")); - m_timer.push_back( m_timersvc->addItem("FullCalo_FCALHAD")); - m_timer.push_back( m_timersvc->addItem("FullCalo_FCALEM")); - m_timer.push_back( m_timersvc->addItem("FullCalo_TILE")); - } - - - return StatusCode::SUCCESS; -} - -StatusCode FullCaloCellContMaker::finalize(){ - - - - return StatusCode::SUCCESS; -} - -StatusCode FullCaloCellContMaker::execute(CaloCellContainer &pCaloCellContainer){ - - if (m_timersvc) (m_timer.at(0))->start(); - // reset error - //m_error=(EFFULLCALO<<28); - m_error = 0; - - /* use LoadFullCollections - in TrigDataAccess */ - /** Load TTEM */ - if (m_timersvc) (m_timer.at(1))->start(); - //if(addFullLArCells(pCaloCellContainer, TTEM, true).isFailure() ) - if(addFullDetCells(pCaloCellContainer).isFailure() ) - return StatusCode::FAILURE; - if (m_timersvc) (m_timer.at(1))->stop(); - -#ifdef OLDCODE - /** Load TTHEC */ - if (m_timersvc) (m_timer.at(2))->start(); - if(addFullLArCells(pCaloCellContainer, TTHEC, true).isFailure() ) - return StatusCode::FAILURE; - if (m_timersvc) (m_timer.at(2))->stop(); - - /** Load FCALHAD */ - if (m_timersvc) (m_timer.at(3))->start(); - if(addFullLArCells(pCaloCellContainer, FCALHAD, true).isFailure() ) - return StatusCode::FAILURE; - if (m_timersvc) (m_timer.at(3))->stop(); - - /** Load FCALEM */ - if (m_timersvc) (m_timer.at(4))->start(); - if(addFullLArCells(pCaloCellContainer, FCALEM, true).isFailure() ) - return StatusCode::FAILURE; - if (m_timersvc) (m_timer.at(4))->stop(); - - /** Load Tile */ - if (m_timersvc) (m_timer.at(5))->start(); - if(addFullTileCells(pCaloCellContainer,/* 0,*/ true).isFailure() ) - return StatusCode::FAILURE; - if (m_timersvc) (m_timer.at(5))->stop(); -#endif - - if (m_timersvc) (m_timer.at(0))->stop(); - - return StatusCode::SUCCESS; - -} - -StatusCode FullCaloCellContMaker::addFullLArCells(CaloCellContainer& pCaloCellContainer, - DETID detectorID, - bool prepare) -{ - - CaloCell_ID::SUBCALO iSubCalo=CaloCell_ID::NOT_VALID; - - //int iDet=0; - //double const_cal=1.0; - switch (detectorID) { - case TTEM: - iSubCalo=CaloCell_ID::LAREM; - //iDet=0; - //const_cal=const_cal_em; - break; - case TTHEC: - iSubCalo=CaloCell_ID::LARHEC; - //iDet=1; - //const_cal=const_cal_had; - break; - case FCALEM: - case FCALHAD: - iSubCalo=CaloCell_ID::LARFCAL; - //iDet=3; - //const_cal=1.0; // ??? - break; - default: - break; - } - - // Prepare data, load collections - // if (m_timersvc) m_timer[iDet][1]->resume(); - if ( (m_data->LoadFullCollections(m_iBegin,m_iEnd, detectorID, prepare)).isFailure()) return StatusCode::FAILURE; - if (m_data->report_error()) { - m_error |= m_data->report_error(); // + (EFFULLCALO<<28); - //if (m_timersvc) m_timer[iDet][1]->stop(); - //return StatusCode::SUCCESS; //don't return if problem with unpacking occurs - } - // Algorithmic time - // if (m_timersvc) m_timer[iDet][2]->resume(); - - int counter = 0; - - // noise suppression - if(m_do_LArCells_noise_suppression!=0){ - - for(m_it = m_iBegin;m_it != m_iEnd; ++m_it) { // Main Loop - //const CaloDetDescrElement* caloDDE = (*m_it)->caloDDE(); - //double larcellnoise = m_noiseTool->getNoise(caloDDE,ICalorimeterNoiseTool::TOTALNOISE); - double larcellnoise = m_noiseTool->getNoise(*m_it,ICalorimeterNoiseTool::TOTALNOISE); - float usedEnergy = m_absEinSigma ? fabs((*m_it)->e()) : (*m_it)->e(); - if(usedEnergy > (m_cutvalue*larcellnoise)){ - CaloCell* cell = (CaloCell*)(*m_it); - //pCaloCellContainer.push_back(cell); - pCaloCellContainer.push_back_fast(cell); - ++counter; - } - } // end loop - } // with noise suppression - else{ - - for(m_it = m_iBegin;m_it != m_iEnd; ++m_it) { // Main Loop - CaloCell* cell = (CaloCell*)(*m_it); - //pCaloCellContainer.push_back(cell); - pCaloCellContainer.push_back_fast(cell); - ++counter; - } // end loop - } // without noise suppression - - pCaloCellContainer.setHasCalo(iSubCalo); - - return StatusCode::SUCCESS; -} - -StatusCode FullCaloCellContMaker::addFullTileCells(CaloCellContainer& pCaloCellContainer, - /* int sampling,*/ - bool /*prepare*/) -{ - - //int iDet=2; - - // std::cout << "Full Tile container size " << m_data->TileFullContSize() << " " << m_data->TileContSize() << std::endl; - - // Prepare data, load collections - for( unsigned int iR=0; iR!=m_data->TileFullContSize();++iR ){ - - // Time to access Collection - // if (m_timersvc) m_timer[iDet][1]->resume(); - if( (m_data->LoadFullCollections(m_itBegin,m_itEnd, iR, !iR)).isFailure()) return StatusCode::FAILURE; - if (m_data->report_error()) { - m_error |= m_data->report_error(); // + (EFFULLCALO<<28); - // if (m_timersvc) m_timer[iDet][1]->pause(); - //continue; // do not stop and process other layer. - } - // Algorithmic time - // if (m_timersvc) m_timer[iDet][2]->resume(); - - int counter = 0; - //double const_cal = const_cal_had; - - if (m_do_TileCells_noise_suppression!=0) { - for ( m_itt = m_itBegin; m_itt != m_itEnd; ++m_itt) { - TileCellCollection::const_iterator& it = m_itt; - CaloCell* cell = (CaloCell*)(*it); - double tilecellnoise = m_twogaussiannoise ? - m_noiseTool->getEffectiveSigma(cell,ICalorimeterNoiseTool::MAXSYMMETRYHANDLING,ICalorimeterNoiseTool::TOTALNOISE) : - m_noiseTool->getNoise(cell,ICalorimeterNoiseTool::TOTALNOISE); - float usedEnergy = m_absEinSigma ? fabs((*it)->e()) : (*it)->e(); - if ( (usedEnergy > (m_cutvalue*tilecellnoise)) ) { - pCaloCellContainer.push_back(cell); - ++counter; - } - } - } - else { - for(m_itt = m_itBegin;m_itt != m_itEnd; ++m_itt) { // Main Loop - - // possibly do some tower building - - CaloCell* cell = (CaloCell*)(*m_itt); - //pCaloCellContainer.push_back(cell); - pCaloCellContainer.push_back_fast(cell); - ++counter; - } // end loop - } - - } // end loop iR - - - -pCaloCellContainer.setHasCalo(CaloCell_ID::TILE); - - return StatusCode::SUCCESS; -} - -StatusCode FullCaloCellContMaker::addFullDetCells(CaloCellContainer& pCaloCellContainer) -{ - - // Prepare data, load collections - if ( (m_data->LoadFullCollections(m_icBegin,m_icEnd)).isFailure()) return StatusCode::FAILURE; - if (m_data->report_error()) { - m_error |= m_data->report_error(); // + (EFFULLCALO<<28); - //if (m_timersvc) m_timer[iDet][1]->stop(); - } - - int counter = 0; - - // noise suppression - if(m_do_LArCells_noise_suppression!=0){ - - for(m_itc = m_icBegin;m_itc != m_icEnd; ++m_itc) { // Main Loop - //const CaloDetDescrElement* caloDDE = (*m_itc)->caloDDE(); - //double larcellnoise = m_noiseTool->getNoise(caloDDE,ICalorimeterNoiseTool::TOTALNOISE); - double larcellnoise = m_noiseTool->getNoise(*m_it,ICalorimeterNoiseTool::TOTALNOISE); - float usedEnergy = m_absEinSigma ? fabs((*m_itc)->e()) : (*m_itc)->e(); - if(usedEnergy > (m_cutvalue*larcellnoise)){ - CaloCell* cell = (CaloCell*)(*m_itc); - //pCaloCellContainer.push_back(cell); - pCaloCellContainer.push_back_fast(cell); - ++counter; - } - } // end loop - } // with noise suppression - else{ - - // FIXME: const-cast allows changing cells in SG. - for (CaloCellContainer::const_iterator it = m_icBegin; - it != m_icEnd; - ++it) - { - pCaloCellContainer.push_back (const_cast<CaloCell*>(*it)); - } - } // without noise suppression - - pCaloCellContainer.setHasCalo(CaloCell_ID::LAREM); - pCaloCellContainer.setHasCalo(CaloCell_ID::LARHEC); - pCaloCellContainer.setHasCalo(CaloCell_ID::LARFCAL); - pCaloCellContainer.setHasCalo(CaloCell_ID::TILE); - - // Assume data preparation made full container (by construction!) - pCaloCellContainer.setHasTotalSize(true); - pCaloCellContainer.setIsOrderedAndComplete(true); - - return StatusCode::SUCCESS; -} diff --git a/Trigger/TrigAlgorithms/TrigCaloRec/src/RoIFCalEmCellContMaker.cxx b/Trigger/TrigAlgorithms/TrigCaloRec/src/RoIFCalEmCellContMaker.cxx deleted file mode 100644 index 5bfc91407f13..000000000000 --- a/Trigger/TrigAlgorithms/TrigCaloRec/src/RoIFCalEmCellContMaker.cxx +++ /dev/null @@ -1,158 +0,0 @@ -/* - Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration -*/ - -// ******************************************************************** -// -// NAME: RoIFCaleEmCellContMaker.cxx -// PACKAGE: Trigger/TrigAlgorithms/TrigCaloRec -// -// AUTHOR: C. Santamarina -// Implements the new data unpacking developped by Denis. -// -// ******************************************************************** - -#include "GaudiKernel/MsgStream.h" -#include "CaloGeoHelpers/CaloSampling.h" - -#include "TrigCaloRec/RoIFCalEmCellContMaker.h" -#include "CaloEvent/CaloCellContainer.h" - - -#include "TrigT2CaloCommon/Calo_Def.h" -#include "GaudiKernel/ListItem.h" -#include "GaudiKernel/IToolSvc.h" -//#include "CaloDetDescr/CaloDetDescrElement.h" -// noise suppression -//#include "CaloDetDescr/CaloDetDescrManager.h" -//#include <Identifier/HWIdentifier.h> -#include "CaloInterface/ICalorimeterNoiseTool.h" - -#include "IRegionSelector/IRoiDescriptor.h" - -#include <math.h> - -ATLAS_NO_CHECK_FILE_THREAD_SAFETY; // legacy trigger code - -RoIFCalEmCellContMaker::RoIFCalEmCellContMaker(const std::string & type, const std::string & name, - const IInterface* parent): IAlgToolEFCalo(type, name, parent), - m_data(NULL) -{ - - declareProperty("DoLArCellsNoiseSuppression", m_do_LArCells_noise_suppression = 1); - declareProperty("CaloNoiseTool",m_noiseTool,"Tool Handle for noise tool"); - declareProperty("CutValue",m_cutvalue = 2,"Cell accepted if e>m_cutvalue*larcellnoise"); - -} - -// -RoIFCalEmCellContMaker::~RoIFCalEmCellContMaker(){ -} - -StatusCode RoIFCalEmCellContMaker::initialize(){ - - if (toolSvc()->retrieveTool("TrigDataAccess", m_data).isFailure()) { - return StatusCode::FAILURE; - } - - if (m_do_LArCells_noise_suppression!=0){ - - if (m_noiseTool.retrieve().isFailure()) return StatusCode::FAILURE; - - } else { - m_noiseTool.disable(); - } - - // Initialize timing service - - if( service( "TrigTimerSvc", m_timersvc).isFailure() ) { - std::cout << ": Unable to locate TrigTimer Service" << std::endl; - } - - - if (m_timersvc) { - m_timer.push_back(m_timersvc->addItem("TCRec_FCalEmTotal")); - m_timer.push_back(m_timersvc->addItem("TCRec_FCalEmRegionSelector")); - m_timer.push_back(m_timersvc->addItem("TCRec_FCalEmDataAccess")); - m_timer.push_back(m_timersvc->addItem("TCRec_FCalEmPushBackCells")); - } - - return StatusCode::SUCCESS; -} - -StatusCode RoIFCalEmCellContMaker::finalize(){ - - - - return StatusCode::SUCCESS; -} - -StatusCode RoIFCalEmCellContMaker::execute(CaloCellContainer &pCaloCellContainer, - const IRoiDescriptor& roi ) { - // reset error -// m_error = (EFFCALEM<<28); - m_error = 0 ; - - if (m_timersvc) { - (m_timer.at(0))->start(); - (m_timer.at(1))->start(); (m_timer.at(1))->pause(); - (m_timer.at(2))->start(); (m_timer.at(2))->pause(); - (m_timer.at(3))->start(); (m_timer.at(3))->pause(); - } - - - //for ( unsigned int sampling = 0; sampling <3; sampling++) { - unsigned int sampling=0; - - if (m_timersvc) (m_timer.at(1))->resume(); - m_data->RegionSelector( sampling, roi, FCALEM ); - if (m_timersvc) (m_timer.at(1))->pause(); - - - if (m_timersvc) (m_timer.at(2))->resume(); - if((m_data->LoadCollections(m_iBegin,m_iEnd,sampling,!sampling)).isFailure()) { - ATH_MSG_DEBUG("unable to load cell collections"); - //return StatusCode::FAILURE; - } - if(m_data->report_error()) { - m_error=m_data->report_error(); //+(EFFCALEM<<28); - if (m_timersvc) (m_timer.at(2))->pause(); - return StatusCode::SUCCESS; - } - if (m_timersvc) (m_timer.at(2))->pause(); - - if (m_timersvc) (m_timer.at(3))->resume(); - LArTT_Selector<LArCellCont>::const_iterator it; - - if (m_do_LArCells_noise_suppression!=0){ - - - for(it = m_iBegin;it != m_iEnd; ++it) { - //const CaloDetDescrElement* caloDDE = (*it)->caloDDE(); - //double larcellnoise = m_noiseTool->getNoise(caloDDE,ICalorimeterNoiseTool::TOTALNOISE); - double larcellnoise = m_noiseTool->getNoise(*it,ICalorimeterNoiseTool::TOTALNOISE); - if((*it)->e() > (m_cutvalue*larcellnoise)){ - CaloCell* cell = (CaloCell*)(*it); - pCaloCellContainer.push_back(cell); - } - } - - } else{ - - for ( it = m_iBegin; it != m_iEnd; ++it) { - CaloCell* cell = (CaloCell*)(*it); - pCaloCellContainer.push_back(cell); - } - - } - if (m_timersvc) (m_timer.at(3))->pause(); - //} - - // Including the LAREM calorimeter in the setHasCalo - pCaloCellContainer.setHasCalo(CaloCell_ID::LARFCAL); - - if (m_timersvc) { (m_timer.at(0))->stop(); (m_timer.at(1))->stop(); (m_timer.at(2))->stop(); (m_timer.at(3))->stop(); } - - return StatusCode::SUCCESS; - -} diff --git a/Trigger/TrigAlgorithms/TrigCaloRec/src/RoIFCalHadCellContMaker.cxx b/Trigger/TrigAlgorithms/TrigCaloRec/src/RoIFCalHadCellContMaker.cxx deleted file mode 100644 index f9af4f1a6725..000000000000 --- a/Trigger/TrigAlgorithms/TrigCaloRec/src/RoIFCalHadCellContMaker.cxx +++ /dev/null @@ -1,152 +0,0 @@ -/* - Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration -*/ - -// ******************************************************************** -// -// NAME: RoIFCalHadCellContMaker.cxx -// PACKAGE: Trigger/TrigAlgorithms/TrigCaloRec -// -// AUTHOR: M.Campanelli/C. Santamarina -// Implements the new data unpacking developped by Denis. -// -// ******************************************************************** - -#include "GaudiKernel/MsgStream.h" -#include "CaloGeoHelpers/CaloSampling.h" - -#include "TrigCaloRec/RoIFCalHadCellContMaker.h" -#include "CaloEvent/CaloCellContainer.h" - - -#include "TrigT2CaloCommon/Calo_Def.h" -#include "GaudiKernel/ListItem.h" -#include "GaudiKernel/IToolSvc.h" -//#include "CaloDetDescr/CaloDetDescrElement.h" -// noise suppression -//#include "CaloDetDescr/CaloDetDescrManager.h" -//#include <Identifier/HWIdentifier.h> -#include "CaloInterface/ICalorimeterNoiseTool.h" - -#include <math.h> - -ATLAS_NO_CHECK_FILE_THREAD_SAFETY; // legacy trigger code - -RoIFCalHadCellContMaker::RoIFCalHadCellContMaker(const std::string & type, const std::string & name, - const IInterface* parent): IAlgToolEFCalo(type, name, parent), - m_data(NULL) -{ - - declareProperty("DoLArCellsNoiseSuppression", m_do_LArCells_noise_suppression = 1); - declareProperty("CaloNoiseTool",m_noiseTool,"Tool Handle for noise tool"); - declareProperty("CutValue",m_cutvalue = 2,"Cell accepted if e>m_cutvalue*larcellnoise"); - -} - -// -RoIFCalHadCellContMaker::~RoIFCalHadCellContMaker(){ -} - -StatusCode RoIFCalHadCellContMaker::initialize(){ - - if (toolSvc()->retrieveTool("TrigDataAccess", m_data).isFailure()) { - return StatusCode::FAILURE; - } - - if (m_do_LArCells_noise_suppression!=0){ - - if (m_noiseTool.retrieve().isFailure()) return StatusCode::FAILURE; - - } else { - m_noiseTool.disable(); - } - - // Initialize timing service - - if( service( "TrigTimerSvc", m_timersvc).isFailure() ) { - std::cout << ": Unable to locate TrigTimer Service" << std::endl; - } - - - if (m_timersvc) { - m_timer.push_back(m_timersvc->addItem("TCRec_FCalHadTotal")); - m_timer.push_back(m_timersvc->addItem("TCRec_FCalHadRegionSelector")); - m_timer.push_back(m_timersvc->addItem("TCRec_FCalHadDataAccess")); - m_timer.push_back(m_timersvc->addItem("TCRec_FCalHadPushBackCells")); - } - - return StatusCode::SUCCESS; -} - -StatusCode RoIFCalHadCellContMaker::finalize(){ - - return StatusCode::SUCCESS; - -} - -StatusCode RoIFCalHadCellContMaker::execute(CaloCellContainer &pCaloCellContainer, - const IRoiDescriptor& roi ) { - // reset error - //m_error = (EFFCALHAD<<28); - m_error = 0; - - if (m_timersvc) { - (m_timer.at(0))->start(); - (m_timer.at(1))->start(); (m_timer.at(1))->pause(); - (m_timer.at(2))->start(); (m_timer.at(2))->pause(); - (m_timer.at(3))->start(); (m_timer.at(3))->pause(); - } - - for ( unsigned int sampling = 0; sampling <2; sampling++) { - - if (m_timersvc) (m_timer.at(1))->resume(); - m_data->RegionSelector( sampling, roi, FCALHAD ); - if (m_timersvc) (m_timer.at(1))->pause(); - - if (m_timersvc) (m_timer.at(2))->resume(); - if((m_data->LoadCollections(m_iBegin,m_iEnd,sampling,!sampling)).isFailure()) { - ATH_MSG_DEBUG("unable to load cell collections"); - //return StatusCode::FAILURE; - } - if (m_data->report_error()) { - m_error=m_data->report_error();// + (EFFCALHAD<<28); - if (m_timersvc) (m_timer.at(2))->pause(); - //continue; - } - if (m_timersvc) (m_timer.at(2))->pause(); - - if (m_timersvc) (m_timer.at(3))->resume(); - LArTT_Selector<LArCellCont>::const_iterator it; - - if (m_do_LArCells_noise_suppression!=0){ - - - for(it = m_iBegin;it != m_iEnd; ++it) { - //const CaloDetDescrElement* caloDDE = (*it)->caloDDE(); - //double larcellnoise = m_noiseTool->getNoise(caloDDE,ICalorimeterNoiseTool::TOTALNOISE); - double larcellnoise = m_noiseTool->getNoise(*it,ICalorimeterNoiseTool::TOTALNOISE); - if((*it)->e() > (m_cutvalue*larcellnoise)){ - CaloCell* cell = (CaloCell*)(*it); - pCaloCellContainer.push_back(cell); - } - } - } else{ - - for ( it = m_iBegin; it != m_iEnd; ++it) { - CaloCell* cell = (CaloCell*)(*it); - pCaloCellContainer.push_back(cell); - } - } - - if (m_timersvc) (m_timer.at(3))->pause(); - - } - - // Including the LAREM calorimeter in the setHasCalo */ - pCaloCellContainer.setHasCalo(CaloCell_ID::LARFCAL); - - if (m_timersvc) { (m_timer.at(0))->stop(); (m_timer.at(1))->stop(); (m_timer.at(2))->stop(); (m_timer.at(3))->stop(); } - - return StatusCode::SUCCESS; - -} diff --git a/Trigger/TrigAlgorithms/TrigCaloRec/src/RoILArEMCellContMaker.cxx b/Trigger/TrigAlgorithms/TrigCaloRec/src/RoILArEMCellContMaker.cxx deleted file mode 100644 index 808c2aa8538e..000000000000 --- a/Trigger/TrigAlgorithms/TrigCaloRec/src/RoILArEMCellContMaker.cxx +++ /dev/null @@ -1,145 +0,0 @@ -/* - Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration -*/ - -// ******************************************************************** -// -// NAME: RoILArEMCellContMaker.cxx -// PACKAGE: Trigger/TrigAlgorithms/TrigCaloRec -// -// AUTHOR: C. Santamarina -// Implements the new data unpacking developped by Denis. -// -// ******************************************************************** - -#include "GaudiKernel/MsgStream.h" -#include "CaloGeoHelpers/CaloSampling.h" - -#include "TrigCaloRec/RoILArEMCellContMaker.h" -#include "CaloEvent/CaloCellContainer.h" - - -#include "TrigT2CaloCommon/Calo_Def.h" -#include "GaudiKernel/ListItem.h" -#include "GaudiKernel/IToolSvc.h" -//#include "CaloDetDescr/CaloDetDescrElement.h" -// noise suppression -//#include "CaloDetDescr/CaloDetDescrManager.h" -//#include <Identifier/HWIdentifier.h> -#include "CaloInterface/ICalorimeterNoiseTool.h" - -#include <math.h> - -ATLAS_NO_CHECK_FILE_THREAD_SAFETY; // legacy trigger code - -RoILArEMCellContMaker::RoILArEMCellContMaker(const std::string & type, const std::string & name, - const IInterface* parent): IAlgToolEFCalo(type, name, parent), - m_data(NULL) -{ - - declareProperty("DoLArCellsNoiseSuppression", m_do_LArCells_noise_suppression = 1); - declareProperty("CaloNoiseTool",m_noiseTool,"Tool Handle for noise tool"); - declareProperty("CutValue",m_cutvalue = 2,"Cell accepted if e>m_cutvalue*larcellnoise"); - declareProperty("AbsEinSigma",m_absEinSigma = 0,"0=asymmetric noise-sigma cut(default)"); -} - -// -RoILArEMCellContMaker::~RoILArEMCellContMaker(){ -} - -StatusCode RoILArEMCellContMaker::initialize(){ - - if (toolSvc()->retrieveTool("TrigDataAccess", m_data).isFailure()) { - return StatusCode::FAILURE; - } - - if (m_do_LArCells_noise_suppression!=0){ - - if (m_noiseTool.retrieve().isFailure()) return StatusCode::FAILURE; - - } else { - m_noiseTool.disable(); - } - - if( service( "TrigTimerSvc", m_timersvc).isFailure() ) { - std::cout << ": Unable to locate TrigTimer Service" << std::endl; - } - - // Initialize timing service - if (m_timersvc) { - m_timer.push_back(m_timersvc->addItem("TCRec_LArEMTotal")); - m_timer.push_back(m_timersvc->addItem("TCRec_LArEMRegionSelector")); - m_timer.push_back(m_timersvc->addItem("TCRec_LArEMDataAccess")); - m_timer.push_back(m_timersvc->addItem("TCRec_LArEMPushBackCells")); - } - - return StatusCode::SUCCESS; -} - -StatusCode RoILArEMCellContMaker::finalize(){ - return StatusCode::SUCCESS; -} - -StatusCode RoILArEMCellContMaker::execute(CaloCellContainer &pCaloCellContainer, - const IRoiDescriptor& roi ) { - // reset error - //m_error=(EFTTEM<<28); - m_error=0; - - if (m_timersvc) { - (m_timer.at(0))->start(); - (m_timer.at(1))->start(); (m_timer.at(1))->pause(); - (m_timer.at(2))->start(); (m_timer.at(2))->pause(); - (m_timer.at(3))->start(); (m_timer.at(3))->pause(); - } - - for (int sampling = 0; sampling <4; sampling ++) { - // Get detector offline ID's for Collections - if (m_timersvc) (m_timer.at(1))->resume(); - m_data->RegionSelector(sampling,roi); - if (m_timersvc) (m_timer.at(1))->pause(); - - if (m_timersvc) (m_timer.at(2))->resume(); - if((m_data->LoadCollections(m_iBegin,m_iEnd,sampling,false)).isFailure()) { - ATH_MSG_DEBUG("unable to load cell collections"); - //return StatusCode::FAILURE; - } - if (m_data->report_error()) { - m_error=m_data->report_error(); // + (EFTTEM<<28); - if (m_timersvc) (m_timer.at(2))->pause(); - //continue; - } - - if (m_timersvc) (m_timer.at(2))->pause(); - - if (m_timersvc) (m_timer.at(3))->resume(); - LArTT_Selector<LArCellCont>::const_iterator it; - - if (m_do_LArCells_noise_suppression!=0){ - for(it = m_iBegin;it != m_iEnd; ++it) { - //const CaloDetDescrElement* caloDDE = (*it)->caloDDE(); - //double larcellnoise = m_noiseTool->getNoise(caloDDE,ICalorimeterNoiseTool::TOTALNOISE); - double larcellnoise = m_noiseTool->getNoise(*it,ICalorimeterNoiseTool::TOTALNOISE); - float usedEnergy = m_absEinSigma ? fabs((*it)->e()) : (*it)->e(); - if( usedEnergy > (m_cutvalue*larcellnoise)) { - CaloCell* cell = (CaloCell*)(*it); - pCaloCellContainer.push_back(cell); - } - } - } else{ - for ( it = m_iBegin; it != m_iEnd; ++it) { - CaloCell* cell = (CaloCell*)(*it); - pCaloCellContainer.push_back(cell); - } - } - if (m_timersvc) (m_timer.at(3))->pause(); - } - - // Including the LAREM calorimeter in the setHasCalo */ - pCaloCellContainer.setHasCalo(CaloCell_ID::LAREM); - - if (m_timersvc) { (m_timer.at(0))->stop(); (m_timer.at(1))->stop(); (m_timer.at(2))->stop(); (m_timer.at(3))->stop(); } - - return StatusCode::SUCCESS; -} - diff --git a/Trigger/TrigAlgorithms/TrigCaloRec/src/RoILArHadCellContMaker.cxx b/Trigger/TrigAlgorithms/TrigCaloRec/src/RoILArHadCellContMaker.cxx deleted file mode 100644 index d532843b053b..000000000000 --- a/Trigger/TrigAlgorithms/TrigCaloRec/src/RoILArHadCellContMaker.cxx +++ /dev/null @@ -1,154 +0,0 @@ -/* - Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration -*/ - -// ******************************************************************** -// -// NAME: RoILArHadCellContMaker.cxx -// PACKAGE: Trigger/TrigAlgorithms/TrigCaloRec -// -// AUTHOR: C. Santamarina -// Implements the new data unpacking developped by Denis. -// -// ******************************************************************** - -#include "GaudiKernel/MsgStream.h" -#include "CaloGeoHelpers/CaloSampling.h" - -#include "TrigCaloRec/RoILArHadCellContMaker.h" -#include "CaloEvent/CaloCellContainer.h" - - -#include "TrigT2CaloCommon/Calo_Def.h" -#include "GaudiKernel/ListItem.h" -#include "GaudiKernel/IToolSvc.h" -//#include "CaloDetDescr/CaloDetDescrElement.h" -// noise suppression -//#include "CaloDetDescr/CaloDetDescrManager.h" -//#include <Identifier/HWIdentifier.h> -#include "CaloInterface/ICalorimeterNoiseTool.h" - -#include <math.h> - -ATLAS_NO_CHECK_FILE_THREAD_SAFETY; // legacy trigger code - -RoILArHadCellContMaker::RoILArHadCellContMaker(const std::string & type, const std::string & name, - const IInterface* parent): IAlgToolEFCalo(type, name, parent), - m_data(NULL) -{ - - declareProperty("DoLArCellsNoiseSuppression", m_do_LArCells_noise_suppression = 1); - declareProperty("CaloNoiseTool",m_noiseTool,"Tool Handle for noise tool"); - declareProperty("CutValue",m_cutvalue = 2,"Cell accepted if e>m_cutvalue*larcellnoise"); - declareProperty("AbsEinSigma",m_absEinSigma = 0,"0=asymmetric noise-sigma cut(default)"); -} - -// -RoILArHadCellContMaker::~RoILArHadCellContMaker(){ -} - -StatusCode RoILArHadCellContMaker::initialize(){ - - if (toolSvc()->retrieveTool("TrigDataAccess", m_data).isFailure()) { - return StatusCode::FAILURE; - } - - if (m_do_LArCells_noise_suppression!=0){ - - if (m_noiseTool.retrieve().isFailure()) return StatusCode::FAILURE; - - } else { - m_noiseTool.disable(); - } - - // Initialize timing service - - if( service( "TrigTimerSvc", m_timersvc).isFailure() ) { - std::cout << ": Unable to locate TrigTimer Service" << std::endl; - } - - if (m_timersvc) { - m_timer.push_back(m_timersvc->addItem("TCRec_LArHadTotal")); - m_timer.push_back(m_timersvc->addItem("TCRec_LArHadRegionSelector")); - m_timer.push_back(m_timersvc->addItem("TCRec_LArHadDataAccess")); - m_timer.push_back(m_timersvc->addItem("TCRec_LArHadPushBackCells")); - } - - return StatusCode::SUCCESS; - -} - -StatusCode RoILArHadCellContMaker::finalize(){ - - - - return StatusCode::SUCCESS; -} - -StatusCode RoILArHadCellContMaker::execute(CaloCellContainer &pCaloCellContainer, - const IRoiDescriptor& roi ) { - - // reset error - //m_error=(EFTTHEC<<28); - m_error=0; - - if (m_timersvc) { - (m_timer.at(0))->start(); - (m_timer.at(1))->start(); (m_timer.at(1))->pause(); - (m_timer.at(2))->start(); (m_timer.at(2))->pause(); - (m_timer.at(3))->start(); (m_timer.at(3))->pause(); - } - - for ( unsigned int sampling = 0; sampling <4; sampling++) { - - if (m_timersvc) (m_timer.at(1))->resume(); - m_data->RegionSelector(sampling,roi,TTHEC); - if (m_timersvc) (m_timer.at(1))->pause(); - - if (m_timersvc) (m_timer.at(2))->resume(); - if((m_data->LoadCollections(m_iBegin,m_iEnd,sampling,!sampling)).isFailure()) { - ATH_MSG_DEBUG("unable to load cell collections"); - //return StatusCode::FAILURE; - } - if (m_data->report_error()) { - m_error=m_data->report_error(); // + (EFTTHEC<<28); - if (m_timersvc) (m_timer.at(2))->pause(); - //continue; - } - - if (m_timersvc) (m_timer.at(2))->pause(); - - if (m_timersvc) (m_timer.at(3))->resume(); - LArTT_Selector<LArCellCont>::const_iterator it; - - if (m_do_LArCells_noise_suppression!=0){ - for(it = m_iBegin;it != m_iEnd; ++it) { - //const CaloDetDescrElement* caloDDE = (*it)->caloDDE(); - //double larcellnoise = m_noiseTool->getNoise(caloDDE,ICalorimeterNoiseTool::TOTALNOISE); - double larcellnoise = m_noiseTool->getNoise(*it,ICalorimeterNoiseTool::TOTALNOISE); - float usedEnergy = m_absEinSigma ? fabs((*it)->e()) : (*it)->e(); - if( usedEnergy > (m_cutvalue*larcellnoise)) { - CaloCell* cell = (CaloCell*)(*it); - pCaloCellContainer.push_back(cell); - } - } - } else{ - - for ( it = m_iBegin; it != m_iEnd; ++it) { - CaloCell* cell = (CaloCell*)(*it); - pCaloCellContainer.push_back(cell); - } - } - - if (m_timersvc) (m_timer.at(3))->pause(); - - } - - // Including the LAREM calorimeter in the setHasCalo */ - pCaloCellContainer.setHasCalo(CaloCell_ID::LARHEC); - - if (m_timersvc) { (m_timer.at(0))->stop(); (m_timer.at(1))->stop(); (m_timer.at(2))->stop(); (m_timer.at(3))->stop(); } - - return StatusCode::SUCCESS; - -} diff --git a/Trigger/TrigAlgorithms/TrigCaloRec/src/RoITileCellContMaker.cxx b/Trigger/TrigAlgorithms/TrigCaloRec/src/RoITileCellContMaker.cxx deleted file mode 100755 index a5c8d21892de..000000000000 --- a/Trigger/TrigAlgorithms/TrigCaloRec/src/RoITileCellContMaker.cxx +++ /dev/null @@ -1,148 +0,0 @@ -/* - Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration -*/ - -// ******************************************************************** -// -// NAME: RoITileCellContMaker.cxx -// PACKAGE: Trigger/TrigAlgorithms/TrigCaloRec -// -// AUTHOR: C. Santamarina -// Implements the new data unpacking developped by Denis. -// -// ******************************************************************** - -#include "GaudiKernel/MsgStream.h" -#include "CaloGeoHelpers/CaloSampling.h" - -#include "TrigCaloRec/RoITileCellContMaker.h" -#include "CaloEvent/CaloCellContainer.h" - - -#include "TrigT2CaloCommon/Calo_Def.h" -#include "GaudiKernel/ListItem.h" -#include "GaudiKernel/IToolSvc.h" -#include "CaloDetDescr/CaloDetDescrElement.h" - -#include <math.h> - -ATLAS_NO_CHECK_FILE_THREAD_SAFETY; // legacy trigger code - -RoITileCellContMaker::RoITileCellContMaker(const std::string & type, const std::string & name, - const IInterface* parent): IAlgToolEFCalo(type, name, parent), - m_data(NULL) -{ - declareProperty("CheckCellWithinRoI", m_CheckCellWithinRoI = false); - declareProperty("DoTileCellsNoiseSuppression", m_do_TileCells_noise_suppression = 0); - declareProperty("CaloNoiseTool",m_noiseTool,"Tool Handle for noise tool"); - declareProperty("CutValue",m_cutvalue = 2,"Cell accepted if e>m_cutvalue*tilecellnoise"); - declareProperty("AbsEinSigma",m_absEinSigma = 0,"0=asymmetric noise-sigma cut(default)"); - declareProperty("TwoGaussianNoise",m_twogaussiannoise = false,"false=do not use double gaussian description for tile(default)"); -} - -// -RoITileCellContMaker::~RoITileCellContMaker(){ -} - -StatusCode RoITileCellContMaker::initialize(){ - - if (toolSvc()->retrieveTool("TrigDataAccess", m_data).isFailure()) { - return StatusCode::FAILURE; - } - - if (m_do_TileCells_noise_suppression!=0){ - - if (m_noiseTool.retrieve().isFailure()) return StatusCode::FAILURE; - - std::cout << name() << " Two-Gaussian noise for Tile set to " << (m_twogaussiannoise ? "true" : "false") << std::endl; - - } else { - m_noiseTool.disable(); - } - - if( service( "TrigTimerSvc", m_timersvc).isFailure() ) { - std::cout << ": Unable to locate TrigTimer Service" << std::endl; - } - - // Initialize timing service - if (m_timersvc) { - m_timer.push_back(m_timersvc->addItem("TCRec_TileTotal")); - m_timer.push_back(m_timersvc->addItem("TCRec_TileRegionSelector")); - m_timer.push_back(m_timersvc->addItem("TCRec_TileDataAccess")); - m_timer.push_back(m_timersvc->addItem("TCRec_TilePushBackCells")); - } - - return StatusCode::SUCCESS; -} - -StatusCode RoITileCellContMaker::finalize(){ - return StatusCode::SUCCESS; -} - -StatusCode RoITileCellContMaker::execute(CaloCellContainer &pCaloCellContainer, - const IRoiDescriptor& roi ) { - // reset error - //m_error=(EFTILE<<28); - m_error=0; - - if (m_timersvc) { - (m_timer.at(0))->start(); - (m_timer.at(1))->start(); (m_timer.at(1))->pause(); - (m_timer.at(2))->start(); (m_timer.at(2))->pause(); - (m_timer.at(3))->start(); (m_timer.at(3))->pause(); - } - - // Region Selector, Tile Calorimeter... - if (m_timersvc) (m_timer.at(1))->resume(); - m_data->RegionSelector(0,roi,TILE); - if (m_timersvc) (m_timer.at(1))->pause(); - - - for (unsigned int iR=0;iR<m_data->TileContSize();iR++) { - - if (m_timersvc) (m_timer.at(2))->resume(); - if((m_data->LoadCollections(m_iBegin,m_iEnd,iR,!iR)).isFailure()) { - ATH_MSG_DEBUG("unable to load cell collections"); - //return StatusCode::FAILURE; - } - if (m_data->report_error()) { - m_error=m_data->report_error(); //+(EFTILE<<28); - if (m_timersvc) (m_timer.at(2))->pause(); - //continue; - } - if (m_timersvc) (m_timer.at(2))->pause(); - - if (m_timersvc) (m_timer.at(3))->resume(); - TileCellCollection::const_iterator it; - - if (m_do_TileCells_noise_suppression!=0) { - for ( it = m_iBegin; it != m_iEnd; ++it) { - CaloCell* cell = (CaloCell*)(*it); - double tilecellnoise = m_twogaussiannoise ? - m_noiseTool->getEffectiveSigma(cell,ICalorimeterNoiseTool::MAXSYMMETRYHANDLING,ICalorimeterNoiseTool::TOTALNOISE) : - m_noiseTool->getNoise(cell,ICalorimeterNoiseTool::TOTALNOISE); - float usedEnergy = m_absEinSigma ? fabs((*it)->e()) : (*it)->e(); - if ( (usedEnergy > (m_cutvalue*tilecellnoise)) && - (!m_CheckCellWithinRoI || this->CellInTheRoi(cell,roi)) ) { - pCaloCellContainer.push_back(cell); - } - } - } else { - for ( it = m_iBegin; it != m_iEnd; ++it) { - CaloCell* cell = (CaloCell*)(*it); - if ( !m_CheckCellWithinRoI || this->CellInTheRoi(cell,roi) ) - pCaloCellContainer.push_back(cell); - } - } - if (m_timersvc) (m_timer.at(3))->pause(); - - } - - // Including the TILE calorimeter in the setHasCalo */ - pCaloCellContainer.setHasCalo(CaloCell_ID::TILE); - - if (m_timersvc) { (m_timer.at(0))->stop(); (m_timer.at(1))->stop(); (m_timer.at(2))->stop(); (m_timer.at(3))->stop(); } - - return StatusCode::SUCCESS; -} - diff --git a/Trigger/TrigAlgorithms/TrigCaloRec/src/TrigCaloCellMaker.cxx b/Trigger/TrigAlgorithms/TrigCaloRec/src/TrigCaloCellMaker.cxx deleted file mode 100755 index 98b8ed516b25..000000000000 --- a/Trigger/TrigAlgorithms/TrigCaloRec/src/TrigCaloCellMaker.cxx +++ /dev/null @@ -1,511 +0,0 @@ -/* - Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration -*/ - -// ******************************************************************** -// -// NAME: TrigCaloCellMaker.cxx -// PACKAGE: Trigger/TrigAlgorithms/TrigCaloRec -// -// AUTHOR: P.A. Delsart -// This is an Hlt algorithm that creates a cell container -// with calorimeter cells within an RoI. Based on Cibran -// Santamarina original TrigCaloRec -// -// ******************************************************************** -// - -#include <sstream> -// -#include "GaudiKernel/MsgStream.h" -#include "GaudiKernel/IToolSvc.h" -#include "GaudiKernel/StatusCode.h" -#include "GaudiKernel/ListItem.h" -// -#include "CxxUtils/phihelper.h" -#include "TrigT1Interfaces/TrigT1Interfaces_ClassDEF.h" -#include "TrigSteeringEvent/TrigRoiDescriptor.h" -// -#include "CaloEvent/CaloCellContainer.h" -// -#include "EventKernel/INavigable4Momentum.h" -#include "NavFourMom/INavigable4MomentumCollection.h" -// -#include "CaloUtils/CaloCollectionHelper.h" -#include "TrigTimeAlgs/TrigTimerSvc.h" - -#include "TrigCaloRec/TrigCaloCellMaker.h" -#include "TrigCaloRec/IAlgToolEFCalo.h" -#include "TrigCaloRec/TrigCaloQuality.h" -#include "CaloInterface/ICaloCellMakerTool.h" -#include "TrigT2CaloCommon/ITrigDataAccess.h" - -// -class ISvcLocator; -// EM mid layer cell size. -const double TrigCaloCellMaker::m_detas2 = 0.025; -const double TrigCaloCellMaker::m_dphis2 = 0.0245436926; - - -///////////////////////////////////////////////////////////////////// -// CONSTRUCTOR: -///////////////////////////////////////////////////////////////////// - -TrigCaloCellMaker::TrigCaloCellMaker(const std::string& name, ISvcLocator* pSvcLocator) - : HLT::FexAlgo(name, pSvcLocator) - , m_tcrAlgTools(this), - m_counter(0), - m_data("TrigDataAccess/TrigDataAccess"), - m_caloCellContainer(NULL), - m_trigCaloQuality(NULL), - m_fullScanEnabled(false), - m_trustRoiLimits(false), - m_createRoiForID(false), - m_etaWidthForID(0), - m_phiWidthForID(0) - { - - // Name of Tools to check and finalize the cell container... - declareProperty("ContainerTools",m_containerToolNames); - - // Eta and Phi size of the RoI window... - declareProperty("eta_size",m_neta); - declareProperty("phi_size",m_nphi); - - /// Trust the limits encoded in the RoI already - declareProperty("TrustRoiLimits", m_trustRoiLimits=false); - - /// create an RoI for the ID trigger - declareProperty("CreateRoiForID", m_createRoiForID=false); - declareProperty("EtaWidthForID", m_etaWidthForID=0); - declareProperty("PhiWidthForID", m_phiWidthForID=0); - - declareProperty ("TCRTools", m_tcrAlgTools); - //declareProperty ("ContainerTools", m_containerTools); - - // prescale for persistency of CaloCell - declareProperty ("PersistencyPrescaleFactor", m_persistencyPSF=0); - declareProperty ("PersistencyKeyName" , m_persistencyKey="TrigCaloCellMaker"); - declareProperty("TrigDataAccess",m_data,"Data Access for LVL2 Calo Algorithms"); - - - declareMonitoredVariable("CellContainerSize", m_CellContainerSize); - declareMonitoredVariable("EtaL2", m_EtaL2); - declareMonitoredVariable("PhiL2", m_PhiL2); - declareMonitoredVariable("ConversionErrorInLArEM", m_conversionError[IAlgToolEFCalo::EFTTEM]); - declareMonitoredVariable("ConversionErrorInLArHad", m_conversionError[IAlgToolEFCalo::EFTTHEC]); - declareMonitoredVariable("ConversionErrorInTile", m_conversionError[IAlgToolEFCalo::EFTILE]); - declareMonitoredVariable("ConversionErrorInFCalEm", m_conversionError[IAlgToolEFCalo::EFFCALEM]); - declareMonitoredVariable("ConversionErrorInFCalHad", m_conversionError[IAlgToolEFCalo::EFFCALHAD]); - declareMonitoredVariable("ConversionErrorInFullCalo",m_conversionError[IAlgToolEFCalo::EFFULLCALO]); - m_vec_robs.reserve(1000); - -} - -///////////////////////////////////////////////////////////////////// -// DESTRUCTOR: -///////////////////////////////////////////////////////////////////// -// -TrigCaloCellMaker::~TrigCaloCellMaker() -{ m_vec_robs.clear(); } - -///////////////////////////////////////////////////////////////////// -// INITIALIZE: -// The initialize method will create all the required algorithm objects -// Note that it is NOT NSSARY to run the initialize of individual -// sub-algorithms. The framework takes care of it. -///////////////////////////////////////////////////////////////////// -// - -HLT::ErrorCode TrigCaloCellMaker::hltInitialize() -{ - msg() << MSG::INFO << "in initialize()" << endmsg; - - m_counter = 0; - - // Cache pointer to ToolSvc - IToolSvc* toolSvc = 0;// Pointer to Tool Service - if (service("ToolSvc", toolSvc).isFailure()) { - msg() << MSG::FATAL << " Tool Service not found " << endmsg; - return HLT::TOOL_FAILURE; - } - - if (timerSvc()) { // Global timers - m_timer.push_back(addTimer("TCC_TimerTot")); - m_timer.push_back(addTimer("TCC_RoICellContainer")); - } - - - /*if ( m_tcrAlgTools.retrieve().isFailure() ) { - msg() << MSG::ERROR << "Failed to retrieve helper tools: " << m_tcrAlgTools << endmsg; - return HLT::BAD_JOB_SETUP; - } else { - msg() << MSG::INFO << "Retrieved " << m_tcrAlgTools << endmsg; - }*/ - - std::vector<std::string>::iterator itrName; - std::vector<std::string>::iterator endName; - m_fullScanEnabled=false; - - ToolHandleArray<IAlgToolEFCalo>::iterator itrtcr = m_tcrAlgTools.begin(); - ToolHandleArray<IAlgToolEFCalo>::iterator endtcr = m_tcrAlgTools.end(); - - for (; itrtcr!=endtcr; ++itrtcr) { - - if( (itrtcr->retrieve()).isFailure() ) { - msg() << MSG::ERROR << "Unable to find tool named " << (*itrtcr).name() << endmsg; - return HLT::BAD_JOB_SETUP; - } else { - msg() << MSG::INFO << " successfully retrieved " << (*itrtcr).name() << endmsg; - std::vector<TrigTimer*> tooltimers = (*itrtcr)->getTimers(); - std::vector<TrigTimer*>::iterator timer = tooltimers.begin(); - for (; timer != tooltimers.end(); timer++){ - declareMonitoredObject((*timer)->name(),*(*timer), &TrigTimer::lastElapsed); - //declareMonitoredObject((*timer)->name(),*(*timer), &TrigTimer::elapsed); - if(msgLvl() <= MSG::DEBUG) msg() << MSG::DEBUG << "Found timer. Added to monitoring " << endmsg; - } - } - if((*itrtcr).name() == "FullCaloCellContMaker") - m_fullScanEnabled=true; - } - // access CellContainer tools and store them - itrName = m_containerToolNames.begin() ; - endName = m_containerToolNames.end() ; - - for (; itrName!=endName; ++itrName) { - - ListItem theItem(*itrName); - IAlgTool* algtool; - - if( toolSvc->retrieveTool(theItem.type(), theItem.name(), algtool,this).isFailure() ) { - msg() << MSG::FATAL << "Unable to find tool for " << (*itrName) << endmsg; - return HLT::TOOL_FAILURE; - } else { - msg() << MSG::INFO << (*itrName) << " successfully retrieved" << endmsg; - // Save the cell container tools (only for checking purposes) in m_containerTools - m_containerTools.push_back(dynamic_cast<ICaloCellMakerTool*>(algtool) ); - if(timerSvc() ) m_timer.push_back(addTimer("TCC_"+theItem.name())); // One timer per tool - } - } - // end of helpers... - - if (msgLvl() <= MSG::DEBUG) - msg() << MSG::DEBUG - << "Initialization of TrigCaloCellMaker completed successfully" - << endmsg; - - if ((m_data.retrieve()).isFailure()) { - msg() << MSG::ERROR << "Could not get m_data" << endmsg; - return HLT::TOOL_FAILURE; - } - - return HLT::OK; -} - - -HLT::ErrorCode TrigCaloCellMaker::hltFinalize() -{ - if (msgLvl() <= MSG::DEBUG) - msg() << MSG::DEBUG << "in finalize()" << endmsg; - - return HLT::OK; -} - -HLT::ErrorCode TrigCaloCellMaker::hltExecute(const HLT::TriggerElement* inputTE, - HLT::TriggerElement* outputTE) -{ - - // Time total TrigCaloCellMaker execution time. - if (timerSvc()) m_timer[0]->start(); - for(int id=0; id<IAlgToolEFCalo::MAXNEFCALO; id++) m_conversionError[id]=0; - -#ifndef NDEBUG - if (msgLvl() <= MSG::DEBUG) - msg() << MSG::DEBUG << "in execute()" << endmsg; -#endif - - // Monitoring initialization... - m_CellContainerSize = 0.; - - // Some debug output: -#ifndef NDEBUG - if (msgLvl() <= MSG::DEBUG) { - msg() << MSG::DEBUG << "outputTE->getId(): " << outputTE->getId() << endmsg; - msg() << MSG::DEBUG << "inputTE->getId(): " << inputTE->getId() << endmsg; - } -#endif - - // Get RoiDescriptor - // bool createdRoI = false; - const TrigRoiDescriptor* tmpRoi = 0; - HLT::ErrorCode sc = getFeature(inputTE, tmpRoi, ""); - if (sc != HLT::OK || tmpRoi==0 ) return sc; - - const IRoiDescriptor* roiDescriptor = tmpRoi; - - if ( !roiDescriptor->composite() ) { - if ( !m_trustRoiLimits ){ - - double eta0 = roiDescriptor->eta(); - /// don't really need to wrap phi, as the RoI does it anyway, so phi - /// from the RoI should always be wrapped anyway - double phi0 = CxxUtils::wrapToPi(roiDescriptor->phi()); - - // Set Phi in [0, 2Pi] - //while (phi0 > 2.*M_PI) phi0 -= 2. * M_PI; - //while (phi0 < 0. ) phi0 += 2. * M_PI; - /// not needed - // while (phi0 > M_PI) phi0 -= 2. * M_PI; - // while (phi0 <-M_PI) phi0 += 2. * M_PI; - - // set up the sampling windows (only for samp2??): - - //double etamin = std::max(-2.5,eta0-(m_detas2*(float)m_neta)/2.); - //double etamax = std::min( 2.5,eta0+(m_detas2*(float)m_neta)/2.); - double etamin = eta0-(m_detas2*(float)m_neta)/2.; - double etamax = eta0+(m_detas2*(float)m_neta)/2.; - // What if phimin < 0 or phimax > 2Pi ?? question - double phimin = CxxUtils::wrapToPi(phi0 - (m_dphis2*(float)m_nphi)/2.); - double phimax = CxxUtils::wrapToPi(phi0 + (m_dphis2*(float)m_nphi)/2.); - - /// need to map the limits as well !!! - NB: CxxUtils::wrapToPi does this now - // while (phimin > M_PI) phimin -= 2. * M_PI; - // while (phimin <-M_PI) phimin += 2. * M_PI; - - // while (phimax > M_PI) phimax -= 2. * M_PI; - // while (phimax <-M_PI) phimax += 2. * M_PI; - - -#ifndef NDEBUG - if (msgLvl() <= MSG::DEBUG) { - msg() << MSG::DEBUG << " eta0 = "<< eta0 << endmsg; - msg() << MSG::DEBUG << " phi0 = "<< phi0 << endmsg; - msg() << MSG::DEBUG << " etamin = "<< etamin << endmsg; - msg() << MSG::DEBUG << " etamax = "<< etamax << endmsg; - msg() << MSG::DEBUG << " phimin = "<< phimin << endmsg; - msg() << MSG::DEBUG << " phimax = "<< phimax << endmsg; - } -#endif - - TrigRoiDescriptor* roi = new TrigRoiDescriptor( roiDescriptor->roiWord(), roiDescriptor->l1Id(), roiDescriptor->roiId(), - eta0, etamin, etamax, phi0, phimin, phimax ); - attachFeature( outputTE, roi, "" ); - roiDescriptor = roi; - } - } - - m_PhiL2 = roiDescriptor->phi(); - m_EtaL2 = roiDescriptor->eta(); - - - -#ifndef NDEBUG - if (msgLvl() <= MSG::DEBUG) - msg() << MSG::DEBUG << " REGTEST: RoI id " << *roiDescriptor << roiDescriptor->eta() << endmsg; -#endif - - - //if (timerSvc()) m_timer[1]->start(); // Measures the time to retrieve the cells in the RoI - - // The CellContainer is not the cell owner (SG::VIEW_ELEMENTS)... - //CaloCellContainer* m_caloCellContainer = new CaloCellContainer(SG::VIEW_ELEMENTS); - m_caloCellContainer = new CaloCellContainer(SG::VIEW_ELEMENTS); - m_caloCellContainer->reserve(190000); - m_trigCaloQuality = new TrigCaloQuality(); - - bool isPersistent = (m_persistencyPSF!=0 && (m_counter%m_persistencyPSF)==0) ? 1 : 0; - std::string persKey = isPersistent ? m_persistencyKey : "TrigCaloCellMaker"; -#ifndef NDEBUG - if ( msgLvl() <= MSG::DEBUG) { - msg() << MSG::DEBUG << "CaloCellContainer is stored with key = " << persKey << endmsg; - } -#endif - - std::string cellCollKey; - sc = getUniqueKey( m_caloCellContainer, cellCollKey, persKey ); - if (sc != HLT::OK) { - msg() << MSG::DEBUG << "Could not retrieve the cell collection key" << endmsg; - return sc; - } - if ( store()->record(m_caloCellContainer, cellCollKey).isFailure() ) { - msg() << MSG::ERROR << "Could not record a cell container in the RoI with key " << cellCollKey << endmsg; - } - - // Creating the cells containers... - ToolHandleArray<IAlgToolEFCalo>::iterator itrtcr = m_tcrAlgTools.begin(); - ToolHandleArray<IAlgToolEFCalo>::iterator endtcr = m_tcrAlgTools.end(); - // Use specific Tools to fill the container : - int index=0; - uint32_t error = 0; - - if (timerSvc()) m_timer[1]->start(); - - unsigned idet=0; - for (; itrtcr!=endtcr; ++itrtcr) { - - //if (timerSvc()) m_timer[2+index]->start(); - StatusCode sc; - - if(m_fullScanEnabled) { - sc= (*itrtcr)->execute(*m_caloCellContainer); - } else { - // sc = (*itrtcr)->execute(*m_caloCellContainer, new TrigRoiDescriptor( eta0, etamin, etamax, phi0, phimin, phimax ) ); - sc = (*itrtcr)->execute(*m_caloCellContainer, *roiDescriptor ); - } - - if ( sc.isFailure() ) { - msg() << MSG::ERROR << "Error executing TCR tool " << (*itrtcr).name() << endmsg; - return HLT::TOOL_FAILURE; - } else { - uint32_t in_error = (*itrtcr)->report_error(); - if ( m_fullScanEnabled ) idet = IAlgToolEFCalo::EFFULLCALO; - if (0x0FFFFFFF & in_error) ++m_conversionError[idet]; - idet++; - error|=(in_error&0x0FFFFFFF); -# ifndef NDEBUG - if (msgLvl() <= MSG::DEBUG) msg() << MSG::DEBUG << "Executed TCR tool " << (*itrtcr).name() << endmsg; -# endif - } - //if (timerSvc()) m_timer[2+index]->stop(); - - ++index; - } - - if (timerSvc()) m_timer[1]->stop(); - - /// delete the Roi descriptor if we needed to create another (should really - /// add it to the navigation with the appropriate IDs !!! - // if ( !m_trustRoiLimits && !m_useSuperRoi ) delete roiDescriptor; - // if ( createdRoi ) delete roiDescriptor; - - if (m_caloCellContainer->size() < 1) return HLT::ErrorCode(HLT::Action::ABORT_CHAIN, HLT::Reason::MISSING_FEATURE); - - // Check conversion status - m_trigCaloQuality->setPersistencyFlag(false); - m_trigCaloQuality->setPersistencyFlag(isPersistent); - m_trigCaloQuality->setError(error); - if (store()->record(m_trigCaloQuality, cellCollKey).isFailure()) { - msg() << MSG::WARNING << "TrigCaloQuality cannot recorded with key=" - << cellCollKey << endmsg; - } -# ifndef NDEBUG - else { - msg() << MSG::DEBUG << "successfully record TrigCaloQuality with key=" << cellCollKey << " " << error << endmsg; - } -# endif - - // Looping over cell container tools... this could be used for calibrations... - - index=0; - const EventContext& ctx = Gaudi::Hive::currentContext(); - for (const ICaloCellMakerTool* tool : m_containerTools) { - if (timerSvc()) m_timer[2+index]->start(); - if ( tool->process (m_caloCellContainer, ctx).isFailure() ) { - //msg() << MSG::ERROR << "Error executing tool " << m_containerToolNames[index] << endmsg; - msg() << MSG::ERROR << "Error executing container tool " << endmsg; - } -#ifndef NDEBUG -else { - if (msgLvl() <= MSG::DEBUG) msg() << MSG::DEBUG << "Executed container tool " << endmsg; - } -#endif - if (timerSvc()) m_timer[2+index]->stop(); - ++index; - } - if ( m_fullScanEnabled) m_caloCellContainer->updateCaloIterators(); - (evtStore()->setConst( m_caloCellContainer ) ).ignore(); -//if (timerSvc()) m_timer[1]->stop(); - - /* // Protection against types used in methods API (uint16_t). Ask Tomasz. - if (m_caloCellContainer->size()>= 65535) { - msg() << MSG::WARNING << "CellContainer Size larger than 65535, Chain Aborted " << endmsg; - return HLT::ErrorCode(HLT::Action::ABORT_CHAIN, HLT::Reason::NAV_ERROR); - } -*/ - - cellCollKey = ""; - try { - sc = reAttachFeature(outputTE, m_caloCellContainer, cellCollKey, persKey ); - if (sc != HLT::OK) { - msg() << MSG::WARNING << "Could not record a cell container in the RoI with key " << cellCollKey << " " << name() << endmsg; - } -# ifndef NDEBUG - else { - if (msgLvl() <= MSG::DEBUG) - msg() << MSG::DEBUG << " REGTEST: Recorded the cell container in the RoI " << endmsg; - } -# endif - } catch (std::exception& e) { - msg() << MSG::WARNING << "HLTNavigation reached it's limit: " << e.what() << endmsg; - return HLT::ErrorCode(HLT::Action::ABORT_CHAIN, HLT::Reason::NAV_ERROR); - } - -# ifndef NDEBUG - if (msgLvl() <= MSG::DEBUG) - msg() << MSG::DEBUG << " REGTEST: Produced a Cell Container of Size= " << m_caloCellContainer->size() << endmsg; -# endif - - //monitoring - m_CellContainerSize = (float)m_caloCellContainer->size(); - - /// create and attache an RoI for the ID Trigger - if ( m_createRoiForID ) { - - if ( roiDescriptor->composite() ) { - msg() << MSG::WARNING << " Request to build an RoI for the ID From a composite RoiDescriptor" << *roiDescriptor << endmsg; - } - - - TrigRoiDescriptor* roi = new TrigRoiDescriptor( roiDescriptor->roiWord(), - roiDescriptor->l1Id(), - roiDescriptor->roiId(), - roiDescriptor->eta(), - roiDescriptor->eta()-m_etaWidthForID, - roiDescriptor->eta()+m_etaWidthForID, - roiDescriptor->phi(), - CxxUtils::wrapToPi(roiDescriptor->phi()-m_phiWidthForID), - CxxUtils::wrapToPi(roiDescriptor->phi()+m_phiWidthForID) ); - - if ( m_etaWidthForID==0 || m_phiWidthForID==0 ) { - msg() << MSG::WARNING << "ZERO width RoI requested for the ID: " << *roi << endmsg; - } - - if (msgLvl() <= MSG::DEBUG) msg() << MSG::DEBUG << "REGTEST: attach RoI for ID " << *roi << endmsg; - attachFeature( outputTE, roi, "forID" ); - } - - - // Time total TrigCaloCellMaker execution time. - if (timerSvc()) { - m_timer[0]->stop(); - } - - if (error) return HLT::ErrorCode(HLT::Action::CONTINUE, HLT::Reason::USERDEF_2); - - ++m_counter; - - return HLT::OK; -} - -HLT::ErrorCode TrigCaloCellMaker::prepareRobRequests(const HLT::TriggerElement* inputTE ){ - - // Calculate ROBs needed - const IRoiDescriptor* roi = 0; - HLT::ErrorCode hltStatus; - - const TrigRoiDescriptor* roiDescriptor = 0; - hltStatus = getFeature(inputTE, roiDescriptor); - roi = roiDescriptor; - - if ( hltStatus != HLT::OK ) { - std::cout << MSG::WARNING << " Failed to find RoiDescriptor " << std::endl; - return hltStatus; - } - - m_data->ROBList( *roi, m_vec_robs); - - config()->robRequestInfo()->addRequestScheduledRobIDs(m_vec_robs); - - return HLT::OK; - -} diff --git a/Trigger/TrigAlgorithms/TrigCaloRec/src/components/TrigCaloRec_entries.cxx b/Trigger/TrigAlgorithms/TrigCaloRec/src/components/TrigCaloRec_entries.cxx index ff5fdf1b4e27..34856877a92a 100644 --- a/Trigger/TrigAlgorithms/TrigCaloRec/src/components/TrigCaloRec_entries.cxx +++ b/Trigger/TrigAlgorithms/TrigCaloRec/src/components/TrigCaloRec_entries.cxx @@ -1,13 +1,6 @@ -#include "TrigCaloRec/RoILArEMCellContMaker.h" -#include "TrigCaloRec/RoILArHadCellContMaker.h" -#include "TrigCaloRec/RoITileCellContMaker.h" -#include "TrigCaloRec/RoIFCalEmCellContMaker.h" -#include "TrigCaloRec/RoIFCalHadCellContMaker.h" -#include "TrigCaloRec/FullCaloCellContMaker.h" #include "TrigCaloRec/TrigL1FCALTTSumFex.h" #include "TrigCaloRec/TrigCaloClusterMaker.h" -#include "TrigCaloRec/TrigCaloCellMaker.h" #include "TrigCaloRec/TrigCaloTowerMaker.h" #include "TrigCaloRec/TrigFullCaloCellMaker.h" #include "TrigCaloRec/TrigFullCaloClusterMaker.h" @@ -27,7 +20,6 @@ DECLARE_COMPONENT( TrigCaloTowerMakerMT ) DECLARE_COMPONENT( TrigCaloClusterCalibratorMT ) DECLARE_COMPONENT( TrigCaloClusterMakerMT ) -DECLARE_COMPONENT( TrigCaloCellMaker ) DECLARE_COMPONENT( TrigFullCaloCellMaker ) DECLARE_COMPONENT( TrigCaloTowerMaker ) DECLARE_COMPONENT( TrigCaloClusterMaker ) @@ -38,12 +30,6 @@ DECLARE_COMPONENT( TrigLArNoisyROAlg ) DECLARE_COMPONENT( TrigL1BSTowerMaker ) DECLARE_COMPONENT( TrigL1BSTowerHypo ) DECLARE_COMPONENT( TrigL1FCALTTSumFex ) -DECLARE_COMPONENT( RoILArEMCellContMaker ) -DECLARE_COMPONENT( RoILArHadCellContMaker ) -DECLARE_COMPONENT( RoITileCellContMaker ) -DECLARE_COMPONENT( RoIFCalEmCellContMaker ) -DECLARE_COMPONENT( RoIFCalHadCellContMaker ) -DECLARE_COMPONENT( FullCaloCellContMaker ) DECLARE_COMPONENT( HLTCaloCellMaker ) DECLARE_COMPONENT( HLTCaloCellSumMaker ) diff --git a/Trigger/TrigAlgorithms/TrigL2MissingET/ATLAS_CHECK_THREAD_SAFETY b/Trigger/TrigAlgorithms/TrigL2MissingET/ATLAS_CHECK_THREAD_SAFETY deleted file mode 100644 index be5ae8e59402..000000000000 --- a/Trigger/TrigAlgorithms/TrigL2MissingET/ATLAS_CHECK_THREAD_SAFETY +++ /dev/null @@ -1 +0,0 @@ -Trigger/TrigAlgorithms/TrigL2MissingET diff --git a/Trigger/TrigAlgorithms/TrigL2MissingET/CMakeLists.txt b/Trigger/TrigAlgorithms/TrigL2MissingET/CMakeLists.txt deleted file mode 100644 index e274321db3c3..000000000000 --- a/Trigger/TrigAlgorithms/TrigL2MissingET/CMakeLists.txt +++ /dev/null @@ -1,16 +0,0 @@ -# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration - -# Declare the package name: -atlas_subdir( TrigL2MissingET ) - -# External dependencies: -find_package( tdaq-common ) - -# Component(s) in the package: -atlas_add_component( TrigL2MissingET - src/*.cxx src/components/*.cxx - INCLUDE_DIRS ${TDAQ-COMMON_INCLUDE_DIRS} - LINK_LIBRARIES ${TDAQ-COMMON_LIBRARIES} CaloIdentifier CxxUtils GaudiKernel IRegionSelector LArCablingLib LArIdentifier LArRecConditions LArRecEvent StoreGateLib TrigInterfacesLib TrigMissingEtEvent TrigNavigationLib TrigSteeringEvent TrigT1Interfaces TrigT2CaloCommonLib TrigTimeAlgsLib xAODEventInfo xAODTrigMissingET ) - -# Install files from the package: -atlas_install_python_modules( python/*.py POST_BUILD_CMD ${ATLAS_FLAKE8} --extend-extensions=ATL900,ATL901 ) diff --git a/Trigger/TrigAlgorithms/TrigL2MissingET/doc/packagedoc.h b/Trigger/TrigAlgorithms/TrigL2MissingET/doc/packagedoc.h deleted file mode 100644 index 347a2d9fe8a4..000000000000 --- a/Trigger/TrigAlgorithms/TrigL2MissingET/doc/packagedoc.h +++ /dev/null @@ -1,50 +0,0 @@ -/* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration -*/ - -/** -@page TrigL2MissingET_page TrigL2MissingET Package - - -The TrigL2MissingET package implements the missing energy and scalar -energy sums feature extraction (Fex) algorithms for the L2 level ATLAS -trigger level. More details are provided in the -<a href="https://twiki.cern.ch/twiki/bin/view/Atlas/AtlasHltMetSlice">AtlasHltMetSlice</a> -twiki page. - -@authors Diego Casadei <Diego.Casadei@cern.ch> - Kyle Cranmer <cranmer@cern.ch> - Till Eifert <till.eifert@cern.ch> - Xiaowen Lei <xiaowen@physics.arizona.edu> - Allen Mincer <allen.mincer@nyu.edu> - -@section TrigL2MissingET_TrigL2MissingETIntro Introduction - -The package provides LVL2 MissingET algorithms. -It returns etx and ety, the x and y components of missing Et, -Et, equal to the sqrt(metx^2+mety^2), and sumEt, the scalar -sum of the energy projected onto the transverse plane. - -This is an allte algorithm, and can run in seeded or unseeded -modes. In the seeded mode, the roi inputs must have energy sum -first. LVL 2 muons can be added as a second roi. In the -unseeded mode only muon no roi's or only muon roi's are provided. - -@section TrigL2MissingET_TrigL2MissingETOverview Class Overview - - The full work of TrigL2MissingET is currently carried out in - T2MissingET.cxx - -@section TrigL2MissingET_TrigL2MissingETAlgorithm Algorithm properties - -property [default] meaning - -"MissingETOutputKey" ["T2MissingET"] HLT feature label in navigation -"BadRegionsPhiMin" empty List of lower limits for dead phi regions -"BadRegionsPhiMax" empty List of uper limits for dead phi regions -"BadRegionsEtaMin" empty List of lower limits for dead eta regions -"BadRegionsEtaMax" empty List of uper limits for dead eta regions - -As eta is not available from LVL1, the last two properties are not used. - -*/ diff --git a/Trigger/TrigAlgorithms/TrigL2MissingET/python/TrigL2MissingETConfig.py b/Trigger/TrigAlgorithms/TrigL2MissingET/python/TrigL2MissingETConfig.py deleted file mode 100755 index afbdd7969982..000000000000 --- a/Trigger/TrigAlgorithms/TrigL2MissingET/python/TrigL2MissingETConfig.py +++ /dev/null @@ -1,68 +0,0 @@ -# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration - -from TrigL2MissingET.TrigL2MissingETConf import PESA__T2MissingET, T2CaloMissingET - - - -class L2MissingET_Fex ( PESA__T2MissingET ) : - __slots__ = [] - def __init__ (self, name="L2MissingET_Fex"): - super(L2MissingET_Fex, self).__init__(name) - - # monitoring part. To switch off do in topOption TriggerFlags.enableMonitoring = [] - from TrigL2MissingET.TrigL2MissingETMonitoring import T2MissingETOnlineMonitoring, T2MissingETCosmicMonitoring, T2MissingETValidationMonitoring - validation = T2MissingETValidationMonitoring() - online = T2MissingETOnlineMonitoring() - cosmic = T2MissingETCosmicMonitoring() - - from TrigTimeMonitor.TrigTimeHistToolConfig import TrigTimeHistToolConfig - time = TrigTimeHistToolConfig("Time") - time.TimerHistLimits = [0, 50] - self.METLabel = "T2MissingET" - self.AthenaMonTools = [ time, validation, online, cosmic ] - self.DecodeDetMask=True - -class L2CaloMissingET_Fex ( T2CaloMissingET ) : - __slots__ = [] - def __init__ (self, name="L2CaloMissingET_Fex"): - super(L2CaloMissingET_Fex, self).__init__(name) - - # monitoring part. To switch off do in topOption TriggerFlags.enableMonitoring = [] - from TrigL2MissingET.TrigL2MissingETMonitoring import T2CaloMissingETOnlineMonitoring, T2CaloMissingETValidationMonitoring - validation = T2CaloMissingETValidationMonitoring() - online = T2CaloMissingETOnlineMonitoring() - - from TrigTimeMonitor.TrigTimeHistToolConfig import TrigTimeHistToolConfig - time = TrigTimeHistToolConfig("Time") - time.TimerHistLimits = [0, 2] - time.NumberOfHistBins=100 - self.OneByOne=False - self.ReadL2L1=False - self.doTiming=True - #self.OneByOne=True; - self.METLabel = "TrigL2MissingET_FEB" - self.AthenaMonTools = [ online,validation,time ] - #self.AthenaMonTools = [ online,time ] - -class L2CaloMissingET_Fex_ReadL2L1 ( T2CaloMissingET ) : - __slots__ = [] - def __init__ (self, name="L2CaloMissingET_Fex_ReadL2L1"): - super(L2CaloMissingET_Fex_ReadL2L1, self).__init__(name) - - # monitoring part. To switch off do in topOption TriggerFlags.enableMonitoring = [] - from TrigL2MissingET.TrigL2MissingETMonitoring import T2CaloMissingETOnlineMonitoring, T2CaloMissingETValidationMonitoring - validation = T2CaloMissingETValidationMonitoring() - online = T2CaloMissingETOnlineMonitoring() - from TrigTimeMonitor.TrigTimeHistToolConfig import TrigTimeHistToolConfig - time = TrigTimeHistToolConfig("Time") - time.TimerHistLimits = [0, 2] - time.NumberOfHistBins=100 - self.OneByOne=False - self.ReadL2L1=True - self.doTiming=True - #self.OneByOne=True - self.METLabel = "TrigL2MissingET_FEB" - self.AthenaMonTools = [ online,validation,time ] - #self.AthenaMonTools = [ online,time ] - - diff --git a/Trigger/TrigAlgorithms/TrigL2MissingET/python/TrigL2MissingETMonitoring.py b/Trigger/TrigAlgorithms/TrigL2MissingET/python/TrigL2MissingETMonitoring.py deleted file mode 100755 index c29f0f65a56e..000000000000 --- a/Trigger/TrigAlgorithms/TrigL2MissingET/python/TrigL2MissingETMonitoring.py +++ /dev/null @@ -1,191 +0,0 @@ -# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration - -################# Validation, DQ checks -from TrigMonitorBase.TrigGenericMonitoringToolConfig import defineHistogram, TrigGenericMonitoringToolConfig -from builtins import range - -bitNames = [ "ErrParityL1", # bit 0 - "ErrL1mult", # bit 1 - "ErrMuon", # bit 2 - "spare", # bit 3 - "L1OverflowExEy", # bit 4 - "L1OverflowSumEt", # bit 5 - "spare", # bit 6 - "METinBadPhiRegion", # bit 7 - "METinBadRegion", # bit 8 - "ObjInPhiRegion", # bit 9 - "ObjInRegion", # bit 10 - "ObjInCrack", # bit 11 - "PhiCorrJet1", # bit 12 - "PhiCorrJet2", # bit 13 - "PhiCorrJet3", # bit 14 - "CompError", # bit 15 - "EMB_A_Missing", # bit 16 - "EMB_C_Missing", # bit 17 - "EME_A_Missing", # bit 18 - "EME_C_Missing", # bit 19 - "HEC_A_Missing", # bit 20 - "HEC_C_Missing", # bit 21 - "FCAL_A_Missing", # bit 22 - "FCAL_C_Missing", # bit 23 - "TileB_A_Missing", # bit 24 - "TileB_C_Missing", # bit 25 - "TileE_A_Missing", # bit 26 - "TileE_C_Missing", # bit 27 - "L1Calo_Missing", # bit 28 - "GlobBigMEtSEtRatio", # bit 29 - "spare", # bit 30 - "GlobError" # bit 31 - ] - -bitLabels = '' -for a in bitNames: - bitLabels += a+':' - -### histogram definitions -# linear-scale -hEx_lin_L1 = defineHistogram('L1_METx', type='TH1F', title="L1 Measured E_{x};E_{x} (GeV)", xbins=199, xmin=-298.5, xmax=298.5) -hEy_lin_L1 = defineHistogram('L1_METy', type='TH1F', title="L1 Measured E_{y};E_{y} (GeV)", xbins=199, xmin=-298.5, xmax=298.5) -hEx_lin_L2 = defineHistogram('L2_METx', type='TH1F', title="L2 Missing E_{x};ME_{x} (GeV)", xbins=199, xmin=-298.5, xmax=298.5) -hEy_lin_L2 = defineHistogram('L2_METy', type='TH1F', title="L2 Missing E_{y};ME_{y} (GeV)", xbins=199, xmin=-298.5, xmax=298.5) -# -hMET_lin_L1 = defineHistogram('L1_MET', type='TH1F', title="L1 E_{T};E_{T} (GeV)", xbins=205, xmin=-13.5, xmax=601.5) -hMET_lin_L2 = defineHistogram('L2_MET', type='TH1F', title="L2 |Missing E_{T}|;ME_{T} (GeV)", xbins=205, xmin=-13.5, xmax=601.5) -hSumEt_lin_L1 = defineHistogram('L1_SumEt', type='TH1F', title="L1 Sum |E_{T}|;SumE_{T} (GeV)", xbins=305, xmin=-27., xmax=1803.) -hSumEt_lin_L2 = defineHistogram('L2_SumEt', type='TH1F', title="L2 Sum |E_{T}|;SumE_{T} (GeV)", xbins=305, xmin=-27., xmax=1803.) -# -hMETPhi_L1 = defineHistogram('L1_MET_phi', type='TH1F', title="L1 MET #phi;MET #phi (rad)", xbins= 32, xmin=-3.1416, xmax=3.1416) -hMETPhi_L2 = defineHistogram('L2_MET_phi', type='TH1F', title="L2 MET #phi;MET #phi (rad)", xbins= 32, xmin=-3.1416, xmax=3.1416) -# -# -hMETstatus = defineHistogram('L2_MET_status', type='TH1I', title="L2 MET Status", xbins= 32, xmin=-0.5, xmax=31.5, labels=bitLabels, opt="kVec") -# histogram for recording L2 significance -h_XS_L1 = defineHistogram('L1_XS', type='TH1F', title="L1 Significance; (XS/GeV^{1/2})", xbins=40, xmin=-0.025, xmax=20.025) -h_XS_L2 = defineHistogram('L2_XS', type='TH1F', title="L2 Significance; (XS/GeV^{1/2})", xbins=40, xmin=-0.025, xmax=20.025) -# -# signed log-scale: 0.15/bin = 1.413X/bin (factor of ~2 each two bins) -# central bin is +/- 0.075 and contains values whose abs < 1.189 GeV -# limits are +/- 1.189 TeV -hEx_log_L1 = defineHistogram('L1_MEx_log', type='TH1F', title="L1 Measured E_{x};sgn(E_{x}) log_{10}(E_{x}/GeV)", xbins=41, xmin=-3.075, xmax=3.075) -hEy_log_L1 = defineHistogram('L1_MEy_log', type='TH1F', title="L1 Measured E_{y};sgn(E_{y}) log_{10}(E_{y}/GeV)", xbins=41, xmin=-3.075, xmax=3.075) -hEx_log_L2 = defineHistogram('L2_MEx_log', type='TH1F', title="L2 Missing E_{x};sgn(ME_{x}) log_{10}(ME_{x}/GeV)", xbins=41, xmin=-3.075, xmax=3.075) -hEy_log_L2 = defineHistogram('L2_MEy_log', type='TH1F', title="L2 Missing E_{y};sgn(ME_{y}) log_{10}(ME_{y}/GeV)", xbins=41, xmin=-3.075, xmax=3.075) -# -# signed log-scale: 0.15/bin = 1.413X/bin (factor of ~2 each two bins) -# bin centered on zero is +/- 0.075 and contains values whose abs < 1.189 GeV -# limits are -74.99 GeV and 2.371 TeV -hMET_log_L1 = defineHistogram('L1_MET_log', type='TH1F', title="L1 E_{T};log_{10}(E_{T}/GeV)", xbins=35, xmin=-1.875, xmax=3.375) -hMET_log_L2 = defineHistogram('L2_MET_log', type='TH1F', title="L2 |Missing E_{T}|;log_{10}(ME_{T}/GeV)", xbins=35, xmin=-1.875, xmax=3.375) -hSumEt_log_L1 = defineHistogram('L1_SumEt_log', type='TH1F', title="L1 Sum |E_{T}|;log_{10}(SumE_{T}/GeV)", xbins=40, xmin=-1.875, xmax=4.125) -hSumEt_log_L2 = defineHistogram('L2_SumEt_log', type='TH1F', title="L2 Sum |E_{T}|;log_{10}(SumE_{T}/GeV)", xbins=40, xmin=-1.875, xmax=4.125) -# - -### Online -class T2CaloMissingETOnlineMonitoring(TrigGenericMonitoringToolConfig): - def __init__ (self, name="L2CaloMissingETOnlineMonitoring"): - super(T2CaloMissingETOnlineMonitoring, self).__init__(name) - self.defineTarget("Online") - label_lba='' - label_lbc='' - label_eba='' - label_ebc='' - for i in range(64): - if i==63 : - label_la = '%(b)s%(n)02d' % {'b':'LBA', 'n':(i+1)} - label_lc = '%(b)s%(n)02d' % {'b':'LBC', 'n':(i+1)} - label_ea = '%(b)s%(n)02d' % {'b':'EBA', 'n':(i+1)} - label_ec = '%(b)s%(n)02d' % {'b':'EBC', 'n':(i+1)} - else: - label_la = '%(b)s%(n)02d:' % {'b':'LBA', 'n':(i+1)} - label_lc = '%(b)s%(n)02d:' % {'b':'LBC', 'n':(i+1)} - label_ea = '%(b)s%(n)02d:' % {'b':'EBA', 'n':(i+1)} - label_ec = '%(b)s%(n)02d:' % {'b':'EBC', 'n':(i+1)} - label_lba+=label_la - label_lbc+=label_lc - label_eba+=label_ea - label_ebc+=label_ec - - self.Histograms += [ defineHistogram('Met',type='TH1F', title="Met;(Met/GeV)", xbins=205, xmin=-13.5, xmax=601.5) ] - self.Histograms += [ defineHistogram('E',type='TH1F', title="E;(E/GeV)", xbins=305, xmin=-27., xmax=1803.) ] - self.Histograms += [ defineHistogram('Et',type='TH1F', title="E_{T};(E_{T}/GeV)", xbins=305, xmin=-27., xmax=1803.) ] - self.Histograms += [ defineHistogram('Tile_nLBA,Tile_LBA', type='TH2F', title='L2 Calo Missing E_{T} in LBA ; drawer ; Tile E_{T}', xbins=64, xmin=0, xmax=64, ybins=50, ymin=0.,ymax=500., labels=label_lba,opt='kLBN') ] - self.Histograms += [ defineHistogram('Tile_nLBC,Tile_LBC', type='TH2F', title='L2 Calo Missing E_{T} in LBC ; drawer ; Tile E_{T}', xbins=64, xmin=0, xmax=64, ybins=50, ymin=0.,ymax=500., labels=label_lbc,opt='kLBN') ] - self.Histograms += [ defineHistogram('Tile_nEBA,Tile_EBA', type='TH2F', title='L2 Calo Missing E_{T} in EBA ; drawer ; Tile E_{T}', xbins=64, xmin=0, xmax=64, ybins=50, ymin=0.,ymax=500., labels=label_eba,opt='kLBN') ] - self.Histograms += [ defineHistogram('Tile_nEBC,Tile_EBC', type='TH2F', title='L2 Calo Missing E_{T} in EBC ; drawer ; Tile E_{T}', xbins=64, xmin=0, xmax=64, ybins=50, ymin=0.,ymax=500., labels=label_ebc,opt='kLBN') ] -# self.Histograms += [ defineHistogram('TotalTime',type='TH1F', title="TotalTime", xbins=1000, xmin=-10, xmax=9999) ] - -class T2CaloMissingETValidationMonitoring(TrigGenericMonitoringToolConfig): - def __init__ (self, name="L2CaloMissingETValidationMonitoring"): - super(T2CaloMissingETValidationMonitoring, self).__init__(name) - self.defineTarget("Validation") - label_lba='' - label_lbc='' - label_eba='' - label_ebc='' - for i in range(64): - if i==63 : - label_la = '%(b)s%(n)02d' % {'b':'LBA', 'n':(i+1)} - label_lc = '%(b)s%(n)02d' % {'b':'LBC', 'n':(i+1)} - label_ea = '%(b)s%(n)02d' % {'b':'EBA', 'n':(i+1)} - label_ec = '%(b)s%(n)02d' % {'b':'EBC', 'n':(i+1)} - else: - label_la = '%(b)s%(n)02d:' % {'b':'LBA', 'n':(i+1)} - label_lc = '%(b)s%(n)02d:' % {'b':'LBC', 'n':(i+1)} - label_ea = '%(b)s%(n)02d:' % {'b':'EBA', 'n':(i+1)} - label_ec = '%(b)s%(n)02d:' % {'b':'EBC', 'n':(i+1)} - label_lba+=label_la - label_lbc+=label_lc - label_eba+=label_ea - label_ebc+=label_ec - - self.Histograms += [ defineHistogram('Met',type='TH1F', title="Met;(Met/GeV)", xbins=205, xmin=-13.5, xmax=601.5) ] - self.Histograms += [ defineHistogram('E',type='TH1F', title="E;(E/GeV)", xbins=305, xmin=-27., xmax=1803.) ] - self.Histograms += [ defineHistogram('Et',type='TH1F', title="E_{T};(E_{T}/GeV)", xbins=305, xmin=-27., xmax=1803.) ] - self.Histograms += [ defineHistogram('Tile_nLBA,Tile_LBA', type='TH2F', title='L2 Calo Missing E_{T} in LBA ; drawer ; Tile E_{T}', xbins=64, xmin=0, xmax=64, ybins=50, ymin=0.,ymax=500., labels=label_lba,opt='kLBN') ] - self.Histograms += [ defineHistogram('Tile_nLBC,Tile_LBC', type='TH2F', title='L2 Calo Missing E_{T} in LBC ; drawer ; Tile E_{T}', xbins=64, xmin=0, xmax=64, ybins=50, ymin=0.,ymax=500., labels=label_lbc,opt='kLBN') ] - self.Histograms += [ defineHistogram('Tile_nEBA,Tile_EBA', type='TH2F', title='L2 Calo Missing E_{T} in EBA ; drawer ; Tile E_{T}', xbins=64, xmin=0, xmax=64, ybins=50, ymin=0.,ymax=500., labels=label_eba,opt='kLBN') ] - self.Histograms += [ defineHistogram('Tile_nEBC,Tile_EBC', type='TH2F', title='L2 Calo Missing E_{T} in EBC ; drawer ; Tile E_{T}', xbins=64, xmin=0, xmax=64, ybins=50, ymin=0.,ymax=500., labels=label_ebc,opt='kLBN') ] -# self.Histograms += [ defineHistogram('TotalTime',type='TH1F', title="TotalTime", xbins=1000, xmin=-10, xmax=9999) ] - - -### Online -class T2MissingETOnlineMonitoring(TrigGenericMonitoringToolConfig): - def __init__ (self, name="L2MissingETOnlineMonitoring"): - super(T2MissingETOnlineMonitoring, self).__init__(name) - self.defineTarget("Online") - - self.Histograms = [ hMETstatus ] - self.Histograms += [ hEx_lin_L1, hEy_lin_L1, hMET_lin_L1, hSumEt_lin_L1, h_XS_L1, hMETPhi_L1 ] - self.Histograms += [ hEx_lin_L2, hEy_lin_L2, hMET_lin_L2, hSumEt_lin_L2, h_XS_L2, hMETPhi_L2 ] - self.Histograms += [ hEx_log_L1, hEy_log_L1, hMET_log_L1, hSumEt_log_L1 ] - self.Histograms += [ hEx_log_L2, hEy_log_L2, hMET_log_L2, hSumEt_log_L2 ] - -### Cosmic -class T2MissingETCosmicMonitoring(TrigGenericMonitoringToolConfig): - def __init__ (self, name="L2MissingETCosmicMonitoring"): - super(T2MissingETCosmicMonitoring, self).__init__(name) - self.defineTarget("Cosmic") - - self.Histograms = [ hMETstatus ] - self.Histograms += [ hEx_lin_L1, hEy_lin_L1, hMET_lin_L1, hSumEt_lin_L1, h_XS_L1, hMETPhi_L1 ] - self.Histograms += [ hEx_lin_L2, hEy_lin_L2, hMET_lin_L2, hSumEt_lin_L2, h_XS_L2, hMETPhi_L2 ] - self.Histograms += [ hEx_log_L1, hEy_log_L1, hMET_log_L1, hSumEt_log_L1 ] - self.Histograms += [ hEx_log_L2, hEy_log_L2, hMET_log_L2, hSumEt_log_L2 ] - - -######################################################################### -# -# If you ever remove histograms from Online - move them into Validation -# -######################################################################### -class T2MissingETValidationMonitoring( T2MissingETOnlineMonitoring ): - def __init__ (self, name="L2MissingETValidationMonitoring"): - super(T2MissingETValidationMonitoring, self).__init__(name) - self.defineTarget("Validation") - - self.Histograms = [ hMETstatus ] - self.Histograms += [ hEx_lin_L1, hEy_lin_L1, hMET_lin_L1, hSumEt_lin_L1, h_XS_L1, hMETPhi_L1 ] - self.Histograms += [ hEx_lin_L2, hEy_lin_L2, hMET_lin_L2, hSumEt_lin_L2, h_XS_L2, hMETPhi_L2 ] - self.Histograms += [ hEx_log_L1, hEy_log_L1, hMET_log_L1, hSumEt_log_L1 ] - self.Histograms += [ hEx_log_L2, hEy_log_L2, hMET_log_L2, hSumEt_log_L2 ] - diff --git a/Trigger/TrigAlgorithms/TrigL2MissingET/src/T2CaloMissingET.cxx b/Trigger/TrigAlgorithms/TrigL2MissingET/src/T2CaloMissingET.cxx deleted file mode 100644 index 21b8c839c9c3..000000000000 --- a/Trigger/TrigAlgorithms/TrigL2MissingET/src/T2CaloMissingET.cxx +++ /dev/null @@ -1,614 +0,0 @@ -/* - Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration -*/ - -// ******************************************************************** -// -// NAME: T2CaloMissingET.cxx -// PACKAGE: Trigger/TrigAlgorithms/TrigL2MissingET -// -// AUTHOR: Denis Oliveira Damazio - Brookhaven National Laboratory -// Chris Young - Oxford University -// Sven Kreiss - New York University -// -// Description: Level2 MissingET AllTEAlgo (FEX) algorithm. -// -// -// ******************************************************************** - -#include "T2CaloMissingET.h" -#include "TrigMissingEtEvent/TrigMissingET.h" -#include "TrigSteeringEvent/TrigRoiDescriptor.h" - -#include "xAODTrigMissingET/TrigMissingET.h" -#include "xAODTrigMissingET/TrigMissingETContainer.h" - -#include "TrigT1Interfaces/RecEnergyRoI.h" -#include "TrigTimeAlgs/TrigTimer.h" - -#include <cmath> -#include <cstdio> - -#define USECABLINGSERVICE -#ifndef USECABLINGSERVICE -#include "febmapL2.h" -#endif - -// number of components for the MET feature -#define NCOM 16 - -T2CaloMissingET::T2CaloMissingET(const std::string& name, ISvcLocator* pSvcLocator) - : HLT::AllTEAlgo(name, pSvcLocator), - m_useCachedResult(false), - m_data("TrigDataAccess/TrigDataAccess"), - m_log(NULL), - m_timersvc("TrigTimerSvc/TrigTimerSvc","T2CaloMissingET"), - m_met_feature(NULL), - m_cachedTE(NULL), - m_LArOnlineID(NULL), - m_CaloCell_ID(NULL) -{ - declareProperty("METLabel", m_featureLabel = "L2MissingET_FEB", "label for the MET feature in the HLT Navigation"); //change this to another name later - declareProperty("METL2L1Label", m_L2L1featureLabel = "T2MissingET", "label for the MET feature from the L2=L1 algorithm"); - declareProperty("TrigDataAccess",m_data,"Data Access for LVL2 Calo Algorithms"); - declareProperty("TrigTimerSvc", m_timersvc,"TrigTimerSvc Handle."); - declareProperty("EtaWidth", m_etaWidth = 0.1,"Eta Width of the Region of Interest"); - declareProperty("PhiWidth", m_phiWidth = 0.1,"Phi Width of the Region of Interest"); - declareProperty("OneByOne", m_one_by_one=false, "get data from each ROB (opposite to get data from each ROS)"); - declareProperty("L1MetDiffCut",m_l1metDiffCut=100., "fail event if large difference from L1 values"); - declareProperty("ReadL2L1", m_ReadL2L1=false, "Read the L2=L1 result"); - declareMonitoredVariable("E_x",m_Ex); - declareMonitoredVariable("E_y",m_Ey); - declareMonitoredVariable("E_z",m_Ez); - declareMonitoredVariable("Met",m_met); - declareMonitoredVariable("E",m_E); - declareMonitoredVariable("Et",m_Et); - // declareMonitoredVariable("E_x_Tile",m_ExT); - // declareMonitoredVariable("E_y_Tile",m_EyT); - // declareMonitoredVariable("E_z_Tile",m_EzT); - declareMonitoredStdContainer("Tile_LBA", m_tile_lba ); - declareMonitoredStdContainer("Tile_LBC", m_tile_lbc ); - declareMonitoredStdContainer("Tile_EBA", m_tile_eba ); - declareMonitoredStdContainer("Tile_EBC", m_tile_ebc ); - declareMonitoredStdContainer("Tile_nLBA", m_tile_nlba ); - declareMonitoredStdContainer("Tile_nLBC", m_tile_nlbc ); - declareMonitoredStdContainer("Tile_nEBA", m_tile_neba ); - declareMonitoredStdContainer("Tile_nEBC", m_tile_nebc ); - m_vec_robs.reserve(1000); - - m_timer[0] = 0; - m_timer[1] = 0; - -} - -HLT::ErrorCode T2CaloMissingET::hltInitialize(){ - - m_log = new MsgStream(msgSvc(), name()); - (*m_log) << MSG::INFO << "on hltInitialize()" << endmsg; - - if ((m_data.retrieve()).isFailure()) { - (*m_log) << MSG::ERROR << "Could not get m_data" << endmsg; - return HLT::OK; - } - - if( (m_timersvc.retrieve()).isFailure() ) { - (*m_log) << MSG::WARNING << name() << ": Unable to locate TrigTimer Service" << endmsg; - } - - if ( !m_timersvc.empty()) { - m_timer[0] = m_timersvc->addItem("totaltime"); - m_timer[1] = m_timersvc->addItem("onlyExecs"); - } - - // Monitor the variables Ex, Ey, Ez per event - m_detid.push_back(TTEM); - if ( m_one_by_one ){ - m_detid.push_back(TTHEC); - m_detid.push_back(FCALEM); - m_detid.push_back(FCALHAD); - } - -#ifdef USECABLINGSERVICE - if(m_cablingKey.initialize().isFailure()) { - *m_log << MSG::FATAL << "Could not get LAr Cabling map with key " << m_cablingKey.key() << endmsg; - return HLT::BAD_JOB_SETUP; - } - - if(m_RodKey.initialize().isFailure()) { - *m_log << MSG::FATAL << "Could not get LAr FebRod map with key " << m_RodKey.key() << endmsg; - return HLT::BAD_JOB_SETUP; - } -#endif - - StoreGateSvc* detStore = 0; - if (service( "DetectorStore", detStore ).isFailure()) { - *m_log << MSG::FATAL << "Unable to locate DetectorStore" << endmsg; - return HLT::BAD_JOB_SETUP; - } - - if (detStore->retrieve(m_LArOnlineID, "LArOnlineID").isFailure()) { - *m_log << MSG::FATAL << "Could not get LArOnlineID helper!" << endmsg; - return HLT::BAD_JOB_SETUP; - } - - if (detStore->retrieve(m_CaloCell_ID, "CaloCell_ID").isFailure()) { - *m_log << MSG::FATAL << "Could not get CaloCell_ID helper!" << endmsg; - return HLT::BAD_JOB_SETUP; - } - - return HLT::OK; -} - -HLT::ErrorCode T2CaloMissingET::hltFinalize(){ - (*m_log) << MSG::INFO << "on hltFinalize()" << endmsg; - delete m_log; - return HLT::OK; -} - - -HLT::TriggerElement* T2CaloMissingET::makeSeeding(std::vector<std::vector<HLT::TriggerElement*> >& tes_in, unsigned int type_out ) { - - HLT::TEVec allTEs; - for ( unsigned type = 0; type < tes_in.size(); ++ type ) { - std::vector<HLT::TriggerElement*>& tes = tes_in.at(type); - - for ( unsigned teIdx = 0; teIdx < tes.size(); ++teIdx ) { - - const LVL1::RecEnergyRoI* lvl1_energyRoi(0); - if ( getFeature(tes.at(teIdx), lvl1_energyRoi) == HLT::OK) { // for the seeding use only XE/TE/XS trigger elements (i.e. those having the RecEnergy obj) - if ( lvl1_energyRoi ) { - allTEs.push_back(tes.at(teIdx)); - /* - if (msgLvl() <= MSG::INFO) { - msg() << MSG::INFO << "using TE as a seed " << tes.at(teIdx)->getId() << endmsg; - } - */ - } else { - /* - if (msgLvl() <= MSG::INFO) { - msg() << MSG::INFO << "skipping TE " << tes.at(teIdx)->getId() << endmsg; - } - */ - } - } - } - } - return config()->getNavigation()->addNode(allTEs, type_out); -} -////////////////////////////////////////////////////////// - -HLT::ErrorCode T2CaloMissingET::hltExecute(std::vector<std::vector<HLT::TriggerElement*> >& tes_in, - unsigned int type_out) -{ - - - // CACHING - // first check whether we executed this instance before: - if (m_useCachedResult) { - if (msgLvl() <= MSG::DEBUG) { - (*m_log) << MSG::DEBUG << "Executing this T2iCaloMissingET " << name() << " in cached mode" << endmsg; - } - - HLT::TriggerElement* outputTE = makeSeeding(tes_in, type_out); - m_config->getNavigation()->copyAllFeatures( m_cachedTE, outputTE ); - - return HLT::OK; - } - - // start monitoring - beforeExecMonitors().ignore(); - - bool debug = (m_log->level() <= MSG::DEBUG); - - m_timer[0]->start(); - - m_met_feature = new xAOD::TrigMissingET(); m_met_feature->makePrivateStore(); - - std::vector <std::string> vs_aux; - for(int i = 0; i < NCOM; i++) - vs_aux.push_back(""); - m_met_feature->defineComponents(vs_aux); - - // assign names and usedchannels - init(m_met_feature); - m_timer[1]->start(); - m_timer[1]->pause(); - - //If flag is set, read in results of L2=L1 algorithm and put the results on the zero component - if(m_ReadL2L1) { - - if(msgLvl() <= MSG::DEBUG) { - msg() << MSG::DEBUG<< " Reading in L2=L1 MET container" << endmsg; - } - - bool storeL2L1 = true; - - unsigned int tes_in_size=tes_in.size(); // = 2 (seeded) or 1 (unseeded) - std::vector<const xAOD::TrigMissingET*> vectorL2L1MissingET; - - if (tes_in_size != 1) { - msg() << MSG::WARNING << " Failed to get L2=L1 vectorMissingETs. No storage of L1 will be performed " << endmsg; - storeL2L1 = false; - } - else { - HLT::ErrorCode status = getFeatures(tes_in[0][0], vectorL2L1MissingET); - if(status != HLT::OK) { - msg() << MSG::WARNING << "Cannot find L2=L1 MET result!" << endmsg; - storeL2L1 = false; - } - else { - if ( vectorL2L1MissingET.size() < 1 ) { - msg() << MSG::WARNING << "Cannot find L2=L1 MET result!" << endmsg; - storeL2L1 = false; - } - } - } - - if(storeL2L1) { - if(msgLvl() <= MSG::DEBUG) { - msg() << MSG::DEBUG << " Got " << vectorL2L1MissingET.size() - << " vectorL2L1MissingET size associated to the TE" << endmsg; - } - } - - const xAOD::TrigMissingET* metL2L1; - if(storeL2L1) { - metL2L1 = vectorL2L1MissingET.front(); - if (metL2L1==0){ - if(msgLvl() <= MSG::DEBUG) { - msg() << MSG::DEBUG<< " L2=L1 MissingET pointer is null! No storage of L1 will be performed" << endmsg; - } - storeL2L1 = false; - } - } - if(storeL2L1) { - //float L2L1MET=metL2L1->et(); // No component level MET so don't get this - float L2L1SET=metL2L1->sumEt(); // MeV - float L2L1Ex=metL2L1->ex(); // MeV - float L2L1Ey=metL2L1->ey(); // MeV - float L2L1Ez=metL2L1->ez(); // MeV - - m_met_feature->setExComponent(0,L2L1Ex); - m_met_feature->setEyComponent(0,L2L1Ey); - m_met_feature->setEzComponent(0,L2L1Ez); - m_met_feature->setSumEtComponent(0,L2L1SET); - float tempE = sqrt(L2L1Ex*L2L1Ex+L2L1Ey*L2L1Ey+L2L1Ez*L2L1Ez); - m_met_feature->setSumEComponent(0,tempE); - } - } - LArFebEnergyCollection::const_iterator feb_it, feb_it_beg, feb_it_end; - TileL2Container::const_iterator draw_it, draw_it_beg, draw_it_end; - if ( debug ) (*m_log) << MSG::DEBUG << "Executing" << endmsg; - - int k_n[30]; - for (int p=0; p<30; p++) k_n[p]=0; - - if ( debug ) (*m_log) << MSG::DEBUG << "Size of detid:" << m_detid.size() << endmsg; - -#ifdef USECABLINGSERVICE - SG::ReadCondHandle<LArOnOffIdMapping> cablingHdl{m_cablingKey}; - const LArOnOffIdMapping* cabling = *cablingHdl; - if(!cabling) { - (*m_log) << MSG::ERROR << "Do not have cabling map !" << endmsg; - return HLT::ERROR; - } - SG::ReadCondHandle<LArFebRodMapping> rodHdl{m_RodKey}; - const LArFebRodMapping* rodmap = *rodHdl; - if(!rodmap) { - (*m_log) << MSG::ERROR << "Do not have LAr FEB-ROD map !" << endmsg; - return HLT::ERROR; - } -#endif - //bool BSerrors = false; - //if (m_data->report_error()) BSerrors = true; - - // Get the LAr part of the Calo info - for(size_t detid = 0; detid<m_detid.size();detid++){ - m_timer[1]->resume(); - if ( (m_data->LoadFullCollections(feb_it_beg,feb_it_end, m_detid[detid])).isFailure() ){ - (*m_log) << MSG::INFO << "problems to run load collection" << endmsg; - return HLT::OK; - } - - m_timer[1]->pause(); - for(feb_it = feb_it_beg; feb_it != feb_it_end; ++feb_it){ - // start timer - -#ifdef USECABLINGSERVICE - if( (*feb_it)->getFebId() == 0) { - if(msgLvl() <= MSG::DEBUG) { - (*m_log) << "component unknown for this FEB id: " << std::hex << (*feb_it)->getFebId() << std::dec << endmsg; - (*m_log) << "this feb has: Ex " << (*feb_it)->getFebEx() << " Ey: " << (*feb_it)->getFebEy() << " Ez: " << (*feb_it)->getFebEz() << endmsg; - (*m_log) << "Skipping this FEB" << endmsg; - } - continue; - } - HWIdentifier febid2((*feb_it)->getFebId()); - - Identifier offChId; - int ichannel=0; - do { - HWIdentifier onlChId = m_LArOnlineID->channel_Id(febid2,ichannel); - offChId = cabling->cnvToIdentifier(onlChId); - ichannel++; - if (ichannel>127) { - (*m_log) << MSG::ERROR - << "not connected channel found for this FEB: " << (*feb_it)->getFebId() << endmsg; - return HLT::ERROR; - } - } while(!offChId.is_valid()); - - int caloSamp = m_CaloCell_ID->sampling(offChId); - HWIdentifier modId = rodmap->getReadoutModuleID(febid2); //ReadOutModuleId - int subdet = m_larROModSvc.em_hec_fcal(modId); // em=0, hec=1, fcal=2 - int caloId = m_larROModSvc.barrel_ec(modId); // barrel:0 or EndCAp:1 - - // stop timer - - // compute the component index - unsigned int k=0; - //bool doHackForHEC=false; - switch (subdet) { - case 0: // EM - k = 1 + 4*caloId + caloSamp; - break; - case 1: // HEC - k = 9 + caloSamp; - //doHackForHEC=true; - break; - case 2: // FCAL - k = 11 + caloSamp; - break; - default: - (*m_log) << MSG::FATAL << "Unknown subdetector!" << endmsg; - return HLT::ERROR; - } - - // check that the sample value is sensible - if (k<30){ - k_n[k]=k_n[k]+1; - }else{ - (*m_log) << MSG::ERROR << "Unknown subdetector index!" << endmsg; - } -#else - //if(msgLvl() <= MSG::DEBUG) (*m_log) << "USING FEB MAP" << endmsg; - - unsigned char k = 0; - std::map<int,unsigned char>::const_iterator it = febIdToComponentMap.find( (*feb_it)->getFebId() ); - if( it != febIdToComponentMap.end() ) { - k = it->second +1; - } else { - if(msgLvl() <= MSG::DEBUG) { - (*m_log) << "component unknown for this FEB id: " << std::hex << (*feb_it)->getFebId() << std::dec << endmsg; - (*m_log) << "this feb has: Ex " << (*feb_it)->getFebEx() << " Ey: " << (*feb_it)->getFebEy() << " Ez: " << (*feb_it)->getFebEz() << endmsg; - } - k = 1; // TODO to which component do we add unknown FEB energies; or should we have an "unknown" component - } - -#endif - - // save into TrigMissingET: fetch MEx,...SumE, add the current values, save them back - float tempEx = m_met_feature->exComponent(k); - float compEx = (*feb_it)->getFebEx(); - m_met_feature->setExComponent(k,tempEx-compEx); - float tempEy = m_met_feature->eyComponent(k); - float compEy = (*feb_it)->getFebEy(); - m_met_feature->setEyComponent(k,tempEy-compEy); - float tempEz = m_met_feature->ezComponent(k); - float compEz = (*feb_it)->getFebEz(); - m_met_feature->setEzComponent(k,tempEz-compEz); - float tempE = m_met_feature->sumEComponent(k); - tempE += sqrt(compEx*compEx+compEy*compEy+compEz*compEz); - m_met_feature->setSumEComponent(k,tempE); - float tempEt = m_met_feature->sumEtComponent(k); - tempEt += sqrt(compEx*compEx+compEy*compEy); - m_met_feature->setSumEtComponent(k,tempEt); - //Sum of Signs? - - if ( debug ){ - (*m_log) << MSG::DEBUG; - (*m_log) << std::hex << "febID=0x" << (*feb_it)->getFebId() << std::dec; - (*m_log) << "; Ex=" << (*feb_it)->getFebEx(); - (*m_log) << "; Ey=" << (*feb_it)->getFebEy(); - (*m_log) << "; Ez=" << (*feb_it)->getFebEz(); - (*m_log) << endmsg; - } // end of debug - } // end of feb_it for - } // end of detid for - - // Get the Tile part of the Calo info - if( (m_data->LoadFullCollections(draw_it_beg, draw_it_end )).isFailure() ){ - (*m_log) << MSG::INFO << "Call to LoadFullCollections for tile drawers failed." << endmsg; - return HLT::OK; - } - draw_it = draw_it_beg; - m_tile_lba.clear(); - m_tile_lbc.clear(); - m_tile_eba.clear(); - m_tile_ebc.clear(); - m_tile_nlba.clear(); - m_tile_nlbc.clear(); - m_tile_neba.clear(); - m_tile_nebc.clear(); - for(;draw_it!=draw_it_end;++draw_it){ - int targetComponent = 10; - int id = (*draw_it)->identify(); - int idd = (id & 0xFF); - float Etd = (*draw_it)->Et()/1e3; - if ( Etd > 490. ) Etd=490.0; - if ( (id & 0x700) == 0x100 ){ - m_tile_nlba.push_back( idd ); - m_tile_lba.push_back( Etd ); - } - if ( (id & 0x700) == 0x200 ){ - m_tile_nlbc.push_back( idd ); - m_tile_lbc.push_back( Etd ); - } - if ( (id & 0x700) == 0x300 ){ - m_tile_neba.push_back( idd ); - m_tile_eba.push_back( Etd ); - } - if ( (id & 0x700) == 0x400 ){ - m_tile_nebc.push_back( idd ); - m_tile_ebc.push_back( Etd ); - } - //if(m_outputLevel <= MSG::DEBUG) (*m_log) << MSG::DEBUG << std::hex << "drawerID=0x" << id << std::dec << endmsg; - if( (id & 0x700) == 0x100 || (id & 0x700) == 0x200 ) { - //if(m_outputLevel <= MSG::DEBUG) (*m_log) << MSG::DEBUG << "barrel" << endmsg; - targetComponent = 10; - }else if( (id & 0x700) == 0x300 || (id & 0x700) == 0x400 ) { - //if(m_outputLevel <= MSG::DEBUG) (*m_log) << MSG::DEBUG << "extended barrel" << endmsg; - targetComponent = 11; - }else{ - (*m_log) << MSG::ERROR << "dont know which part this tile drawer belongs to." << endmsg; - } - - float tempEx = m_met_feature->exComponent(targetComponent); - float compEx = (*draw_it)->Ex(); - m_met_feature->setExComponent(targetComponent,tempEx-compEx); - float tempEy = m_met_feature->eyComponent(targetComponent); - float compEy = (*draw_it)->Ey(); - m_met_feature->setEyComponent(targetComponent,tempEy-compEy); - float tempEz = m_met_feature->ezComponent(targetComponent); - float compEz = (*draw_it)->Ez(); - m_met_feature->setEzComponent(targetComponent,tempEz-compEz); - float tempE = m_met_feature->sumEComponent(targetComponent); - tempE += sqrt(compEx*compEx+compEy*compEy+compEz*compEz); - m_met_feature->setSumEComponent(targetComponent,tempE); - float tempEt = m_met_feature->sumEtComponent(targetComponent); - tempEt += sqrt(compEx*compEx+compEy*compEy); - m_met_feature->setSumEtComponent(targetComponent,tempEt); - if ( debug ){ - (*m_log) << MSG::DEBUG; - (*m_log) << std::hex << "draweID=0x" << (*draw_it)->identify() << std::dec; - (*m_log) << "; Ex=" << (*draw_it)->Ex(); - (*m_log) << "; Ey=" << (*draw_it)->Ey(); - (*m_log) << "; Ez=" << (*draw_it)->Ez(); - (*m_log) << endmsg; - } - - } - if ( debug ) (*m_log) << MSG::DEBUG << "Setting energies" << endmsg; - - //Fill the total Ex,Ey,Ez,E,Et - float tempEx=0.; - float tempEy=0.; - float tempEz=0.; - float tempE=0.; - float tempEt=0.; - for (int p=1; p<NCOM-1; p++) { - tempEx += m_met_feature->exComponent(p); - tempEy += m_met_feature->eyComponent(p); - tempEz += m_met_feature->ezComponent(p); - tempE += m_met_feature->sumEComponent(p); - tempEt += m_met_feature->sumEtComponent(p); - } - m_met_feature->setEx(tempEx); - m_met_feature->setEy(tempEy); - m_met_feature->setEz(tempEz); - m_met_feature->setSumE(tempE); - m_met_feature->setSumEt(tempEt); - - - if ( debug ) { - (*m_log) << MSG::DEBUG << "m_met_feature" << std::endl << m_met_feature << endmsg; - for(int i=0; i < NCOM; i++) { - (*m_log) << MSG::DEBUG << "m_met_feature component: " << i; - (*m_log) << "\t Ex : " << m_met_feature->exComponent(i); - (*m_log) << "\t Ey : " << m_met_feature->eyComponent(i); - (*m_log) << "\t Ez : " << m_met_feature->ezComponent(i); - (*m_log) << "\t SumE : " << m_met_feature->sumEComponent(i); - (*m_log) << "\t SumEt: " << m_met_feature->sumEtComponent(i); - (*m_log) << endmsg; - } - } - // convert back to GeV for output log - m_Ex=tempEx/1000.; - m_Ey=tempEy/1000.; - m_Ez=tempEz/1000.; - m_E=std::fabs(tempE/1000.); - m_Et=std::fabs(tempEt/1000.); - m_met=sqrt(tempEx*tempEx+tempEy*tempEy)/1000.; - - if ( debug ) { - msg() << MSG::DEBUG << "REGTEST: (LVL2 FEB) MET = " << m_met << " GeV" << endmsg; - msg() << MSG::DEBUG << "REGTEST: (LVL2 FEB) METx = " << m_Ex << " GeV" << endmsg; - msg() << MSG::DEBUG << "REGTEST: (LVL2 FEB) METy = " << m_Ey << " GeV" << endmsg; - msg() << MSG::DEBUG << "REGTEST: (LVL2 FEB) SumEt = " << m_Et << " GeV" << endmsg; - } - - m_timer[1]->stop(); - m_timer[0]->stop(); - - HLT::TriggerElement* outputTE = makeSeeding(tes_in, type_out); - - // save feature to output TE: - HLT::ErrorCode hltStatus = attachFeature(outputTE, m_met_feature, m_featureLabel); - - if ( hltStatus != HLT::OK ) { - msg() << MSG::WARNING // ERROR - << "Write of TrigMissingET feature into outputTE failed" - << endmsg; - return hltStatus; - } - - // CACHING - // if we got here, everything was okay. so, we cache the feature for further execution of this instance in e.g. other MET Sequences: - m_useCachedResult = true; - m_cachedTE = outputTE; - - // stop monitoring - afterExecMonitors().ignore(); - - return HLT::OK; - -} - -////////////////////////////////////////////////////////// - -HLT::ErrorCode T2CaloMissingET::init(xAOD::TrigMissingET *met){ - int ncom=met->getNumberOfComponents(); - if(ncom!=NCOM){ - msg() << MSG::ERROR << "Wrong number of TrigMissingET dimension." << endmsg; - return HLT::NO_HLT_RESULT; - } - met->setNameOfComponent(0, "L1Calo "); - met->setNameOfComponent(1, "PreSamplB"); - met->setNameOfComponent(2, "EMB1 "); - met->setNameOfComponent(3, "EMB2 "); - met->setNameOfComponent(4, "EMB3 "); - met->setNameOfComponent(5, "PreSamplE"); - met->setNameOfComponent(6, "EME1 "); - met->setNameOfComponent(7, "EME2 "); - met->setNameOfComponent(8, "EME3 "); - met->setNameOfComponent(9, "HEC "); - met->setNameOfComponent(10,"TileBar "); - met->setNameOfComponent(11,"TileExt "); - met->setNameOfComponent(12,"FCalEM "); - met->setNameOfComponent(13,"FCalHad1 "); - met->setNameOfComponent(14,"FCalHad2 "); - met->setNameOfComponent(15,"Muons "); - // Already set to zero by constructor of EDM - for(int index=0;index<ncom-1;index++){ - met->setUsedChannelsComponent(index,1); // Suggestion by Diego - met->setExComponent(index,0.); - met->setEyComponent(index,0.); - met->setEzComponent(index,0.); - met->setSumEComponent(index,0.); - met->setSumEtComponent(index,0.); - } - return HLT::OK; -} - -HLT::ErrorCode T2CaloMissingET::prepareRobRequests( const std::vector<HLT::TEConstVec>& /*inputs*/ ){ - - // Calculate ROBs needed - const RoiDescriptor roi (true) ; - - m_data->ROBList( roi, m_vec_robs); - - config()->robRequestInfo()->addRequestScheduledRobIDs(m_vec_robs); - - return HLT::OK; - -} diff --git a/Trigger/TrigAlgorithms/TrigL2MissingET/src/T2CaloMissingET.h b/Trigger/TrigAlgorithms/TrigL2MissingET/src/T2CaloMissingET.h deleted file mode 100644 index 234aca85af0b..000000000000 --- a/Trigger/TrigAlgorithms/TrigL2MissingET/src/T2CaloMissingET.h +++ /dev/null @@ -1,122 +0,0 @@ -/* - Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration -*/ - -/********************************************************************************** - * @Project: HLT, PESA algorithms - * @Package: TrigL2MissingET - * @class : L2CaloMissingET - * - * @brief PESA algorithm that takes the LVL2 MissingET from LVL1 - * - * @author Denis Oliveira Damazio - Brookhaven National Laboratory - * - * File and Version Information: - * $Id: T2CaloMissingET.h 740613 2016-04-15 14:48:44Z damazio $ - **********************************************************************************/ - - - -#ifndef TRIGL2MISSINGET_L2CALOMISSINGET_H -#define TRIGL2MISSINGET_L2CALOMISSINGET_H - - -#include "TrigInterfaces/AllTEAlgo.h" -#include "GaudiKernel/ToolHandle.h" -#include "LArRecEvent/LArFebEnergyCollection.h" -#include "IRegionSelector/RegSelEnums.h" -#include "LArIdentifier/LArOnlineID.h" -#include "LArIdentifier/LArReadoutModuleService.h" -#include "CaloIdentifier/CaloCell_ID.h" -#include "TrigT2CaloCommon/ITrigDataAccess.h" -#include "TrigTimeAlgs/ITrigTimerSvc.h" -#include "StoreGate/ReadCondHandleKey.h" -#include "LArCabling/LArOnOffIdMapping.h" -#include "LArRecConditions/LArFebRodMapping.h" - - -#include "xAODTrigMissingET/TrigMissingET.h" - -#include <vector> - -class MsgStream; -class TrigTimerSvc; - - -namespace HLT { - class TriggerElement; -} - - -class T2CaloMissingET : public HLT::AllTEAlgo - { - public: - - T2CaloMissingET(const std::string& name, ISvcLocator* pSvcLocator); //!< std Gaudi Algorithm constructor - - HLT::ErrorCode hltInitialize(); //!< hlt initialize, doing nothing here - HLT::ErrorCode hltFinalize(); //!< hlt finalize, doing nothing here - - /** - * @brief implementation of the abstract hltExecute method in HLT::AllTEAlgo. - * - * @param input outer vector describeds the different input TE types, - here we expect: 1st LVL1 energy TE; - inner vector provides all TE instances of the given type - * @param output the output TE type - */ - HLT::ErrorCode hltExecute(std::vector<std::vector<HLT::TriggerElement*> >& input, - unsigned int output); - - HLT::ErrorCode hltEndEvent() { m_useCachedResult = false; m_met_feature = 0; m_cachedTE=0; return HLT::OK; }; - - // virtual bool reset() {m_useCachedResult = false; m_met_feature = 0; m_cachedTE=0; AllTEAlgo::reset(); return true;} - - HLT::ErrorCode init(xAOD::TrigMissingET *met); - - using HLT::AllTEAlgo::prepareRobRequests; - HLT::ErrorCode prepareRobRequests(const std::vector<HLT::TEConstVec>& inputs ); - - private: - - SG::ReadCondHandleKey<LArOnOffIdMapping> m_cablingKey{this,"CablingKey","LArOnOffIdMap","SG Key of LArOnOffIdMapping object"}; - SG::ReadCondHandleKey<LArFebRodMapping> m_RodKey{this, "FebRodKey", "LArFebRodMap", "SG ROD mapping key"}; - - bool m_useCachedResult; - - std::string m_featureLabel; //!< label for the MET feature in the HLT Navigation - std::string m_L2L1featureLabel; //!< label for the L2=l1 MET feature - - ToolHandle<ITrigDataAccess> m_data; - MsgStream* m_log; - ServiceHandle<ITrigTimerSvc> m_timersvc; - float m_etaWidth,m_phiWidth; - TrigTimer* m_timer[2]; - float m_Ex, m_Ey, m_Ez, m_met, m_E, m_Et; -// float m_ExT, m_EyT, m_EzT; - bool m_one_by_one; - float m_l1metDiffCut; - std::vector<DETID> m_detid; - bool m_ReadL2L1; - - xAOD::TrigMissingET* m_met_feature; //!< internal caching: missing E_T feature of the first execution - HLT::TriggerElement* m_cachedTE; //!< internal caching: output TE from the first exectution - - const LArOnlineID *m_LArOnlineID; - const CaloCell_ID *m_CaloCell_ID; - LArReadoutModuleService m_larROModSvc; - - HLT::TriggerElement* makeSeeding(std::vector<std::vector<HLT::TriggerElement*> >& input, unsigned int type_out ) ; - std::vector<float> m_tile_lba; - std::vector<float> m_tile_lbc; - std::vector<float> m_tile_eba; - std::vector<float> m_tile_ebc; - std::vector<unsigned char> m_tile_nlba; - std::vector<unsigned char> m_tile_nlbc; - std::vector<unsigned char> m_tile_neba; - std::vector<unsigned char> m_tile_nebc; - std::vector<uint32_t> m_vec_robs; -}; - -#endif - diff --git a/Trigger/TrigAlgorithms/TrigL2MissingET/src/T2MissingET.cxx b/Trigger/TrigAlgorithms/TrigL2MissingET/src/T2MissingET.cxx deleted file mode 100755 index 9257d0daf122..000000000000 --- a/Trigger/TrigAlgorithms/TrigL2MissingET/src/T2MissingET.cxx +++ /dev/null @@ -1,699 +0,0 @@ -/* - Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration -*/ - -// ******************************************************************** -// -// NAME: T2MissingET.cxx -// PACKAGE: Trigger/TrigAlgorithms/TrigL2MissingET -// -// AUTHOR: Till Eifert, Diego Casadei -// CREATED: May 9, 2007 -// -// Description: Level2 MissingET AllTEAlgo (FEX) algorithm. Uses LVL1 MET -// -// ******************************************************************** - -#include "T2MissingET.h" -#include "TrigT1Interfaces/RecEnergyRoI.h" -#include "TrigSteeringEvent/Enums.h" -#include "TrigMissingEtEvent/TrigMissingET.h" -#include "TrigNavigation/Navigation.h" -#include "CxxUtils/sincos.h" -#include "CxxUtils/sincosf.h" - -#include "xAODEventInfo/EventInfo.h" -#include "eformat/DetectorMask.h" -#include "eformat/SourceIdentifier.h" - -#include <cmath> -#include <cstdio> - -#define NCOM 1 - -using namespace PESA; - -T2MissingET::T2MissingET(const std::string& name, ISvcLocator* pSvcLocator) - : HLT::AllTEAlgo(name, pSvcLocator), - m_useCachedResult(false), - m_met_feature(0), - m_cachedTE(0) -{ - - m_badRegions.resize(4); - m_badRegions[0].clear(); - m_badRegions[1].clear(); - m_badRegions[2].clear(); - m_badRegions[3].clear(); - - declareProperty("METLabel", m_featureLabel = "T2MissingET", "label for the MET feature in the HLT Navigation"); - declareProperty("BadRegionsPhiMin", m_badRegions[0], "list of inf(bad phi interval)"); - declareProperty("BadRegionsPhiMax", m_badRegions[1], "list of sup(bad phi interval)"); - declareProperty("BadRegionsEtaMin", m_badRegions[2], "list of inf(bad eta interval)"); - declareProperty("BadRegionsEtaMax", m_badRegions[3], "list of sup(bad eta interval)"); - declareProperty("DecodeDetMask", m_decodeDetMask = false, "switch on/off DetMask decoding"); - declareProperty("GlobMaxMEtSumEtRatio", m_GlobMaxMEtSumEtRatio = 0.9, "max reasonable |MET/SumET|"); - - declareMonitoredVariable("L2_METx", m_lvl2_mex); - declareMonitoredVariable("L2_METy", m_lvl2_mey); - declareMonitoredVariable("L2_MET", m_lvl2_met); - declareMonitoredVariable("L2_SumEt", m_lvl2_set); - declareMonitoredVariable("L2_MET_phi", m_lvl2_phi); - declareMonitoredVariable("L1_METx", m_lvl1_mex); - declareMonitoredVariable("L1_METy", m_lvl1_mey); - declareMonitoredVariable("L1_MET", m_lvl1_met); - declareMonitoredVariable("L1_SumEt", m_lvl1_set); - declareMonitoredVariable("L1_MET_phi", m_lvl1_phi); - - declareMonitoredVariable("L2_MEx_log", m_lvl2_mex_log); - declareMonitoredVariable("L2_MEy_log", m_lvl2_mey_log); - declareMonitoredVariable("L2_MET_log", m_lvl2_met_log); - declareMonitoredVariable("L2_SumEt_log", m_lvl2_set_log); - declareMonitoredVariable("L1_MEx_log", m_lvl1_mex_log); - declareMonitoredVariable("L1_MEy_log", m_lvl1_mey_log); - declareMonitoredVariable("L1_MET_log", m_lvl1_met_log); - declareMonitoredVariable("L1_SumEt_log", m_lvl1_set_log); - - declareMonitoredVariable("L1_XS", m_lvl1_xs); - declareMonitoredVariable("L2_XS", m_lvl2_xs); - - m_status_flag.reserve(32); // to map a 32-bit word - m_status_flag.assign(32, 0); - declareMonitoredStdContainer("L2_MET_status", m_status_flag); - - m_StoreGate=0; - m_current_run_id=0; - m_current_lbk_id=0; - m_current_evt_id=0; - m_current_bcg_id=0; - m_LArEMbarrelAside=true; - m_LArEMbarrelCside=true; - m_LArEMendCapAside=true; - m_LArEMendCapCside=true; - m_LArHECendCapAside=true; - m_LArHECendCapCside=true; - m_LArFCalAside=true; - m_LArFCalCside=true; - m_TileBarrelAside=true; - m_TileBarrelCside=true; - m_TileExtBarAside=true; - m_TileExtBarCside=true; - m_L1Calo=true; - - - - /** definition of the meaning for the component flag bits **/ - m_maskErrParityL1 = 0x0001; // bit 0 - m_maskErrL1mult = 0x0002; // bit 1 - m_maskErrMuon = 0x0004; // bit 2 - // spare = 0x0008; // bit 3 - m_maskL1OverflowExEy = 0x0010; // bit 4 - m_maskL1OverflowSumEt = 0x0020; // bit 5 - // spare = 0x0040; // bit 6 - m_maskMETinBadPhiRegion = 0x0080; // bit 7 - m_maskMETinBadRegion = 0x0100; // bit 8 - m_maskObjInPhiRegion = 0x0200; // bit 9 - m_maskObjInRegion = 0x0400; // bit 10 - m_maskObjInCrack = 0x0800; // bit 11 - m_maskPhiCorrJet1 = 0x1000; // bit 12 - m_maskPhiCorrJet2 = 0x2000; // bit 13 - m_maskPhiCorrJet3 = 0x4000; // bit 14 - m_maskCompErrors = 0x8000; // bit 15 - - /** definition of the meaning for the global flag bits (highest ones only) **/ - m_maskEMB_A_Missing = 0x00010000; // bit 16 - m_maskEMB_C_Missing = 0x00020000; // bit 17 - m_maskEME_A_Missing = 0x00040000; // bit 18 - m_maskEME_C_Missing = 0x00080000; // bit 19 - m_maskHEC_A_Missing = 0x00100000; // bit 20 - m_maskHEC_C_Missing = 0x00200000; // bit 21 - m_maskFCAL_A_Missing = 0x00400000; // bit 22 - m_maskFCAL_C_Missing = 0x00800000; // bit 23 - m_maskTileB_A_Missing = 0x01000000; // bit 24 - m_maskTileB_C_Missing = 0x02000000; // bit 25 - m_maskTileE_A_Missing = 0x04000000; // bit 26 - m_maskTileE_C_Missing = 0x08000000; // bit 27 - m_maskL1Calo_Missing = 0x10000000; // bit 28 - m_maskGlobBigMEtSEtRatio = 0x20000000; // bit 29 - // spare = 0x40000000; // bit 30 - m_maskGlobErrors = 0x80000000; // bit 31 - - //initialization to prevent coverity error: - m_firsteventinrun=false; - -} - - -////////////////////////////////////////////////////////// - -HLT::ErrorCode T2MissingET::hltStart() { - - // access StoreGate - m_StoreGate = store(); - if (m_StoreGate==0) { - ATH_MSG_ERROR( "Can not access StoreGate" ); - return HLT::SG_ERROR; - } - - m_firsteventinrun = true; - - return HLT::OK; -} - - -////////////////////////////////////////////////////////// - - - - -HLT::TriggerElement* T2MissingET::makeSeeding(std::vector<std::vector<HLT::TriggerElement*> >& tes_in, unsigned int type_out ) { - - HLT::TEVec allTEs; - for ( unsigned type = 0; type < tes_in.size(); ++ type ) { - std::vector<HLT::TriggerElement*>& tes = tes_in.at(type); - - for ( unsigned teIdx = 0; teIdx < tes.size(); ++teIdx ) { - - const LVL1::RecEnergyRoI* lvl1_energyRoi(0); - if ( getFeature(tes.at(teIdx), lvl1_energyRoi) == HLT::OK) { // for the seeding use onlt XE/TE/XS trigger elements (i.e. those having the RecEnergy obj) - if ( lvl1_energyRoi ) { - allTEs.push_back(tes.at(teIdx)); - } - } - } - } - return config()->getNavigation()->addNode(allTEs, type_out); -} - -HLT::ErrorCode T2MissingET::hltExecute(std::vector<std::vector<HLT::TriggerElement*> >& tes_in, unsigned int type_out) -{ - - // CACHING - // first check whether we executed this instance before: - if (m_useCachedResult) { - ATH_MSG_DEBUG( "Executing this T2MissingET " << name() << " in cached mode" ); - - HLT::TriggerElement* outputTE = makeSeeding(tes_in, type_out); - - - // save (cached) met feature to output TE: - m_config->getNavigation()->copyAllFeatures( m_cachedTE, outputTE ); - - return HLT::OK; - } - - // event status flag - int flag=0; - - if(m_firsteventinrun) { - ATH_MSG_DEBUG( "REGTEST: First event in run" ); - // get EventInfo - const xAOD::EventInfo* pEvent(0); - StatusCode sc = m_StoreGate->retrieve(pEvent); - if ( sc.isFailure() ) { - ATH_MSG_ERROR( "Cannot find xAODEventInfo object" ); - return HLT::SG_ERROR; - } - m_current_run_id = pEvent->runNumber(); - m_current_lbk_id = pEvent->lumiBlock(); - m_current_evt_id = pEvent->eventNumber(); - m_current_bcg_id = pEvent->bcid(); - - if(msgLvl() <= MSG::DEBUG){ - char buff[512]; - snprintf(buff,512, - "REGTEST: Run number = %11u, luminosity block = %11u, event number = %11u, bunch crossing = %11u", - m_current_run_id, m_current_lbk_id, m_current_evt_id, m_current_bcg_id); - ATH_MSG_DEBUG( buff ); - } - - m_LArEMbarrelAside=true; - m_LArEMbarrelCside=true; - m_LArEMendCapAside=true; - m_LArEMendCapCside=true; - m_LArHECendCapAside=true; - m_LArHECendCapCside=true; - m_LArFCalAside=true; - m_LArFCalCside=true; - m_TileBarrelAside=true; - m_TileBarrelCside=true; - m_TileExtBarAside=true; - m_TileExtBarCside=true; - m_L1Calo=true; - - - if(m_decodeDetMask) { - uint64_t mask64 = pEvent->detectorMask(); - if(msgLvl() <= MSG::DEBUG){ - char buff[512]; - snprintf(buff,512,"REGTEST: DetMask = 0x%08lu",mask64); - msg() << MSG::DEBUG << buff << endmsg; - } - - if (!(mask64==0)) { // 0 means present - - eformat::helper::DetectorMask dm(mask64); - m_LArEMbarrelAside = dm.is_set(eformat::LAR_EM_BARREL_A_SIDE); - m_LArEMbarrelCside = dm.is_set(eformat::LAR_EM_BARREL_C_SIDE); - m_LArEMendCapAside = dm.is_set(eformat::LAR_EM_ENDCAP_A_SIDE); - m_LArEMendCapCside = dm.is_set(eformat::LAR_EM_ENDCAP_C_SIDE); - m_LArHECendCapAside = dm.is_set(eformat::LAR_HAD_ENDCAP_A_SIDE); - m_LArHECendCapCside = dm.is_set(eformat::LAR_HAD_ENDCAP_C_SIDE); - m_LArFCalAside = dm.is_set(eformat::LAR_FCAL_A_SIDE); - m_LArFCalCside = dm.is_set(eformat::LAR_FCAL_C_SIDE); - m_TileBarrelAside = dm.is_set(eformat::TILECAL_BARREL_A_SIDE); - m_TileBarrelCside = dm.is_set(eformat::TILECAL_BARREL_C_SIDE); - m_TileExtBarAside = dm.is_set(eformat::TILECAL_EXT_A_SIDE); - m_TileExtBarCside = dm.is_set(eformat::TILECAL_EXT_C_SIDE); - - if(!m_LArEMbarrelAside) ATH_MSG_WARNING( "LAR_EM_BARREL_A_SIDE is absent!" ); - if(!m_LArEMbarrelCside) ATH_MSG_WARNING( "LAR_EM_BARREL_C_SIDE is absent!" ); - if(!m_LArEMendCapAside) ATH_MSG_WARNING( "LAR_EM_ENDCAP_A_SIDE is absent!" ); - if(!m_LArEMendCapCside) ATH_MSG_WARNING( "LAR_EM_ENDCAP_C_SIDE is absent!" ); - if(!m_LArHECendCapAside) ATH_MSG_WARNING( "LAR_HAD_ENDCAP_A_SIDE is absent!" ); - if(!m_LArHECendCapCside) ATH_MSG_WARNING( "LAR_HAD_ENDCAP_C_SIDE is absent!" ); - if(!m_LArFCalAside) ATH_MSG_WARNING( "LAR_FCAL_A_SIDE is absent!" ); - if(!m_LArFCalCside) ATH_MSG_WARNING( "LAR_FCAL_C_SIDE is absent!" ); - if(!m_TileBarrelAside) ATH_MSG_WARNING( "TILECAL_BARREL_A_SIDE is absent!" ); - if(!m_TileBarrelCside) ATH_MSG_WARNING( "TILECAL_BARREL_C_SIDE is absent!" ); - if(!m_TileExtBarAside) ATH_MSG_WARNING( "TILECAL_EXT_A_SIDE is absent!" ); - if(!m_TileExtBarCside) ATH_MSG_WARNING( "TILECAL_EXT_C_SIDE is absent!" ); - - m_L1Calo=true; - if (!dm.is_set(eformat::TDAQ_CALO_PREPROC)) m_L1Calo=false; - if (!dm.is_set(eformat::TDAQ_CALO_CLUSTER_PROC_DAQ)) m_L1Calo=false; - if (!dm.is_set(eformat::TDAQ_CALO_CLUSTER_PROC_ROI)) m_L1Calo=false; - if (!dm.is_set(eformat::TDAQ_CALO_JET_PROC_DAQ)) m_L1Calo=false; - if (!dm.is_set(eformat::TDAQ_CALO_JET_PROC_ROI)) m_L1Calo=false; - - if(!m_L1Calo) ATH_MSG_WARNING( "L1Calo is absent!" ); - - } // Finshed dealing with non zero detector mask - - } // finished decoding detector mask - m_firsteventinrun = false; - } // end processing of first run in event - - // if L1Calo is missing, produce an empty feature - if(!m_L1Calo){ - m_met_feature = new xAOD::TrigMissingET(); m_met_feature->makePrivateStore(); - - std::vector <std::string> vs_aux; - for(int i = 0; i < NCOM; i++) - vs_aux.push_back(""); - m_met_feature->defineComponents(vs_aux); - - if (m_met_feature==0) { - if(msgLvl() <= MSG::WARNING) - msg() << MSG::ERROR //WARNING - << "cannot create the TrigMissingET object!" << endmsg; - return HLT::NO_HLT_RESULT; - } - - flag |= m_maskL1Calo_Missing | m_maskGlobErrors; - m_met_feature->setFlag(flag); - - HLT::TriggerElement* outputTE = makeSeeding(tes_in, type_out); - - HLT::ErrorCode hltStatus = attachFeature(outputTE, m_met_feature, m_featureLabel); - - if ( hltStatus != HLT::OK ) { - ATH_MSG_WARNING( "Write of TrigMissingET feature into outputTE failed" ); - return hltStatus; - } - - init(m_met_feature); - - m_useCachedResult = true; - m_cachedTE = outputTE; - - return HLT::OK; - } // end if L1Calo is absent - - // flag event accordingly to DetMask - if (!m_LArEMbarrelAside) flag |= m_maskEMB_A_Missing; - if (!m_LArEMbarrelCside) flag |= m_maskEMB_C_Missing; - if (!m_LArEMendCapAside) flag |= m_maskEME_A_Missing; - if (!m_LArEMendCapCside) flag |= m_maskEME_C_Missing; - if (!m_LArHECendCapAside) flag |= m_maskHEC_A_Missing; - if (!m_LArHECendCapCside) flag |= m_maskHEC_C_Missing; - if (!m_LArFCalAside) flag |= m_maskFCAL_A_Missing; - if (!m_LArFCalCside) flag |= m_maskFCAL_C_Missing; - if (!m_TileBarrelAside) flag |= m_maskTileB_A_Missing; - if (!m_TileBarrelCside) flag |= m_maskTileB_C_Missing; - if (!m_TileExtBarAside) flag |= m_maskTileE_A_Missing; - if (!m_TileExtBarCside) flag |= m_maskTileE_C_Missing; - - // start monitoring - beforeExecMonitors().ignore(); - - m_lvl1_mex = -9e9; - m_lvl1_mey = -9e9; - m_lvl1_met = -9e9; - m_lvl1_set = -9e9; - m_lvl1_phi = -9e9; - m_lvl2_mex = -9e9; - m_lvl2_mey = -9e9; - m_lvl2_met = -9e9; - m_lvl2_set = -9e9; - m_lvl2_phi = -9e9; - - m_lvl2_mex_log = -9e9; - m_lvl2_mey_log = -9e9; - m_lvl2_met_log = -9e9; - m_lvl2_set_log = -9e9; - m_lvl1_mex_log = -9e9; - m_lvl1_mey_log = -9e9; - m_lvl1_met_log = -9e9; - m_lvl1_set_log = -9e9; - - m_lvl1_xs = -9e9; - m_lvl2_xs = -9e9; - - bool seeded=true; // default mode: seeded by L1 - unsigned int tes_in_size=tes_in.size(); // = 1 (seeded) or 0 (unseeded) - unsigned int tes_in0_size=0; // size of L1 result (must be = 1) - - if (msgLvl() <= MSG::DEBUG) { - ATH_MSG_DEBUG( "tes_in.size() = " << tes_in_size ); - - for (unsigned u=0; u<tes_in_size; ++u) { - ATH_MSG_DEBUG( "tes_in[" << u << "].size() = " << tes_in[u].size() ); - } - } - - switch (tes_in_size) { - case 0: // unseeded mode - seeded=false; - ATH_MSG_DEBUG( "Running in unseeded mode" ); - break; - - case 1: // seeded mode - seeded=true; - ATH_MSG_DEBUG( "Running in seeded mode" ); - tes_in0_size=tes_in[0].size(); - if (tes_in0_size != 1) { - msg() << MSG::ERROR - << "Configuration error: expecting exactly 1 L1 result. Aborting chain" << endmsg; - return HLT::ErrorCode(HLT::Action::ABORT_CHAIN, HLT::Reason::BAD_JOB_SETUP); - } - break; - - default: - msg() << MSG::ERROR - << "Configuration error: tes_in.size() is " << tes_in_size - << " but can only be 1 or 0 in unseeded mode. Aborting chain" << endmsg; - return HLT::ErrorCode(HLT::Action::ABORT_CHAIN, HLT::Reason::BAD_JOB_SETUP); - } - - /// get LVL1 result /// - const LVL1::RecEnergyRoI* lvl1_energyRoi = 0; - - if (seeded) { // seeded mode (default) - std::vector<const LVL1::RecEnergyRoI*> vectorOfEnergyRoI; - HLT::ErrorCode status = getFeatures(tes_in[0][0], vectorOfEnergyRoI); - if(status == HLT::OK) { - if ( vectorOfEnergyRoI.size() < 1 ) { - msg() << MSG::ERROR << "Cannot find L1 result! Aborting" << endmsg; - return HLT::ErrorCode(HLT::Action::ABORT_CHAIN, HLT::Reason::MISSING_FEATURE); - } - else if ( vectorOfEnergyRoI.size() > 1 ) { - ATH_MSG_WARNING( "found " << vectorOfEnergyRoI.size() - << " RecEnergyRoI features but they should be exactly 1! Taking first one with fingers crossed" ); - } - lvl1_energyRoi = vectorOfEnergyRoI.front(); - } else { - msg() << MSG::ERROR - << "RecEnergyRoI feature not found. Aborting" << endmsg; - return HLT::ErrorCode(HLT::Action::ABORT_CHAIN, HLT::Reason::MISSING_FEATURE); - } - } else { // unseeded mode: get all RoIs and look for the good one - HLT::Navigation* nav = config()->getNavigation(); - HLT::TriggerElement* initial = nav->getInitialNode(); - const std::vector<HLT::TriggerElement*>& rois = nav->getDirectSuccessors(initial); - for (unsigned u=0; u<rois.size(); ++u) { - if ( nav->getFeature( rois[u], lvl1_energyRoi ) ) { - if (lvl1_energyRoi) break; - } - } - if(!lvl1_energyRoi) { - msg() << MSG::ERROR - << "No RecEnergyRoI object found! Aborting" << endmsg; - return HLT::ErrorCode(HLT::Action::ABORT_CHAIN, HLT::Reason::MISSING_FEATURE); - } - } - - // this is in ~ GeV units - // (scale factor will be contained in LVL1ConfigSvc at one point ...) - m_lvl1_mex = - static_cast<float>(lvl1_energyRoi->energyX()); - m_lvl1_mey = - static_cast<float>(lvl1_energyRoi->energyY()); - m_lvl1_met = sqrt( m_lvl1_mex * m_lvl1_mex + m_lvl1_mey* m_lvl1_mey); - m_lvl1_set = static_cast<float>(lvl1_energyRoi->energyT()); - m_lvl1_phi = atan2f(m_lvl1_mey, m_lvl1_mex); - - if(msgLvl() <= MSG::DEBUG){ - if (m_StoreGate) { - const xAOD::EventInfo* pEvent(0); - StatusCode sc = m_StoreGate->retrieve(pEvent); - if ( sc.isFailure() ) { - ATH_MSG_ERROR( "Cannot find xAOD::EventInfo object" ); - } else { - m_current_run_id = pEvent->runNumber(); - m_current_lbk_id = pEvent->lumiBlock(); - m_current_evt_id = pEvent->eventNumber(); - m_current_bcg_id = pEvent->bcid(); - char buff[512]; - snprintf(buff,512, - "REGTEST: Run number = %11u, luminosity block = %11u, event number = %11u, bunch crossing = %11u", - m_current_run_id, m_current_lbk_id, m_current_evt_id, m_current_bcg_id); - ATH_MSG_DEBUG( buff ); - } - } - ATH_MSG_DEBUG( "REGTEST: (LVL1) Lvl1Id = " << config()->getLvl1Id() ); - ATH_MSG_DEBUG( "REGTEST: (LVL1) et = " << m_lvl1_met << " GeV" ); - ATH_MSG_DEBUG( "REGTEST: (LVL1) ex = " << m_lvl1_mex << " GeV" ); - ATH_MSG_DEBUG( "REGTEST: (LVL1) ey = " << m_lvl1_mey << " GeV" ); - ATH_MSG_DEBUG( "REGTEST: (LVL1) SumEt = " << m_lvl1_set << " GeV" ); - } - - // convert energy from GeV to MeV - m_lvl2_mex = m_lvl1_mex * 1e3; - m_lvl2_mey = m_lvl1_mey * 1e3; - m_lvl2_met = m_lvl1_met * 1e3; - m_lvl2_set = m_lvl1_set * 1e3; - m_lvl2_phi = m_lvl1_phi; - - /// flagging the event based on L1 /// - unsigned int bitParityError = 0x8000000; // bit 27 - roiWord parity error - - // check for L1 overflows and parity errors - if ( lvl1_energyRoi->roiWord0() & bitParityError ) flag |= m_maskErrParityL1 | m_maskGlobErrors; - if ( lvl1_energyRoi->roiWord1() & bitParityError ) flag |= m_maskErrParityL1 | m_maskGlobErrors; - if ( lvl1_energyRoi->roiWord2() & bitParityError ) flag |= m_maskErrParityL1 | m_maskGlobErrors; - if ( lvl1_energyRoi->overflowX() ) flag |= m_maskL1OverflowExEy; - if ( lvl1_energyRoi->overflowY() ) flag |= m_maskL1OverflowExEy; - if ( lvl1_energyRoi->overflowT() ) flag |= m_maskL1OverflowSumEt; - - - // flag events with strange MET/SumET ratio - if (m_lvl1_set>0.1 && fabsf(m_lvl2_met/m_lvl2_set)>m_GlobMaxMEtSumEtRatio) - flag |= m_maskGlobBigMEtSEtRatio; - - - int Nphi = m_badRegions[0].size(); - if (Nphi>0 && Nphi==(int)m_badRegions[1].size()) { // check if phi belongs to a bad region - for (int kk=0; kk<Nphi; ++kk) { // loop over bad regions - float phiMin = (m_badRegions[0])[kk]; - float phiMax = (m_badRegions[1])[kk]; - if (msgLvl() <= MSG::INFO) - msg() << MSG::INFO << "Bad region: phi between " - << phiMin << " and " << phiMax ; - // the following is needed to accept the case phiMin>phiMax - // and angles defined both in [0, 2 PI] and [-PI, PI] - float aa, bb, xx=m_lvl2_phi; - if (phiMin<phiMax) { - aa = fmodf(phiMin, 2*M_PI); - bb = fmodf(phiMax, 2*M_PI); - } else { - aa = fmodf(phiMin, 2*M_PI) + 2*M_PI; - bb = fmodf(phiMax, 2*M_PI) + 2*M_PI; - xx += 2*M_PI; - } - if (xx>aa && xx<bb) { - flag |= m_maskMETinBadPhiRegion; // flag event - ATH_MSG_INFO( " -- measured phi = " << m_lvl2_phi - << " --> event flagged" ); - - /* -NO CHECK ON ETA CAN BE DONE ON THE RESULT BY L1Calo: keep this code for the future :-) - // check also eta - int Neta = m_badRegions[2].size(); - if (Neta>0 && Neta==Nphi && Neta==(int)m_badRegions[3].size()) { - float etaMin = (m_badRegions[2])[kk]; - float etaMax = (m_badRegions[3])[kk]; - msg() << MSG::INFO << "Bad region: eta between " - << etaMin << " and " << etaMax ; - float MEeta=0; // no L1Calo eta is available! - if (MEeta>etaMin && MEeta<etaMax) { - flag |= m_maskMETinBadRegion; // flag event - ATH_MSG_INFO( " -- measured eta = " << MEeta - << " --> event flagged" ); - } - else { - ATH_MSG_INFO( " -- event does not point here" ); - } - } // end eta check - */ - - } else { - ATH_MSG_INFO( " -- event does not point here" ); - } // end of region check - } // loop over bad regions - } // end of phi check - - - /// TO DO: USE TRACKS AND JETS /// - /// /// - /// 1. find TRT tracks /// - /// 2. check that they are not muons /// - /// 3. flag if they enter the phi region: m_maskObjInPhiRegion /// - /// 5. flag if they enter the (eta, phi) region: m_maskObjInRegion /// - /// /// - /// 6. find jets /// - /// 7. flag if they enter the phi region: m_maskObjInPhiRegion /// - /// 8. flag if they enter the (eta, phi) region: m_maskObjInRegion /// - /// 9. flag if MET is correlated with jet Pt: m_maskPhiCorrJet1, ... /// - - /// create MET feature /// - m_met_feature = new xAOD::TrigMissingET(); m_met_feature->makePrivateStore(); - std::vector <std::string> vs_aux; - for(int i = 0; i < NCOM; i++) - vs_aux.push_back(""); - m_met_feature->defineComponents(vs_aux); - - if (m_met_feature==0) { - ATH_MSG_WARNING( "cannot create the TrigMissingET object!" ); - return HLT::NO_HLT_RESULT; - } - init(m_met_feature); - - // basic info: - m_met_feature->setEx(m_lvl2_mex); - m_met_feature->setEy(m_lvl2_mey); - m_met_feature->setSumEt(m_lvl2_set); - - // update event status flag - m_met_feature->setFlag(flag); - - // convert back to GeV for monitoring histograms - m_lvl2_mex *= 1e-3; - m_lvl2_mey *= 1e-3; - m_lvl2_set *= 1e-3; - m_lvl2_met = sqrt(m_lvl2_mex * m_lvl2_mex + m_lvl2_mey * m_lvl2_mey); - - if (msgLvl() <= MSG::DEBUG) { - ATH_MSG_DEBUG( "REGTEST: (LVL2) et = " << m_lvl2_met << " GeV" ); - ATH_MSG_DEBUG( "REGTEST: (LVL2) ex = " << m_lvl2_mex << " GeV" ); - ATH_MSG_DEBUG( "REGTEST: (LVL2) ey = " << m_lvl2_mey << " GeV" ); - ATH_MSG_DEBUG( "REGTEST: (LVL2) SumEt = " << m_lvl2_set << " GeV" ); - char buff[128]; - std::snprintf(buff,128,"REGTEST: (LVL2) Event status = 0x%08x", (unsigned)flag); - ATH_MSG_DEBUG( buff ); - } - - // monitoring: status flag - for (int i=0; i<32; ++i) { - unsigned mask = (1<<i); - if (flag & mask) - m_status_flag[i] = 1; - else - m_status_flag[i] = 0; - } - - // monitoring: log-scale quantities - float epsilon = 1e-6; // 1 keV - - if (fabsf(m_lvl2_mex)>epsilon) - m_lvl2_mex_log = copysign(log10(fabsf(m_lvl2_mex)), m_lvl2_mex); - else - m_lvl2_mex_log = 0; - - if (fabsf(m_lvl2_mey)>epsilon) - m_lvl2_mey_log = copysign(log10(fabsf(m_lvl2_mey)), m_lvl2_mey); - else - m_lvl2_mey_log = 0; - - if (fabsf(m_lvl2_met)>epsilon) - m_lvl2_met_log = copysign(log10(fabsf(m_lvl2_met)), m_lvl2_met); - else - m_lvl2_met_log = 0; - - if (fabsf(m_lvl2_set)>epsilon) - m_lvl2_set_log = copysign(log10(fabsf(m_lvl2_set)), m_lvl2_set); - else - m_lvl2_set_log = 0; - - if (fabsf(m_lvl1_mex)>epsilon) - m_lvl1_mex_log = copysign(log10(fabsf(m_lvl1_mex)), m_lvl1_mex); - else - m_lvl1_mex_log = 0; - - if (fabsf(m_lvl1_mey)>epsilon) - m_lvl1_mey_log = copysign(log10(fabsf(m_lvl1_mey)), m_lvl1_mey); - else - m_lvl1_mey_log = 0; - - if (fabsf(m_lvl1_met)>epsilon) - m_lvl1_met_log = copysign(log10(fabsf(m_lvl1_met)), m_lvl1_met); - else - m_lvl1_met_log = 0; - - if (fabsf(m_lvl1_set)>epsilon) - m_lvl1_set_log = copysign(log10(fabsf(m_lvl1_set)), m_lvl1_set); - else - m_lvl1_set_log = 0; - - if (m_lvl1_set>epsilon) - m_lvl1_xs = m_lvl1_met / sqrt(m_lvl1_set); - - if (m_lvl2_set>epsilon) - m_lvl2_xs = m_lvl2_met / sqrt(m_lvl2_set); - - // create output TE: - // Create an output TE seeded by the inputs - HLT::TriggerElement* outputTE = makeSeeding(tes_in, type_out); - - // save feature to output TE: - HLT::ErrorCode hltStatus = attachFeature(outputTE, m_met_feature, m_featureLabel); - - if ( hltStatus != HLT::OK ) { - ATH_MSG_WARNING( "Write of TrigMissingET feature into outputTE failed" ); - return hltStatus; - } - - // CACHING - // if we got here, everything was okay. so, we cache the feature for further execution of this instance in e.g. other MET Sequences: - m_useCachedResult = true; - m_cachedTE = outputTE; - - // stop monitoring - afterExecMonitors().ignore(); - - return HLT::OK; -} - -////////////////////////////////////////////////////////// -// Initializing the TrigMissingET object -// This should be done in the TrigMissingEtEvent definition -HLT::ErrorCode T2MissingET::init(xAOD::TrigMissingET *met){ - int ncom=met->getNumberOfComponents(); - if(ncom!=NCOM){ - ATH_MSG_ERROR( "Wrong number of TrigMissingET dimension." ); - return HLT::NO_HLT_RESULT; - } - met->setNameOfComponent(0,"Muons "); - for(int index=0;index<ncom;index++){ - met->setUsedChannelsComponent(index,1); // Suggestion by Diego - } - return HLT::OK; -} diff --git a/Trigger/TrigAlgorithms/TrigL2MissingET/src/T2MissingET.h b/Trigger/TrigAlgorithms/TrigL2MissingET/src/T2MissingET.h deleted file mode 100755 index 3a55ff5b594e..000000000000 --- a/Trigger/TrigAlgorithms/TrigL2MissingET/src/T2MissingET.h +++ /dev/null @@ -1,194 +0,0 @@ -/* - Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration -*/ - -/********************************************************************************** - * @Project: HLT, PESA algorithms - * @Package: TrigL2MissingET - * @class : L2MissingET - * - * @brief PESA algorithm that takes the LVL2 MissingET from LVL1 - * - * @author Till Eifert <Till.Eifert@cern.ch> - U. of Geneva, Switzerland - * - * File and Version Information: - * $Id: T2MissingET.h,v 1.13 2009-05-07 09:00:20 casadei Exp $ - **********************************************************************************/ - - - -#ifndef TrigL2MissingET_L2MissingET_H -#define TrigL2MissingET_L2MissingET_H - -#include "xAODTrigMissingET/TrigMissingET.h" - -#include "TrigInterfaces/AllTEAlgo.h" -#include <vector> - - -namespace HLT { - class TriggerElement; -} - - -namespace PESA { - - /** - $class T2MissingET - This class uses LVL1 MET to produce LVL2 MET. - LVL1 METx and METy are determined as minus the LVL1 energy ROI - LVL2 MET = sqrt (METx^2 + METy^2) - - The first defined trigger element must be the LVL1 MET - - @author Till Eifert <Till.Eifert@cern.ch> - @author Allen Mincer <allen.mincer@nyu.edu> - */ - class T2MissingET : public HLT::AllTEAlgo - { - public: - - T2MissingET(const std::string& name, ISvcLocator* pSvcLocator); //!< std Gaudi Algorithm constructor - - HLT::ErrorCode hltInitialize() { return HLT::OK; } //!< hlt initialize, doing nothing here - HLT::ErrorCode hltFinalize() { return HLT::OK; } //!< hlt finalize, doing nothing here - - virtual HLT::ErrorCode hltStart(); - - /** - * @brief implementation of the abstract hltExecute method in HLT::AllTEAlgo. - * - * @param input outer vector describeds the different input TE types, - here we expect: 1st LVL1 energy TE; - inner vector provides all TE instances of the given type - * @param output the output TE type - */ - HLT::ErrorCode hltExecute(std::vector<std::vector<HLT::TriggerElement*> >& input, - unsigned int output); - - HLT::ErrorCode hltEndEvent() { m_useCachedResult = false; m_met_feature = 0; m_cachedTE=0; return HLT::OK; }; - - /** - * @brief This method overwrites the default one (doing nothing) in the algo.h class - * - * This is used to reset the internal caching mechanism of this T2MissingET algorithm. - */ - // virtual bool reset() {m_useCachedResult = false; m_met_feature = 0; m_cachedTE=0; AllTEAlgo::reset(); return true;} - HLT::ErrorCode init(xAOD::TrigMissingET *); - - private: - - std::vector<std::vector<float> > m_badRegions; //!< configurable bad phi regions - - std::string m_featureLabel; //!< label for the MET feature in the HLT Navigation - - StoreGateSvc* m_StoreGate; //!< pointer to StoreGate - - float m_GlobMaxMEtSumEtRatio; //<! (configurable) max reasonable |MET/SumET| - - // the following are 32-bit unsigned values: - unsigned int m_current_run_id; //!< run number - unsigned int m_current_lbk_id; //!< luminosity block - unsigned int m_current_evt_id; //!< event number - unsigned int m_current_bcg_id; //!< bunch crossing - - bool m_useCachedResult; //!< internal caching: true when the hltExecute will run in cached mode - bool m_decodeDetMask; //!< switch on/off DetMask decoding - - /** subdetector flags in DetMask */ - bool m_LArEMbarrelAside; // LAR_EM_BARREL_A_SIDE - bool m_LArEMbarrelCside; // LAR_EM_BARREL_C_SIDE - bool m_LArEMendCapAside; // LAR_EM_ENDCAP_A_SIDE - bool m_LArEMendCapCside; // LAR_EM_ENDCAP_C_SIDE - bool m_LArHECendCapAside; // LAR_HAD_ENDCAP_A_SIDE - bool m_LArHECendCapCside; // LAR_HAD_ENDCAP_C_SIDE - bool m_LArFCalAside; // LAR_FCAL_A_SIDE - bool m_LArFCalCside; // LAR_FCAL_C_SIDE - bool m_TileBarrelAside; // TILECAL_BARREL_A_SIDE - bool m_TileBarrelCside; // TILECAL_BARREL_C_SIDE - bool m_TileExtBarAside; // TILECAL_EXT_A_SIDE - bool m_TileExtBarCside; // TILECAL_EXT_C_SIDE - bool m_L1Calo; // TDAQ_CALO_PREPROC - // || TDAQ_CALO_CLUSTER_PROC_DAQ - // || TDAQ_CALO_CLUSTER_PROC_ROI - // || TDAQ_CALO_JET_PROC_DAQ - // || TDAQ_CALO_JET_PROC_ROI - bool m_firsteventinrun; - - float m_lvl1_mex; //!< Monitoring: LVL1 energyX [GeV] - float m_lvl1_mey; //!< Monitoring: LVL1 energyY [GeV] - float m_lvl1_met; //!< Monitoring: LVL1 missing E_T [GeV] - float m_lvl1_set; //!< Monitoring: LVL1 sum E_T [GeV] - float m_lvl1_phi; //!< Monitoring: LVL1 phi [rad] - - float m_lvl2_mex; //!< Monitoring: LVL2 METx [GeV] - float m_lvl2_mey; //!< Monitoring: LVL2 METy [GeV] - float m_lvl2_met; //!< Monitoring: LVL2 MissingEt [GeV] - float m_lvl2_set; //!< Monitoring: LVL2 SumEt [GeV] - float m_lvl2_phi; //!< Monitoring: LVL2 MissingEt phi [rad] - - float m_lvl1_xs; //!< Monitoring: LVL1 Excess [1/GeV^1/2] - float m_lvl2_xs; //!< Monitoring: LVL2 Excess [1/GeV^1/2] - - float m_lvl1_mex_log; //!< Monitoring: LVL1 energyX [GeV] log-scale - float m_lvl1_mey_log; //!< Monitoring: LVL1 energyY [GeV] log-scale - float m_lvl1_met_log; //!< Monitoring: LVL1 missing E_T [GeV] log-scale - float m_lvl1_set_log; //!< Monitoring: LVL1 sum E_T [GeV] log-scale - - float m_lvl2_mex_log; //!< Monitoring: LVL2 METx [GeV] log-scale - float m_lvl2_mey_log; //!< Monitoring: LVL2 METy [GeV] log-scale - float m_lvl2_met_log; //!< Monitoring: LVL2 MissingEt [GeV] log-scale - float m_lvl2_set_log; //!< Monitoring: LVL2 SumEt [GeV] log-scale - - std::vector<int> m_status_flag; //!< Monitoring: status flags - - xAOD::TrigMissingET* m_met_feature; //!< internal caching: mnissing E_T feature of the first execution - HLT::TriggerElement* m_cachedTE; //!< internal caching: output TE from the first exectution - - /** definition of the meaning for the component flag bits - ** (see the constructor) - **/ - - unsigned short m_maskErrParityL1; //!< L1 parity error - unsigned short m_maskErrL1mult; //!< Wrong number of L1 objects - unsigned short m_maskErrMuon; //!< Unexpected no. of input muons - - unsigned short m_maskL1OverflowExEy; //!< L1 overflow in Ex or Ey - unsigned short m_maskL1OverflowSumEt; //!< L1 overflow in SumEt - - unsigned short m_maskMETinBadPhiRegion; //!< MET points to bad phi region - unsigned short m_maskMETinBadRegion; //!< MET points to bad (eta,phi) region - unsigned short m_maskObjInPhiRegion; //!< Jet or non-muon track into to bad phi region - unsigned short m_maskObjInRegion; //!< Jet or non-muon track into (eta, phi) hole - unsigned short m_maskObjInCrack; //!< Jet or non-muon track into ckrack - unsigned short m_maskPhiCorrJet1; //!< MET direction near 1-st jet - unsigned short m_maskPhiCorrJet2; //!< MET direction near 2-nd jet - unsigned short m_maskPhiCorrJet3; //!< MET direction near 3-rd or softer jet - unsigned short m_maskCompErrors; //!< Error detected - - - /** definition of the meaning for the global flag highest 16 bits - ** (see the constructor) - **/ - unsigned m_maskEMB_A_Missing; //!< EMB_A absent in DetMask - unsigned m_maskEMB_C_Missing; //!< EMB_C absent in DetMask - unsigned m_maskEME_A_Missing; //!< EME_A absent in DetMask - unsigned m_maskEME_C_Missing; //!< EME_C absent in DetMask - unsigned m_maskHEC_A_Missing; //!< HEC_A absent in DetMask - unsigned m_maskHEC_C_Missing; //!< HEC_C absent in DetMask - unsigned m_maskFCAL_A_Missing; //!< FCAL_A absent in DetMask - unsigned m_maskFCAL_C_Missing; //!< FCAL_C absent in DetMask - unsigned m_maskTileB_A_Missing; //!< TileB_A absent in DetMask - unsigned m_maskTileB_C_Missing; //!< TileB_C absent in DetMask - unsigned m_maskTileE_A_Missing; //!< TileE_A absent in DetMask - unsigned m_maskTileE_C_Missing; //!< TileE_C absent in DetMask - unsigned m_maskL1Calo_Missing; //!< L1Calo not working (DetMask) - unsigned m_maskGlobBigMEtSEtRatio; //<! max reasonable |MET/SumET| - unsigned m_maskGlobErrors; //!< Error detected - - HLT::TriggerElement* makeSeeding(std::vector<std::vector<HLT::TriggerElement*> >& input, unsigned int type_out ) ; - - }; -} // end namespace - -#endif diff --git a/Trigger/TrigAlgorithms/TrigL2MissingET/src/components/TrigL2MissingET_entries.cxx b/Trigger/TrigAlgorithms/TrigL2MissingET/src/components/TrigL2MissingET_entries.cxx deleted file mode 100644 index 4523bb8d9e64..000000000000 --- a/Trigger/TrigAlgorithms/TrigL2MissingET/src/components/TrigL2MissingET_entries.cxx +++ /dev/null @@ -1,6 +0,0 @@ -#include "../T2MissingET.h" -#include "../T2CaloMissingET.h" - -DECLARE_COMPONENT( PESA::T2MissingET ) -DECLARE_COMPONENT( T2CaloMissingET ) - diff --git a/Trigger/TrigAlgorithms/TrigL2MissingET/src/febmapL2.h b/Trigger/TrigAlgorithms/TrigL2MissingET/src/febmapL2.h deleted file mode 100644 index 180ea0984ac0..000000000000 --- a/Trigger/TrigAlgorithms/TrigL2MissingET/src/febmapL2.h +++ /dev/null @@ -1,1542 +0,0 @@ -/* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration -*/ - - -// automatically created by convertFeb.py -// ============================================ -// filtered output -#include <map> - -std::map<int,unsigned char> fillMap(void) { - std::map<int,unsigned char> febIdToComponentMap; - - febIdToComponentMap[ 0x39018000 ] = 1; - febIdToComponentMap[ 0x39f98000 ] = 1; - febIdToComponentMap[ 0x39340000 ] = 3; - febIdToComponentMap[ 0x399d0000 ] = 2; - febIdToComponentMap[ 0x394d8000 ] = 2; - febIdToComponentMap[ 0x38000000 ] = 0; - febIdToComponentMap[ 0x38308000 ] = 1; - febIdToComponentMap[ 0x3b540000 ] = 8; - febIdToComponentMap[ 0x3a160000 ] = 7; - febIdToComponentMap[ 0x38390000 ] = 1; - febIdToComponentMap[ 0x3b610000 ] = 5; - febIdToComponentMap[ 0x38118000 ] = 1; - febIdToComponentMap[ 0x3ac20000 ] = 5; - febIdToComponentMap[ 0x3a728000 ] = 5; - febIdToComponentMap[ 0x3a230000 ] = 5; - febIdToComponentMap[ 0x39d38000 ] = 1; - febIdToComponentMap[ 0x38818000 ] = 1; - febIdToComponentMap[ 0x3abc0000 ] = 7; - febIdToComponentMap[ 0x3a6c8000 ] = 6; - febIdToComponentMap[ 0x397e0000 ] = 2; - febIdToComponentMap[ 0x392e8000 ] = 2; - febIdToComponentMap[ 0x38400000 ] = 0; - febIdToComponentMap[ 0x39840000 ] = 3; - febIdToComponentMap[ 0x39348000 ] = 3; - febIdToComponentMap[ 0x3b848000 ] = 8; - febIdToComponentMap[ 0x3b350000 ] = 12; - febIdToComponentMap[ 0x3a960000 ] = 6; - febIdToComponentMap[ 0x39580000 ] = 0; - febIdToComponentMap[ 0x39088000 ] = 1; - febIdToComponentMap[ 0x38b90000 ] = 1; - febIdToComponentMap[ 0x381a0000 ] = 1; - febIdToComponentMap[ 0x38e50000 ] = 2; - febIdToComponentMap[ 0x38f18000 ] = 1; - febIdToComponentMap[ 0x3bae0000 ] = 7; - febIdToComponentMap[ 0x3a700000 ] = 4; - febIdToComponentMap[ 0x3a208000 ] = 5; - febIdToComponentMap[ 0x39d10000 ] = 1; - febIdToComponentMap[ 0x38958000 ] = 2; - febIdToComponentMap[ 0x39320000 ] = 1; - febIdToComponentMap[ 0x38e28000 ] = 1; - febIdToComponentMap[ 0x38930000 ] = 1; - febIdToComponentMap[ 0x38438000 ] = 1; - febIdToComponentMap[ 0x38460000 ] = 2; - febIdToComponentMap[ 0x3b880000 ] = 4; - febIdToComponentMap[ 0x3b388000 ] = 5; - febIdToComponentMap[ 0x3a4a0000 ] = 5; - febIdToComponentMap[ 0x39fa8000 ] = 1; - febIdToComponentMap[ 0x39ab0000 ] = 1; - febIdToComponentMap[ 0x395b8000 ] = 1; - febIdToComponentMap[ 0x390c0000 ] = 3; - febIdToComponentMap[ 0x38bc8000 ] = 3; - febIdToComponentMap[ 0x381d8000 ] = 2; - febIdToComponentMap[ 0x38768000 ] = 2; - febIdToComponentMap[ 0x3b128000 ] = 5; - febIdToComponentMap[ 0x3ac30000 ] = 5; - febIdToComponentMap[ 0x3a738000 ] = 7; - febIdToComponentMap[ 0x3a240000 ] = 7; - febIdToComponentMap[ 0x39d48000 ] = 3; - febIdToComponentMap[ 0x39850000 ] = 2; - febIdToComponentMap[ 0x39358000 ] = 2; - febIdToComponentMap[ 0x38e60000 ] = 2; - febIdToComponentMap[ 0x38968000 ] = 2; - febIdToComponentMap[ 0x3b8b8000 ] = 7; - febIdToComponentMap[ 0x3b3c0000 ] = 7; - febIdToComponentMap[ 0x3a4d8000 ] = 5; - febIdToComponentMap[ 0x39fe0000 ] = 2; - febIdToComponentMap[ 0x39ae8000 ] = 2; - febIdToComponentMap[ 0x38c00000 ] = 0; - febIdToComponentMap[ 0x38708000 ] = 1; - febIdToComponentMap[ 0x38210000 ] = 1; - febIdToComponentMap[ 0x3b080000 ] = 4; - febIdToComponentMap[ 0x39d18000 ] = 1; - febIdToComponentMap[ 0x3ab88000 ] = 5; - febIdToComponentMap[ 0x3b658000 ] = 6; - febIdToComponentMap[ 0x39d80000 ] = 0; - febIdToComponentMap[ 0x39888000 ] = 1; - febIdToComponentMap[ 0x39390000 ] = 1; - febIdToComponentMap[ 0x38e98000 ] = 1; - febIdToComponentMap[ 0x389a0000 ] = 1; - febIdToComponentMap[ 0x384a8000 ] = 1; - febIdToComponentMap[ 0x3a690000 ] = 5; - febIdToComponentMap[ 0x3aa08000 ] = 5; - febIdToComponentMap[ 0x3a998000 ] = 5; - febIdToComponentMap[ 0x39b20000 ] = 1; - febIdToComponentMap[ 0x39628000 ] = 1; - febIdToComponentMap[ 0x39130000 ] = 1; - febIdToComponentMap[ 0x38c38000 ] = 1; - febIdToComponentMap[ 0x38740000 ] = 3; - febIdToComponentMap[ 0x38248000 ] = 3; - febIdToComponentMap[ 0x39ca0000 ] = 1; - febIdToComponentMap[ 0x3a418000 ] = 5; - febIdToComponentMap[ 0x3bb88000 ] = 5; - febIdToComponentMap[ 0x3b690000 ] = 5; - febIdToComponentMap[ 0x3a7a8000 ] = 5; - febIdToComponentMap[ 0x3a2b0000 ] = 5; - febIdToComponentMap[ 0x39db8000 ] = 1; - febIdToComponentMap[ 0x398c0000 ] = 3; - febIdToComponentMap[ 0x393c8000 ] = 3; - febIdToComponentMap[ 0x38ed0000 ] = 2; - febIdToComponentMap[ 0x389d8000 ] = 2; - febIdToComponentMap[ 0x384e0000 ] = 2; - febIdToComponentMap[ 0x397a8000 ] = 1; - febIdToComponentMap[ 0x392b0000 ] = 1; - febIdToComponentMap[ 0x3b928000 ] = 5; - febIdToComponentMap[ 0x3b430000 ] = 5; - febIdToComponentMap[ 0x3aa40000 ] = 7; - febIdToComponentMap[ 0x3a548000 ] = 8; - febIdToComponentMap[ 0x3a050000 ] = 6; - febIdToComponentMap[ 0x39b58000 ] = 2; - febIdToComponentMap[ 0x39660000 ] = 2; - febIdToComponentMap[ 0x39168000 ] = 2; - febIdToComponentMap[ 0x38280000 ] = 0; - febIdToComponentMap[ 0x38db8000 ] = 1; - febIdToComponentMap[ 0x3bbc0000 ] = 7; - febIdToComponentMap[ 0x3b6c8000 ] = 6; - febIdToComponentMap[ 0x3a7e0000 ] = 7; - febIdToComponentMap[ 0x39400000 ] = 0; - febIdToComponentMap[ 0x38f08000 ] = 1; - febIdToComponentMap[ 0x38a10000 ] = 1; - febIdToComponentMap[ 0x388c0000 ] = 3; - febIdToComponentMap[ 0x38020000 ] = 1; - febIdToComponentMap[ 0x383c8000 ] = 3; - febIdToComponentMap[ 0x3b960000 ] = 6; - febIdToComponentMap[ 0x3a580000 ] = 4; - febIdToComponentMap[ 0x3a088000 ] = 5; - febIdToComponentMap[ 0x39b90000 ] = 1; - febIdToComponentMap[ 0x39698000 ] = 1; - febIdToComponentMap[ 0x391a0000 ] = 1; - febIdToComponentMap[ 0x38ca8000 ] = 1; - febIdToComponentMap[ 0x387b0000 ] = 1; - febIdToComponentMap[ 0x382b8000 ] = 1; - febIdToComponentMap[ 0x386d0000 ] = 2; - febIdToComponentMap[ 0x3b218000 ] = 5; - febIdToComponentMap[ 0x3b700000 ] = 4; - febIdToComponentMap[ 0x3b208000 ] = 5; - febIdToComponentMap[ 0x3b9d8000 ] = 6; - febIdToComponentMap[ 0x3a320000 ] = 11; - febIdToComponentMap[ 0x39e28000 ] = 1; - febIdToComponentMap[ 0x39930000 ] = 1; - febIdToComponentMap[ 0x39438000 ] = 1; - febIdToComponentMap[ 0x38f40000 ] = 3; - febIdToComponentMap[ 0x38a48000 ] = 3; - febIdToComponentMap[ 0x38058000 ] = 2; - febIdToComponentMap[ 0x3b4e0000 ] = 7; - febIdToComponentMap[ 0x3b998000 ] = 5; - febIdToComponentMap[ 0x3b4a0000 ] = 5; - febIdToComponentMap[ 0x3aab0000 ] = 5; - febIdToComponentMap[ 0x3a5b8000 ] = 7; - febIdToComponentMap[ 0x3a0c0000 ] = 7; - febIdToComponentMap[ 0x39bc8000 ] = 3; - febIdToComponentMap[ 0x396d0000 ] = 2; - febIdToComponentMap[ 0x391d8000 ] = 2; - febIdToComponentMap[ 0x38ce0000 ] = 2; - febIdToComponentMap[ 0x387e8000 ] = 2; - febIdToComponentMap[ 0x3b7e8000 ] = 6; - febIdToComponentMap[ 0x3b918000 ] = 5; - febIdToComponentMap[ 0x3baf0000 ] = 6; - febIdToComponentMap[ 0x3bc30000 ] = 5; - febIdToComponentMap[ 0x3b738000 ] = 7; - febIdToComponentMap[ 0x3b240000 ] = 7; - febIdToComponentMap[ 0x3a358000 ] = 12; - febIdToComponentMap[ 0x39e60000 ] = 2; - febIdToComponentMap[ 0x39968000 ] = 2; - febIdToComponentMap[ 0x38a80000 ] = 0; - febIdToComponentMap[ 0x38588000 ] = 1; - febIdToComponentMap[ 0x38090000 ] = 1; - febIdToComponentMap[ 0x38688000 ] = 1; - febIdToComponentMap[ 0x3b9d0000 ] = 6; - febIdToComponentMap[ 0x3b4d8000 ] = 5; - febIdToComponentMap[ 0x3aae8000 ] = 6; - febIdToComponentMap[ 0x39c00000 ] = 0; - febIdToComponentMap[ 0x39708000 ] = 1; - febIdToComponentMap[ 0x39210000 ] = 1; - febIdToComponentMap[ 0x3a900000 ] = 4; - febIdToComponentMap[ 0x38820000 ] = 1; - febIdToComponentMap[ 0x38328000 ] = 1; - febIdToComponentMap[ 0x39c08000 ] = 1; - febIdToComponentMap[ 0x3a888000 ] = 5; - febIdToComponentMap[ 0x3a390000 ] = 5; - febIdToComponentMap[ 0x39e98000 ] = 1; - febIdToComponentMap[ 0x399a0000 ] = 1; - febIdToComponentMap[ 0x394a8000 ] = 1; - febIdToComponentMap[ 0x38fb0000 ] = 1; - febIdToComponentMap[ 0x38ab8000 ] = 1; - febIdToComponentMap[ 0x385c0000 ] = 3; - febIdToComponentMap[ 0x380c8000 ] = 3; - febIdToComponentMap[ 0x39710000 ] = 1; - febIdToComponentMap[ 0x3ba08000 ] = 5; - febIdToComponentMap[ 0x3ba18000 ] = 5; - febIdToComponentMap[ 0x3ab20000 ] = 8; - febIdToComponentMap[ 0x3a628000 ] = 5; - febIdToComponentMap[ 0x3a130000 ] = 5; - febIdToComponentMap[ 0x39c38000 ] = 1; - febIdToComponentMap[ 0x39740000 ] = 3; - febIdToComponentMap[ 0x39248000 ] = 3; - febIdToComponentMap[ 0x38d50000 ] = 2; - febIdToComponentMap[ 0x38858000 ] = 2; - febIdToComponentMap[ 0x38d20000 ] = 1; - febIdToComponentMap[ 0x3b7a8000 ] = 5; - febIdToComponentMap[ 0x3b2b0000 ] = 5; - febIdToComponentMap[ 0x3a8c0000 ] = 7; - febIdToComponentMap[ 0x3a3c8000 ] = 6; - febIdToComponentMap[ 0x39ed0000 ] = 2; - febIdToComponentMap[ 0x399d8000 ] = 2; - febIdToComponentMap[ 0x394e0000 ] = 2; - febIdToComponentMap[ 0x38fe8000 ] = 2; - febIdToComponentMap[ 0x38100000 ] = 0; - febIdToComponentMap[ 0x38828000 ] = 1; - febIdToComponentMap[ 0x38330000 ] = 1; - febIdToComponentMap[ 0x3ba40000 ] = 7; - febIdToComponentMap[ 0x3b548000 ] = 8; - febIdToComponentMap[ 0x3b050000 ] = 6; - febIdToComponentMap[ 0x3a660000 ] = 6; - febIdToComponentMap[ 0x3a168000 ] = 6; - febIdToComponentMap[ 0x39280000 ] = 0; - febIdToComponentMap[ 0x38d88000 ] = 1; - febIdToComponentMap[ 0x38890000 ] = 1; - febIdToComponentMap[ 0x38398000 ] = 1; - febIdToComponentMap[ 0x38638000 ] = 1; - febIdToComponentMap[ 0x3b7e0000 ] = 7; - febIdToComponentMap[ 0x3a400000 ] = 4; - febIdToComponentMap[ 0x39f08000 ] = 1; - febIdToComponentMap[ 0x39a10000 ] = 1; - febIdToComponentMap[ 0x3b940000 ] = 7; - febIdToComponentMap[ 0x39020000 ] = 1; - febIdToComponentMap[ 0x38b28000 ] = 1; - febIdToComponentMap[ 0x38630000 ] = 1; - febIdToComponentMap[ 0x38138000 ] = 1; - febIdToComponentMap[ 0x38218000 ] = 1; - febIdToComponentMap[ 0x3b448000 ] = 6; - febIdToComponentMap[ 0x3b580000 ] = 4; - febIdToComponentMap[ 0x3b088000 ] = 5; - febIdToComponentMap[ 0x3ab90000 ] = 5; - febIdToComponentMap[ 0x3a698000 ] = 5; - febIdToComponentMap[ 0x3a1a0000 ] = 8; - febIdToComponentMap[ 0x39ca8000 ] = 1; - febIdToComponentMap[ 0x397b0000 ] = 1; - febIdToComponentMap[ 0x392b8000 ] = 1; - febIdToComponentMap[ 0x38dc0000 ] = 3; - febIdToComponentMap[ 0x388c8000 ] = 3; - febIdToComponentMap[ 0x383d0000 ] = 2; - febIdToComponentMap[ 0x3b750000 ] = 6; - febIdToComponentMap[ 0x3b258000 ] = 6; - febIdToComponentMap[ 0x3b320000 ] = 11; - febIdToComponentMap[ 0x3a930000 ] = 5; - febIdToComponentMap[ 0x3a438000 ] = 7; - febIdToComponentMap[ 0x39f40000 ] = 3; - febIdToComponentMap[ 0x39a48000 ] = 3; - febIdToComponentMap[ 0x39550000 ] = 2; - febIdToComponentMap[ 0x39058000 ] = 2; - febIdToComponentMap[ 0x38b60000 ] = 2; - febIdToComponentMap[ 0x38668000 ] = 2; - febIdToComponentMap[ 0x38560000 ] = 2; - febIdToComponentMap[ 0x38918000 ] = 1; - febIdToComponentMap[ 0x3bab0000 ] = 5; - febIdToComponentMap[ 0x3b5b8000 ] = 7; - febIdToComponentMap[ 0x3b0c0000 ] = 7; - febIdToComponentMap[ 0x3abc8000 ] = 6; - febIdToComponentMap[ 0x3a6d0000 ] = 6; - febIdToComponentMap[ 0x39ce0000 ] = 2; - febIdToComponentMap[ 0x397e8000 ] = 2; - febIdToComponentMap[ 0x38900000 ] = 0; - febIdToComponentMap[ 0x38408000 ] = 1; - febIdToComponentMap[ 0x38068000 ] = 2; - febIdToComponentMap[ 0x3b370000 ] = 13; - febIdToComponentMap[ 0x3b358000 ] = 12; - febIdToComponentMap[ 0x39a80000 ] = 0; - febIdToComponentMap[ 0x39588000 ] = 1; - febIdToComponentMap[ 0x39090000 ] = 1; - febIdToComponentMap[ 0x38b98000 ] = 1; - febIdToComponentMap[ 0x386a0000 ] = 1; - febIdToComponentMap[ 0x381a8000 ] = 1; - febIdToComponentMap[ 0x3bae8000 ] = 6; - febIdToComponentMap[ 0x3ac00000 ] = 4; - febIdToComponentMap[ 0x3a708000 ] = 5; - febIdToComponentMap[ 0x3a210000 ] = 5; - febIdToComponentMap[ 0x39180000 ] = 0; - febIdToComponentMap[ 0x38e30000 ] = 1; - febIdToComponentMap[ 0x38938000 ] = 1; - febIdToComponentMap[ 0x38440000 ] = 3; - febIdToComponentMap[ 0x38c88000 ] = 1; - febIdToComponentMap[ 0x3b888000 ] = 5; - febIdToComponentMap[ 0x3b390000 ] = 5; - febIdToComponentMap[ 0x3a9a0000 ] = 5; - febIdToComponentMap[ 0x3a4a8000 ] = 5; - febIdToComponentMap[ 0x39fb0000 ] = 1; - febIdToComponentMap[ 0x39ab8000 ] = 1; - febIdToComponentMap[ 0x395c0000 ] = 3; - febIdToComponentMap[ 0x390c8000 ] = 3; - febIdToComponentMap[ 0x38bd0000 ] = 2; - febIdToComponentMap[ 0x386d8000 ] = 2; - febIdToComponentMap[ 0x381e0000 ] = 2; - febIdToComponentMap[ 0x38790000 ] = 1; - febIdToComponentMap[ 0x38298000 ] = 1; - febIdToComponentMap[ 0x3bb20000 ] = 8; - febIdToComponentMap[ 0x3b628000 ] = 5; - febIdToComponentMap[ 0x3b130000 ] = 5; - febIdToComponentMap[ 0x3ac38000 ] = 7; - febIdToComponentMap[ 0x3a740000 ] = 7; - febIdToComponentMap[ 0x3a248000 ] = 6; - febIdToComponentMap[ 0x39d50000 ] = 2; - febIdToComponentMap[ 0x39858000 ] = 2; - febIdToComponentMap[ 0x39360000 ] = 2; - febIdToComponentMap[ 0x38e68000 ] = 2; - febIdToComponentMap[ 0x385a0000 ] = 1; - febIdToComponentMap[ 0x3b8c0000 ] = 7; - febIdToComponentMap[ 0x3b3c8000 ] = 6; - febIdToComponentMap[ 0x3a9d8000 ] = 6; - febIdToComponentMap[ 0x3a4e0000 ] = 7; - febIdToComponentMap[ 0x39fe8000 ] = 2; - febIdToComponentMap[ 0x39100000 ] = 0; - febIdToComponentMap[ 0x38c08000 ] = 1; - febIdToComponentMap[ 0x38710000 ] = 1; - febIdToComponentMap[ 0x3b8a8000 ] = 5; - febIdToComponentMap[ 0x39e18000 ] = 1; - febIdToComponentMap[ 0x3b3b0000 ] = 5; - febIdToComponentMap[ 0x3b660000 ] = 6; - febIdToComponentMap[ 0x3b168000 ] = 6; - febIdToComponentMap[ 0x3a280000 ] = 4; - febIdToComponentMap[ 0x39d88000 ] = 1; - febIdToComponentMap[ 0x39890000 ] = 1; - febIdToComponentMap[ 0x39398000 ] = 1; - febIdToComponentMap[ 0x38ea0000 ] = 1; - febIdToComponentMap[ 0x389a8000 ] = 1; - febIdToComponentMap[ 0x384b0000 ] = 1; - febIdToComponentMap[ 0x3b6b8000 ] = 7; - febIdToComponentMap[ 0x3b400000 ] = 4; - febIdToComponentMap[ 0x3aa10000 ] = 5; - febIdToComponentMap[ 0x3a9c0000 ] = 7; - febIdToComponentMap[ 0x3a020000 ] = 5; - febIdToComponentMap[ 0x39b28000 ] = 1; - febIdToComponentMap[ 0x39630000 ] = 1; - febIdToComponentMap[ 0x39138000 ] = 1; - febIdToComponentMap[ 0x38c40000 ] = 3; - febIdToComponentMap[ 0x38748000 ] = 3; - febIdToComponentMap[ 0x38250000 ] = 2; - febIdToComponentMap[ 0x3b4c8000 ] = 6; - febIdToComponentMap[ 0x3b698000 ] = 5; - febIdToComponentMap[ 0x3b1a0000 ] = 8; - febIdToComponentMap[ 0x3a7b0000 ] = 5; - febIdToComponentMap[ 0x3a2b8000 ] = 7; - febIdToComponentMap[ 0x39dc0000 ] = 3; - febIdToComponentMap[ 0x398c8000 ] = 3; - febIdToComponentMap[ 0x393d0000 ] = 2; - febIdToComponentMap[ 0x38ed8000 ] = 2; - febIdToComponentMap[ 0x389e0000 ] = 2; - febIdToComponentMap[ 0x384e8000 ] = 2; - febIdToComponentMap[ 0x39fd0000 ] = 2; - febIdToComponentMap[ 0x39ad8000 ] = 2; - febIdToComponentMap[ 0x3b930000 ] = 5; - febIdToComponentMap[ 0x3b438000 ] = 7; - febIdToComponentMap[ 0x3aa48000 ] = 6; - febIdToComponentMap[ 0x3a058000 ] = 6; - febIdToComponentMap[ 0x39b60000 ] = 2; - febIdToComponentMap[ 0x39668000 ] = 2; - febIdToComponentMap[ 0x38780000 ] = 0; - febIdToComponentMap[ 0x38288000 ] = 1; - febIdToComponentMap[ 0x395e0000 ] = 2; - febIdToComponentMap[ 0x38950000 ] = 2; - febIdToComponentMap[ 0x3bbc8000 ] = 6; - febIdToComponentMap[ 0x3b6d0000 ] = 6; - febIdToComponentMap[ 0x3a7e8000 ] = 6; - febIdToComponentMap[ 0x39900000 ] = 0; - febIdToComponentMap[ 0x39408000 ] = 1; - febIdToComponentMap[ 0x38f10000 ] = 1; - febIdToComponentMap[ 0x390e8000 ] = 2; - febIdToComponentMap[ 0x38520000 ] = 1; - febIdToComponentMap[ 0x38028000 ] = 1; - febIdToComponentMap[ 0x3aa80000 ] = 4; - febIdToComponentMap[ 0x3a588000 ] = 5; - febIdToComponentMap[ 0x3a090000 ] = 5; - febIdToComponentMap[ 0x39b98000 ] = 1; - febIdToComponentMap[ 0x396a0000 ] = 1; - febIdToComponentMap[ 0x391a8000 ] = 1; - febIdToComponentMap[ 0x38cb0000 ] = 1; - febIdToComponentMap[ 0x387b8000 ] = 1; - febIdToComponentMap[ 0x382c0000 ] = 3; - febIdToComponentMap[ 0x38190000 ] = 1; - febIdToComponentMap[ 0x3b318000 ] = 11; - febIdToComponentMap[ 0x38200000 ] = 0; - febIdToComponentMap[ 0x3a820000 ] = 8; - febIdToComponentMap[ 0x3a328000 ] = 11; - febIdToComponentMap[ 0x38508000 ] = 1; - febIdToComponentMap[ 0x3aab8000 ] = 5; - febIdToComponentMap[ 0x38010000 ] = 1; - febIdToComponentMap[ 0x38318000 ] = 1; - febIdToComponentMap[ 0x3a360000 ] = 12; - febIdToComponentMap[ 0x3b620000 ] = 5; - febIdToComponentMap[ 0x3aaf0000 ] = 6; - febIdToComponentMap[ 0x3a100000 ] = 4; - febIdToComponentMap[ 0x3a928000 ] = 5; - febIdToComponentMap[ 0x3a430000 ] = 5; - febIdToComponentMap[ 0x39f38000 ] = 1; - febIdToComponentMap[ 0x3ba10000 ] = 5; - febIdToComponentMap[ 0x39a40000 ] = 3; - febIdToComponentMap[ 0x3b020000 ] = 5; - febIdToComponentMap[ 0x3ab28000 ] = 8; - febIdToComponentMap[ 0x3a138000 ] = 5; - febIdToComponentMap[ 0x39c40000 ] = 3; - febIdToComponentMap[ 0x39748000 ] = 3; - febIdToComponentMap[ 0x39250000 ] = 2; - febIdToComponentMap[ 0x38d58000 ] = 2; - febIdToComponentMap[ 0x38860000 ] = 2; - febIdToComponentMap[ 0x39548000 ] = 3; - febIdToComponentMap[ 0x3a8c8000 ] = 6; - febIdToComponentMap[ 0x3a3d0000 ] = 6; - febIdToComponentMap[ 0x39ed8000 ] = 2; - febIdToComponentMap[ 0x399e0000 ] = 2; - febIdToComponentMap[ 0x394e8000 ] = 2; - febIdToComponentMap[ 0x38600000 ] = 0; - febIdToComponentMap[ 0x38108000 ] = 1; - febIdToComponentMap[ 0x39050000 ] = 2; - febIdToComponentMap[ 0x38b58000 ] = 2; - febIdToComponentMap[ 0x3ba48000 ] = 6; - febIdToComponentMap[ 0x3a170000 ] = 6; - febIdToComponentMap[ 0x39780000 ] = 0; - febIdToComponentMap[ 0x39288000 ] = 1; - febIdToComponentMap[ 0x38d90000 ] = 1; - febIdToComponentMap[ 0x38898000 ] = 1; - febIdToComponentMap[ 0x38660000 ] = 2; - febIdToComponentMap[ 0x3a408000 ] = 5; - febIdToComponentMap[ 0x39f10000 ] = 1; - febIdToComponentMap[ 0x38168000 ] = 2; - febIdToComponentMap[ 0x39520000 ] = 1; - febIdToComponentMap[ 0x39028000 ] = 1; - febIdToComponentMap[ 0x38b30000 ] = 1; - febIdToComponentMap[ 0x38140000 ] = 3; - febIdToComponentMap[ 0x3ba80000 ] = 4; - febIdToComponentMap[ 0x3b090000 ] = 5; - febIdToComponentMap[ 0x3ab98000 ] = 5; - febIdToComponentMap[ 0x3a6a0000 ] = 5; - febIdToComponentMap[ 0x3a1a8000 ] = 8; - febIdToComponentMap[ 0x39cb0000 ] = 1; - febIdToComponentMap[ 0x397b8000 ] = 1; - febIdToComponentMap[ 0x392c0000 ] = 3; - febIdToComponentMap[ 0x38dc8000 ] = 3; - febIdToComponentMap[ 0x388d0000 ] = 2; - febIdToComponentMap[ 0x383d8000 ] = 2; - febIdToComponentMap[ 0x3b280000 ] = 4; - febIdToComponentMap[ 0x3b820000 ] = 8; - febIdToComponentMap[ 0x3b328000 ] = 11; - febIdToComponentMap[ 0x3a938000 ] = 7; - febIdToComponentMap[ 0x3a440000 ] = 7; - febIdToComponentMap[ 0x39f48000 ] = 3; - febIdToComponentMap[ 0x39a50000 ] = 2; - febIdToComponentMap[ 0x39558000 ] = 2; - febIdToComponentMap[ 0x39060000 ] = 2; - febIdToComponentMap[ 0x38b68000 ] = 2; - febIdToComponentMap[ 0x3b588000 ] = 5; - febIdToComponentMap[ 0x38a18000 ] = 1; - febIdToComponentMap[ 0x3bab8000 ] = 5; - febIdToComponentMap[ 0x3b5c0000 ] = 7; - febIdToComponentMap[ 0x3b0c8000 ] = 6; - febIdToComponentMap[ 0x3abd0000 ] = 6; - febIdToComponentMap[ 0x3a6d8000 ] = 6; - febIdToComponentMap[ 0x39ce8000 ] = 2; - febIdToComponentMap[ 0x38e00000 ] = 0; - febIdToComponentMap[ 0x38908000 ] = 1; - febIdToComponentMap[ 0x38410000 ] = 1; - febIdToComponentMap[ 0x3a890000 ] = 5; - febIdToComponentMap[ 0x3a398000 ] = 5; - febIdToComponentMap[ 0x3b360000 ] = 12; - febIdToComponentMap[ 0x39f80000 ] = 0; - febIdToComponentMap[ 0x39a88000 ] = 1; - febIdToComponentMap[ 0x39590000 ] = 1; - febIdToComponentMap[ 0x39098000 ] = 1; - febIdToComponentMap[ 0x38ba0000 ] = 1; - febIdToComponentMap[ 0x386a8000 ] = 1; - febIdToComponentMap[ 0x381b0000 ] = 1; - febIdToComponentMap[ 0x39ea0000 ] = 1; - febIdToComponentMap[ 0x39118000 ] = 1; - febIdToComponentMap[ 0x3b100000 ] = 4; - febIdToComponentMap[ 0x3ac08000 ] = 5; - febIdToComponentMap[ 0x3a710000 ] = 5; - febIdToComponentMap[ 0x399a8000 ] = 1; - febIdToComponentMap[ 0x39d20000 ] = 1; - febIdToComponentMap[ 0x39828000 ] = 1; - febIdToComponentMap[ 0x39330000 ] = 1; - febIdToComponentMap[ 0x38e38000 ] = 1; - febIdToComponentMap[ 0x38940000 ] = 3; - febIdToComponentMap[ 0x38448000 ] = 3; - febIdToComponentMap[ 0x394b0000 ] = 1; - febIdToComponentMap[ 0x3b890000 ] = 5; - febIdToComponentMap[ 0x3b398000 ] = 5; - febIdToComponentMap[ 0x3a9a8000 ] = 5; - febIdToComponentMap[ 0x3a4b0000 ] = 5; - febIdToComponentMap[ 0x39fb8000 ] = 1; - febIdToComponentMap[ 0x39ac0000 ] = 3; - febIdToComponentMap[ 0x395c8000 ] = 3; - febIdToComponentMap[ 0x390d0000 ] = 2; - febIdToComponentMap[ 0x38bd8000 ] = 2; - febIdToComponentMap[ 0x386e0000 ] = 2; - febIdToComponentMap[ 0x38fb8000 ] = 1; - febIdToComponentMap[ 0x39818000 ] = 1; - febIdToComponentMap[ 0x38ac0000 ] = 3; - febIdToComponentMap[ 0x3bb28000 ] = 8; - febIdToComponentMap[ 0x3b630000 ] = 5; - febIdToComponentMap[ 0x3b138000 ] = 5; - febIdToComponentMap[ 0x3ac40000 ] = 7; - febIdToComponentMap[ 0x3a748000 ] = 6; - febIdToComponentMap[ 0x3a250000 ] = 6; - febIdToComponentMap[ 0x39d58000 ] = 2; - febIdToComponentMap[ 0x39860000 ] = 2; - febIdToComponentMap[ 0x39368000 ] = 2; - febIdToComponentMap[ 0x38480000 ] = 0; - febIdToComponentMap[ 0x385c8000 ] = 3; - febIdToComponentMap[ 0x3b8c8000 ] = 6; - febIdToComponentMap[ 0x3b3d0000 ] = 6; - febIdToComponentMap[ 0x3a9e0000 ] = 6; - febIdToComponentMap[ 0x3a4e8000 ] = 6; - febIdToComponentMap[ 0x39600000 ] = 0; - febIdToComponentMap[ 0x39108000 ] = 1; - febIdToComponentMap[ 0x38c10000 ] = 1; - febIdToComponentMap[ 0x380d0000 ] = 2; - febIdToComponentMap[ 0x38220000 ] = 1; - febIdToComponentMap[ 0x39f18000 ] = 1; - febIdToComponentMap[ 0x3bbd8000 ] = 6; - febIdToComponentMap[ 0x3a780000 ] = 4; - febIdToComponentMap[ 0x3a288000 ] = 5; - febIdToComponentMap[ 0x39d90000 ] = 1; - febIdToComponentMap[ 0x39898000 ] = 1; - febIdToComponentMap[ 0x393a0000 ] = 1; - febIdToComponentMap[ 0x38ea8000 ] = 1; - febIdToComponentMap[ 0x389b0000 ] = 1; - febIdToComponentMap[ 0x384b8000 ] = 1; - febIdToComponentMap[ 0x3b6e0000 ] = 6; - febIdToComponentMap[ 0x3b900000 ] = 4; - febIdToComponentMap[ 0x3b408000 ] = 5; - febIdToComponentMap[ 0x381e8000 ] = 2; - febIdToComponentMap[ 0x3a520000 ] = 8; - febIdToComponentMap[ 0x3a028000 ] = 5; - febIdToComponentMap[ 0x39b30000 ] = 1; - febIdToComponentMap[ 0x39638000 ] = 1; - febIdToComponentMap[ 0x39140000 ] = 3; - febIdToComponentMap[ 0x38c48000 ] = 3; - febIdToComponentMap[ 0x38750000 ] = 2; - febIdToComponentMap[ 0x38258000 ] = 2; - febIdToComponentMap[ 0x3b4f0000 ] = 6; - febIdToComponentMap[ 0x3a618000 ] = 5; - febIdToComponentMap[ 0x3bb98000 ] = 5; - febIdToComponentMap[ 0x3b6a0000 ] = 5; - febIdToComponentMap[ 0x3b1a8000 ] = 8; - febIdToComponentMap[ 0x3a7b8000 ] = 5; - febIdToComponentMap[ 0x3a2c0000 ] = 7; - febIdToComponentMap[ 0x39dc8000 ] = 3; - febIdToComponentMap[ 0x398d0000 ] = 2; - febIdToComponentMap[ 0x393d8000 ] = 2; - febIdToComponentMap[ 0x38ee0000 ] = 2; - febIdToComponentMap[ 0x389e8000 ] = 2; - febIdToComponentMap[ 0x3a458000 ] = 6; - febIdToComponentMap[ 0x38300000 ] = 0; - febIdToComponentMap[ 0x3b938000 ] = 7; - febIdToComponentMap[ 0x3b440000 ] = 7; - febIdToComponentMap[ 0x3aa50000 ] = 6; - febIdToComponentMap[ 0x3a060000 ] = 6; - febIdToComponentMap[ 0x39b68000 ] = 2; - febIdToComponentMap[ 0x38c80000 ] = 0; - febIdToComponentMap[ 0x38788000 ] = 1; - febIdToComponentMap[ 0x38290000 ] = 1; - febIdToComponentMap[ 0x39e08000 ] = 1; - febIdToComponentMap[ 0x3bbd0000 ] = 6; - febIdToComponentMap[ 0x3b6d8000 ] = 6; - febIdToComponentMap[ 0x3a7f0000 ] = 6; - febIdToComponentMap[ 0x39908000 ] = 1; - febIdToComponentMap[ 0x39410000 ] = 1; - febIdToComponentMap[ 0x39910000 ] = 1; - febIdToComponentMap[ 0x38a20000 ] = 1; - febIdToComponentMap[ 0x38030000 ] = 1; - febIdToComponentMap[ 0x39418000 ] = 1; - febIdToComponentMap[ 0x3aa88000 ] = 5; - febIdToComponentMap[ 0x3a590000 ] = 5; - febIdToComponentMap[ 0x3a098000 ] = 5; - febIdToComponentMap[ 0x39ba0000 ] = 1; - febIdToComponentMap[ 0x396a8000 ] = 1; - febIdToComponentMap[ 0x391b0000 ] = 1; - febIdToComponentMap[ 0x38cb8000 ] = 1; - febIdToComponentMap[ 0x387c0000 ] = 3; - febIdToComponentMap[ 0x382c8000 ] = 3; - febIdToComponentMap[ 0x38f20000 ] = 1; - febIdToComponentMap[ 0x3b418000 ] = 5; - febIdToComponentMap[ 0x3bc08000 ] = 5; - febIdToComponentMap[ 0x3b710000 ] = 5; - febIdToComponentMap[ 0x38a28000 ] = 1; - febIdToComponentMap[ 0x3a828000 ] = 8; - febIdToComponentMap[ 0x3a330000 ] = 11; - febIdToComponentMap[ 0x39e38000 ] = 1; - febIdToComponentMap[ 0x39940000 ] = 3; - febIdToComponentMap[ 0x39448000 ] = 3; - febIdToComponentMap[ 0x38f50000 ] = 2; - febIdToComponentMap[ 0x38a58000 ] = 2; - febIdToComponentMap[ 0x38530000 ] = 1; - febIdToComponentMap[ 0x3b9a8000 ] = 5; - febIdToComponentMap[ 0x3b4b0000 ] = 5; - febIdToComponentMap[ 0x3aac0000 ] = 7; - febIdToComponentMap[ 0x3a5c8000 ] = 6; - febIdToComponentMap[ 0x3a0d0000 ] = 6; - febIdToComponentMap[ 0x39bd8000 ] = 2; - febIdToComponentMap[ 0x396e0000 ] = 2; - febIdToComponentMap[ 0x391e8000 ] = 2; - febIdToComponentMap[ 0x38038000 ] = 1; - febIdToComponentMap[ 0x38340000 ] = 3; - febIdToComponentMap[ 0x3bc40000 ] = 7; - febIdToComponentMap[ 0x3b748000 ] = 6; - febIdToComponentMap[ 0x3b250000 ] = 6; - febIdToComponentMap[ 0x3a368000 ] = 13; - febIdToComponentMap[ 0x39480000 ] = 0; - febIdToComponentMap[ 0x38f88000 ] = 1; - febIdToComponentMap[ 0x38a90000 ] = 1; - febIdToComponentMap[ 0x38598000 ] = 1; - febIdToComponentMap[ 0x380a0000 ] = 1; - febIdToComponentMap[ 0x3b648000 ] = 6; - febIdToComponentMap[ 0x3b9e0000 ] = 6; - febIdToComponentMap[ 0x3b4e8000 ] = 6; - febIdToComponentMap[ 0x3a600000 ] = 4; - febIdToComponentMap[ 0x3a108000 ] = 5; - febIdToComponentMap[ 0x39c10000 ] = 1; - febIdToComponentMap[ 0x3b150000 ] = 6; - febIdToComponentMap[ 0x39220000 ] = 1; - febIdToComponentMap[ 0x38d28000 ] = 1; - febIdToComponentMap[ 0x38830000 ] = 1; - febIdToComponentMap[ 0x38338000 ] = 1; - febIdToComponentMap[ 0x3ac58000 ] = 6; - febIdToComponentMap[ 0x3b780000 ] = 4; - febIdToComponentMap[ 0x3b288000 ] = 5; - febIdToComponentMap[ 0x3a898000 ] = 5; - febIdToComponentMap[ 0x3a3a0000 ] = 5; - febIdToComponentMap[ 0x39ea8000 ] = 1; - febIdToComponentMap[ 0x399b0000 ] = 1; - febIdToComponentMap[ 0x394b8000 ] = 1; - febIdToComponentMap[ 0x38fc0000 ] = 3; - febIdToComponentMap[ 0x38ac8000 ] = 3; - febIdToComponentMap[ 0x385d0000 ] = 2; - febIdToComponentMap[ 0x380d8000 ] = 2; - febIdToComponentMap[ 0x3b760000 ] = 6; - febIdToComponentMap[ 0x38268000 ] = 2; - febIdToComponentMap[ 0x3b520000 ] = 8; - febIdToComponentMap[ 0x3b028000 ] = 5; - febIdToComponentMap[ 0x3ab30000 ] = 8; - febIdToComponentMap[ 0x3a638000 ] = 7; - febIdToComponentMap[ 0x3a140000 ] = 7; - febIdToComponentMap[ 0x39c48000 ] = 3; - febIdToComponentMap[ 0x39750000 ] = 2; - febIdToComponentMap[ 0x39258000 ] = 2; - febIdToComponentMap[ 0x38d60000 ] = 2; - febIdToComponentMap[ 0x38868000 ] = 2; - febIdToComponentMap[ 0x3b7b8000 ] = 5; - febIdToComponentMap[ 0x3b2c0000 ] = 7; - febIdToComponentMap[ 0x3a8d0000 ] = 6; - febIdToComponentMap[ 0x3a3d8000 ] = 6; - febIdToComponentMap[ 0x39ee0000 ] = 2; - febIdToComponentMap[ 0x399e8000 ] = 2; - febIdToComponentMap[ 0x38b00000 ] = 0; - febIdToComponentMap[ 0x38608000 ] = 1; - febIdToComponentMap[ 0x38110000 ] = 1; - febIdToComponentMap[ 0x38b80000 ] = 0; - febIdToComponentMap[ 0x3ba50000 ] = 6; - febIdToComponentMap[ 0x3b060000 ] = 6; - febIdToComponentMap[ 0x39c80000 ] = 0; - febIdToComponentMap[ 0x39788000 ] = 1; - febIdToComponentMap[ 0x39290000 ] = 1; - febIdToComponentMap[ 0x38d98000 ] = 1; - febIdToComponentMap[ 0x388a0000 ] = 1; - febIdToComponentMap[ 0x383a8000 ] = 1; - febIdToComponentMap[ 0x38e88000 ] = 1; - febIdToComponentMap[ 0x3a908000 ] = 5; - febIdToComponentMap[ 0x3a410000 ] = 5; - febIdToComponentMap[ 0x38990000 ] = 1; - febIdToComponentMap[ 0x39a20000 ] = 1; - febIdToComponentMap[ 0x39528000 ] = 1; - febIdToComponentMap[ 0x39030000 ] = 1; - febIdToComponentMap[ 0x38b38000 ] = 1; - febIdToComponentMap[ 0x38640000 ] = 3; - febIdToComponentMap[ 0x38148000 ] = 3; - febIdToComponentMap[ 0x38498000 ] = 1; - febIdToComponentMap[ 0x38418000 ] = 1; - febIdToComponentMap[ 0x3ba88000 ] = 5; - febIdToComponentMap[ 0x3b590000 ] = 5; - febIdToComponentMap[ 0x3b098000 ] = 5; - febIdToComponentMap[ 0x3aba0000 ] = 5; - febIdToComponentMap[ 0x3a6a8000 ] = 5; - febIdToComponentMap[ 0x3a1b0000 ] = 8; - febIdToComponentMap[ 0x39cb8000 ] = 1; - febIdToComponentMap[ 0x397c0000 ] = 3; - febIdToComponentMap[ 0x392c8000 ] = 3; - febIdToComponentMap[ 0x38dd0000 ] = 2; - febIdToComponentMap[ 0x388d8000 ] = 2; - febIdToComponentMap[ 0x383e0000 ] = 2; - febIdToComponentMap[ 0x3b7a0000 ] = 5; - febIdToComponentMap[ 0x3baa8000 ] = 5; - febIdToComponentMap[ 0x3b828000 ] = 8; - febIdToComponentMap[ 0x3b330000 ] = 11; - febIdToComponentMap[ 0x3a940000 ] = 7; - febIdToComponentMap[ 0x3a448000 ] = 6; - febIdToComponentMap[ 0x39f50000 ] = 2; - febIdToComponentMap[ 0x39a58000 ] = 2; - febIdToComponentMap[ 0x39560000 ] = 2; - febIdToComponentMap[ 0x39068000 ] = 2; - febIdToComponentMap[ 0x38180000 ] = 0; - febIdToComponentMap[ 0x3b5b0000 ] = 5; - febIdToComponentMap[ 0x3bac0000 ] = 7; - febIdToComponentMap[ 0x3b5c8000 ] = 6; - febIdToComponentMap[ 0x3b0d0000 ] = 6; - febIdToComponentMap[ 0x3abd8000 ] = 6; - febIdToComponentMap[ 0x3a6e0000 ] = 6; - febIdToComponentMap[ 0x39300000 ] = 0; - febIdToComponentMap[ 0x38e08000 ] = 1; - febIdToComponentMap[ 0x38910000 ] = 1; - febIdToComponentMap[ 0x3b0b8000 ] = 7; - febIdToComponentMap[ 0x3a3c0000 ] = 7; - febIdToComponentMap[ 0x3b368000 ] = 13; - febIdToComponentMap[ 0x3a480000 ] = 4; - febIdToComponentMap[ 0x39f88000 ] = 1; - febIdToComponentMap[ 0x39a90000 ] = 1; - febIdToComponentMap[ 0x39598000 ] = 1; - febIdToComponentMap[ 0x390a0000 ] = 1; - febIdToComponentMap[ 0x38ba8000 ] = 1; - febIdToComponentMap[ 0x386b0000 ] = 1; - febIdToComponentMap[ 0x381b8000 ] = 1; - febIdToComponentMap[ 0x39ec8000 ] = 3; - febIdToComponentMap[ 0x39218000 ] = 1; - febIdToComponentMap[ 0x3b600000 ] = 4; - febIdToComponentMap[ 0x3b108000 ] = 5; - febIdToComponentMap[ 0x3ac10000 ] = 5; - febIdToComponentMap[ 0x3a9d0000 ] = 6; - febIdToComponentMap[ 0x3a220000 ] = 5; - febIdToComponentMap[ 0x39d28000 ] = 1; - febIdToComponentMap[ 0x39830000 ] = 1; - febIdToComponentMap[ 0x39338000 ] = 1; - febIdToComponentMap[ 0x38e40000 ] = 3; - febIdToComponentMap[ 0x38948000 ] = 3; - febIdToComponentMap[ 0x38450000 ] = 2; - febIdToComponentMap[ 0x39cd8000 ] = 2; - febIdToComponentMap[ 0x3b898000 ] = 5; - febIdToComponentMap[ 0x3b3a0000 ] = 5; - febIdToComponentMap[ 0x3a9b0000 ] = 5; - febIdToComponentMap[ 0x3a4b8000 ] = 5; - febIdToComponentMap[ 0x39fc0000 ] = 3; - febIdToComponentMap[ 0x39ac8000 ] = 3; - febIdToComponentMap[ 0x395d0000 ] = 2; - febIdToComponentMap[ 0x390d8000 ] = 2; - febIdToComponentMap[ 0x38be0000 ] = 2; - febIdToComponentMap[ 0x386e8000 ] = 2; - febIdToComponentMap[ 0x38fe0000 ] = 2; - febIdToComponentMap[ 0x39918000 ] = 1; - febIdToComponentMap[ 0x38ae8000 ] = 2; - febIdToComponentMap[ 0x3bb30000 ] = 8; - febIdToComponentMap[ 0x3b638000 ] = 7; - febIdToComponentMap[ 0x3b140000 ] = 7; - febIdToComponentMap[ 0x3ac48000 ] = 6; - febIdToComponentMap[ 0x3a750000 ] = 6; - febIdToComponentMap[ 0x3a258000 ] = 6; - febIdToComponentMap[ 0x39d60000 ] = 2; - febIdToComponentMap[ 0x39868000 ] = 2; - febIdToComponentMap[ 0x38980000 ] = 0; - febIdToComponentMap[ 0x38488000 ] = 1; - febIdToComponentMap[ 0x3b8d0000 ] = 6; - febIdToComponentMap[ 0x3b3d8000 ] = 6; - febIdToComponentMap[ 0x3a4f0000 ] = 6; - febIdToComponentMap[ 0x39b00000 ] = 0; - febIdToComponentMap[ 0x39608000 ] = 1; - febIdToComponentMap[ 0x39110000 ] = 1; - febIdToComponentMap[ 0x38c18000 ] = 1; - febIdToComponentMap[ 0x38720000 ] = 1; - febIdToComponentMap[ 0x38228000 ] = 1; - febIdToComponentMap[ 0x39f60000 ] = 2; - febIdToComponentMap[ 0x3bc00000 ] = 4; - febIdToComponentMap[ 0x398a0000 ] = 1; - febIdToComponentMap[ 0x393a8000 ] = 1; - febIdToComponentMap[ 0x3b708000 ] = 5; - febIdToComponentMap[ 0x3b210000 ] = 5; - febIdToComponentMap[ 0x3a528000 ] = 8; - febIdToComponentMap[ 0x38d18000 ] = 1; - febIdToComponentMap[ 0x3a718000 ] = 5; - febIdToComponentMap[ 0x3bba0000 ] = 5; - febIdToComponentMap[ 0x3b1b0000 ] = 8; - febIdToComponentMap[ 0x3a7c0000 ] = 7; - febIdToComponentMap[ 0x39820000 ] = 1; - febIdToComponentMap[ 0x39328000 ] = 1; - febIdToComponentMap[ 0x3aa58000 ] = 6; - febIdToComponentMap[ 0x3a630000 ] = 5; - febIdToComponentMap[ 0x3a300000 ] = 11; - febIdToComponentMap[ 0x39938000 ] = 1; - febIdToComponentMap[ 0x39440000 ] = 3; - febIdToComponentMap[ 0x3aa90000 ] = 6; - febIdToComponentMap[ 0x3a598000 ] = 5; - febIdToComponentMap[ 0x396b0000 ] = 1; - febIdToComponentMap[ 0x391b8000 ] = 1; - febIdToComponentMap[ 0x38cc0000 ] = 3; - febIdToComponentMap[ 0x382d0000 ] = 2; - febIdToComponentMap[ 0x38f48000 ] = 3; - febIdToComponentMap[ 0x3bc10000 ] = 5; - febIdToComponentMap[ 0x38a50000 ] = 2; - febIdToComponentMap[ 0x3b220000 ] = 5; - febIdToComponentMap[ 0x3a830000 ] = 8; - febIdToComponentMap[ 0x39948000 ] = 3; - febIdToComponentMap[ 0x39450000 ] = 2; - febIdToComponentMap[ 0x38f58000 ] = 2; - febIdToComponentMap[ 0x38a60000 ] = 2; - febIdToComponentMap[ 0x38558000 ] = 2; - febIdToComponentMap[ 0x3aac8000 ] = 6; - febIdToComponentMap[ 0x3a5d0000 ] = 6; - febIdToComponentMap[ 0x3a0d8000 ] = 6; - febIdToComponentMap[ 0x39be0000 ] = 2; - febIdToComponentMap[ 0x396e8000 ] = 2; - febIdToComponentMap[ 0x38800000 ] = 0; - febIdToComponentMap[ 0x38060000 ] = 2; - febIdToComponentMap[ 0x38368000 ] = 2; - febIdToComponentMap[ 0x3bc48000 ] = 6; - febIdToComponentMap[ 0x3a370000 ] = 13; - febIdToComponentMap[ 0x39980000 ] = 0; - febIdToComponentMap[ 0x39488000 ] = 1; - febIdToComponentMap[ 0x38f90000 ] = 1; - febIdToComponentMap[ 0x38a98000 ] = 1; - febIdToComponentMap[ 0x380a8000 ] = 1; - febIdToComponentMap[ 0x3ab00000 ] = 5; - febIdToComponentMap[ 0x3a608000 ] = 5; - febIdToComponentMap[ 0x3a110000 ] = 6; - febIdToComponentMap[ 0x39c18000 ] = 1; - febIdToComponentMap[ 0x39720000 ] = 1; - febIdToComponentMap[ 0x39228000 ] = 1; - febIdToComponentMap[ 0x38d30000 ] = 1; - febIdToComponentMap[ 0x38838000 ] = 1; - febIdToComponentMap[ 0x3b480000 ] = 4; - febIdToComponentMap[ 0x3b788000 ] = 5; - febIdToComponentMap[ 0x3b290000 ] = 5; - febIdToComponentMap[ 0x3a8a0000 ] = 5; - febIdToComponentMap[ 0x3a3a8000 ] = 5; - febIdToComponentMap[ 0x39eb0000 ] = 1; - febIdToComponentMap[ 0x399b8000 ] = 1; - febIdToComponentMap[ 0x394c0000 ] = 3; - febIdToComponentMap[ 0x38fc8000 ] = 3; - febIdToComponentMap[ 0x38ad0000 ] = 2; - febIdToComponentMap[ 0x385d8000 ] = 2; - febIdToComponentMap[ 0x380e0000 ] = 2; - febIdToComponentMap[ 0x3a788000 ] = 5; - febIdToComponentMap[ 0x3a290000 ] = 5; - febIdToComponentMap[ 0x3ba20000 ] = 5; - febIdToComponentMap[ 0x3b528000 ] = 8; - febIdToComponentMap[ 0x3b030000 ] = 5; - febIdToComponentMap[ 0x3ab38000 ] = 8; - febIdToComponentMap[ 0x3a640000 ] = 7; - febIdToComponentMap[ 0x3a148000 ] = 6; - febIdToComponentMap[ 0x39c50000 ] = 2; - febIdToComponentMap[ 0x39758000 ] = 2; - febIdToComponentMap[ 0x39260000 ] = 2; - febIdToComponentMap[ 0x38d68000 ] = 2; - febIdToComponentMap[ 0x39d98000 ] = 1; - febIdToComponentMap[ 0x3b2c8000 ] = 6; - febIdToComponentMap[ 0x3a8d8000 ] = 6; - febIdToComponentMap[ 0x3a3e0000 ] = 6; - febIdToComponentMap[ 0x39ee8000 ] = 2; - febIdToComponentMap[ 0x39000000 ] = 0; - febIdToComponentMap[ 0x38b08000 ] = 1; - febIdToComponentMap[ 0x38610000 ] = 1; - febIdToComponentMap[ 0x3a0a0000 ] = 5; - febIdToComponentMap[ 0x39ba8000 ] = 1; - febIdToComponentMap[ 0x3ba58000 ] = 6; - febIdToComponentMap[ 0x3a180000 ] = 5; - febIdToComponentMap[ 0x39c88000 ] = 1; - febIdToComponentMap[ 0x39790000 ] = 1; - febIdToComponentMap[ 0x39298000 ] = 1; - febIdToComponentMap[ 0x38da0000 ] = 1; - febIdToComponentMap[ 0x388a8000 ] = 1; - febIdToComponentMap[ 0x383b0000 ] = 1; - febIdToComponentMap[ 0x38eb0000 ] = 1; - febIdToComponentMap[ 0x3b300000 ] = 11; - febIdToComponentMap[ 0x3a910000 ] = 5; - febIdToComponentMap[ 0x389b8000 ] = 1; - febIdToComponentMap[ 0x39f20000 ] = 1; - febIdToComponentMap[ 0x39a28000 ] = 1; - febIdToComponentMap[ 0x39530000 ] = 1; - febIdToComponentMap[ 0x39038000 ] = 1; - febIdToComponentMap[ 0x38b40000 ] = 3; - febIdToComponentMap[ 0x38648000 ] = 3; - febIdToComponentMap[ 0x38150000 ] = 2; - febIdToComponentMap[ 0x384c0000 ] = 3; - febIdToComponentMap[ 0x38518000 ] = 1; - febIdToComponentMap[ 0x3ba90000 ] = 6; - febIdToComponentMap[ 0x3b598000 ] = 5; - febIdToComponentMap[ 0x3b0a0000 ] = 5; - febIdToComponentMap[ 0x3aba8000 ] = 5; - febIdToComponentMap[ 0x3a6b0000 ] = 5; - febIdToComponentMap[ 0x3a1b8000 ] = 8; - febIdToComponentMap[ 0x39cc0000 ] = 3; - febIdToComponentMap[ 0x397c8000 ] = 3; - febIdToComponentMap[ 0x392d0000 ] = 2; - febIdToComponentMap[ 0x38dd8000 ] = 2; - febIdToComponentMap[ 0x388e0000 ] = 2; - febIdToComponentMap[ 0x387c8000 ] = 3; - febIdToComponentMap[ 0x3bad0000 ] = 6; - febIdToComponentMap[ 0x3b830000 ] = 8; - febIdToComponentMap[ 0x3a948000 ] = 6; - febIdToComponentMap[ 0x3a450000 ] = 6; - febIdToComponentMap[ 0x39f58000 ] = 2; - febIdToComponentMap[ 0x39a60000 ] = 2; - febIdToComponentMap[ 0x39568000 ] = 2; - febIdToComponentMap[ 0x38680000 ] = 0; - febIdToComponentMap[ 0x38188000 ] = 1; - febIdToComponentMap[ 0x3b5d8000 ] = 6; - febIdToComponentMap[ 0x3bac8000 ] = 6; - febIdToComponentMap[ 0x3b5d0000 ] = 6; - febIdToComponentMap[ 0x3b0d8000 ] = 6; - febIdToComponentMap[ 0x3abe0000 ] = 6; - febIdToComponentMap[ 0x39800000 ] = 0; - febIdToComponentMap[ 0x39308000 ] = 1; - febIdToComponentMap[ 0x38e10000 ] = 1; - febIdToComponentMap[ 0x3b0e0000 ] = 6; - febIdToComponentMap[ 0x38420000 ] = 1; - febIdToComponentMap[ 0x383e8000 ] = 2; - febIdToComponentMap[ 0x3a980000 ] = 4; - febIdToComponentMap[ 0x3a488000 ] = 5; - febIdToComponentMap[ 0x39f90000 ] = 1; - febIdToComponentMap[ 0x39a98000 ] = 1; - febIdToComponentMap[ 0x395a0000 ] = 1; - febIdToComponentMap[ 0x390a8000 ] = 1; - febIdToComponentMap[ 0x38bb0000 ] = 1; - febIdToComponentMap[ 0x386b8000 ] = 1; - febIdToComponentMap[ 0x381c0000 ] = 3; - febIdToComponentMap[ 0x39318000 ] = 1; - febIdToComponentMap[ 0x3bb00000 ] = 5; - febIdToComponentMap[ 0x3b608000 ] = 5; - febIdToComponentMap[ 0x3b110000 ] = 6; - febIdToComponentMap[ 0x3ac18000 ] = 5; - febIdToComponentMap[ 0x3a720000 ] = 5; - febIdToComponentMap[ 0x3a228000 ] = 5; - febIdToComponentMap[ 0x39d30000 ] = 1; - febIdToComponentMap[ 0x39838000 ] = 1; - febIdToComponentMap[ 0x38e48000 ] = 3; - febIdToComponentMap[ 0x3b2a8000 ] = 5; - febIdToComponentMap[ 0x38458000 ] = 2; - febIdToComponentMap[ 0x39d00000 ] = 0; - febIdToComponentMap[ 0x3b8a0000 ] = 5; - febIdToComponentMap[ 0x3b3a8000 ] = 5; - febIdToComponentMap[ 0x3a9b8000 ] = 7; - febIdToComponentMap[ 0x3a4c0000 ] = 7; - febIdToComponentMap[ 0x39fc8000 ] = 3; - febIdToComponentMap[ 0x39ad0000 ] = 2; - febIdToComponentMap[ 0x395d8000 ] = 2; - febIdToComponentMap[ 0x390e0000 ] = 2; - febIdToComponentMap[ 0x38be8000 ] = 2; - febIdToComponentMap[ 0x3a008000 ] = 5; - febIdToComponentMap[ 0x39a18000 ] = 1; - febIdToComponentMap[ 0x39b10000 ] = 1; - febIdToComponentMap[ 0x3bb38000 ] = 8; - febIdToComponentMap[ 0x3b640000 ] = 7; - febIdToComponentMap[ 0x3b148000 ] = 6; - febIdToComponentMap[ 0x3ac50000 ] = 6; - febIdToComponentMap[ 0x3a758000 ] = 6; - febIdToComponentMap[ 0x3a260000 ] = 6; - febIdToComponentMap[ 0x39d68000 ] = 2; - febIdToComponentMap[ 0x38e80000 ] = 0; - febIdToComponentMap[ 0x38988000 ] = 1; - febIdToComponentMap[ 0x38490000 ] = 1; - febIdToComponentMap[ 0x39618000 ] = 1; - febIdToComponentMap[ 0x3b8d8000 ] = 6; - febIdToComponentMap[ 0x3b3e0000 ] = 6; - febIdToComponentMap[ 0x3a000000 ] = 4; - febIdToComponentMap[ 0x39b08000 ] = 1; - febIdToComponentMap[ 0x39610000 ] = 1; - febIdToComponentMap[ 0x38920000 ] = 1; - febIdToComponentMap[ 0x38c20000 ] = 1; - febIdToComponentMap[ 0x38728000 ] = 1; - febIdToComponentMap[ 0x38230000 ] = 1; - febIdToComponentMap[ 0x3a118000 ] = 6; - febIdToComponentMap[ 0x38428000 ] = 1; - febIdToComponentMap[ 0x3b180000 ] = 5; - febIdToComponentMap[ 0x3a790000 ] = 6; - febIdToComponentMap[ 0x3a298000 ] = 5; - febIdToComponentMap[ 0x39da0000 ] = 1; - febIdToComponentMap[ 0x398a8000 ] = 1; - febIdToComponentMap[ 0x393b0000 ] = 1; - febIdToComponentMap[ 0x38eb8000 ] = 1; - febIdToComponentMap[ 0x389c0000 ] = 3; - febIdToComponentMap[ 0x384c8000 ] = 3; - febIdToComponentMap[ 0x38730000 ] = 1; - febIdToComponentMap[ 0x3b910000 ] = 5; - febIdToComponentMap[ 0x3ba38000 ] = 7; - febIdToComponentMap[ 0x3aa28000 ] = 5; - febIdToComponentMap[ 0x3a530000 ] = 8; - febIdToComponentMap[ 0x3a038000 ] = 7; - febIdToComponentMap[ 0x39b40000 ] = 3; - febIdToComponentMap[ 0x39648000 ] = 3; - febIdToComponentMap[ 0x39150000 ] = 2; - febIdToComponentMap[ 0x38c58000 ] = 2; - febIdToComponentMap[ 0x38760000 ] = 2; - febIdToComponentMap[ 0x38540000 ] = 3; - febIdToComponentMap[ 0x3bba8000 ] = 5; - febIdToComponentMap[ 0x3b6b0000 ] = 5; - febIdToComponentMap[ 0x3b1b8000 ] = 8; - febIdToComponentMap[ 0x3a7c8000 ] = 6; - febIdToComponentMap[ 0x3a2d0000 ] = 6; - febIdToComponentMap[ 0x39dd8000 ] = 2; - febIdToComponentMap[ 0x398e0000 ] = 2; - febIdToComponentMap[ 0x393e8000 ] = 2; - febIdToComponentMap[ 0x38500000 ] = 0; - febIdToComponentMap[ 0x38008000 ] = 1; - febIdToComponentMap[ 0x3b048000 ] = 6; - febIdToComponentMap[ 0x38350000 ] = 2; - febIdToComponentMap[ 0x3b948000 ] = 6; - febIdToComponentMap[ 0x3b450000 ] = 6; - febIdToComponentMap[ 0x3aa60000 ] = 6; - febIdToComponentMap[ 0x39680000 ] = 0; - febIdToComponentMap[ 0x39188000 ] = 1; - febIdToComponentMap[ 0x38c90000 ] = 1; - febIdToComponentMap[ 0x38798000 ] = 1; - febIdToComponentMap[ 0x382a0000 ] = 1; - febIdToComponentMap[ 0x3a658000 ] = 6; - febIdToComponentMap[ 0x3bbe0000 ] = 6; - febIdToComponentMap[ 0x3a800000 ] = 5; - febIdToComponentMap[ 0x3a308000 ] = 11; - febIdToComponentMap[ 0x39e10000 ] = 1; - febIdToComponentMap[ 0x3b160000 ] = 7; - febIdToComponentMap[ 0x39420000 ] = 1; - febIdToComponentMap[ 0x38f28000 ] = 1; - febIdToComponentMap[ 0x38a30000 ] = 1; - febIdToComponentMap[ 0x38538000 ] = 1; - febIdToComponentMap[ 0x38040000 ] = 3; - febIdToComponentMap[ 0x39c68000 ] = 2; - febIdToComponentMap[ 0x3b980000 ] = 4; - febIdToComponentMap[ 0x3b488000 ] = 5; - febIdToComponentMap[ 0x3aa98000 ] = 6; - febIdToComponentMap[ 0x3a5a0000 ] = 5; - febIdToComponentMap[ 0x3a0a8000 ] = 5; - febIdToComponentMap[ 0x39bb0000 ] = 1; - febIdToComponentMap[ 0x396b8000 ] = 1; - febIdToComponentMap[ 0x391c0000 ] = 3; - febIdToComponentMap[ 0x38cc8000 ] = 3; - febIdToComponentMap[ 0x387d0000 ] = 2; - febIdToComponentMap[ 0x382d8000 ] = 2; - febIdToComponentMap[ 0x3b618000 ] = 5; - febIdToComponentMap[ 0x3bc18000 ] = 5; - febIdToComponentMap[ 0x3b720000 ] = 5; - febIdToComponentMap[ 0x3b228000 ] = 5; - febIdToComponentMap[ 0x3a838000 ] = 8; - febIdToComponentMap[ 0x3a340000 ] = 11; - febIdToComponentMap[ 0x39950000 ] = 2; - febIdToComponentMap[ 0x39458000 ] = 2; - febIdToComponentMap[ 0x38f60000 ] = 2; - febIdToComponentMap[ 0x38a68000 ] = 2; - febIdToComponentMap[ 0x38d80000 ] = 0; - febIdToComponentMap[ 0x3b9b8000 ] = 7; - febIdToComponentMap[ 0x3b4c0000 ] = 7; - febIdToComponentMap[ 0x3aad0000 ] = 6; - febIdToComponentMap[ 0x3a5d8000 ] = 6; - febIdToComponentMap[ 0x3a0e0000 ] = 6; - febIdToComponentMap[ 0x39be8000 ] = 2; - febIdToComponentMap[ 0x38d00000 ] = 0; - febIdToComponentMap[ 0x38808000 ] = 1; - febIdToComponentMap[ 0x38310000 ] = 1; - febIdToComponentMap[ 0x38888000 ] = 1; - febIdToComponentMap[ 0x3bb90000 ] = 5; - febIdToComponentMap[ 0x3bc50000 ] = 6; - febIdToComponentMap[ 0x3b758000 ] = 6; - febIdToComponentMap[ 0x3b260000 ] = 6; - febIdToComponentMap[ 0x39e80000 ] = 0; - febIdToComponentMap[ 0x39988000 ] = 1; - febIdToComponentMap[ 0x39490000 ] = 1; - febIdToComponentMap[ 0x38f98000 ] = 1; - febIdToComponentMap[ 0x38aa0000 ] = 1; - febIdToComponentMap[ 0x385a8000 ] = 1; - febIdToComponentMap[ 0x380b0000 ] = 1; - febIdToComponentMap[ 0x38698000 ] = 1; - febIdToComponentMap[ 0x3b000000 ] = 4; - febIdToComponentMap[ 0x3ab08000 ] = 6; - febIdToComponentMap[ 0x3a610000 ] = 5; - febIdToComponentMap[ 0x3b9a0000 ] = 5; - febIdToComponentMap[ 0x39c20000 ] = 1; - febIdToComponentMap[ 0x39728000 ] = 1; - febIdToComponentMap[ 0x39230000 ] = 1; - febIdToComponentMap[ 0x38d38000 ] = 1; - febIdToComponentMap[ 0x38840000 ] = 3; - febIdToComponentMap[ 0x38348000 ] = 3; - febIdToComponentMap[ 0x3b4a8000 ] = 5; - febIdToComponentMap[ 0x3b790000 ] = 6; - febIdToComponentMap[ 0x3b298000 ] = 5; - febIdToComponentMap[ 0x3a8a8000 ] = 5; - febIdToComponentMap[ 0x3a3b0000 ] = 5; - febIdToComponentMap[ 0x39eb8000 ] = 1; - febIdToComponentMap[ 0x399c0000 ] = 3; - febIdToComponentMap[ 0x394c8000 ] = 3; - febIdToComponentMap[ 0x38fd0000 ] = 2; - febIdToComponentMap[ 0x38ad8000 ] = 2; - febIdToComponentMap[ 0x385e0000 ] = 2; - febIdToComponentMap[ 0x380e8000 ] = 2; - febIdToComponentMap[ 0x3b7b0000 ] = 5; - febIdToComponentMap[ 0x3b2b8000 ] = 7; - febIdToComponentMap[ 0x3ba28000 ] = 5; - febIdToComponentMap[ 0x3b530000 ] = 8; - febIdToComponentMap[ 0x3b038000 ] = 7; - febIdToComponentMap[ 0x3ab40000 ] = 8; - febIdToComponentMap[ 0x3a648000 ] = 6; - febIdToComponentMap[ 0x3a150000 ] = 6; - febIdToComponentMap[ 0x39c58000 ] = 2; - febIdToComponentMap[ 0x39760000 ] = 2; - febIdToComponentMap[ 0x39268000 ] = 2; - febIdToComponentMap[ 0x38380000 ] = 0; - febIdToComponentMap[ 0x3a5c0000 ] = 7; - febIdToComponentMap[ 0x3b7c8000 ] = 6; - febIdToComponentMap[ 0x3b2d0000 ] = 6; - febIdToComponentMap[ 0x3a8e0000 ] = 6; - febIdToComponentMap[ 0x39500000 ] = 0; - febIdToComponentMap[ 0x39008000 ] = 1; - febIdToComponentMap[ 0x38b10000 ] = 1; - febIdToComponentMap[ 0x3a0c8000 ] = 6; - febIdToComponentMap[ 0x38120000 ] = 1; - febIdToComponentMap[ 0x39bd0000 ] = 2; - febIdToComponentMap[ 0x3ba60000 ] = 6; - febIdToComponentMap[ 0x3a680000 ] = 4; - febIdToComponentMap[ 0x3a188000 ] = 6; - febIdToComponentMap[ 0x39c90000 ] = 1; - febIdToComponentMap[ 0x39798000 ] = 1; - febIdToComponentMap[ 0x392a0000 ] = 1; - febIdToComponentMap[ 0x38da8000 ] = 1; - febIdToComponentMap[ 0x388b0000 ] = 1; - febIdToComponentMap[ 0x383b8000 ] = 1; - febIdToComponentMap[ 0x396d8000 ] = 2; - febIdToComponentMap[ 0x3b800000 ] = 5; - febIdToComponentMap[ 0x3b308000 ] = 11; - febIdToComponentMap[ 0x391e0000 ] = 2; - febIdToComponentMap[ 0x3a420000 ] = 5; - febIdToComponentMap[ 0x39f28000 ] = 1; - febIdToComponentMap[ 0x39a30000 ] = 1; - febIdToComponentMap[ 0x39538000 ] = 1; - febIdToComponentMap[ 0x39040000 ] = 3; - febIdToComponentMap[ 0x38b48000 ] = 3; - febIdToComponentMap[ 0x38650000 ] = 2; - febIdToComponentMap[ 0x38158000 ] = 2; - febIdToComponentMap[ 0x38ce8000 ] = 2; - febIdToComponentMap[ 0x38618000 ] = 1; - febIdToComponentMap[ 0x3ba98000 ] = 6; - febIdToComponentMap[ 0x3b5a0000 ] = 5; - febIdToComponentMap[ 0x3b0a8000 ] = 5; - febIdToComponentMap[ 0x3abb0000 ] = 5; - febIdToComponentMap[ 0x3a6b8000 ] = 7; - febIdToComponentMap[ 0x3a1c0000 ] = 8; - febIdToComponentMap[ 0x39cc8000 ] = 3; - febIdToComponentMap[ 0x397d0000 ] = 2; - febIdToComponentMap[ 0x392d8000 ] = 2; - febIdToComponentMap[ 0x38de0000 ] = 2; - febIdToComponentMap[ 0x388e8000 ] = 2; - febIdToComponentMap[ 0x3b7f0000 ] = 6; - febIdToComponentMap[ 0x3b838000 ] = 8; - febIdToComponentMap[ 0x3b340000 ] = 11; - febIdToComponentMap[ 0x39e30000 ] = 1; - febIdToComponentMap[ 0x39a68000 ] = 2; - febIdToComponentMap[ 0x39e00000 ] = 0; - febIdToComponentMap[ 0x39808000 ] = 1; - febIdToComponentMap[ 0x39310000 ] = 1; - febIdToComponentMap[ 0x3b908000 ] = 5; - febIdToComponentMap[ 0x3b410000 ] = 5; - febIdToComponentMap[ 0x3a490000 ] = 6; - febIdToComponentMap[ 0x390b0000 ] = 1; - febIdToComponentMap[ 0x39718000 ] = 1; - febIdToComponentMap[ 0x3bb08000 ] = 6; - febIdToComponentMap[ 0x3aa20000 ] = 5; - febIdToComponentMap[ 0x38528000 ] = 1; - febIdToComponentMap[ 0x3a4c8000 ] = 6; - febIdToComponentMap[ 0x3a030000 ] = 5; - febIdToComponentMap[ 0x39b18000 ] = 1; - febIdToComponentMap[ 0x39b38000 ] = 1; - febIdToComponentMap[ 0x3bb40000 ] = 8; - febIdToComponentMap[ 0x3a760000 ] = 6; - febIdToComponentMap[ 0x39380000 ] = 0; - febIdToComponentMap[ 0x39640000 ] = 3; - febIdToComponentMap[ 0x3b8e0000 ] = 6; - febIdToComponentMap[ 0x3a500000 ] = 5; - febIdToComponentMap[ 0x39148000 ] = 3; - febIdToComponentMap[ 0x39120000 ] = 1; - febIdToComponentMap[ 0x38c28000 ] = 1; - febIdToComponentMap[ 0x38238000 ] = 1; - febIdToComponentMap[ 0x3a218000 ] = 5; - febIdToComponentMap[ 0x38c50000 ] = 2; - febIdToComponentMap[ 0x3b188000 ] = 6; - febIdToComponentMap[ 0x3a798000 ] = 6; - febIdToComponentMap[ 0x3a2a0000 ] = 5; - febIdToComponentMap[ 0x39da8000 ] = 1; - febIdToComponentMap[ 0x393b8000 ] = 1; - febIdToComponentMap[ 0x38ec0000 ] = 3; - febIdToComponentMap[ 0x389c8000 ] = 3; - febIdToComponentMap[ 0x38758000 ] = 2; - febIdToComponentMap[ 0x38260000 ] = 2; - febIdToComponentMap[ 0x3b420000 ] = 5; - febIdToComponentMap[ 0x3aa30000 ] = 5; - febIdToComponentMap[ 0x3a538000 ] = 8; - febIdToComponentMap[ 0x3a040000 ] = 7; - febIdToComponentMap[ 0x39b48000 ] = 3; - febIdToComponentMap[ 0x39650000 ] = 2; - febIdToComponentMap[ 0x39158000 ] = 2; - febIdToComponentMap[ 0x38c60000 ] = 2; - febIdToComponentMap[ 0x38568000 ] = 2; - febIdToComponentMap[ 0x3a918000 ] = 5; - febIdToComponentMap[ 0x3bbb0000 ] = 5; - febIdToComponentMap[ 0x3b1c0000 ] = 8; - febIdToComponentMap[ 0x3a7d0000 ] = 6; - febIdToComponentMap[ 0x3a2d8000 ] = 6; - febIdToComponentMap[ 0x39de0000 ] = 2; - febIdToComponentMap[ 0x398e8000 ] = 2; - febIdToComponentMap[ 0x38a00000 ] = 0; - febIdToComponentMap[ 0x3b950000 ] = 6; - febIdToComponentMap[ 0x3b458000 ] = 6; - febIdToComponentMap[ 0x39b80000 ] = 0; - febIdToComponentMap[ 0x39688000 ] = 1; - febIdToComponentMap[ 0x39190000 ] = 1; - febIdToComponentMap[ 0x38c98000 ] = 1; - febIdToComponentMap[ 0x387a0000 ] = 1; - febIdToComponentMap[ 0x382a8000 ] = 1; - febIdToComponentMap[ 0x3b680000 ] = 4; - febIdToComponentMap[ 0x3b018000 ] = 5; - febIdToComponentMap[ 0x3a808000 ] = 6; - febIdToComponentMap[ 0x3a310000 ] = 11; - febIdToComponentMap[ 0x3a988000 ] = 5; - febIdToComponentMap[ 0x39920000 ] = 1; - febIdToComponentMap[ 0x39428000 ] = 1; - febIdToComponentMap[ 0x38f30000 ] = 1; - febIdToComponentMap[ 0x38a38000 ] = 1; - febIdToComponentMap[ 0x38048000 ] = 3; - febIdToComponentMap[ 0x3b490000 ] = 6; - febIdToComponentMap[ 0x3b988000 ] = 5; - febIdToComponentMap[ 0x3aaa0000 ] = 5; - febIdToComponentMap[ 0x3a5a8000 ] = 5; - febIdToComponentMap[ 0x3a0b0000 ] = 5; - febIdToComponentMap[ 0x39bb8000 ] = 1; - febIdToComponentMap[ 0x396c0000 ] = 3; - febIdToComponentMap[ 0x391c8000 ] = 3; - febIdToComponentMap[ 0x38cd0000 ] = 2; - febIdToComponentMap[ 0x387d8000 ] = 2; - febIdToComponentMap[ 0x382e0000 ] = 2; - febIdToComponentMap[ 0x3b798000 ] = 6; - febIdToComponentMap[ 0x3b718000 ] = 5; - febIdToComponentMap[ 0x39aa0000 ] = 1; - febIdToComponentMap[ 0x3bc20000 ] = 5; - febIdToComponentMap[ 0x3b728000 ] = 5; - febIdToComponentMap[ 0x3b230000 ] = 5; - febIdToComponentMap[ 0x3a840000 ] = 8; - febIdToComponentMap[ 0x3a348000 ] = 12; - febIdToComponentMap[ 0x39e50000 ] = 2; - febIdToComponentMap[ 0x39958000 ] = 2; - febIdToComponentMap[ 0x39460000 ] = 2; - febIdToComponentMap[ 0x38f68000 ] = 2; - febIdToComponentMap[ 0x38080000 ] = 0; - febIdToComponentMap[ 0x395a8000 ] = 1; - febIdToComponentMap[ 0x3b9c0000 ] = 7; - febIdToComponentMap[ 0x3aad8000 ] = 5; - febIdToComponentMap[ 0x3a5e0000 ] = 6; - febIdToComponentMap[ 0x39200000 ] = 0; - febIdToComponentMap[ 0x38d08000 ] = 1; - febIdToComponentMap[ 0x38810000 ] = 1; - febIdToComponentMap[ 0x398b0000 ] = 1; - febIdToComponentMap[ 0x38bb8000 ] = 1; - febIdToComponentMap[ 0x3bc58000 ] = 6; - febIdToComponentMap[ 0x3a380000 ] = 4; - febIdToComponentMap[ 0x39e88000 ] = 1; - febIdToComponentMap[ 0x39990000 ] = 1; - febIdToComponentMap[ 0x39498000 ] = 1; - febIdToComponentMap[ 0x38fa0000 ] = 1; - febIdToComponentMap[ 0x38aa8000 ] = 1; - febIdToComponentMap[ 0x385b0000 ] = 1; - febIdToComponentMap[ 0x380b8000 ] = 1; - febIdToComponentMap[ 0x386c0000 ] = 3; - febIdToComponentMap[ 0x3b500000 ] = 5; - febIdToComponentMap[ 0x3b008000 ] = 5; - febIdToComponentMap[ 0x381c8000 ] = 3; - febIdToComponentMap[ 0x3a120000 ] = 5; - febIdToComponentMap[ 0x39c28000 ] = 1; - febIdToComponentMap[ 0x39730000 ] = 1; - febIdToComponentMap[ 0x39238000 ] = 1; - febIdToComponentMap[ 0x38d40000 ] = 3; - febIdToComponentMap[ 0x38848000 ] = 3; - febIdToComponentMap[ 0x384d0000 ] = 2; - febIdToComponentMap[ 0x3b2a0000 ] = 5; - febIdToComponentMap[ 0x3a8b0000 ] = 5; - febIdToComponentMap[ 0x3a3b8000 ] = 7; - febIdToComponentMap[ 0x39ec0000 ] = 3; - febIdToComponentMap[ 0x399c8000 ] = 3; - febIdToComponentMap[ 0x394d0000 ] = 2; - febIdToComponentMap[ 0x38fd8000 ] = 2; - febIdToComponentMap[ 0x38ae0000 ] = 2; - febIdToComponentMap[ 0x3b7d8000 ] = 5; - febIdToComponentMap[ 0x3b2e0000 ] = 6; - febIdToComponentMap[ 0x3ba30000 ] = 5; - febIdToComponentMap[ 0x3b538000 ] = 8; - febIdToComponentMap[ 0x3b040000 ] = 7; - febIdToComponentMap[ 0x3ab48000 ] = 8; - febIdToComponentMap[ 0x3a650000 ] = 6; - febIdToComponentMap[ 0x3a158000 ] = 5; - febIdToComponentMap[ 0x39c60000 ] = 2; - febIdToComponentMap[ 0x39768000 ] = 2; - febIdToComponentMap[ 0x38880000 ] = 0; - febIdToComponentMap[ 0x38388000 ] = 1; - febIdToComponentMap[ 0x385e8000 ] = 2; - febIdToComponentMap[ 0x3a950000 ] = 6; - febIdToComponentMap[ 0x3b7d0000 ] = 6; - febIdToComponentMap[ 0x3b2d8000 ] = 6; - febIdToComponentMap[ 0x39a00000 ] = 0; - febIdToComponentMap[ 0x39508000 ] = 1; - febIdToComponentMap[ 0x39010000 ] = 1; - febIdToComponentMap[ 0x38b18000 ] = 1; - febIdToComponentMap[ 0x38620000 ] = 1; - febIdToComponentMap[ 0x38128000 ] = 1; - febIdToComponentMap[ 0x38018000 ] = 1; - febIdToComponentMap[ 0x3a8b8000 ] = 7; - febIdToComponentMap[ 0x3ab80000 ] = 4; - febIdToComponentMap[ 0x3a688000 ] = 5; - febIdToComponentMap[ 0x39c98000 ] = 1; - febIdToComponentMap[ 0x397a0000 ] = 1; - febIdToComponentMap[ 0x392a8000 ] = 1; - febIdToComponentMap[ 0x38db0000 ] = 1; - febIdToComponentMap[ 0x388b8000 ] = 1; - febIdToComponentMap[ 0x383c0000 ] = 3; - febIdToComponentMap[ 0x39f00000 ] = 0; - febIdToComponentMap[ 0x3b808000 ] = 6; - febIdToComponentMap[ 0x3b310000 ] = 11; - febIdToComponentMap[ 0x39a08000 ] = 1; - febIdToComponentMap[ 0x3a920000 ] = 5; - febIdToComponentMap[ 0x3a428000 ] = 5; - febIdToComponentMap[ 0x39f30000 ] = 1; - febIdToComponentMap[ 0x39a38000 ] = 1; - febIdToComponentMap[ 0x39540000 ] = 3; - febIdToComponentMap[ 0x39048000 ] = 3; - febIdToComponentMap[ 0x38b50000 ] = 2; - febIdToComponentMap[ 0x38658000 ] = 2; - febIdToComponentMap[ 0x38160000 ] = 2; - febIdToComponentMap[ 0x39510000 ] = 1; - febIdToComponentMap[ 0x38718000 ] = 1; - febIdToComponentMap[ 0x3baa0000 ] = 5; - febIdToComponentMap[ 0x3b5a8000 ] = 5; - febIdToComponentMap[ 0x3b0b0000 ] = 5; - febIdToComponentMap[ 0x3abb8000 ] = 7; - febIdToComponentMap[ 0x3a6c0000 ] = 7; - febIdToComponentMap[ 0x3a1c8000 ] = 8; - febIdToComponentMap[ 0x39cd0000 ] = 2; - febIdToComponentMap[ 0x397d8000 ] = 2; - febIdToComponentMap[ 0x392e0000 ] = 2; - febIdToComponentMap[ 0x38de8000 ] = 2; - febIdToComponentMap[ 0x3a018000 ] = 5; - febIdToComponentMap[ 0x38b20000 ] = 1; - febIdToComponentMap[ 0x3b840000 ] = 8; - febIdToComponentMap[ 0x3b348000 ] = 12; - febIdToComponentMap[ 0x3a958000 ] = 6; - febIdToComponentMap[ 0x3a460000 ] = 6; - febIdToComponentMap[ 0x39f68000 ] = 2; - febIdToComponentMap[ 0x39080000 ] = 0; - febIdToComponentMap[ 0x38b88000 ] = 1; - febIdToComponentMap[ 0x38690000 ] = 1; - febIdToComponentMap[ 0x38198000 ] = 1; - febIdToComponentMap[ 0x38628000 ] = 1; - febIdToComponentMap[ 0x38e18000 ] = 1; - febIdToComponentMap[ 0x3bad8000 ] = 5; - febIdToComponentMap[ 0x3b5e0000 ] = 6; - febIdToComponentMap[ 0x3a200000 ] = 4; - febIdToComponentMap[ 0x39d08000 ] = 1; - febIdToComponentMap[ 0x39810000 ] = 1; - febIdToComponentMap[ 0x38130000 ] = 1; - febIdToComponentMap[ 0x38e20000 ] = 1; - febIdToComponentMap[ 0x38928000 ] = 1; - febIdToComponentMap[ 0x38430000 ] = 1; - febIdToComponentMap[ 0x3bc38000 ] = 7; - febIdToComponentMap[ 0x3b380000 ] = 4; - febIdToComponentMap[ 0x3a990000 ] = 5; - febIdToComponentMap[ 0x3a498000 ] = 6; - febIdToComponentMap[ 0x39fa0000 ] = 1; - febIdToComponentMap[ 0x39aa8000 ] = 1; - febIdToComponentMap[ 0x395b0000 ] = 1; - febIdToComponentMap[ 0x390b8000 ] = 1; - febIdToComponentMap[ 0x38bc0000 ] = 3; - febIdToComponentMap[ 0x386c8000 ] = 3; - febIdToComponentMap[ 0x381d0000 ] = 2; - febIdToComponentMap[ 0x3b740000 ] = 7; - febIdToComponentMap[ 0x39518000 ] = 1; - febIdToComponentMap[ 0x3b248000 ] = 6; - febIdToComponentMap[ 0x3b120000 ] = 5; - febIdToComponentMap[ 0x3ac28000 ] = 5; - febIdToComponentMap[ 0x3a730000 ] = 5; - febIdToComponentMap[ 0x3a238000 ] = 7; - febIdToComponentMap[ 0x39d40000 ] = 3; - febIdToComponentMap[ 0x39848000 ] = 3; - febIdToComponentMap[ 0x39350000 ] = 2; - febIdToComponentMap[ 0x38e58000 ] = 2; - febIdToComponentMap[ 0x38960000 ] = 2; - febIdToComponentMap[ 0x38468000 ] = 2; - febIdToComponentMap[ 0x38550000 ] = 2; - febIdToComponentMap[ 0x3b8b0000 ] = 5; - febIdToComponentMap[ 0x3b3b8000 ] = 7; - febIdToComponentMap[ 0x3a9c8000 ] = 6; - febIdToComponentMap[ 0x3a4d0000 ] = 6; - febIdToComponentMap[ 0x39fd8000 ] = 2; - febIdToComponentMap[ 0x39ae0000 ] = 2; - febIdToComponentMap[ 0x395e8000 ] = 2; - febIdToComponentMap[ 0x38700000 ] = 0; - febIdToComponentMap[ 0x38208000 ] = 1; - febIdToComponentMap[ 0x3b058000 ] = 6; - febIdToComponentMap[ 0x38360000 ] = 2; - febIdToComponentMap[ 0x3bb48000 ] = 8; - febIdToComponentMap[ 0x3b650000 ] = 6; - febIdToComponentMap[ 0x3b158000 ] = 5; - febIdToComponentMap[ 0x3ac60000 ] = 6; - febIdToComponentMap[ 0x39880000 ] = 0; - febIdToComponentMap[ 0x39388000 ] = 1; - febIdToComponentMap[ 0x38e90000 ] = 1; - febIdToComponentMap[ 0x38998000 ] = 1; - febIdToComponentMap[ 0x384a0000 ] = 1; - febIdToComponentMap[ 0x39e68000 ] = 2; - febIdToComponentMap[ 0x3aa00000 ] = 4; - febIdToComponentMap[ 0x3a508000 ] = 6; - febIdToComponentMap[ 0x3a010000 ] = 5; - febIdToComponentMap[ 0x3b170000 ] = 6; - febIdToComponentMap[ 0x39620000 ] = 1; - febIdToComponentMap[ 0x39128000 ] = 1; - febIdToComponentMap[ 0x38c30000 ] = 1; - febIdToComponentMap[ 0x38738000 ] = 1; - febIdToComponentMap[ 0x38240000 ] = 3; - febIdToComponentMap[ 0x3a318000 ] = 11; - febIdToComponentMap[ 0x3bb80000 ] = 4; - febIdToComponentMap[ 0x3b688000 ] = 5; - febIdToComponentMap[ 0x3a7a0000 ] = 5; - febIdToComponentMap[ 0x3a2a8000 ] = 5; - febIdToComponentMap[ 0x39db0000 ] = 1; - febIdToComponentMap[ 0x398b8000 ] = 1; - febIdToComponentMap[ 0x393c0000 ] = 3; - febIdToComponentMap[ 0x38ec8000 ] = 3; - febIdToComponentMap[ 0x389d0000 ] = 2; - febIdToComponentMap[ 0x384d8000 ] = 2; - febIdToComponentMap[ 0x38f80000 ] = 0; - febIdToComponentMap[ 0x38a88000 ] = 1; - febIdToComponentMap[ 0x3b920000 ] = 5; - febIdToComponentMap[ 0x3b428000 ] = 5; - febIdToComponentMap[ 0x3aa38000 ] = 7; - febIdToComponentMap[ 0x3a540000 ] = 8; - febIdToComponentMap[ 0x3a048000 ] = 6; - febIdToComponentMap[ 0x39b50000 ] = 2; - febIdToComponentMap[ 0x39658000 ] = 2; - febIdToComponentMap[ 0x39160000 ] = 2; - febIdToComponentMap[ 0x38c68000 ] = 2; - febIdToComponentMap[ 0x38590000 ] = 1; - febIdToComponentMap[ 0x3aa18000 ] = 5; - febIdToComponentMap[ 0x3bbb8000 ] = 7; - febIdToComponentMap[ 0x3b6c0000 ] = 7; - febIdToComponentMap[ 0x3b1c8000 ] = 8; - febIdToComponentMap[ 0x3a7d8000 ] = 5; - febIdToComponentMap[ 0x3a2e0000 ] = 6; - febIdToComponentMap[ 0x39de8000 ] = 2; - febIdToComponentMap[ 0x38f00000 ] = 0; - febIdToComponentMap[ 0x38a08000 ] = 1; - febIdToComponentMap[ 0x38510000 ] = 1; - febIdToComponentMap[ 0x38098000 ] = 1; - febIdToComponentMap[ 0x383a0000 ] = 1; - febIdToComponentMap[ 0x3b958000 ] = 6; - febIdToComponentMap[ 0x3b460000 ] = 6; - febIdToComponentMap[ 0x3a080000 ] = 4; - febIdToComponentMap[ 0x39b88000 ] = 1; - febIdToComponentMap[ 0x39690000 ] = 1; - febIdToComponentMap[ 0x39198000 ] = 1; - febIdToComponentMap[ 0x38ca0000 ] = 1; - febIdToComponentMap[ 0x387a8000 ] = 1; - febIdToComponentMap[ 0x382b0000 ] = 1; - febIdToComponentMap[ 0x3b6a8000 ] = 5; - febIdToComponentMap[ 0x3b118000 ] = 6; - febIdToComponentMap[ 0x3b200000 ] = 4; - febIdToComponentMap[ 0x3b9b0000 ] = 5; - febIdToComponentMap[ 0x39e20000 ] = 1; - febIdToComponentMap[ 0x39928000 ] = 1; - febIdToComponentMap[ 0x39430000 ] = 1; - febIdToComponentMap[ 0x38f38000 ] = 1; - febIdToComponentMap[ 0x38a40000 ] = 3; - febIdToComponentMap[ 0x38548000 ] = 3; - febIdToComponentMap[ 0x38050000 ] = 2; - febIdToComponentMap[ 0x3b4b8000 ] = 5; - febIdToComponentMap[ 0x3b990000 ] = 5; - febIdToComponentMap[ 0x3b498000 ] = 6; - febIdToComponentMap[ 0x3aaa8000 ] = 5; - febIdToComponentMap[ 0x3a5b0000 ] = 5; - febIdToComponentMap[ 0x3a0b8000 ] = 7; - febIdToComponentMap[ 0x39bc0000 ] = 3; - febIdToComponentMap[ 0x396c8000 ] = 3; - febIdToComponentMap[ 0x391d0000 ] = 2; - febIdToComponentMap[ 0x38cd8000 ] = 2; - febIdToComponentMap[ 0x387e0000 ] = 2; - febIdToComponentMap[ 0x382e8000 ] = 2; - febIdToComponentMap[ 0x3b7c0000 ] = 7; - febIdToComponentMap[ 0x3a2c8000 ] = 6; - febIdToComponentMap[ 0x3bc28000 ] = 5; - febIdToComponentMap[ 0x3b730000 ] = 5; - febIdToComponentMap[ 0x3b238000 ] = 7; - febIdToComponentMap[ 0x3a848000 ] = 8; - febIdToComponentMap[ 0x3a350000 ] = 12; - febIdToComponentMap[ 0x39e58000 ] = 2; - febIdToComponentMap[ 0x39960000 ] = 2; - febIdToComponentMap[ 0x39468000 ] = 2; - febIdToComponentMap[ 0x38580000 ] = 0; - febIdToComponentMap[ 0x38088000 ] = 1; - febIdToComponentMap[ 0x39dd0000 ] = 2; - febIdToComponentMap[ 0x3b9c8000 ] = 6; - febIdToComponentMap[ 0x3b4d0000 ] = 6; - febIdToComponentMap[ 0x3aae0000 ] = 7; - febIdToComponentMap[ 0x39700000 ] = 0; - febIdToComponentMap[ 0x39208000 ] = 1; - febIdToComponentMap[ 0x38d10000 ] = 1; - febIdToComponentMap[ 0x398d8000 ] = 2; - febIdToComponentMap[ 0x38320000 ] = 1; - febIdToComponentMap[ 0x393e0000 ] = 2; - febIdToComponentMap[ 0x3bc60000 ] = 6; - febIdToComponentMap[ 0x3a880000 ] = 4; - febIdToComponentMap[ 0x3a388000 ] = 5; - febIdToComponentMap[ 0x39e90000 ] = 1; - febIdToComponentMap[ 0x39998000 ] = 1; - febIdToComponentMap[ 0x394a0000 ] = 1; - febIdToComponentMap[ 0x38fa8000 ] = 1; - febIdToComponentMap[ 0x38ab0000 ] = 1; - febIdToComponentMap[ 0x385b8000 ] = 1; - febIdToComponentMap[ 0x380c0000 ] = 3; - febIdToComponentMap[ 0x38ee8000 ] = 2; - febIdToComponentMap[ 0x3ba00000 ] = 4; - febIdToComponentMap[ 0x3b508000 ] = 6; - febIdToComponentMap[ 0x3b010000 ] = 5; - febIdToComponentMap[ 0x3a620000 ] = 5; - febIdToComponentMap[ 0x3a128000 ] = 5; - febIdToComponentMap[ 0x39c30000 ] = 1; - febIdToComponentMap[ 0x39738000 ] = 1; - febIdToComponentMap[ 0x39240000 ] = 3; - febIdToComponentMap[ 0x38d48000 ] = 3; - febIdToComponentMap[ 0x38850000 ] = 2; - febIdToComponentMap[ 0x38358000 ] = 2; - - return febIdToComponentMap; -} - - -static const std::map<int,unsigned char> febIdToComponentMap = fillMap(); - diff --git a/Trigger/TrigAlgorithms/TrigT2CaloCommon/TrigT2CaloCommon/IAlgToolCalo.h b/Trigger/TrigAlgorithms/TrigT2CaloCommon/TrigT2CaloCommon/IAlgToolCalo.h deleted file mode 100644 index 87555b7ca568..000000000000 --- a/Trigger/TrigAlgorithms/TrigT2CaloCommon/TrigT2CaloCommon/IAlgToolCalo.h +++ /dev/null @@ -1,230 +0,0 @@ -/* - Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration -*/ - -/******************************************************************** - - NAME: IAlgToolCalo.h - PACKAGE: Trigger/TrigAlgorithms/TrigT2CaloCommon - - AUTHOR: M.P. Casado - - PURPOSE: Serve as a basis for the TrigT2Calo Tools - providing some commom framework basis, like - data access via appropriated pointers and - ByteStream converter objects. Also, time - measurement items. - KNOWTOINHERIT : TrigT2CaloEgamma/EgammaSamp2Fex, - EgammaSamp1Fex, EgammaEmEnFex, EgammaHadEnFex - TrigT2CaloTau/TauSamp2Fex,TauSamp1Fex, - TauEmEnFex,TauHadEnFex - *******************************************************************/ - -#ifndef TRIGT2CALOCOMMON_IALGTOOLCALO_H -#define TRIGT2CALOCOMMON_IALGTOOLCALO_H - -#include "GaudiKernel/IAlgTool.h" -#include "AthenaBaseComps/AthAlgTool.h" -#include "GaudiKernel/ToolHandle.h" -#include "GaudiKernel/ServiceHandle.h" - -#include "CaloIdentifier/CaloIdManager.h" -#include "TrigTimeAlgs/TrigTimerSvc.h" - -#include "TileByteStream/TileCellCont.h" -#include "TrigT2CaloCommon/LArCellCont.h" -#include "Identifier/IdentifierHash.h" -#include "LArRawUtils/LArTT_Selector.h" - -#include "LArRecEvent/LArCellCollection.h" - -#include "TileEvent/TileCell.h" - -#include "TrigT2CaloCommon/T2GeometryTool.h" -#include "TrigT2CaloCommon/T2Calibration.h" -#include "TrigT2CaloCommon/ITrigDataAccess.h" -#include "TrigT2CaloCommon/ITrigCaloDataAccessSvc.h" -#include "CaloGeoHelpers/CaloSampling.h" -#include "xAODTrigCalo/TrigEMCluster.h" - -#include "TrigSteeringEvent/Enums.h" - -#include "CxxUtils/checker_macros.h" -ATLAS_NO_CHECK_FILE_THREAD_SAFETY; // legacy trigger code - -//class TrigEMCluster; -class TrigTauCluster; -class T2CaloConfig; -class EventContext; - -static const InterfaceID IID_IAlgToolCalo("IAlgToolCalo",1,0); - -static const CaloDetDescrElement* caloDDENull(nullptr); - -/** Base Class for Tools used for Egamma and Tau Feature - Extraction Algorithms */ -class IAlgToolCalo: public virtual IAlgTool, - public AthAlgTool { - public: - /** Constructor */ - IAlgToolCalo(const std::string & type, const std::string & name, - const IInterface* parent) : AthAlgTool(type,name,parent), - m_timersvc("TrigTimerSvc","IAlgToolCalo"), - m_geometryTool("T2GeometryTool/T2GeometryTool", this ), - m_data("TrigDataAccess/TrigDataAccess"), - m_caloDDE(0), m_cellkeepthr(1e5) { - declareInterface<IAlgToolCalo>(this); - declareProperty("SaveCellsInContainer",m_saveCells=false,"Enables saving of the RoI Calorimeter Cells in StoreGate"); - declareProperty("TrigTimerSvc",m_timersvc,"Trigger Timer Service for benchmarking algorithms"); - declareProperty("T2GeometryTool",m_geometryTool, - "Tool to check that a cells are contained in a given cluster - for different cluster sizes"); - declareProperty("trigDataAccess",m_data,"Data Access for LVL2 Calo Algorithms"); - declareProperty("ThresholdKeepCells",m_cellkeepthr,"Threshold to keep cells into container"); - if ( caloDDENull != nullptr ) return; - } - /** Destructor */ - virtual ~IAlgToolCalo() { } - /** Interface ID for a virtual class */ - static const InterfaceID& interfaceID(); - - - /** The same function should initialize all Tools. - It will also provide stardard timers for all tools */ - StatusCode initialize(); - /** Finalize method */ - StatusCode finalize(); - /** @brief This is the execute method for Egamma Algorithms. These - * interface must be common to allow all tools to be called - * within T2CaloEgamma::hltExecute as a vector of IAlgToolCalos. - * @param[out] ptrigEMCluster : cluster to be filled with FEX results. - * @param[in] eta/phi-min/max : limits of RoI. - */ - - virtual StatusCode execute(xAOD::TrigEMCluster& /*ptrigEMCluster*/, - const IRoiDescriptor& /*roi*/, - const CaloDetDescrElement*& /*caloDDE*/) {return StatusCode::SUCCESS;} - - /// obsolete - virtual StatusCode execute(xAOD::TrigEMCluster& /*ptrigEMCluster*/ - , double /*etamin*/, double /*etamax*/, double /*phimin*/ - , double /*phimax*/){return StatusCode::SUCCESS;} - /** @brief This is the execute method for Tau Algorithms. These - * interface must be common to allow all tools to be called - * within T2CaloTau::hltExecute as a vector of IAlgToolCalos. - * @param[out] ptrigTauCluster : cluster to be filled with FEX results. - * @param[in] eta/phi-min/max : limits of RoI. - */ - virtual HLT::ErrorCode execute(TrigTauCluster& /*ptrigTauCluster*/, - const IRoiDescriptor& /*roi*/, - const CaloDetDescrElement*& /*caloDDE*/ - ) {return HLT::OK;} - - /// obsolete - virtual HLT::ErrorCode execute(TrigTauCluster& /*ptrigTauCluster*/ - ,double /*etamin*/, double /*etamax*/, double /*phimin*/ - ,double /*phimax*/, double /*RoIeta*/, double /*RoIphi*/) - {return HLT::OK;} - /** Expose error for a given IAlgToolCalo */ - uint32_t report_error() const { return m_error; }; - - /** enumerate tau-specific errors */ - enum TAUCLUSTERROR{ - FAILPRESEED=31, - FAILSEED=30, - HADS1E0=11, - HADS2E0=10, - HADS3E0=9, - EMS0E0=15, - EMS1E0=14, - EMS2E0=13, - EMS3E0=12 - }; - - /** Sets the pointer of the cell container */ - void setCellContainerPointer(CaloCellContainer** p ) - { m_CaloCellContPoint = p; } - - protected: - - /** methods to manage error bit inside the tools: general and tau-specific */ - void SetClusterError(unsigned int bit) { m_error |= (0x1<<bit); } - void ClearClusterError(unsigned int bit) { m_error &= ~(0x1<<bit); } - void SetClusterError(TAUCLUSTERROR biterr) { SetClusterError((unsigned int)biterr); } - void ClearClusterError(TAUCLUSTERROR biterr) { ClearClusterError((unsigned int)biterr); } - - -#ifndef NDEBUG - /** Very useful function to check about the Cluster structure. - It prints out a grid of cells eta and phi positions and energies. - Only exist in DEBUG versions of the code. */ - void PrintCluster(const double energyFromAlg, const int nCaloType,const int nCaloSamp, - const CaloSampling::CaloSample, const CaloSampling::CaloSample ); -#endif - /** Store All Calorimeter Cells in RoI in an StoreGate Container. */ - void storeCells(void); - - /** iterators to LArCells. To be used when online - LArCellCont (fast ByteStream Decoder) are to be used. - Used as input for TrigDataAccess::LoadCollections */ - LArTT_Selector<LArCellCont>::const_iterator m_iBegin; - LArTT_Selector<LArCellCont>::const_iterator m_iEnd; - LArTT_Selector<LArCellCont>::const_iterator m_it; - /** iterators to TileCells. To be used when on/offline - TileCellCont/IDC (fast/slow ByteStream Decoder) are to be used. - Used as input for TrigDataAccess::LoadCollections */ - TileCellCollection::const_iterator m_itBegin; - TileCellCollection::const_iterator m_itEnd; - TileCellCollection::const_iterator m_itt; - - /** DataHandle to TrigTimerSvc */ - ServiceHandle<ITrigTimerSvc> m_timersvc; - /** Timing measure items in all IAlgToolCalos. - m_timer[0] is the complete exec timer. m_timer[1] is the - Region Selector timer, m_timer[2] is the LoadCollection - timer (Data Preparation), m_timer[3] is the real algorithmic - timer and m_timer[4] is the saving data (to TrigCaloEvent - object) timer. */ - TrigTimer* m_timer[5]; - - /** Objects will need T2Calibration. So far, a given tool will - not need more than one of such objects. */ - T2Calibration *m_calib; - /** Input objects to calibration. This will be changed in such - a way the the calibration tool will have to know alone about - such properties. */ - std::vector<float> m_limit; - std::vector<int> m_dimension; - std::vector<float> m_correction; - - /** Objects will need T2GeometryTool (maybe two instances - for EmEn and three for HadEn - to be studied) */ - ToolHandle<IT2GeometryTool> m_geometryTool; - /** Object that provides data access in a Region of - Interest. See TrigDataAccess for more details. */ - ToolHandle<ITrigDataAccess> m_data; - /** Calorimeter Id Manager for calorimeter part - determination (Barrel versus EndCap) */ - const CaloIdManager* m_larMgr = nullptr; - /** (don't by default) Save Calorimeter Cells in StoreGate - for a posteriori analysis */ - bool m_saveCells; - /** Pointer of the cell container */ - CaloCellContainer** m_CaloCellContPoint; - // Objects that the Tools should not worry about - protected: - bool m_lardecoded, m_tiledecoded; - /** error control */ - uint32_t m_error; - /** caloDDE (of the cluster 2nd layer hottest cell) */ - const CaloDetDescrElement* m_caloDDE; - /** Threshold to keep cells in RoI */ - float m_cellkeepthr; - private: -}; - -inline const InterfaceID& IAlgToolCalo::interfaceID() -{ - return IID_IAlgToolCalo; -} - -#endif diff --git a/Trigger/TrigAlgorithms/TrigT2CaloCommon/TrigT2CaloCommon/T2CaloBase.h b/Trigger/TrigAlgorithms/TrigT2CaloCommon/TrigT2CaloCommon/T2CaloBase.h deleted file mode 100644 index 201ae9f1171b..000000000000 --- a/Trigger/TrigAlgorithms/TrigT2CaloCommon/TrigT2CaloCommon/T2CaloBase.h +++ /dev/null @@ -1,93 +0,0 @@ -/* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration -*/ - -/******************************************************************** - - NAME: T2Calo.h - PACKAGE: Trigger/TrigAlgorithms/TrigT2CaloCommon - - AUTHOR: M.P. Casado - - PURPOSE: This is the common base for T2CaloEgamma and T2CaloTau - algorithm. It interfaces with LVL1 to fetch Region of - Interest position, builds the LVL2 output cell cluster - and calls the execute method of the IAlgToolCalos which - will build the cluster properties (feature extraction). - *******************************************************************/ - -#ifndef TRIGT2CALOCOMMON_T2CALOBASE_H -#define TRIGT2CALOCOMMON_T2CALOBASE_H - -#include <string> -#include "TrigInterfaces/FexAlgo.h" -#include "TrigTimeAlgs/TrigTimerSvc.h" -#include "TrigT2CaloCommon/IAlgToolCalo.h" -#include "TrigT2CaloCommon/T2CaloConfig.h" -#include "GaudiKernel/ToolHandle.h" - -class ITrigDataAccess; - -/**T2CaloBase class definition. This is an HLT::FexAlgo */ -class T2CaloBase: public HLT::FexAlgo { - enum { MaxNumberTools = 10 }; - - public: - /** Constructor of this HLT Algorithm */ - T2CaloBase(const std::string & name, ISvcLocator* pSvcLocator); - /** Destructor */ - virtual ~T2CaloBase(); - - /** Initialize method. Tools are loaded for FEX. */ - StatusCode initialize(); - /** Finalize method. */ - StatusCode finalize(); - - /** Prepare ROB requests */ - using HLT::FexAlgo::prepareRobRequests; - HLT::ErrorCode prepareRobRequests(const HLT::TriggerElement* inputTE ); - - /* - int EtaPhiRange(const int nCaloType, const int nCaloSamp, const int nStripEta, const int nStripPhi, const double energyEta, const double energyPhi, double *CellEtaMin, double *CellEtaMax, double *CellPhiMin, double *CellPhiMax); - */ - - protected: - - /** Eta width of Region of Interest. Should be 0.2 for EGamma. */ - double m_etaWidth; - /** Phi width of Region of Interest. Should be 0.2 for EGamma. */ - double m_phiWidth; - /** Eta width of Region of Interest for ID. Should be 0.1 for EGamma. */ - double m_etaWidthForID; - /** Phi width of Region of Interest for ID. Should be 0.1 for EGamma. */ - double m_phiWidthForID; - - /** Name of the Total Algorithm timer item. */ - std::string m_timerString; - std::string m_paramSet; - std::string m_triggerType; - - /** Array of IAlgToolCalo Handles. These ones build the cluster - properties. */ - ToolHandleArray<IAlgToolCalo> m_emAlgTools; - ToolHandle<ITrigDataAccess> m_data; - - /** Time Service Handle */ - ServiceHandle<ITrigTimerSvc> m_timersvc; - /** Timer Items for the main algorithms. */ - TrigTimer* m_timer[2]; - - /** Some variables for RegionSelector specification */ - double m_roiEtaLimit; - double m_fcalEtaMin; - double m_fcalEtaMax; - - /** vector to keep track of ROBs to be requested */ - std::vector<uint32_t> m_vec_robs; - - /** whether to use standard, or composite roi **/ - bool m_useCompositeRoi; - -}; - -#endif diff --git a/Trigger/TrigAlgorithms/TrigT2CaloCommon/python/TrigT2CaloCommonConfig.py b/Trigger/TrigAlgorithms/TrigT2CaloCommon/python/TrigT2CaloCommonConfig.py index 43d44eb02c02..3f2e66c5f5db 100644 --- a/Trigger/TrigAlgorithms/TrigT2CaloCommon/python/TrigT2CaloCommonConfig.py +++ b/Trigger/TrigAlgorithms/TrigT2CaloCommon/python/TrigT2CaloCommonConfig.py @@ -1,35 +1,7 @@ # Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration -from TrigT2CaloCommon.TrigT2CaloCommonConf import TrigDataAccess as _TrigDataAccess from TrigT2CaloCommon.TrigT2CaloCommonConf import TrigCaloDataAccessSvc as _TrigCaloDataAccessSvc -class TrigDataAccess(_TrigDataAccess): - __slots__ = () - - def __init__(self, name='TrigDataAccess'): - super(TrigDataAccess, self).__init__(name) - - from AthenaCommon.AppMgr import ServiceMgr as svcMgr - from TriggerJobOpts.TriggerFlags import TriggerFlags - from AthenaCommon.GlobalFlags import globalflags - from AthenaCommon.Logging import logging - log = logging.getLogger(name) - - self.loadFullCollections = TriggerFlags.doHLT() - self.loadAllSamplings = TriggerFlags.doHLT() - log.info('Not possible anymore to enable HLT calo offset correction, tools deprecated') - - from RecExConfig.RecFlags import rec - transientBS = (rec.readRDO() and not globalflags.InputFormat()=='bytestream') - if ( transientBS or TriggerFlags.doTransientByteStream() ): - if ( not hasattr(svcMgr.ToolSvc,'LArRawDataContByteStreamTool') ): - from LArByteStream.LArByteStreamConfig import LArRawDataContByteStreamToolConfig - svcMgr.ToolSvc += LArRawDataContByteStreamToolConfig() - svcMgr.ToolSvc.LArRawDataContByteStreamTool.DSPRunMode=4 - svcMgr.ToolSvc.LArRawDataContByteStreamTool.RodBlockVersion=10 - - return - class TrigCaloDataAccessSvc(_TrigCaloDataAccessSvc): __slots__ = () diff --git a/Trigger/TrigAlgorithms/TrigT2CaloCommon/src/IAlgToolCalo.cxx b/Trigger/TrigAlgorithms/TrigT2CaloCommon/src/IAlgToolCalo.cxx deleted file mode 100644 index a66c17282f33..000000000000 --- a/Trigger/TrigAlgorithms/TrigT2CaloCommon/src/IAlgToolCalo.cxx +++ /dev/null @@ -1,408 +0,0 @@ -/* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration -*/ - - -// ******************************************************************** -// -// NAME: IAlgToolCalo.cxx -// PACKAGE: Trigger/TrigAlgorithms/TrigT2CaloCommon -// -// AUTHOR: Denis Oliveira Damazio -// -// REFERENCES: This will provide infrastructure for the Tools -// to perform their algorithms -// -// ******************************************************************** - -#include "GaudiKernel/MsgStream.h" -#include "CaloIdentifier/LArEM_ID.h" -#include "LArRecEvent/LArCell.h" - -#include "CaloIdentifier/LArEM_ID.h" -//#include "TrigCaloEvent/TrigEMCluster.h" -#include "xAODTrigCalo/TrigEMCluster.h" -#include "CaloGeoHelpers/CaloSampling.h" -#include "CaloEvent/CaloCellContainer.h" - -#include "TrigT2CaloCommon/IAlgToolCalo.h" -#include "TrigInterfaces/FexAlgo.h" - - -// Initialize method for all tools -// Retrieval of all Tools to be used during run -StatusCode IAlgToolCalo::initialize() -{ - ATH_MSG_DEBUG("in initialize() by IAlgToolCalo"); - - ATH_CHECK( detStore()->retrieve(m_larMgr) ); - if ( !m_data.empty() ) ATH_CHECK( m_data.retrieve() ); - ATH_CHECK( m_geometryTool.retrieve() ); - - // Initialize timing service in order to perform some measures - // of performance - if( !m_timersvc.empty() && m_timersvc.retrieve().isFailure() ) { - ATH_MSG_WARNING( name() << - ": Unable to locate TrigTimer Service" ); - // Does not need to fail the Algorithm if no timing service is found - } // End of if timing service - // Initialize four timers for RegionSelector, ByteStreamCnv, - // Algorithm time, Saving EMShowerMinimal - if (!m_timersvc.empty()) { - if ( name().find("Fex",0) == std::string::npos) - ATH_MSG_WARNING( " Name of Alg not found" ); - else { - std::string basename(name().substr(6,1)+name().substr(name().find("Fex",0)-5,5)); - //basename+=(name().substr(6,1)+name().substr(name().find("Fex",0)-5,5)); - ATH_MSG_INFO( "BaseName is : " << basename ); - HLT::FexAlgo *p = dynamic_cast<HLT::FexAlgo*>(const_cast<IInterface*>(parent())); - /* - m_timer[0] = m_timersvc->addItem(basename+"Total"); - m_timer[1] = m_timersvc->addItem(basename+"RegSel"); - m_timer[2] = m_timersvc->addItem(basename+"BSCnv"); - m_timer[3] = m_timersvc->addItem(basename+"Algor"); - m_timer[4] = m_timersvc->addItem(basename+"SaveEM"); - */ - std::string Total((basename+"Total")); - m_timer[0] = p->addTimer(Total); - std::string RegSel((basename+"RegSel")); - m_timer[1] = p->addTimer(RegSel); - std::string BSCnv((basename+"BSCnv")); - m_timer[2] = p->addTimer(BSCnv); - std::string Algor((basename+"Algor")); - m_timer[3] = p->addTimer(Algor); - std::string SaveEM((basename+"SaveEM")); - m_timer[4] = p->addTimer(SaveEM); - } // End of check for Fex - } // End of if timing service - - // Calibration object initialization - if ( m_limit.size() != 0 ){ - m_calib->initialize(m_limit,m_dimension,m_correction); - } - m_lardecoded=true; - m_tiledecoded=true; - - return StatusCode::SUCCESS; -} // End of initialize - -// Finalize method for all tools -// nothing realy important done here -StatusCode IAlgToolCalo::finalize(){ - ATH_MSG_DEBUG( "in finalize() by IAlgToolCalo" ); - return StatusCode::SUCCESS; -} // End of finalize - -#ifndef NDEBUG -//#define EXTRADEBUG -// Method designed by Tomek Kott. This method -// Loops over cells and try to find out about their energy -// Then it prints out a cluster view for debugging purposes. -#ifdef EXTRADEBUG -# define ARG(x) x -#else -# define ARG(x) -#endif - -void IAlgToolCalo::PrintCluster(const double ARG(energyFromAlg), - const int ARG(nCaloType), - const int ARG(nCaloSamp), - CaloSampling::CaloSample ARG(SAMP1), - CaloSampling::CaloSample ARG(SAMP2) ) -#undef ARG -{ -#ifdef EXTRADEBUG - - int CaloTech = -1 ; // 0 for LAr | 1 for Tile; - std::string Samp1_str; - std::string Samp2_str; - - - std::list<double> phiInfo; - std::list<double> etaInfo; - - std::list<double>::const_iterator phi_it; - std::list<double>::const_iterator eta_it; - - if ( ( SAMP1 == CaloSampling::PreSamplerB || SAMP1 == CaloSampling::EMB1 || - SAMP1 == CaloSampling::EMB2 || SAMP1 == CaloSampling::EMB3 || - SAMP1 == CaloSampling::PreSamplerE || SAMP1 == CaloSampling::EME1 || - SAMP1 == CaloSampling::EME2 || SAMP1 == CaloSampling::EME3 || - SAMP1 == CaloSampling::HEC0 || SAMP1 == CaloSampling::HEC1 || - SAMP1 == CaloSampling::HEC2 ) && - ( SAMP2 == CaloSampling::PreSamplerB || SAMP2 == CaloSampling::EMB1 || - SAMP2 == CaloSampling::EMB2 || SAMP2 == CaloSampling::EMB3 || - SAMP2 == CaloSampling::PreSamplerE || SAMP2 == CaloSampling::EME1 || - SAMP2 == CaloSampling::EME2 || SAMP2 == CaloSampling::EME3 || - SAMP2 == CaloSampling::HEC0 || SAMP2 == CaloSampling::HEC1 || - SAMP2 == CaloSampling::HEC2 ) ) { - - CaloTech = 0; - if ( SAMP1 == CaloSampling::PreSamplerB ) - Samp1_str="PreSamplerB"; - else if ( SAMP1 == CaloSampling::EMB1 ) - Samp1_str="EMB1"; - else if ( SAMP1 == CaloSampling::EMB2 ) - Samp1_str="EMB2"; - else if ( SAMP1 == CaloSampling::EMB3 ) - Samp1_str="EMB3"; - else if ( SAMP1 == CaloSampling::EME1 ) - Samp1_str="EME1"; - else if ( SAMP1 == CaloSampling::EME2 ) - Samp1_str="EME2"; - else if ( SAMP1 == CaloSampling::EME3 ) - Samp1_str="EME3"; - else if ( SAMP1 == CaloSampling::HEC0 ) - Samp1_str="HEC0"; - else if ( SAMP1 == CaloSampling::HEC1 ) - Samp1_str="HEC1"; - else if ( SAMP1 == CaloSampling::HEC2 ) - Samp1_str="HEC2"; - - if ( SAMP2 == CaloSampling::PreSamplerB ) - Samp2_str="PreSamplerB"; - else if ( SAMP2 == CaloSampling::EMB1 ) - Samp2_str="EMB1"; - else if ( SAMP2 == CaloSampling::EMB2 ) - Samp2_str="EMB2"; - else if ( SAMP2 == CaloSampling::EMB3 ) - Samp2_str="EMB3"; - else if ( SAMP2 == CaloSampling::EME1 ) - Samp2_str="EME1"; - else if ( SAMP2 == CaloSampling::EME2 ) - Samp2_str="EME2"; - else if ( SAMP2 == CaloSampling::EME3 ) - Samp2_str="EME3"; - else if ( SAMP2 == CaloSampling::HEC0 ) - Samp2_str="HEC0"; - else if ( SAMP2 == CaloSampling::HEC1 ) - Samp2_str="HEC1"; - else if ( SAMP2 == CaloSampling::HEC2 ) - Samp2_str="HEC2"; - - } - else if ((SAMP1 == CaloSampling::TileBar0 || SAMP1 == CaloSampling::TileExt0|| - SAMP1 == CaloSampling::TileBar1 || SAMP1 == CaloSampling::TileExt1 || - SAMP1 == CaloSampling::TileBar2 || SAMP1 == CaloSampling::TileExt2 ) && - ( SAMP2 == CaloSampling::TileBar0 ||SAMP2 == CaloSampling::TileExt0 || - SAMP2 == CaloSampling::TileBar1 ||SAMP2 == CaloSampling::TileExt1 || - SAMP2 == CaloSampling::TileBar2 ||SAMP2 == CaloSampling::TileExt2 ) ) { - - CaloTech = 1; - if ( SAMP1 == CaloSampling::TileBar0 ) - Samp1_str="TileBar0"; - else if ( SAMP1 == CaloSampling::TileBar1 ) - Samp1_str="TileBar1"; - else if ( SAMP1 == CaloSampling::TileBar2 ) - Samp1_str="TileBar2"; - else if ( SAMP1 == CaloSampling::TileExt0 ) - Samp1_str="TileExt0"; - else if ( SAMP1 == CaloSampling::TileExt1 ) - Samp1_str="TileExt1"; - else if ( SAMP1 == CaloSampling::TileExt2 ) - Samp1_str="TileExt2"; - - if ( SAMP2 == CaloSampling::TileBar0 ) - Samp2_str="TileBar0"; - else if ( SAMP2 == CaloSampling::TileBar1 ) - Samp2_str="TileBar1"; - else if ( SAMP2 == CaloSampling::TileBar2 ) - Samp2_str="TileBar2"; - else if ( SAMP2 == CaloSampling::TileExt0 ) - Samp2_str="TileExt0"; - else if ( SAMP2 == CaloSampling::TileExt1 ) - Samp2_str="TileExt1"; - else if ( SAMP2 == CaloSampling::TileExt2 ) - Samp2_str="TileExt2"; - } - - if ( CaloTech == 0 ) - { - for ( m_it = m_iBegin; m_it != m_iEnd; ++m_it) { - if ( - (CaloSampling::getSampling(*(*m_it)) == SAMP1|| - CaloSampling::getSampling(*(*m_it)) == SAMP2) ){//If for Det. Description - - double etaCell = (*m_it)->eta(); - double phiCell = (*m_it)->phi(); - if( m_geometryTool->CellInWidCluster(nCaloType, - nCaloSamp,etaCell,phiCell) ) { - bool phiDouble=false, etaDouble=false; - for(phi_it = phiInfo.begin(); phi_it != phiInfo.end(); phi_it++) { - if( floorf(1e4*(*phi_it)) == floorf(1e4*phiCell) ) { - phiDouble = true; - break; - } - } - if(phiDouble == false) { - phiInfo.push_back( phiCell ); - } - for(eta_it = etaInfo.begin(); eta_it != etaInfo.end(); eta_it++) { - if( floorf(1e4*(*eta_it)) == floorf(1e4*etaCell )) { - etaDouble = true; - break; - } - } - if(etaDouble == false) { - etaInfo.push_back( etaCell ); - } - } // end of if phi/eta within bounds - } // End of if Det. Description - }// end for iterators - } // end if EM samp - else if ( CaloTech == 1 ) - { - - for (unsigned int iR=0;iR< m_data->TileContSize();iR++) { - - // For the first sample you will create the containers - // For the others no - if ( m_data->LoadCollections(m_itBegin,m_itEnd,iR,!iR).isFailure() ) { - std::cout << "ERROR loading tile collections." << std::endl; - return; - } - for ( m_itt = m_itBegin; m_itt != m_itEnd; ++m_itt) { - - if ( CaloSampling::getSampling(*(*m_itt)) == SAMP1|| - CaloSampling::getSampling(*(*m_itt)) == SAMP2 ){//If for Det. Description - double etaCell = (*m_itt)->eta(); - double phiCell = (*m_itt)->phi(); - if( m_geometryTool->CellInWidCluster(nCaloType,nCaloSamp,etaCell,phiCell) ) { - bool phiDouble=false, etaDouble=false; - for(phi_it = phiInfo.begin(); phi_it != phiInfo.end(); phi_it++) { - if( floorf(1e4*(*phi_it)) == floorf(1e4*phiCell) ) { - phiDouble = true; - break; - } - } - if(phiDouble == false) { - phiInfo.push_back( phiCell ); - } - for(eta_it = etaInfo.begin(); eta_it != etaInfo.end(); eta_it++) { - if( floorf(1e4*(*eta_it)) == floorf(1e4*etaCell )) { - etaDouble = true; - break; - } - } - if(etaDouble == false) { - etaInfo.push_back( etaCell ); - } - } // end of if phi/eta within bounds - } // End of if Det. Description - }// end for iterators - }// end loop tile colletions - } // end if HAD samp - else - { - std::cout << "Incompatible choice of SAMP1= " << SAMP1 << " and SAMP2 = "<< SAMP2 << std::endl; - return; - } - - phiInfo.sort(); - etaInfo.sort(); - - std::cout << "\n" << name() << " for " << Samp1_str << " and " << Samp2_str - << std::endl; - std::cout << "\nphiInfo size: " << phiInfo.size() - << ", etaInfo size: " << etaInfo.size() - << " Energy total value : " << energyFromAlg - << "\nphiInfo and etaInfo are populated by: " - << "(Energy values expressed in MeV)"; - - std::cout << "\n" << std::setw(9) << "phi/eta |"; - for (eta_it = etaInfo.begin(); eta_it != etaInfo.end(); eta_it++) - std::cout << std::setw(7) << *eta_it << "|"; - std::cout << "\n"; - for (phi_it = phiInfo.begin(); phi_it != phiInfo.end(); phi_it++) { - std::cout << std::setw(7) << *phi_it << " |"; - for (eta_it = etaInfo.begin(); eta_it != etaInfo.end(); eta_it++) { - double Energy=0.; - if ( CaloTech == 0 ) { - for ( m_it = m_iBegin; m_it != m_iEnd; ++m_it) { - if ( (CaloSampling::getSampling(*(*m_it)) == SAMP1|| - CaloSampling::getSampling(*(*m_it)) == SAMP2) ) {//If for Det. Description - - if ( floorf(1e4*(*phi_it)) == floorf(1e4* ((*m_it)->phi()) ) && - floorf(1e4*(*eta_it)) == floorf(1e4* ((*m_it)->eta()) )) { - Energy += (*m_it)->energy(); - } - } // End of if Det. Description - }// end for iterators - } - else if (CaloTech == 1 ) { - for (unsigned int iR=0;iR< m_data->TileContSize();iR++) { - - // For the first sample you will create the containers - // For the others no - if ( m_data->LoadCollections(m_itBegin,m_itEnd,iR,!iR).isFailure() ) { - std::cout << "ERROR loading tile collections." << std::endl; - return; - } - - for ( m_itt = m_itBegin; m_itt != m_itEnd; ++m_itt) { - if ( (CaloSampling::getSampling(*(*m_itt)) == SAMP1|| - CaloSampling::getSampling(*(*m_itt)) == SAMP2) ) {//If for Det. Description - - if ( floorf(1e4*(*phi_it)) == floorf(1e4* ((*m_itt)->phi()) ) && - floorf(1e4*(*eta_it)) == floorf(1e4* ((*m_itt)->eta()) )) { - Energy += (*m_itt)->energy(); - } - } // End of if Det. Description - }// end for iterators - }//end loop tile collections - } - std::cout << std::setw(7) << (int)floorf(Energy) << "|"; - } // end of for etaInfo - std::cout << "\n"; - } // end of for phiInfo -#endif // End of if EXTRADEBUG -return; -} // End of PrintCluster - -#endif - -// very loose implementation. No worry about time performance -void IAlgToolCalo::storeCells( void ) { - - CaloCellContainer * ContainerLAr; - CaloCellContainer * ContainerTile; - if ( evtStore()->contains<CaloCellContainer>("RoILArCells") ) { - ATH_MSG_DEBUG("Found Container, will retrieve it"); - if ( evtStore()->retrieve(ContainerLAr,"RoILArCells").isFailure() ){ - ATH_MSG_DEBUG("Could not retrieve container : RoILarCells"); - } - } else { - ATH_MSG_DEBUG("Creating Container RoILArCells"); - ContainerLAr = new CaloCellContainer(); - - if ( evtStore()->record(ContainerLAr,"RoILArCells").isFailure() ){ - ATH_MSG_ERROR("Error! Could not store Container"); - } - } // End of if contains - if ( evtStore()->contains<CaloCellContainer>("RoITileCells") ) { - ATH_MSG_DEBUG("Found Container, will retrieve it"); - if ( evtStore()->retrieve(ContainerTile,"RoITileCells").isFailure() ){ - ATH_MSG_DEBUG("Could not retrieve container : RoITileCells"); - } - } else { - ATH_MSG_DEBUG("Creating Container RoITileCells"); - ContainerTile = new CaloCellContainer(); - if ( evtStore()->record(ContainerTile,"RoITileCells").isFailure() ){ - ATH_MSG_ERROR("Could not store Container"); - } - } // End of if retrieve - // Now I have a LAr container - if ( m_lardecoded ) - for ( m_it = m_iBegin; m_it != m_iEnd; ++m_it) { - CaloCell* larcell = (CaloCell*)(*m_it)->clone(); - ContainerLAr->push_back(larcell); - } - ATH_MSG_DEBUG( "LAr Container size : " << ContainerLAr->size() ); - // Now I have a Tile container - if ( m_tiledecoded ) - for ( m_itt = m_itBegin; m_itt != m_itEnd; ++m_itt) { - CaloCell* tilecell = (CaloCell*)(*m_itt)->clone(); - ContainerTile->push_back(tilecell); - } - ATH_MSG_DEBUG( "Tile Container size : "<< ContainerTile->size() ); -} diff --git a/Trigger/TrigAlgorithms/TrigT2CaloCommon/src/T2CaloBase.cxx b/Trigger/TrigAlgorithms/TrigT2CaloCommon/src/T2CaloBase.cxx deleted file mode 100644 index 6bfa6b382665..000000000000 --- a/Trigger/TrigAlgorithms/TrigT2CaloCommon/src/T2CaloBase.cxx +++ /dev/null @@ -1,185 +0,0 @@ -/* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration -*/ - -// ******************************************************************** -// -// NAME: T2Calo.cxx -// PACKAGE: Trigger/TrigAlgorithms/TrigT2CaloCommon -// -// AUTHOR: M.P. Casado -// S.R. Armstrong -// -// - Add variables for job option controlled region limits, set defaults -// to most likely values. -// - Add function EtaPhiRange to return the maximum and minimum eta or phi -// values to use when calculating energy sums over a region - R. Soluk -// ******************************************************************** - -#include "GaudiKernel/MsgStream.h" -#include "GaudiKernel/IToolSvc.h" -#include "GaudiKernel/StatusCode.h" - -#include "TrigT1Interfaces/RecEmTauRoI.h" -#include "TrigT1Interfaces/TrigT1Interfaces_ClassDEF.h" -#include "TrigSteeringEvent/TrigRoiDescriptor.h" - -#include "CaloEvent/CaloCluster.h" -#include "CaloEvent/CaloClusterContainer.h" - -#include "TrigT2CaloCommon/T2CaloBase.h" -#include "TrigT2CaloCommon/IAlgToolCalo.h" -#include "TrigInterfaces/FexAlgo.h" -#include "TrigT2CaloCommon/ITrigDataAccess.h" - - -class ISvcLocator; - - -T2CaloBase::T2CaloBase(const std::string & name, ISvcLocator* pSvcLocator): - HLT::FexAlgo(name, pSvcLocator), m_emAlgTools(this), - m_data("TrigDataAccess/TrigDataAccess"), - m_timersvc("TrigTimerSvc/TrigTimerSvc","T2CaloBase"){ - declareProperty("ParamSetFile", m_paramSet); - declareProperty("EtaWidth", m_etaWidth = 0.1,"Eta Width of the Region of Interest"); - declareProperty("PhiWidth", m_phiWidth = 0.1,"Phi Width of the Region of Interest"); - declareProperty("EtaWidthForID", m_etaWidthForID = 0.1,"Eta Width of the Region of Interest for ID"); - declareProperty("PhiWidthForID", m_phiWidthForID = 0.1,"Phi Width of the Region of Interest for ID"); - // declareProperty("T2CaloTools",m_emToolName); - declareProperty("TimerNtuple",m_timerString); - declareProperty("TriggerOn",m_triggerType); - declareProperty("IAlgToolList", m_emAlgTools,"list of AlgToolCalo. These tools perform FEX."); - declareProperty("TrigTimerSvc", m_timersvc,"TrigTimerSvc Handle."); - declareProperty("TrigDataAccess",m_data,"Data Access for LVL2 Calo Algorithms"); - declareProperty("roiEtaLimit",m_roiEtaLimit=2.5); // See TriggerTowerMap - declareProperty("FCalEtaMin",m_fcalEtaMin = 3); - declareProperty("FCalEtaMax",m_fcalEtaMax = 5); - declareProperty("USeCompositeRoi",m_useCompositeRoi = false); - - m_fcalEtaMin = 3.0; - m_fcalEtaMax = 5.0; - m_vec_robs.reserve(200); -} - - -T2CaloBase::~T2CaloBase(){ -} - - -StatusCode T2CaloBase::initialize(){ - - MsgStream log(msgSvc(), name()); - - // if ( msgLvl() <= MSG::INFO ) - log << MSG::INFO << "on initialize()" << endmsg; - - StatusCode stat = HLT::FexAlgo::initialize(); - if (stat.isFailure()) { - log << MSG::ERROR << "base class finalize failed!" << endmsg; - return stat; - } - - if( m_emAlgTools.retrieve().isFailure() ) { - log << MSG::FATAL << "Unable to create " << - "some AlgTool" << endmsg; - return StatusCode::FAILURE; - } ; - - if ((m_data.retrieve()).isFailure()) { - log << MSG::ERROR << "Could not get m_data" << endmsg; - return StatusCode::FAILURE; - } - - - // Initialize timing service - - if( (m_timersvc.retrieve()).isFailure() ) { - log << MSG::WARNING << name() << ": Unable to locate TrigTimer Service" << endmsg; - } - - if ( !m_timersvc.empty()) { - - m_timer[0] = m_timersvc->addItem(m_timerString); - m_timer[1] = m_timersvc->addItem("onlyExecs"); - - } - -#ifndef NDEBUG - log << MSG::INFO - << "Initialization completed successfully" - << endmsg; -#endif - - return StatusCode::SUCCESS; -} - - -StatusCode T2CaloBase::finalize(){ - - MsgStream log(msgSvc(), name()); - -#ifndef NDEBUG - log << MSG::INFO << "in finalize()" << endmsg; -#endif - - StatusCode stat = HLT::FexAlgo::finalize(); - if (stat.isFailure()) { - log << MSG::ERROR << "base class finalize failed!" << endmsg; - return stat; - } - - return StatusCode::SUCCESS; -} - - -HLT::ErrorCode -T2CaloBase::prepareRobRequests(const HLT::TriggerElement* inputTE) -{ - - // Calculate ROBs needed - - const IRoiDescriptor* roi = 0; - HLT::ErrorCode hltStatus; - - const TrigRoiDescriptor* roiDescriptor = 0; - hltStatus = getFeature(inputTE, roiDescriptor); - roi = roiDescriptor; - - - if ( hltStatus != HLT::OK ) { - std::cout << MSG::WARNING << " Failed to find RoiDescriptor " << std::endl; - return hltStatus; - } - - -#if 0 - // setup ROI bounds - double etamin = std::max(-1.0 * m_roiEtaLimit, roiDescriptor->eta() - m_etaWidth); - double etamax = std::min( 1.0 * m_roiEtaLimit, roiDescriptor->eta() + m_etaWidth); - double phimin = roiDescriptor->phi() - m_phiWidth; - double phimax = roiDescriptor->phi() + m_phiWidth; - while (phimin < -M_PI) phimin += 2. * M_PI; - while (phimax > M_PI) phimax -= 2. * M_PI; - - //Look at RoIs in FCal - /// MS: all this stuff checking RoI eta and phi ranges should - /// be in the RegionSelector - if(roiDescriptor->eta()<-3.2){ - etamin = -m_fcalEtaMax; - etamax = -m_fcalEtaMin; - } - if(roiDescriptor->eta()>3.2){ - etamin = m_fcalEtaMin; - etamax = m_fcalEtaMax; - } -#endif - - - // m_data->ROBList(etamin,etamax,phimin,phimax,m_vec_robs); - m_data->ROBList( *roi, m_vec_robs); - - config()->robRequestInfo()->addRequestScheduledRobIDs(m_vec_robs); - - return HLT::OK; -} - diff --git a/Trigger/TrigAlgorithms/TrigT2CaloCommon/src/components/TrigT2CaloCommon_entries.cxx b/Trigger/TrigAlgorithms/TrigT2CaloCommon/src/components/TrigT2CaloCommon_entries.cxx index c7c1a055c1dd..c7e9cbcb62ec 100644 --- a/Trigger/TrigAlgorithms/TrigT2CaloCommon/src/components/TrigT2CaloCommon_entries.cxx +++ b/Trigger/TrigAlgorithms/TrigT2CaloCommon/src/components/TrigT2CaloCommon_entries.cxx @@ -1,11 +1,9 @@ #include "TrigT2CaloCommon/T2GeometryTool.h" -#include "../TrigDataAccess.h" #include "../TrigCaloDataAccessSvc.h" #include "../TestCaloDataAccess.h" #include "../CompareCells.h" DECLARE_COMPONENT( T2GeometryTool ) -DECLARE_COMPONENT( TrigDataAccess ) DECLARE_COMPONENT( TrigCaloDataAccessSvc) DECLARE_COMPONENT( TestCaloDataAccess ) DECLARE_COMPONENT( CompareCells ) diff --git a/Trigger/TrigAlgorithms/TrigT2CaloEgamma/src/EgammaAllFex.cxx b/Trigger/TrigAlgorithms/TrigT2CaloEgamma/src/EgammaAllFex.cxx deleted file mode 100644 index 2309df4e5dfd..000000000000 --- a/Trigger/TrigAlgorithms/TrigT2CaloEgamma/src/EgammaAllFex.cxx +++ /dev/null @@ -1,180 +0,0 @@ -/* - Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration -*/ - -// ******************************************************************** -// -// NAME: EgammaAllFex.cxx -// PACKAGE: Trigger/TrigAlgorithms/TrigT2CaloEgamma -// -// AUTHOR: D.O. Damazio -// -// -// ******************************************************************** - -#include "CaloIdentifier/LArEM_ID.h" - -//#include "TrigCaloEvent/TrigEMCluster.h" -#include "xAODTrigCalo/TrigEMCluster.h" -#include "CaloGeoHelpers/CaloSampling.h" - -#include "EgammaAllFex.h" -#include "TrigT2CaloCommon/Calo_Def.h" - -#include "TrigSteeringEvent/TrigRoiDescriptor.h" - -EgammaAllFex::EgammaAllFex(const std::string & type, const std::string & name, - const IInterface* parent): IAlgToolCalo(type, name, parent) - { - declareProperty("IncludeHad", m_includeHad = false ); -#ifndef NDEBUG - // Create Geometry object - // 0 -> CaloType EM, 2 -> Second Layer - // m_geometry[0] = new T2Geometry(0,2); -#endif -} - -EgammaAllFex::~EgammaAllFex(){ -} - -StatusCode EgammaAllFex::execute(xAOD::TrigEMCluster &rtrigEmCluster, - const IRoiDescriptor& roi, - const CaloDetDescrElement*& /*caloDDE*/, - const EventContext* /*context*/) { - - // Time total AlgTool time - if (!m_timersvc.empty()) { - m_timer[0]->start(); - m_timer[1]->start(); - m_timer[1]->pause(); - m_timer[2]->start(); - m_timer[2]->pause(); - m_timer[3]->start(); - m_timer[3]->pause(); - } - // reset error - m_error=0x0; - int ncells = 0; - // LVL1 positions - float etaL1=rtrigEmCluster.eta(); - float phiL1=rtrigEmCluster.phi(); - - double totalEnergy = 0; - double totalEnergyEM = 0; - CaloSampling::CaloSample samp; - - ATH_MSG_DEBUG( "in execute(TrigEMCluster&)" ); - - // Time to access RegionSelector - - for(DETID dd = TTEM; dd <= TTHEC; dd=(DETID)( ((int)dd)+1) ){ - for(int sampling=0;sampling<4;sampling++) { - // Get detector offline ID's for Collections - if (!m_timersvc.empty()) m_timer[1]->resume(); - m_data->RegionSelector(sampling, roi, dd); - - // Finished to access RegionSelector - if (!m_timersvc.empty()) m_timer[1]->pause(); - // Time to access Collection (and ByteStreamCnv ROBs) - if (!m_timersvc.empty()) m_timer[2]->resume(); - if ( m_data->LoadCollections(m_iBegin,m_iEnd).isFailure() ){ - if (!m_timersvc.empty()) { - m_timer[3]->stop(); - m_timer[2]->stop(); - m_timer[1]->stop(); - m_timer[0]->stop(); - } - return StatusCode::SUCCESS; - } - m_error|=m_data->report_error(); - if ( m_saveCells && !m_error ){ - m_data->storeCells(m_iBegin,m_iEnd,*m_CaloCellContPoint,m_cellkeepthr); - } - // Finished to access Collection - if (!m_timersvc.empty()) m_timer[2]->pause(); - // Algorithmic time - if (!m_timersvc.empty()) m_timer[3]->resume(); - - for(m_it = m_iBegin;m_it != m_iEnd; ++m_it) { - - const LArCell* larcell = (*m_it); - double energyCell = larcell->energy(); - totalEnergy += energyCell; - if( dd==TTEM) totalEnergyEM += energyCell; - //samp = CaloSampling::getSampling(*larcell); - samp = larcell->caloDDE()->getSampling(); - rtrigEmCluster.setEnergy(samp,rtrigEmCluster.energy(samp) + energyCell); - rtrigEmCluster.setRawEnergy(samp,rtrigEmCluster.rawEnergy(samp) + energyCell); - ncells++; - - } // end of loop over sampling - if (!m_timersvc.empty()) m_timer[3]->pause(); - } // end of loop over all samples - } // end of loop over DetID - - // TileCAL - if (!m_timersvc.empty()) m_timer[1]->resume(); - m_data->RegionSelector(0, roi, TILE); - // Finished to access RegionSelector - if (!m_timersvc.empty()) m_timer[1]->stop(); - - for (unsigned int iR=0;iR<m_data->TileContSize();iR++) { - - // Time to access Collection (and ByteStreamCnv ROBs) - if (!m_timersvc.empty()) m_timer[2]->resume(); - if ( m_data->LoadCollections(m_itBegin,m_itEnd,iR,!iR).isFailure() ){ - - if (!m_timersvc.empty()) { - m_timer[3]->stop(); - m_timer[2]->stop(); - m_timer[0]->stop(); - } - return StatusCode::SUCCESS; - } - m_error|=m_data->report_error(); - // Finished to access Collection - if (!m_timersvc.empty()) m_timer[2]->pause(); - // Algorithmic time - if (!m_timersvc.empty()) m_timer[3]->resume(); - - for(m_itt = m_itBegin;m_itt != m_itEnd; ++m_itt) { - - const TileCell* tilecell = (*m_itt); - double energyCell = tilecell->energy(); - totalEnergy += energyCell; - //samp = CaloSampling::getSampling(*tilecell); - samp = tilecell->caloDDE()->getSampling(); - rtrigEmCluster.setEnergy(samp,rtrigEmCluster.energy(samp) + energyCell); - rtrigEmCluster.setRawEnergy(samp,rtrigEmCluster.rawEnergy(samp) + energyCell); - ncells++; - - } // end of loop over sampling - if (!m_timersvc.empty()) m_timer[3]->pause(); - } // end of loop over Tile drawers - - - if (!m_timersvc.empty()) m_timer[2]->stop(); - if (!m_timersvc.empty()) m_timer[3]->stop(); - // Save EMShowerMinimal time - if (!m_timersvc.empty()) m_timer[4]->start(); - - - // Update cluster Variables - - if ( m_includeHad ) - rtrigEmCluster.setEnergy(totalEnergy); - else - rtrigEmCluster.setEnergy(totalEnergyEM); - rtrigEmCluster.setEta(etaL1); - rtrigEmCluster.setPhi(phiL1); - rtrigEmCluster.setNCells(ncells); - - // Finished save EMShowerMinimal time - if (!m_timersvc.empty()) m_timer[4]->stop(); - - - // Time total AlgTool time - if (!m_timersvc.empty()) m_timer[0]->stop(); - - return StatusCode::SUCCESS; -} diff --git a/Trigger/TrigAlgorithms/TrigT2CaloEgamma/src/EgammaAllFex.h b/Trigger/TrigAlgorithms/TrigT2CaloEgamma/src/EgammaAllFex.h deleted file mode 100644 index 5b89ecaae66c..000000000000 --- a/Trigger/TrigAlgorithms/TrigT2CaloEgamma/src/EgammaAllFex.h +++ /dev/null @@ -1,97 +0,0 @@ -/* - Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration -*/ - -/******************************************************************** - - NAME: EgammaSamp2Fex.h - PACKAGE: Trigger/TrigAlgorithms/TrigT2CaloEgamma - - AUTHOR: M.P. Casado - - PURPOSE: Calculates energy weighted cluster position around - hottest cell in RoI. Also, calculates energy in - a 3x7 and in a 7x7 cluster (rCore = 3x7/7x7). - *******************************************************************/ - -#ifndef TRIGT2CALOEGAMMA_CALOALLFEXEGAMMA_H -#define TRIGT2CALOEGAMMA_CALOALLFEXEGAMMA_H - - -#include "TrigT2CaloCommon/IAlgToolCalo.h" -#include "GaudiKernel/AlgTool.h" -#include "CaloGeoHelpers/CaloSampling.h" -#include "TrigSteeringEvent/TrigRoiDescriptor.h" -#include "TrigT2CaloCommon/Calo_Def.h" -#include "CxxUtils/phihelper.h" - -#include "CxxUtils/checker_macros.h" -ATLAS_NO_CHECK_FILE_THREAD_SAFETY; // legacy trigger code - -class IRoiDescriptor; - -/** Feature extraction Tool for LVL2 Calo. Second EM Calorimeter sample. */ -class EgammaAllFex: public IAlgToolCalo { - public: - // to avoid compiler warning about hidden virtuals - using IAlgToolCalo::execute; - - /** Constructor */ - EgammaAllFex(const std::string & type, const std::string & name, - const IInterface* parent); - /** Destructor */ - virtual ~EgammaAllFex(); - - /** @brief execute feature extraction for the EM Calorimeter - * second layer - * @param[out] rtrigEmCluster is the output cluster. - * @param[in] eta/phi-min/max = RoI definition. - */ - StatusCode execute(xAOD::TrigEMCluster &rtrigEmCluster, - const IRoiDescriptor& roi, - const CaloDetDescrElement*& /*caloDDE*/, - const EventContext* /*context*/ ); - - /// OBSOLETE, DO NOT USE!! - /** @brief execute feature extraction for the EM Calorimeter - * second layer - * @param[out] rtrigEmCluster is the output cluster. - * @param[in] eta/phi-min/max = RoI definition. - */ - StatusCode execute(xAOD::TrigEMCluster &rtrigEmCluster, - double etamin, double etamax, - double phimin, double phimax) { - TrigRoiDescriptor roi( 0.5*(etamin+etamax), etamin, etamax, - CxxUtils::phiMean(phimin,phimax), phimin, phimax); - return execute( rtrigEmCluster, roi, caloDDENull, nullptr ); - } - - - /** Special initialize for All to include eta as a - trigger timer item monitored parameter. Important - to compare time performance as a function of cluster - position. - */ - - StatusCode initialize() { - // Very important to call base class initialize - if ( IAlgToolCalo::initialize().isFailure() ) { - *(new MsgStream(AlgTool::msgSvc(), name())) - << MSG::FATAL - << "Could not init base class IAlgTooCalo" << endmsg; - } - std::string basename(name().substr(25,5)+"."); - //std::string basename(name().substr(6,1)+name().substr(name().find("Fex",0)-5,5)); - //basename+=(name().substr(6,1)+name().substr(name().find("Fex",0)-5,5)); - if (m_timersvc) { - m_timer[0]->propName(basename+"Eta"); - } - return StatusCode::SUCCESS; - } - private: - bool m_includeHad; - -}; - - -#endif diff --git a/Trigger/TrigAlgorithms/TrigT2CaloEgamma/src/EgammaEmEnFex.cxx b/Trigger/TrigAlgorithms/TrigT2CaloEgamma/src/EgammaEmEnFex.cxx deleted file mode 100644 index 6f3b73f76cf2..000000000000 --- a/Trigger/TrigAlgorithms/TrigT2CaloEgamma/src/EgammaEmEnFex.cxx +++ /dev/null @@ -1,243 +0,0 @@ -/* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration -*/ - -// ******************************************************************** -// -// NAME: EgammaEmEnFex.cxx -// PACKAGE: Trigger/TrigAlgorithms/TrigT2CaloEgamma -// -// AUTHOR: M.P. Casado -// -// ******************************************************************** - -//#include "TrigCaloEvent/TrigEMCluster.h" -#include "xAODTrigCalo/TrigEMCluster.h" -#include "CaloGeoHelpers/CaloSampling.h" - -#include "EgammaEmEnFex.h" -#include "TrigT2CaloCommon/Calo_Def.h" -#include "T2CalibrationEgamma.h" - - -EgammaEmEnFex::EgammaEmEnFex(const std::string & type, const std::string & name, - const IInterface* parent): IAlgToolCalo(type, name, parent) - { - declareProperty( "QlCorrectionLimit", - m_limit ); - declareProperty( "QlCorrectionDimension", - m_dimension ); - declareProperty( "QlCorrection", - m_correction ); - // Calibration object - m_calib = new T2CalibrationEgamma(); -} - -EgammaEmEnFex::~EgammaEmEnFex(){ - delete m_calib; -} - -StatusCode EgammaEmEnFex::execute(xAOD::TrigEMCluster &rtrigEmCluster, - const IRoiDescriptor& roi, - const CaloDetDescrElement*& caloDDE) { - - // Time total AlgTool time - if (!m_timersvc.empty()) m_timer[0]->start(); - // reset error - m_error=0x0; - bool cluster_in_barrel = true; - if ( caloDDE ) - cluster_in_barrel = caloDDE->is_lar_em_barrel(); - - // MsgStream log(msgSvc(), name()); - ATH_MSG_DEBUG( "in execute(TrigEMCluster &)" ); - - // Time to access RegionSelector - if (!m_timersvc.empty()) m_timer[1]->start(); - - // Region Selector, sampling 0 - int sampling = 0; - - // Get detector offline ID's for Collections - m_data->RegionSelector(sampling, roi ); - - // Finished to access RegionSelector - if (!m_timersvc.empty()) m_timer[1]->pause(); - // Time to access Collection (and ByteStreamCnv ROBs) - if (!m_timersvc.empty()) m_timer[2]->start(); - - if ( m_data->LoadCollections(m_iBegin,m_iEnd).isFailure() ){ - if (!m_timersvc.empty()) m_timer[2]->stop(); - return StatusCode::SUCCESS; - } - m_error|=m_data->report_error(); - if ( m_error ) { - if (!m_timersvc.empty()) m_timer[2]->stop(); - return StatusCode::SUCCESS; - } - if ( m_saveCells ){ - m_data->storeCells(m_iBegin,m_iEnd,*m_CaloCellContPoint,m_cellkeepthr); - } - // Finished to access Collection - if (!m_timersvc.empty()) m_timer[2]->pause(); - // Algorithmic time - if (!m_timersvc.empty()) m_timer[3]->start(); - - double deta = 0.; // eta difference current cell - seed - double dphi = 0.; // phi difference current cell - seed - - double totalEnergy = 0; - CaloSampling::CaloSample samp; - - double energyEta = rtrigEmCluster.eta(); - double energyPhi = rtrigEmCluster.phi(); - if ( caloDDE ){ - energyEta = caloDDE->eta(); - energyPhi = caloDDE->phi(); - } - - int ncells = 0; - - for(m_it = m_iBegin;m_it != m_iEnd; ++m_it) { // Should be revised for London scheme - ncells++; - - const LArCell* larcell = (*m_it); - double etaCell = larcell->eta(); - double phiCell = larcell->phi(); - double energyCell = larcell->energy(); - - // find the standard em cluster energy (3*7 cell, now sampling 0) - // Find position of current cell w.r.t. seed - deta = fabs( etaCell - energyEta ); - dphi = fabs( phiCell - energyPhi ); - - if ( dphi > M_PI ) dphi = 2.* M_PI - dphi; // wrap 0 -> 6.28 - bool condition37 = cluster_in_barrel && ( (deta <= 0.0375+0.0005) && (dphi <= 0.0875+0.0005) ); - bool condition55 = (!cluster_in_barrel) && ( (deta <= 0.0625+0.0005) && (dphi <= 0.0625+0.0005) ); - - if ( condition37 || condition55 ) { - - totalEnergy += energyCell; - //samp = CaloSampling::getSampling(*larcell); - samp = larcell->caloDDE()->getSampling(); - rtrigEmCluster.setEnergy(samp,rtrigEmCluster.energy(samp) + energyCell); - rtrigEmCluster.setRawEnergy(samp,rtrigEmCluster.rawEnergy(samp) + energyCell); - - } - - } // end of loop over sampling 0 - - // Pause algorithmic time - if (!m_timersvc.empty()) m_timer[3]->pause(); - // Save EMShowerMinimal time - if (!m_timersvc.empty()) m_timer[4]->start(); - - // update stored variables - - -#ifndef NDEBUG - // This will internaly define normal, narrow and large clusters - if ( msgLvl(MSG::DEBUG) ) { - if ( m_geometryTool->EtaPhiRange(0,0,energyEta, energyPhi)) - ATH_MSG_ERROR( "problems with EtaPhiRange" ); - PrintCluster(totalEnergy,0,0,CaloSampling::PreSamplerB - ,CaloSampling::PreSamplerE); - } -#endif - // Pause save EMShowerMinimal time - if (!m_timersvc.empty()) m_timer[4]->pause(); - // Time to access RegionSelector - if (!m_timersvc.empty()) m_timer[1]->resume(); - - // Region Selector, sampling 3 - sampling = 3; - - // Get detector offline ID's for Collections - m_data->RegionSelector( sampling, roi ); - - // Finished to access RegionSelector - if (!m_timersvc.empty()) m_timer[1]->stop(); - // Time to access Collection (and ByteStreamCnv ROBs) - if (!m_timersvc.empty()) m_timer[2]->resume(); - - // One does not want to prepare the collection again - // That is why LoadCollections is called with false - if ( m_data->LoadCollections(m_iBegin,m_iEnd,sampling,false) - .isFailure() ){ - if (!m_timersvc.empty()) m_timer[2]->stop(); - return StatusCode::SUCCESS; - } - m_error|=m_data->report_error(); - if ( m_error ) { - if (!m_timersvc.empty()) m_timer[2]->stop(); - return StatusCode::SUCCESS; - } - if ( m_saveCells ){ - m_data->storeCells(m_iBegin,m_iEnd,*m_CaloCellContPoint,m_cellkeepthr); - } - // Finished to access Collection - if (!m_timersvc.empty()) m_timer[2]->stop(); - // Algorithmic time - if (!m_timersvc.empty()) m_timer[3]->resume(); - - - for(m_it = m_iBegin;m_it != m_iEnd; ++m_it) { // Should be revised for London scheme - ncells++; - const LArCell* larcell = (*m_it); - double etaCell = larcell->eta(); - double phiCell = larcell->phi(); - double energyCell = larcell->energy(); - - // find the standard em cluster energy (3*7 cell, now sampling 0) - // Find position of current cell w.r.t. seed - deta = fabs( etaCell - energyEta ); - dphi = fabs( phiCell - energyPhi ); - if ( dphi > M_PI ) dphi = 2.* M_PI - dphi; // wrap 0 -> 6.28 - - bool condition37 = cluster_in_barrel && ( (deta <= 0.0375+0.001) && (dphi <= 0.0875+0.001) ); - bool condition55 = (!cluster_in_barrel) && ( (deta <= 0.0625+0.001) && (dphi <= 0.0625+0.001) ); - - if ( condition37 || condition55 ) { - - totalEnergy += energyCell; - //samp = CaloSampling::getSampling(*larcell); - samp = larcell->caloDDE()->getSampling(); - rtrigEmCluster.setEnergy(samp,rtrigEmCluster.energy(samp) + energyCell); - rtrigEmCluster.setRawEnergy(samp,rtrigEmCluster.rawEnergy(samp) + energyCell); - - } - - } // end of loop over sampling 3 - - // Update Cluster Variables - rtrigEmCluster.setNCells(ncells+rtrigEmCluster.nCells()); - rtrigEmCluster.setRawEnergy( rtrigEmCluster.rawEnergy() + totalEnergy ); - // The dependency with energy is not defined yet - rtrigEmCluster.setEnergy( rtrigEmCluster.rawEnergy()* - m_calib->Calib(energyEta,rtrigEmCluster.energy()) ); - - // Algorithmic time - if (!m_timersvc.empty()) m_timer[3]->stop(); - // Save EMShowerMinimal - if (!m_timersvc.empty()) m_timer[4]->resume(); - rtrigEmCluster.setEt ( rtrigEmCluster.energy()/cosh(energyEta) ); - rtrigEmCluster.setRawEt ( rtrigEmCluster.rawEnergy()/cosh(energyEta) ); - -#ifndef NDEBUG - // This will internaly define normal, narrow and large clusters - if ( msgLvl(MSG::DEBUG) ) { - if ( m_geometryTool->EtaPhiRange(0,3,energyEta, energyPhi)) - ATH_MSG_ERROR( "problems with EtaPhiRange" ); - - PrintCluster(totalEnergy,0,3,CaloSampling::EMB3,CaloSampling::EME3); - } -#endif - // Save EMShowerMinimal - if (!m_timersvc.empty()) m_timer[4]->stop(); - - // Time total AlgTool time - if (!m_timersvc.empty()) m_timer[0]->stop(); - - return StatusCode::SUCCESS; -} - diff --git a/Trigger/TrigAlgorithms/TrigT2CaloEgamma/src/EgammaEmEnFex.h b/Trigger/TrigAlgorithms/TrigT2CaloEgamma/src/EgammaEmEnFex.h deleted file mode 100644 index d51e9129af0b..000000000000 --- a/Trigger/TrigAlgorithms/TrigT2CaloEgamma/src/EgammaEmEnFex.h +++ /dev/null @@ -1,68 +0,0 @@ -/* - Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration -*/ - -/******************************************************************** - - NAME: EgammaEmEnFex.h - PACKAGE: Trigger/TrigAlgorithms/TrigT2CaloEgamma - - AUTHOR: M.P. Casado - - PURPOSE: Based on Cluster position defined in the second - EM Calorimeter layer, calculates total EM cluster - energy. - *******************************************************************/ - -#ifndef TRIGT2CALOEGAMMA_EGAMMAEMENFEX_H -#define TRIGT2CALOEGAMMA_EGAMMAEMENFEX_H - -#include "TrigT2CaloCommon/IAlgToolCalo.h" -#include "CxxUtils/phihelper.h" -#include "TrigSteeringEvent/TrigRoiDescriptor.h" -#include "GaudiKernel/AlgTool.h" - -#include "CxxUtils/checker_macros.h" -ATLAS_NO_CHECK_FILE_THREAD_SAFETY; // legacy trigger code - -/** Feature extraction Tool for LVL2 Calo. EM Presampler and - third EM Calorimeter sample. */ -class EgammaEmEnFex: public IAlgToolCalo { - public: - // to avoid compiler warning about hidden virtuals - using IAlgToolCalo::execute; - - /** Constructor */ - EgammaEmEnFex(const std::string & type, const std::string & name, - const IInterface* parent); - /** Destructor */ - virtual ~EgammaEmEnFex(); - /** @brief execute feature extraction for the EM Calorimeter - * second layer - * @param[out] rtrigEmCluster is the output cluster. - * @param[in] roi RoI definition. - */ - StatusCode execute(xAOD::TrigEMCluster &rtrigEmCluster, - const IRoiDescriptor& roi, - const CaloDetDescrElement*& caloDDE = caloDDENull); - - /// OBSOLETE!! DO NOT USE - - /** @brief execute feature extraction for the EM Calorimeter - * second layer - * @param[out] rtrigEmCluster is the output cluster. - * @param[in] eta/phi-min/max = RoI definition. - */ - StatusCode execute(xAOD::TrigEMCluster &rtrigEmCluster, - double etamin, double etamax, - double phimin, double phimax) { - TrigRoiDescriptor roi( 0.5*(etamin+etamax), etamin, etamax, - CxxUtils::phiMean(phimin,phimax), phimin, phimax); - return execute( rtrigEmCluster, roi, caloDDENull ); - } - - -}; - - -#endif diff --git a/Trigger/TrigAlgorithms/TrigT2CaloEgamma/src/EgammaHadEnFex.cxx b/Trigger/TrigAlgorithms/TrigT2CaloEgamma/src/EgammaHadEnFex.cxx deleted file mode 100644 index f8dfd772b97a..000000000000 --- a/Trigger/TrigAlgorithms/TrigT2CaloEgamma/src/EgammaHadEnFex.cxx +++ /dev/null @@ -1,262 +0,0 @@ -/* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration -*/ - -// ******************************************************************** -// -// NAME: EgammaHadEnFex.cxx -// PACKAGE: Trigger/TrigAlgorithms/TrigT2CaloEgamma -// -// AUTHOR: M.P. Casado -// -// REFERENCES: Based on Trigger/TrigT2CaloEgamma/T2EmHadAlgorithm.cxx -// -// ******************************************************************** - -//#include "TrigCaloEvent/TrigEMCluster.h" -#include "CaloGeoHelpers/CaloSampling.h" - -#include "EgammaHadEnFex.h" -#include "TrigT2CaloCommon/Calo_Def.h" -#include <math.h> - -inline double check_tilemin(const double x){ -const double dphi=0.09817477; -const double oneoverdphi=1.0/0.09817477; -if(x>=0) - return (dphi*ceilf(x*oneoverdphi))+0.01; -else - return (-dphi*floorf(-x*oneoverdphi))+0.01; -} -inline double check_tilemax(const double x){ -const double dphi=0.09817477; -const double oneoverdphi=1.0/0.09817477; -if(x>=0) - return (dphi*floorf(x*oneoverdphi))-0.01; -else - return (-dphi*ceilf(-x*oneoverdphi))-0.01; -} - -EgammaHadEnFex::EgammaHadEnFex(const std::string & type, const std::string & name, - const IInterface* parent): IAlgToolCalo(type, name, parent) - { -} - -EgammaHadEnFex::~EgammaHadEnFex(){ -} - -StatusCode EgammaHadEnFex::execute(xAOD::TrigEMCluster &rtrigEmCluster, - const IRoiDescriptor& roi, - const CaloDetDescrElement*& /*caloDDE*/){ - // Time total AlgTool time - if (!m_timersvc.empty()) m_timer[0]->start(); - m_error=0x0; - -#ifndef NDEBUG - if ( msg().level() <= MSG::DEBUG ) - msg() << MSG::INFO << "in execute(TrigEMCluster &)" << endmsg; -#endif - - double deta = 0.; // eta difference current cell - seed - double dphi = 0.; // phi difference current cell - seed - - CaloSampling::CaloSample samp; - - double energyEta = rtrigEmCluster.eta(); - double energyPhi = rtrigEmCluster.phi(); - rtrigEmCluster.setEhad1(0.); - - // Dump eta-phi strip ranges into arrays - // Define variables here so that their scope covers both the Tile and HEC loops - // Use arrays of length 3 since there is no samp 0 in the HAD calorimeters - // this avoids wasting memory but makes the code slightly less clear - - // Time Region Selector - if (!m_timersvc.empty()) { - m_timer[1]->start(); - m_timer[1]->pause(); - m_timer[2]->start(); - m_timer[2]->pause(); - m_timer[3]->start(); - m_timer[3]->pause(); - m_timer[4]->start(); - m_timer[4]->pause(); - } - - int ncells=0; - - for (unsigned int sampling = 0;sampling<3;sampling++) { - - // Time to access RegionSelector - if (!m_timersvc.empty()) m_timer[1]->resume(); - - // Region Selector - // Get detector offline ID's for Collections - // m_data->RegionSelector(sampling,etamin,etamax,phimin,phimax,TTHEC); - m_data->RegionSelector(sampling,roi,TTHEC); - - if (!m_timersvc.empty()) m_timer[1]->pause(); - // Time to access Collection (and ByteStreamCnv ROBs) - if (!m_timersvc.empty()) m_timer[2]->resume(); - - // For the first sample you will create the containers - // For the others no - if ( m_data->LoadCollections(m_iBegin,m_iEnd,sampling - ,!sampling).isFailure() ){ - if (!m_timersvc.empty()) m_timer[2]->stop(); - return StatusCode::SUCCESS; - } - m_error|=m_data->report_error(); - if ( m_error ) { - if (!m_timersvc.empty()) m_timer[2]->stop(); - return StatusCode::SUCCESS; - } - if ( m_saveCells ){ - m_data->storeCells(m_iBegin,m_iEnd,*m_CaloCellContPoint,m_cellkeepthr); - } - // Finished to access Collection - if (!m_timersvc.empty()) m_timer[2]->pause(); - // Algorithmic time - if (!m_timersvc.empty()) m_timer[3]->resume(); - - for(m_it = m_iBegin;m_it != m_iEnd; ++m_it) { - - ncells++; - const LArCell* larcell = (*m_it); - double etaCell = larcell->eta(); - double phiCell = larcell->phi(); - double energyCell = larcell->energy(); - - // find position of current cell w.r.t. seed - deta = fabs( etaCell - energyEta ); - dphi = fabs( phiCell - energyPhi ); - if ( dphi > M_PI ) dphi = 2.* M_PI - dphi; // wrap 0 -> 6.28 - // hadronic measurements: energy sum in 0.1*0.1 - if ( deta <= 0.12 && - dphi <= 0.12 ){ - //samp = CaloSampling::getSampling(*larcell); - samp = larcell->caloDDE()->getSampling(); - rtrigEmCluster.setEnergy(samp,rtrigEmCluster.energy(samp) + energyCell); - rtrigEmCluster.setRawEnergy(samp,rtrigEmCluster.rawEnergy(samp) + energyCell); - if (CaloSampling::HEC0 == samp) { - rtrigEmCluster.setEhad1(rtrigEmCluster.ehad1() + energyCell ); - } - } - - } // end of loop over cells - // End of Algorithmic time - if (!m_timersvc.empty()) m_timer[3]->pause(); - - } // End sampling loop -#ifndef NDEBUG - if ( msg().level() <= MSG::DEBUG ) { - for (int sampling=0; sampling<3;sampling++) - if (m_geometryTool->EtaPhiRange(1,sampling,energyEta, energyPhi)) - msg() << MSG::ERROR << "problems with EtaPhiRange" << endmsg; - PrintCluster(rtrigEmCluster.energy(CaloSampling::HEC0),1,0 - ,CaloSampling::HEC0,CaloSampling::HEC0); - PrintCluster(rtrigEmCluster.energy(CaloSampling::HEC1),1,1 - ,CaloSampling::HEC1,CaloSampling::HEC1); - PrintCluster(rtrigEmCluster.energy(CaloSampling::HEC2),1,2 - ,CaloSampling::HEC2,CaloSampling::HEC2); - } -#endif - - // Next TILECAL - // Needs some fix for RS - - - // MS phimin=check_tilemin(phimin); - // MS phimax=check_tilemax(phimax); - - - // Time to access RegionSelector - if (!m_timersvc.empty()) m_timer[1]->resume(); - - // Region Selector, no sample needed - // Get detector offline ID's for Collections - // MS m_data->RegionSelector(0,etamin,etamax,phimin,phimax,TILE); - m_data->RegionSelector(0,roi,TILE); - - if (!m_timersvc.empty()) m_timer[1]->pause(); - - for (unsigned int iR=0;iR<m_data->TileContSize();iR++) { - - // Time to access Collection (and ByteStreamCnv ROBs) - if (!m_timersvc.empty()) m_timer[2]->resume(); - // For the first sample you will create the containers - // For the others no - if ( m_data->LoadCollections(m_itBegin,m_itEnd,iR,!iR).isFailure() ){ - if (!m_timersvc.empty()) m_timer[2]->stop(); - return StatusCode::SUCCESS; - } - m_error|=m_data->report_error(); - if ( m_error ) { - if (!m_timersvc.empty()) m_timer[2]->stop(); - return StatusCode::SUCCESS; - } - if ( m_saveCells ){ - m_data->storeCells(m_itBegin,m_itEnd,*m_CaloCellContPoint,m_cellkeepthr); - } - - // Finished to access Collection - if (!m_timersvc.empty()) m_timer[2]->pause(); - // Algorithmic time - if (!m_timersvc.empty()) m_timer[3]->resume(); - - for(m_itt = m_itBegin;m_itt != m_itEnd; ++m_itt) { //loop over cells - - ncells++; - const TileCell* tilecell = (*m_itt); - double etaCell = tilecell->eta(); - double phiCell = tilecell->phi(); - double energyCell = tilecell->energy(); - - // find position of current cell w.r.t. seed - deta = fabs( etaCell - energyEta ); - dphi = fabs( phiCell - energyPhi ); - if ( dphi > M_PI ) dphi = 2.* M_PI - dphi; // wrap 0 -> 6.28 - // hadronic measurements: energy sum in 0.1*0.1 - if ( deta <= 0.12 && - dphi <= 0.12 ){ - //samp = CaloSampling::getSampling(*tilecell); - samp = tilecell->caloDDE()->getSampling(); - rtrigEmCluster.setEnergy(samp,rtrigEmCluster.energy(samp) + energyCell); - rtrigEmCluster.setRawEnergy(samp,rtrigEmCluster.rawEnergy(samp) + energyCell); - if( (CaloSampling::TileBar0 == samp) || (CaloSampling::TileExt0 == samp) || (CaloSampling::TileGap1 == samp) || (CaloSampling::TileGap2 == samp) ) { - rtrigEmCluster.setEhad1(rtrigEmCluster.ehad1() + energyCell); - } - } - - } // end of loop over cells - // Algorithmic time - if (!m_timersvc.empty()) m_timer[3]->pause(); - - } // End of loop over TileCal drawers - rtrigEmCluster.setNCells(ncells+rtrigEmCluster.nCells() ); - if (!m_timersvc.empty()) m_timer[0]->propVal(rtrigEmCluster.nCells() ); - -#ifndef NDEBUG - if ( msg().level() <= MSG::DEBUG ) { - PrintCluster(rtrigEmCluster.energy(CaloSampling::TileBar0) - +rtrigEmCluster.energy(CaloSampling::TileExt0),1,0 - ,CaloSampling::TileBar0,CaloSampling::TileExt0); - PrintCluster(rtrigEmCluster.energy(CaloSampling::TileBar1) - +rtrigEmCluster.energy(CaloSampling::TileExt1),1,1 - ,CaloSampling::TileBar1,CaloSampling::TileExt1); - PrintCluster(rtrigEmCluster.energy(CaloSampling::TileBar2) - +rtrigEmCluster.energy(CaloSampling::TileExt2),1,2 - ,CaloSampling::TileBar2,CaloSampling::TileExt2); - } -#endif - // Stop all timers - if (!m_timersvc.empty()){ - m_timer[4]->stop(); - m_timer[3]->stop(); - m_timer[2]->stop(); - m_timer[1]->stop(); - m_timer[0]->stop(); - } - - return StatusCode::SUCCESS; -} diff --git a/Trigger/TrigAlgorithms/TrigT2CaloEgamma/src/EgammaHadEnFex.h b/Trigger/TrigAlgorithms/TrigT2CaloEgamma/src/EgammaHadEnFex.h deleted file mode 100644 index 6a4ee60b5881..000000000000 --- a/Trigger/TrigAlgorithms/TrigT2CaloEgamma/src/EgammaHadEnFex.h +++ /dev/null @@ -1,67 +0,0 @@ -/* - Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration -*/ - -/******************************************************************** - - NAME: EgammaHadEnFex.h - PACKAGE: Trigger/TrigAlgorithms/TrigT2CaloEgamma - - AUTHOR: M.P. Casado - - PURPOSE: Based on Cluster position defined in the second - EM Calorimeter layer, calculates total Had cluster - energy. - *******************************************************************/ - -#ifndef TRIGT2CALOEGAMMA_EGAMMAHADENFEX_H -#define TRIGT2CALOEGAMMA_EGAMMAHADENFEX_H - -#include "TrigT2CaloCommon/IAlgToolCalo.h" -#include "GaudiKernel/AlgTool.h" - -#include "CxxUtils/checker_macros.h" -ATLAS_NO_CHECK_FILE_THREAD_SAFETY; // legacy trigger code - -/** Feature extraction Tool for LVL2 Calo. Hadronic EndCaps - and Tile Calorimeter. All Samples */ -class EgammaHadEnFex: public IAlgToolCalo { - public: - // to avoid compiler warning about hidden virtuals - using IAlgToolCalo::execute; - - /** Constructor */ - EgammaHadEnFex(const std::string & type, const std::string & name, - const IInterface* parent); - /** Destructor */ - virtual ~EgammaHadEnFex(); - /** @brief execute feature extraction for the EM Calorimeter - * second layer - * @param[out] rtrigEmCluster is the output cluster. - * @param[in] eta/phi-min/max = RoI definition. - */ - StatusCode execute(xAOD::TrigEMCluster &rtrigEmCluster, - const IRoiDescriptor& roi, - const CaloDetDescrElement*& caloDDE = caloDDENull); - - // StatusCode execute(TrigEMCluster &rtrigEmCluster,double etamin, - // double etamax, double phimin, double phimax); - - - StatusCode initialize() { - // Very important to call base class initialize - if ( IAlgToolCalo::initialize().isFailure() ) { - *(new MsgStream(AlgTool::msgSvc(), name())) - << MSG::FATAL - << "Could not init base class IAlgTooCalo" << endmsg; - } - if (!m_timersvc.empty()) { - m_timer[0]->propName("T2CaEm_NCells"); - } - return StatusCode::SUCCESS; - } - -}; - - -#endif diff --git a/Trigger/TrigAlgorithms/TrigT2CaloEgamma/src/EgammaSamp1Fex.cxx b/Trigger/TrigAlgorithms/TrigT2CaloEgamma/src/EgammaSamp1Fex.cxx deleted file mode 100644 index 9886a2a03fdc..000000000000 --- a/Trigger/TrigAlgorithms/TrigT2CaloEgamma/src/EgammaSamp1Fex.cxx +++ /dev/null @@ -1,428 +0,0 @@ -/* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration -*/ - -// ******************************************************************** -// -// NAME: EgammaSamp1Fex.cxx -// PACKAGE: Trigger/TrigAlgorithms/TrigT2CaloEgamma -// -// AUTHOR: M.P. Casado -// -// Energy Ratio calculation modifications by Steve Armstrong -// 8 May 2003 -// -// ******************************************************************** - -//#include "TrigCaloEvent/TrigEMCluster.h" -#include "CaloGeoHelpers/CaloSampling.h" - -#include "EgammaSamp1Fex.h" -#include "TrigT2CaloCommon/Calo_Def.h" - -#include "IRegionSelector/IRoiDescriptor.h" - -inline double proxim(double b,double a){ return b+2.*M_PI*round((a-b)*(1./(2.*M_PI))) ;} - - -EgammaSamp1Fex::EgammaSamp1Fex(const std::string & type, const std::string & name, - const IInterface* parent): IAlgToolCalo(type, name, parent) - { -#ifndef NDEBUG - // Create Geometry object - // 0 -> CaloType EM, 1 -> First Layer -// m_geometry[0] = new T2Geometry(0,1); -#endif -} - -EgammaSamp1Fex::~EgammaSamp1Fex(){ -} - -StatusCode EgammaSamp1Fex::execute(xAOD::TrigEMCluster &rtrigEmCluster, - const IRoiDescriptor& roi, - const CaloDetDescrElement*& caloDDE ) { - - // Time total AlgTool time - if (!m_timersvc.empty()) m_timer[0]->start(); - // reset error - m_error=0x0; - - bool cluster_in_barrel = true; - if ( caloDDE ) - cluster_in_barrel = caloDDE->is_lar_em_barrel(); - - ATH_MSG_DEBUG( "in execute(TrigEMCluster &)" ); - - // Time to access RegionSelector - if (!m_timersvc.empty()) m_timer[1]->start(); - - // Region Selector, sampling 1 - int sampling = 1; - - // Get detector offline ID's for Collections - m_data->RegionSelector(sampling, roi ); - - // Finished to access RegionSelector - if (!m_timersvc.empty()) m_timer[1]->stop(); - // Time to access Collection (and ByteStreamCnv ROBs) - if (!m_timersvc.empty()) m_timer[2]->start(); - - if ( m_data->LoadCollections(m_iBegin,m_iEnd).isFailure() ){ - if (!m_timersvc.empty()) m_timer[2]->stop(); - return StatusCode::SUCCESS; - } - m_error|=m_data->report_error(); - if ( m_error ) { - if (!m_timersvc.empty()) m_timer[2]->stop(); - return StatusCode::SUCCESS; - } - if ( m_saveCells ){ - m_data->storeCells(m_iBegin,m_iEnd,*m_CaloCellContPoint,m_cellkeepthr); - } - // Finished to access Collection - if (!m_timersvc.empty()) m_timer[2]->stop(); - // Algorithmic time - if (!m_timersvc.empty()) m_timer[3]->start(); - - - double totalEnergy = 0; - double etaEnergyS1 = 0; - CaloSampling::CaloSample samp; - - double energyEta = rtrigEmCluster.eta(); - double energyPhi = rtrigEmCluster.phi(); - if ( caloDDE ){ - energyEta = caloDDE->eta(); - energyPhi = caloDDE->phi(); - } - - - - // begin SRA mod: set regions via LAr way - - // Fix for 3x7 cluster size - double z_etamin = energyEta-(0.075/2.); - double z_etamax = energyEta+(0.075/2.); - double z_phimin = energyPhi-(7.0*0.09817477/4.0)/2.0; - double z_phimax = energyPhi+(7.0*0.09817477/4.0)/2.0; - // Fix for 5x5 clusters - if ( ! cluster_in_barrel ) { - z_etamin = energyEta-(0.125/2.); - z_etamax = energyEta+(0.125/2.); - z_phimin = energyPhi-(5.0*0.09817477/4.0)/2.0; - z_phimax = energyPhi+(5.0*0.09817477/4.0)/2.0; - } - - double z_eta = z_etamin + (z_etamax - z_etamin)*0.5; - double z_phi = z_phimin + (z_phimax - z_phimin)*0.5; - - // Make sure these boundaries are valid - - if (z_etamin < -2.4) z_etamin = -2.4 ; - if (z_etamin < -1.4 && z_etamin > -1.5) z_etamin = -1.4; - if (z_etamin > 1.4 && z_etamin < 1.5) z_etamin = 1.5; - - if (z_etamax > 2.4) z_etamax = 2.4 ; - if (z_etamax < -1.4 && z_etamax > -1.5) z_etamax = -1.5; - if (z_etamax > 1.4 && z_etamax < 1.5) z_etamax = 1.4; - - bool signals = false; - if ( (z_etamin < 0) && (z_etamax>0) ) signals = true; - - // identify region - double etareg[6] = {-2.4,-2.0,-1.8,1.8,2.0,2.4}; - double etagra[5] = {0.025/4,0.025/6,0.025/8,0.025/6,0.025/4}; - int imax = -9; - int icrk = 1 ; - double dgra = 0.; - // find the region, and check if the eta range cross region. - for(int ir=0;ir<5;ir++) { - // make sure you're not outside acceptance of 2.4 - if(fabs(z_eta)<2.4 && z_eta>=etareg[ir] && z_eta<=etareg[ir+1]) { - dgra= etagra[ir]; - imax = ir; - if(z_etamin>=etareg[ir] && z_etamax<=etareg[ir+1]) icrk=0; - } - } - const double inv_dgra = dgra != 0 ? 1. / dgra : 1; - - // end SRA modification - - - // begin SRA mod: pick the eta around which to scan - int strip_border; - double etanew; - double aeta = fabs(z_eta); - if (aeta <= 1.4) { - strip_border = (int)rint(aeta*inv_dgra); - // this is -0.5 in atrecon: qgcshap.F .. Makes more sense to be +0.5 - etanew = ((double)strip_border - 0.5)*dgra; - } - if (aeta <= 1.5) { - etanew = -99.; - } - if (aeta <= 1.8) { - strip_border = (int)rint(aeta*inv_dgra); - // this is -0.5 in atrecon: qgcshap.F .. Makes more sense to be +0.5 - etanew = ((double)strip_border - 0.5)*dgra; - } - else if (aeta <= 2.0) { - strip_border = (int)rint((aeta-1.8)*inv_dgra); - etanew = 1.8 + ((double)strip_border - 0.5)*dgra; - } - else if (aeta <= 2.4) { - strip_border = (int)rint((aeta-2.0)*inv_dgra); - etanew = 2.0 + ((double)strip_border - 0.5)*dgra; - } - else { - etanew = -99.; - } - - etanew = (z_eta < 0.) ? -etanew : etanew; - - - // check border crossing. - int ibin = 0 ; - double dgra1 = 0.; - int iadd = 0; - if((icrk==1) && (imax!=-9)){ - if(imax>0 && z_etamin>etareg[imax-1] && z_etamin<=etareg[imax]){ - dgra1 = etagra[imax-1]; - ibin=(int)rint((etareg[imax]+0.5*dgra-etanew)*inv_dgra)+20; - iadd=0; - } else{ - if(imax<4 && z_etamax>etareg[imax+1] && z_etamax<=etareg[imax+2]) { - dgra1 = etagra[imax+1]; - ibin = (int)rint((etareg[imax+1]-0.5*dgra-etanew)*inv_dgra)+20; - iadd=1; - } - } - if ( imax==0 ) { - dgra1 = etagra[0]; - ibin=(int)rint((etareg[0]+0.5*dgra-etanew)*inv_dgra)+20; - iadd=1; - } - if ( imax==4 ) { - dgra1 = etagra[4]; - ibin = (int)rint((etareg[5]-0.5*dgra-etanew)*inv_dgra)+20; - iadd=0; - } - } - const double inv_dgra1 = dgra1 != 0 ? 1. / dgra1 : 1; - - // end SRA mod - - double z_enecell[40]; //SRA - double z_etacell[40]; //SRA - //double z_phicell[40]; //SRA - - for(int iii=0;iii<40;iii++){ - z_enecell[iii]=0.; - z_etacell[iii]=0.; - //z_phicell[iii]=0.; - } - - double deta = 0.; // eta difference current cell - seed - double dphi = 0.; // phi difference current cell - seed - int ncells = 0; - - for(m_it = m_iBegin;m_it != m_iEnd; ++m_it) { // Should be revised for London scheme - ncells++; - const LArCell* larcell = (*m_it); - double etaCell = larcell->caloDDE()->eta_raw(); - double phiCell = larcell->phi(); - double energyCell = larcell->energy(); - - if ( fabs(etanew) != 99.) { - - double eta_cell = etaCell; //SRA - //double eta_cell = larcell->eta(); //SRA - int ieta; //SRA - - - // begin SRA mod - if (eta_cell >= z_etamin && eta_cell <= z_etamax) { - // adjust for possible 2*pi offset. - double phi_cell0=larcell->phi(); - double phi_cell = proxim(phi_cell0,z_phi) ; - if (phi_cell >= z_phimin && phi_cell <= z_phimax) { - if(icrk == 0){ - // single region - ieta = (int)rint((eta_cell-etanew)*inv_dgra)+20; - // correction for eta=0 spacing - if ( signals && eta_cell < 0 ) - ieta=(int)rint((eta_cell-etanew+0.007)*inv_dgra)+20; - } else { - if(eta_cell>etareg[imax] && eta_cell<etareg[imax+1]) - { - // same region - ieta = (int)rint((eta_cell-etanew)*inv_dgra)+20; - } else{ - // different region - ieta = - (int)rint((eta_cell-etareg[imax+iadd]-(0.5-iadd)*dgra1)*inv_dgra1)+ibin; - } - } // icrk==0 - - double z_e = energyCell; - - if(ieta>=1 && ieta<=40){ - z_enecell[ieta-1] +=z_e ; - z_etacell[ieta-1] =eta_cell ; - //z_phicell[ieta-1] =phi_cell0 ; - } - } // phi range - } // eta range - //end SRA mod - } //endif for veto of clusters in crack outside acceptance - - // Find the standard em cluster energy (3*7 cell, now sampling 1) - deta = fabs( etaCell - energyEta ); - dphi = fabs( phiCell - energyPhi ); - if ( dphi > M_PI ) dphi = 2.* M_PI - dphi; // wrap 0 -> 6.28 - - bool condition37 = cluster_in_barrel && ( deta <= 0.0375 && dphi <= 0.0875 ); - bool condition55 = (!cluster_in_barrel) && ( deta <= 0.0625 && dphi <= 0.0625 ); - - if ( condition37 || condition55 ) { - totalEnergy += energyCell; - etaEnergyS1 += energyCell * etaCell; - //samp = CaloSampling::getSampling(*larcell); - samp = larcell->caloDDE()->getSampling(); - rtrigEmCluster.setEnergy(samp,rtrigEmCluster.energy(samp) - + energyCell); - rtrigEmCluster.setRawEnergy(samp,rtrigEmCluster.rawEnergy(samp) - + energyCell); - - } - - - - } // end of loop over sampling 1 - - // Finished lgorithmic time - if (!m_timersvc.empty()) m_timer[3]->stop(); - // Started Save EMShowerMinimal time - if (!m_timersvc.empty()) m_timer[4]->start(); - - //SRA mod: Emax! - double z_emax = -999.0; - int z_ncmax = -999; - for(int ic=0; ic<40; ic++) { - if(z_enecell[ic]>z_emax){ - z_emax = z_enecell[ic]; - z_ncmax=ic; - } - } - - // Include now setWstot - double wtot = 0.; - double etot = 0.; - double wstot = -9999.; - double wstot_deta = (z_etamax-z_etamin)*0.5; - double eta_center = z_etacell[z_ncmax]; - if ( caloDDE != 0 ) { - eta_center = caloDDE->eta(); - wstot_deta = caloDDE->deta()*2.5; - } - - for(int ic=0; ic<40; ic++) { - if( (z_etacell[ic]>=(eta_center-wstot_deta)) && (z_etacell[ic]<=(eta_center+wstot_deta)) ){ - wtot += z_enecell[ic] * (ic - z_ncmax) * (ic - z_ncmax); - etot += z_enecell[ic] ; - } - } - if ( etot>0 ) { - wtot = wtot/etot; - wstot = wtot> 0 ? sqrt(wtot) : -9999.; - } - - //SRA mod: Emax2! - //int z_ncsec1=0; - double z_esec1=-999.0; // energy of strip with second max 2 - - double ecand1; - - for(int iic=1; iic<39; iic++) { - if( (z_enecell[iic]>z_enecell[iic-1]) && (z_enecell[iic]>z_enecell[iic+1]) ){ - if(iic!=z_ncmax){ - ecand1 = z_enecell[iic]; - if(ecand1>z_esec1){ - z_esec1=ecand1; - //z_ncsec1=iic; - } - } - } - } - - - if ((z_emax + z_esec1) < 0.) z_emax = -(100./98.)* z_esec1; - - // do frac73 calculation: sum energies +-3 strips - // and +-1 strip around highest energy strip - double strip7 = 0.; // temporary variables to sum energy - double strip3 = 0.; - double frac73 = 0.; // (E7-E3)/E3 in layer 1 - - // use Steve's array to calculate frac73 MW - // - int smax = z_ncmax ; - if ( z_ncmax>2 && z_ncmax<37 ){ - strip7 = z_enecell[smax-3]+z_enecell[smax-2]+z_enecell[smax-1] - +z_enecell[smax+1]+z_enecell[smax+2]+z_enecell[smax+3] - +z_enecell[smax]; - strip3 = z_enecell[smax-1]+z_enecell[smax]+z_enecell[smax+1]; - } else if (z_ncmax==2){ - strip7 = z_enecell[smax-2]+z_enecell[smax-1] - +z_enecell[smax+1]+z_enecell[smax+2]+z_enecell[smax+3] - +z_enecell[smax]; - strip3 = z_enecell[smax-1]+z_enecell[smax]+z_enecell[smax+1]; - } else if (z_ncmax==37){ - strip7 = z_enecell[smax-3]+z_enecell[smax-2]+z_enecell[smax-1] - +z_enecell[smax+1]+z_enecell[smax+2] - +z_enecell[smax]; - strip3 = z_enecell[smax-1]+z_enecell[smax]+z_enecell[smax+1]; - } else if (z_ncmax==1){ - strip7 = z_enecell[smax-1] - +z_enecell[smax+1]+z_enecell[smax+2]+z_enecell[smax+3] - +z_enecell[smax]; - strip3 = z_enecell[smax-1]+z_enecell[smax]+z_enecell[smax+1]; - } else if (z_ncmax==38){ - strip7 = z_enecell[smax-3]+z_enecell[smax-2]+z_enecell[smax-1] - +z_enecell[smax+1] - +z_enecell[smax]; - strip3 = z_enecell[smax-1]+z_enecell[smax]+z_enecell[smax+1]; - } - strip3 > 1.e-6 ? // protect against small values of strip3 - frac73 = (strip7 - strip3)/strip3: - frac73 = 99.; - - // Update Cluster Variables - - rtrigEmCluster.setNCells(ncells+rtrigEmCluster.nCells()); - rtrigEmCluster.setEmaxs1(z_emax); - rtrigEmCluster.setWstot(wstot); - rtrigEmCluster.setE2tsts1(z_esec1); - rtrigEmCluster.setFracs1(frac73); - if ( totalEnergy != 0.0 ) - rtrigEmCluster.setEta1( etaEnergyS1/totalEnergy ); - else - rtrigEmCluster.setEta1( 99.0 ); - rtrigEmCluster.setRawEnergy( rtrigEmCluster.rawEnergy() + totalEnergy); - -#ifndef NDEBUG - if ( msg().level() <= MSG::DEBUG ) { - if ( m_geometryTool->EtaPhiRange(0,1,energyEta, energyPhi)) - msg() << MSG::ERROR << "problems with EtaPhiRange" << endmsg; - PrintCluster(totalEnergy,0,1,CaloSampling::EMB1,CaloSampling::EME1); - } -#endif - - // Finish Save EMShowerMinimal time - if (!m_timersvc.empty()) m_timer[4]->stop(); - // Time total AlgTool time - if (!m_timersvc.empty()) m_timer[0]->stop(); - - return StatusCode::SUCCESS; -} - diff --git a/Trigger/TrigAlgorithms/TrigT2CaloEgamma/src/EgammaSamp1Fex.h b/Trigger/TrigAlgorithms/TrigT2CaloEgamma/src/EgammaSamp1Fex.h deleted file mode 100644 index 93d60eb1d088..000000000000 --- a/Trigger/TrigAlgorithms/TrigT2CaloEgamma/src/EgammaSamp1Fex.h +++ /dev/null @@ -1,53 +0,0 @@ -/* - Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration -*/ - -/******************************************************************** - - NAME: EgammaSamp1Fex.h - PACKAGE: Trigger/TrigAlgorithms/TrigT2CaloEgamma - - AUTHOR: M.P. Casado - - PURPOSE: Based on Cluster position defined in the second - EM Calorimeter layer, calculates strip layer energy - profile variable (eRatio) to discriminate clusters - with 1 energy peak in the strip layer from clusters - with multiple peaks. Calculates Eta position in - this layer. - *******************************************************************/ - -#ifndef TRIGT2CALOEGAMMA_CALOSAMP1FEXEGAMMA_H -#define TRIGT2CALOEGAMMA_CALOSAMP1FEXEGAMMA_H - -#include "TrigT2CaloCommon/IAlgToolCalo.h" -#include "GaudiKernel/AlgTool.h" - -#include "CxxUtils/checker_macros.h" -ATLAS_NO_CHECK_FILE_THREAD_SAFETY; // legacy trigger code - -class IRoiDescriptor; - -/** Feature extraction Tool for LVL2 Calo. First EM Calorimeter sample. */ -class EgammaSamp1Fex: public IAlgToolCalo { - public: - // to avoid compiler warning about hidden virtuals - using IAlgToolCalo::execute; - - /** Constructor */ - EgammaSamp1Fex(const std::string & type, const std::string & name, - const IInterface* parent); - /** Destructor */ - virtual ~EgammaSamp1Fex(); - /** @brief execute feature extraction for the EM Calorimeter - * second layer - * @param[out] rtrigEmCluster is the output cluster. - * @param[in] eta/phi-min/max = RoI definition. - */ - StatusCode execute(xAOD::TrigEMCluster &rtrigEmCluster, - const IRoiDescriptor& roi, - const CaloDetDescrElement*& caloDDE = caloDDENull); -}; - - -#endif diff --git a/Trigger/TrigAlgorithms/TrigT2CaloEgamma/src/EgammaSamp2Fex.cxx b/Trigger/TrigAlgorithms/TrigT2CaloEgamma/src/EgammaSamp2Fex.cxx deleted file mode 100644 index bc9be455f671..000000000000 --- a/Trigger/TrigAlgorithms/TrigT2CaloEgamma/src/EgammaSamp2Fex.cxx +++ /dev/null @@ -1,515 +0,0 @@ -/* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration -*/ - -// ******************************************************************** -// -// NAME: EgammaSamp2Fex.cxx -// PACKAGE: Trigger/TrigAlgorithms/TrigT2CaloEgamma -// -// AUTHOR: M.P. Casado -// -// -// ******************************************************************** - -#include "CaloIdentifier/LArEM_ID.h" - -//#include "TrigCaloEvent/TrigEMCluster.h" -#include "xAODTrigCalo/TrigEMCluster.h" -#include "CaloGeoHelpers/CaloSampling.h" - -#include "EgammaSamp2Fex.h" -#include "TrigT2CaloCommon/Calo_Def.h" - -#include "IRegionSelector/IRoiDescriptor.h" - -EgammaSamp2Fex::EgammaSamp2Fex(const std::string & type, const std::string & name, - const IInterface* parent): IAlgToolCalo(type, name, parent) - { -#ifndef NDEBUG - // Create Geometry object - // 0 -> CaloType EM, 2 -> Second Layer -// m_geometry[0] = new T2Geometry(0,2); -#endif - // By default no restriction is applied - declareProperty("MaxDetaHotCell",m_maxHotCellDeta=1.0); - declareProperty("MaxDphiHotCell",m_maxHotCellDphi=1.0); -} - -EgammaSamp2Fex::~EgammaSamp2Fex(){ -} - -StatusCode EgammaSamp2Fex::execute(xAOD::TrigEMCluster &rtrigEmCluster, - const IRoiDescriptor& roi, - const CaloDetDescrElement*& caloDDE) { - - // Time total AlgTool time - if (!m_timersvc.empty()) m_timer[0]->start(); - // reset error - m_error=0x0; - - ATH_MSG_DEBUG( "in execute(TrigEMCluster&)" ); - - // Time to access RegionSelector - if (!m_timersvc.empty()) m_timer[1]->start(); - - // Region Selector, sampling 2 - int sampling = 2; - - // Get detector offline ID's for Collections - m_data->RegionSelector( sampling, roi ); - - // Finished to access RegionSelector - if (!m_timersvc.empty()) m_timer[1]->stop(); - // Time to access Collection (and ByteStreamCnv ROBs) - if (!m_timersvc.empty()) m_timer[2]->start(); - - if ( m_data->LoadCollections(m_iBegin,m_iEnd).isFailure() ){ - - if (!m_timersvc.empty()) m_timer[2]->stop(); - return StatusCode::SUCCESS; - } - if ( m_error ) { - if (!m_timersvc.empty()) m_timer[2]->stop(); - return StatusCode::SUCCESS; - } - m_error|=m_data->report_error(); - if ( m_saveCells && !m_error ){ - m_data->storeCells(m_iBegin,m_iEnd,*m_CaloCellContPoint,m_cellkeepthr); - } - // Finished to access Collection - if (!m_timersvc.empty()) m_timer[2]->stop(); - // Algorithmic time - if (!m_timersvc.empty()) m_timer[3]->start(); - - double energyEta = 0.; - double energyPhi = 0.; - - // add these variables to take care of phi wrap-around - double energyNegPhi = 0.; //SRA - double energyNegPhiConv = 0.; //SRA - double energyPosPhi = 0.; //SRA - - - // 1. Find seed cell (highest Et in ROI .. layer 2) - // 2. Find Et weighted eta, phi in 3*7 cell (layer 2) (photon + e id) - // 3. Find Et in cells of sizes 3*3, 3*7, 7*7 (layer 2 + strips) - // (3*7 for photon + e id) - // 4. Find cluster width in 3*5 cell, layer 2 (photon id, needs - // parabolic parametrisation) - // 5. Find strip energies and eta (2*5 window) - // 6. Find frac73 (photon id), (E1-E2)/(E1+E2) (e + photon id) - - double seedEnergy = 0.; - double seedPhi = 999.; - double seedEta = 999.; - double hotPhi = 999.; - double hotEta = 999.; - int ncells = 0; - // LVL1 positions - float etaL1=rtrigEmCluster.eta(); - float phiL1=rtrigEmCluster.phi(); - - const LArEM_ID* emID = m_larMgr->getEM_ID(); - const LArCell* larcell; - const LArCell* seedCell = NULL; - const LArCell* hotCell = NULL; - for(m_it = m_iBegin;m_it != m_iEnd; ++m_it) { - larcell=(*m_it); - if (larcell->energy() > seedEnergy) { // Hottest cell seach - float deta=std::abs(etaL1-larcell->eta()); - if ( deta < m_maxHotCellDeta ){ // Eta check is faster. Do it First - float dphi=std::abs(phiL1-larcell->phi()); - dphi = std::abs ( M_PI - dphi ); - dphi = std::abs ( M_PI - dphi ); - if ( dphi < m_maxHotCellDphi ) { - seedEnergy = larcell->energy(); - seedCell=larcell; - } // End of dphi check - } // End of deta check - } // End of if energy - ncells++; - } - if (seedCell!=NULL){ - seedEta = seedCell->eta(); - seedPhi = seedCell->phi(); - // For the S-shape correction, we store the caloDDE of the hottest cell - caloDDE = (seedCell->caloDDE()); - hotCell = seedCell; - hotEta = hotCell->eta(); - hotPhi = hotCell->phi(); - } else { - m_error|=0x80000000; - if (!m_timersvc.empty()) m_timer[3]->stop(); - return StatusCode::SUCCESS; - } - - std::map<const LArCell*,float> windows; - for(m_it = m_iBegin;m_it != m_iEnd; ++m_it) { - larcell=(*m_it); - float deta=std::abs(seedEta-larcell->eta()); - if ( deta < 0.025+0.002 ){ // Eta check is faster. Do it First - float dphi=std::abs(seedPhi-larcell->phi()); - dphi = std::abs ( M_PI - dphi ); - dphi = std::abs ( M_PI - dphi ); - if ( dphi < 0.025+0.002 ) { - if ( windows.find(larcell) == windows.end() ){ - windows[larcell]=0.0; - } // end of windows check - } // End of dphi check - } // End of deta check - ncells++; - } - for(m_it = m_iBegin;m_it != m_iEnd; ++m_it) { - - const LArCell* larcell = (*m_it); - double etaCell = larcell->eta(); - double phiCell = larcell->phi(); - double energyCell = larcell->et(); - - // Find position of current cell w.r.t. seed - float deta = fabs( etaCell - seedEta ); - if ( deta > 0.05+0.002 ) continue; - for(std::map<const LArCell*,float>::iterator witer= - windows.begin(); witer!=windows.end(); ++witer){ - float deta1 = fabs( etaCell - witer->first->eta() ); - float dphi = fabs( phiCell - witer->first->phi() ); - if ( dphi > M_PI ) dphi = 2.* M_PI - dphi; // wrap 0 -> 6.28 - - - // Electromagnetic measurements, done by layer - // layer 2: Et weighted eta, phi, summed Et in 3*7, - // cluster width in 3*5 cell - // emEnergy in 3*7 cell is also calculated, all samplings - - double cellSizeEta; - double cellSizePhi; - if (emID->is_em_barrel( larcell->ID() ) ) { - cellSizeEta = etaSizeLArEMSamp2(etaCell, Calorimeter::EMBAR); - cellSizePhi = phiSizeLArEMSamp2(etaCell, Calorimeter::EMBAR); - } else { - cellSizeEta = etaSizeLArEMSamp2(etaCell, Calorimeter::EMEND); - cellSizePhi = phiSizeLArEMSamp2(etaCell, Calorimeter::EMEND); - } - - // 3. do the 3*5 stuff - int nCellsEta = 3; - int nCellsPhi = 5; - if ( deta1 <= 0.5*double(nCellsEta-1)*cellSizeEta+0.01 && - dphi <= 0.5*double(nCellsPhi-1)*cellSizePhi+0.01 ){ - witer->second+= energyCell; - } // End of do the 3*5 stuff - } // End of windows map loop - } // end of the loop - - float max = -999; - for(std::map<const LArCell*,float>::const_iterator witer= - windows.begin(); witer!=windows.end(); ++witer){ - if ( witer->second > max ) { - max = witer->second; - seedCell = witer->first; - } - } - - if (seedCell!=NULL){ - seedEta = seedCell->eta(); - seedPhi = seedCell->phi(); - // For the S-shape correction, we store the caloDDE of the hottest cell - caloDDE = (seedCell->caloDDE()); - } else { - m_error|=0x80000000; - if (!m_timersvc.empty()) m_timer[3]->stop(); - return StatusCode::SUCCESS; - } - - - - - - bool cluster_in_barrel = true; - if ( seedCell && seedCell->caloDDE() ) - cluster_in_barrel = seedCell->caloDDE()->is_lar_em_barrel(); - - // Build desired quantities using the values previously obtained. - - double energy37Lay2 = 0.; // sum Et in 3*7 cell layer 2 - double energy37Lay2NegPhi = 0.; //SRA for phi wrap-around - double energy37Lay2PosPhi = 0.; //SRA for phi wrap-around - double energy77Lay2 = 0.; // sum Et in 7*7 cell layer 2 - double energy35Lay2 = 0.; // sum Et in 3*5 cell layer 2 - double energy33Lay2 = 0.; // sum Et in 3*3 cell layer 2 - double weightEta = 0.; // temporary variable for cluster width - double weightEta2 = 0.; // ditto - double clusterWidth35= 0.; // cluster width in eta, 3*5 cell, layer 2 - int nCellsEta = 0; // size of cell array in eta - int nCellsPhi = 0; // size of cell array in phi - double deta = 0.; // eta difference current cell - seed - double dphi = 0.; // phi difference current cell - seed - double detaH = 0.; // eta difference current cell - seed - double dphiH = 0.; // phi difference current cell - seed - - double totalEnergy = 0; - CaloSampling::CaloSample samp; - - for(m_it = m_iBegin;m_it != m_iEnd; ++m_it) { - - const LArCell* larcell = (*m_it); - double etaCell = larcell->eta(); - double phiCell = larcell->phi(); - double energyCell = larcell->energy(); - - // Find position of current cell w.r.t. seed - deta = fabs( etaCell - seedEta ); - dphi = fabs( phiCell - seedPhi ); - if ( dphi > M_PI ) dphi = 2.* M_PI - dphi; // wrap 0 -> 6.28 - - detaH = fabs( etaCell - hotEta ); - dphiH = fabs( phiCell - hotPhi ); - if ( dphiH > M_PI ) dphiH = 2.* M_PI - dphiH; // wrap 0 -> 6.28 - - // Electromagnetic measurements, done by layer - // layer 2: Et weighted eta, phi, summed Et in 3*7, - // cluster width in 3*5 cell - // emEnergy in 3*7 cell is also calculated, all samplings - - double cellSizeEta; - double cellSizePhi; - if (emID->is_em_barrel( larcell->ID() ) ) { - cellSizeEta = etaSizeLArEMSamp2(etaCell, Calorimeter::EMBAR); - cellSizePhi = phiSizeLArEMSamp2(etaCell, Calorimeter::EMBAR); - } else { - cellSizeEta = etaSizeLArEMSamp2(etaCell, Calorimeter::EMEND); - cellSizePhi = phiSizeLArEMSamp2(etaCell, Calorimeter::EMEND); - } - - // hot cell stuff first - // 1. do the 7*7 stuff - nCellsEta = 7; - nCellsPhi = 7; - if ( detaH <= 0.5*double(nCellsEta-1)*cellSizeEta+0.01 && - dphiH <= 0.5*double(nCellsPhi-1)*cellSizePhi+0.01 ){ - // 2. do the 3*7 stuff - nCellsEta = 3; - nCellsPhi = 7; - if ( detaH <= 0.5*double(nCellsEta-1)*cellSizeEta+0.01 && - dphiH <= 0.5*double(nCellsPhi-1)*cellSizePhi+0.01 ){ - energy37Lay2 += energyCell; - } // End of do the 3*7 stuff - energy77Lay2 += energyCell; - } // End of do the 7*7 stuff - - // 1. do the 7*7 stuff - nCellsEta = 7; - nCellsPhi = 7; - if ( deta <= 0.5*double(nCellsEta-1)*cellSizeEta+0.005 && - dphi <= 0.5*double(nCellsPhi-1)*cellSizePhi+0.005 ){ - // 2. do the 3*7 stuff - nCellsEta = 3; - nCellsPhi = 7; - if ( deta <= 0.5*double(nCellsEta-1)*cellSizeEta+0.002 && - dphi <= 0.5*double(nCellsPhi-1)*cellSizePhi+0.002 ){ - energyEta += energyCell * etaCell; - //energy37Lay2 += energyCell; - - if ( cluster_in_barrel ){ - //totalEnergy += energyCell; - //samp = CaloSampling::getSampling(*larcell); - samp = larcell->caloDDE()->getSampling(); - //rtrigEmCluster.setEnergy(samp,rtrigEmCluster.energy(samp) + energyCell); - //rtrigEmCluster.setRawEnergy(samp,rtrigEmCluster.rawEnergy(samp) + energyCell); - } - - if ( phiCell > 0.) { // SRA phi wrap-around - energyPosPhi += double(energyCell) * phiCell; - energy37Lay2PosPhi += energyCell; - } else { - energyNegPhi += double(energyCell) * phiCell; - energyNegPhiConv += double(energyCell) * (phiCell+2.0*M_PI); - energy37Lay2NegPhi += energyCell; - } - // 3. do the 3*5 stuff - nCellsEta = 3; - nCellsPhi = 5; - if ( deta <= 0.5*double(nCellsEta-1)*cellSizeEta+0.01 && - dphi <= 0.5*double(nCellsPhi-1)*cellSizePhi+0.01 ){ - weightEta += energyCell * etaCell; - weightEta2 += energyCell * etaCell * etaCell; - energy35Lay2 += energyCell; - // 3a. do the 3*3 stuff - //nCellsEta = 3; - nCellsPhi = 3; - if ( deta <= 0.5*double(nCellsEta-1)*cellSizeEta+0.01 && - dphi <= 0.5*double(nCellsPhi-1)*cellSizePhi+0.01 ){ - energy33Lay2 += energyCell; - } // End of do the 3*3 stuff - } // End of do the 3*5 stuff - - } // End of do the 3x7 stuff - // 4. do the 5*5 stuff - nCellsEta = 5; - nCellsPhi = 5; - if ( (!cluster_in_barrel) && deta <= 0.5*double(nCellsEta-1)*cellSizeEta+0.005 && - dphi <= 0.5*double(nCellsPhi-1)*cellSizePhi+0.005 ){ - //totalEnergy += energyCell; - //samp = CaloSampling::getSampling(*larcell); - samp = larcell->caloDDE()->getSampling(); - //rtrigEmCluster.setEnergy(samp,rtrigEmCluster.energy(samp) + energyCell); - //rtrigEmCluster.setRawEnergy(samp,rtrigEmCluster.rawEnergy(samp) + energyCell); - } // End of do the 5*5 stuff - //energy77Lay2 += energyCell; - } // End of do the 7*7 stuff - - } // end of loop over sampling 2 - - // Normalise energy weighted angles and calculate values - - // SRA phi wrap-around - double AvgNegPhi = 0.; - double AvgPosPhi = 0.; - - if ( (energy37Lay2PosPhi + energy37Lay2NegPhi) > 0. ){ // dont divide by zero - energyEta /= (energy37Lay2PosPhi + energy37Lay2NegPhi) ; - - if (energy37Lay2NegPhi > 0. ){ - AvgNegPhi = energyNegPhi / energy37Lay2NegPhi; - } else { - AvgNegPhi = -999.0; - } - - if (energy37Lay2PosPhi > 0. ){ - AvgPosPhi = energyPosPhi / energy37Lay2PosPhi; - } else { - AvgPosPhi = -999.0; - } - - if (AvgPosPhi==-999.0) { - if (AvgNegPhi != -999.0) { - energyPhi = AvgNegPhi; - } - } - - if (AvgNegPhi==-999.0) { - if (AvgPosPhi != -999.0) { - energyPhi = AvgPosPhi; - } - } - - if (AvgNegPhi != -999.0 && AvgPosPhi != -999.0) { - if ( (AvgNegPhi > (-M_PI/2.0)) && (AvgPosPhi < (M_PI/2.0)) ) { - energyPhi = (energyNegPhi + energyPosPhi)/(energy37Lay2NegPhi + energy37Lay2PosPhi); - } else { - if ((AvgNegPhi < (-M_PI/2.0)) && (AvgPosPhi > (M_PI/2.0))) { - energyPhi = (energyNegPhiConv + energyPosPhi)/(energy37Lay2NegPhi + energy37Lay2PosPhi); - if (energyPhi > M_PI) { - energyPhi = energyPhi - 2*M_PI; - } - } - } - } - - } else { - energyEta = 99. ; - energyPhi = 0. ; - m_error|=0x40000000; - } - - for(m_it = m_iBegin;m_it != m_iEnd; ++m_it) { - - const LArCell* larcell = (*m_it); - double etaCell = larcell->eta(); - double phiCell = larcell->phi(); - double energyCell = larcell->energy(); - - // Find position of current cell w.r.t. seed - deta = fabs( etaCell - energyEta ); - dphi = fabs( phiCell - energyPhi ); - if ( dphi > M_PI ) dphi = 2.* M_PI - dphi; // wrap 0 -> 6.28 - - double cellSizeEta; - double cellSizePhi; - if (emID->is_em_barrel( larcell->ID() ) ) { - cellSizeEta = etaSizeLArEMSamp2(etaCell, Calorimeter::EMBAR); - cellSizePhi = phiSizeLArEMSamp2(etaCell, Calorimeter::EMBAR); - } else { - cellSizeEta = etaSizeLArEMSamp2(etaCell, Calorimeter::EMEND); - cellSizePhi = phiSizeLArEMSamp2(etaCell, Calorimeter::EMEND); - } - - nCellsEta = 3; - nCellsPhi = 7; - if ( (deta <= 0.5*double(nCellsEta-1)*cellSizeEta+0.01) && - (dphi <= 0.5*double(nCellsPhi-1)*cellSizePhi+0.01) ){ - - if ( cluster_in_barrel ){ - totalEnergy += energyCell; - //samp = CaloSampling::getSampling(*larcell); - samp = larcell->caloDDE()->getSampling(); - rtrigEmCluster.setEnergy(samp,rtrigEmCluster.energy(samp) + energyCell); - rtrigEmCluster.setRawEnergy(samp,rtrigEmCluster.rawEnergy(samp) + energyCell); - } - } // End of do the 3x7 stuff - - nCellsEta = 5; - nCellsPhi = 5; - if ( (!cluster_in_barrel) && (deta <= 0.5*double(nCellsEta-1)*cellSizeEta+0.01) && - (dphi <= 0.5*double(nCellsPhi-1)*cellSizePhi+0.01) ){ - totalEnergy += energyCell; - //samp = CaloSampling::getSampling(*larcell); - samp = larcell->caloDDE()->getSampling(); - rtrigEmCluster.setEnergy(samp,rtrigEmCluster.energy(samp) + energyCell); - rtrigEmCluster.setRawEnergy(samp,rtrigEmCluster.rawEnergy(samp) + energyCell); - } // End of do the 5*5 stuff - - } // end of loop over sampling 2 - - // calculate cluster width - - if ( energy35Lay2 > 0. ){ - const double inv_energy35Lay2 = 1. / energy35Lay2; - clusterWidth35 = (weightEta2*inv_energy35Lay2) - - (weightEta*inv_energy35Lay2)*(weightEta*inv_energy35Lay2); - clusterWidth35 > 0.? clusterWidth35 = sqrt(clusterWidth35) : - clusterWidth35 = 99.; - } else { - clusterWidth35 = 99.; - } - - // Finished Algorithmic time -// m_timer[0]->propVal((int)floorf(energyEta*100)); - if (!m_timersvc.empty()) m_timer[3]->stop(); - // Save EMShowerMinimal time - if (!m_timersvc.empty()) m_timer[4]->start(); - - - // Update cluster Variables - - // update stored variables - rtrigEmCluster.setE233(energy33Lay2); - rtrigEmCluster.setE237(energy37Lay2); - rtrigEmCluster.setE277(energy77Lay2); - rtrigEmCluster.setWeta2(clusterWidth35); - rtrigEmCluster.setRawEnergy( rtrigEmCluster.rawEnergy() + totalEnergy); - rtrigEmCluster.setEta(energyEta); - rtrigEmCluster.setPhi(energyPhi); - rtrigEmCluster.setRawEta(energyEta); - rtrigEmCluster.setRawPhi(energyPhi); - rtrigEmCluster.setNCells(ncells); - - // Finished save EMShowerMinimal time - if (!m_timersvc.empty()) m_timer[4]->stop(); - -#ifndef NDEBUG - // This will internaly define normal, narrow and large clusters - if ( msgLvl(MSG::DEBUG) ) { - if ( m_geometryTool->EtaPhiRange(0,2,energyEta, energyPhi)) - ATH_MSG_ERROR( "problems with EtaPhiRange" ); - ATH_MSG_DEBUG( "totalEnergy" << totalEnergy ); - PrintCluster(totalEnergy,0,2, CaloSampling::EMB2,CaloSampling::EME2); - } -#endif - - // Time total AlgTool time - if (!m_timersvc.empty()) m_timer[0]->stop(); - - return StatusCode::SUCCESS; -} diff --git a/Trigger/TrigAlgorithms/TrigT2CaloEgamma/src/EgammaSamp2Fex.h b/Trigger/TrigAlgorithms/TrigT2CaloEgamma/src/EgammaSamp2Fex.h deleted file mode 100644 index 283e1a7ab607..000000000000 --- a/Trigger/TrigAlgorithms/TrigT2CaloEgamma/src/EgammaSamp2Fex.h +++ /dev/null @@ -1,111 +0,0 @@ -/* - Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration -*/ - -/******************************************************************** - - NAME: EgammaSamp2Fex.h - PACKAGE: Trigger/TrigAlgorithms/TrigT2CaloEgamma - - AUTHOR: M.P. Casado - - PURPOSE: Calculates energy weighted cluster position around - hottest cell in RoI. Also, calculates energy in - a 3x7 and in a 7x7 cluster (rCore = 3x7/7x7). - *******************************************************************/ - -#ifndef TRIGT2CALOEGAMMA_CALOSAMP2FEXEGAMMA_H -#define TRIGT2CALOEGAMMA_CALOSAMP2FEXEGAMMA_H - - -#include "TrigT2CaloCommon/IAlgToolCalo.h" -#include "GaudiKernel/AlgTool.h" -#include "CaloGeoHelpers/CaloSampling.h" -#include "TrigT2CaloCommon/Calo_Def.h" - -#include "CxxUtils/checker_macros.h" -ATLAS_NO_CHECK_FILE_THREAD_SAFETY; // legacy trigger code - -class IRoiDesciptor; - -/** Feature extraction Tool for LVL2 Calo. Second EM Calorimeter sample. */ -class EgammaSamp2Fex: public IAlgToolCalo { - public: - // to avoid compiler warning about hidden virtuals - using IAlgToolCalo::execute; - - /** Constructor */ - EgammaSamp2Fex(const std::string & type, const std::string & name, - const IInterface* parent); - /** Destructor */ - virtual ~EgammaSamp2Fex(); - /** @brief execute feature extraction for the EM Calorimeter - * second layer - * @param[out] rtrigEmCluster is the output cluster. - * @param[in] eta/phi-min/max = RoI definition. - */ - StatusCode execute(xAOD::TrigEMCluster &rtrigEmCluster, const IRoiDescriptor& roi, - const CaloDetDescrElement*& caloDDE = caloDDENull); - - /** Special initialize for Samp2 to include eta as a - trigger timer item monitored parameter. Important - to compare time performance as a function of cluster - position. - */ - StatusCode initialize() { - // Very important to call base class initialize - if ( IAlgToolCalo::initialize().isFailure() ) { - *(new MsgStream(AlgTool::msgSvc(), name())) - << MSG::FATAL - << "Could not init base class IAlgTooCalo" << endmsg; - } - std::string basename(name().substr(25,5)+"."); - //std::string basename(name().substr(6,1)+name().substr(name().find("Fex",0)-5,5)); - //basename+=(name().substr(6,1)+name().substr(name().find("Fex",0)-5,5)); - if (!m_timersvc.empty()) { - m_timer[0]->propName(basename+"Eta"); - } - return StatusCode::SUCCESS; - } - - private: - inline double etaSizeLArEMSamp2(const double eta, const int calo) const; - inline double phiSizeLArEMSamp2(const double eta, const int calo) const; - float m_maxHotCellDeta; - float m_maxHotCellDphi; - -}; - -inline double EgammaSamp2Fex::etaSizeLArEMSamp2(double cellEta, int calo) const{ - double sizeEta; - if( calo == Calorimeter::EMBAR ){ - if ( fabs(cellEta) < 1.4 ){ - sizeEta = 0.025; - }else{ - sizeEta = 0.075; - } - } else { - if ( fabs(cellEta) < 2.5 ){ - sizeEta = 0.025; - } else{ - sizeEta = 0.1; - } - } - return sizeEta; -} - -inline double EgammaSamp2Fex::phiSizeLArEMSamp2(double cellEta, int calo) const{ - double sizePhi; - if( calo == Calorimeter::EMBAR ){ - sizePhi = 0.025; - } else { - if ( fabs(cellEta) < 2.5 ){ - sizePhi = 0.025; - } else { - sizePhi = 0.1; - } - } - return sizePhi; -} - -#endif diff --git a/Trigger/TrigAlgorithms/TrigT2CaloEgamma/src/RingerFex.cxx b/Trigger/TrigAlgorithms/TrigT2CaloEgamma/src/RingerFex.cxx deleted file mode 100644 index b989e67be41c..000000000000 --- a/Trigger/TrigAlgorithms/TrigT2CaloEgamma/src/RingerFex.cxx +++ /dev/null @@ -1,539 +0,0 @@ -/* - Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration -*/ - -/******************************************************* - * Author: Denis Damazio - * Revision - * Joao Victor Pinto, jodafons@cern.ch - * werner freund, wsfreund@cern.ch - * - * Implements the RingerFex. - *******************************************************/ -#include <vector> -#include <map> -#include <cmath> -#include <numeric> -#include "RingerFex.h" -#include "TrigTimeAlgs/TrigTimer.h" -#include "xAODTrigCalo/TrigEMCluster.h" -#include "xAODTrigRinger/TrigRingerRings.h" -#include "xAODTrigCalo/TrigEMClusterContainer.h" -#include "xAODTrigCalo/TrigEMClusterAuxContainer.h" -#include "xAODTrigRinger/TrigRingerRings.h" -#include "xAODTrigRinger/TrigRingerRingsContainer.h" -#include "xAODTrigRinger/TrigRingerRingsAuxContainer.h" -#include "TrigT2CaloCommon/IAlgToolCalo.h" -#include "GaudiKernel/ThreadLocalContext.h" -#include "CaloDetDescr/CaloDetDescrElement.h" - -ATLAS_NO_CHECK_FILE_THREAD_SAFETY; // legacy trigger code - -//!================================================================================= -const double RingerFex::ENERGY_THRESHOLD = 0.001; -const double RingerFex::PI_THRESHOLD = 1.0; -//!================================================================================= -RingerFex::RingerFex(const std::string& type, const std::string& name, const IInterface* parent) - : IAlgToolCalo(type, name, parent), - m_generateClusterTimer(0), - m_saveRoITimer(0), - m_RingerFexExecuteTimer(0), - m_getRingsTimer(0), - m_RingerRegSelTimer(0) - -{ - - declareProperty("EtaBins", m_etaBins ); - declareProperty("GlobalCenter", m_global_center = false ); - declareProperty("EtaSearchWindowSize", m_etaSearchWindowSize = 0.1 ); - declareProperty("PhiSearchWindowSize", m_phiSearchWindowSize = 0.1 ); - declareProperty("DEtaRings", m_detaRings ); - declareProperty("DPhiRings", m_dphiRings ); - declareProperty("NRings", m_nRings ); - declareProperty("LayersRings", m_layersRings ); - declareProperty("NLayersRings", m_nlayersRings ); - declareProperty("NMaxCells", m_maxCells ); - declareProperty("HltFeature", m_hlt_feature = "HLT_TrigT2CaloEgamma"); - declareProperty("Feature", m_feature = "TrigT2CaloEgamma" ); - declareProperty("HistLabel", m_histLabel = "" ); - - m_key = ""; - m_caloDDE = 0; - -} -//!================================================================================= -StatusCode RingerFex::finalize() { - for(unsigned i=0;i<m_cell_for_br.size();i++){ - m_cell_for_br[i].clear(); - } - m_cell_for_br.clear(); - return StatusCode::SUCCESS; -} -//!================================================================================= -StatusCode RingerFex::initialize() { - - if (IAlgToolCalo::initialize().isFailure()) { - ATH_MSG_FATAL( "Could not initialize base tool IAlgToolCalo." ); - return StatusCode::FAILURE; - } - - if ((m_nRings.size() != m_dphiRings.size()) || (m_nRings.size() != m_detaRings.size()) || (m_nRings.size() != m_nlayersRings.size())) { - ATH_MSG_FATAL( "Wrong configuration parameters for ring building." ); - return StatusCode::FAILURE; - } - - if((m_etaBins.size() < 2) || (m_etaBins.size()%2 != 0)){ - ATH_MSG_FATAL( "Wrong eta range configuration. Size must be equal or more than two." ); - return StatusCode::FAILURE; - } - - unsigned int layersCount = 0; - for (unsigned int i = 0; i < m_nRings.size(); ++i) { - std::vector<const CaloCell*> cell; - cell.reserve(m_maxCells[i]); - m_cell_for_br.push_back(cell); - std::vector<CaloSampling::CaloSample> layers; - for (unsigned int j = layersCount; j < layersCount + m_nlayersRings[i]; ++j){ - layers.push_back((CaloSampling::CaloSample) m_layersRings[j]); - } - layersCount += m_nlayersRings[i]; - m_ringsSet.push_back(RingSet(m_nRings[i], m_maxCells[i], m_detaRings[i], m_dphiRings[i], layers)); - } // end of loop over ringsets - - m_parent = dynamic_cast<T2CaloEgamma *>(const_cast<IInterface*>(this->parent())); - if (!m_parent) { - ATH_MSG_INFO( "Failed to get T2CaloEgamma parent algorithm instance, rings will be sored in store gate directly." ); - } - if (m_timersvc and m_parent ){ - if(m_histLabel != "") m_histLabel="_"+m_histLabel; ///insert underscore - m_getRingsTimer = m_parent->addTimer("Time_RingerFexGetRings"+m_histLabel); - m_RingerFexExecuteTimer = m_parent->addTimer("Time_RingerFexExecute"+m_histLabel); - m_RingerRegSelTimer = m_parent->addTimer("Time_RingerFexRegSel"+m_histLabel); - } - - ATH_MSG_DEBUG( "RingerAlgorithm initialization completed successfully." ); - for(unsigned i=0; i < m_etaBins.size(); i+=2) - { - ATH_MSG_DEBUG( "Eta bins for accept are: " << m_etaBins[i] << " < |eta| <= " << m_etaBins[i+1] ); - } - ATH_MSG_DEBUG( "User parameters are:" ); - ATH_MSG_DEBUG( "Using Global Center : " << m_global_center ); - ATH_MSG_DEBUG( "Search Window in Eta : " << m_etaSearchWindowSize ); - ATH_MSG_DEBUG( "Search Window in Phi : " << m_phiSearchWindowSize ); - - // reserve space for cells, better do it now than later - m_maxCellsAccumulated = std::accumulate(m_maxCells.begin()+4, m_maxCells.end(), 0); - m_cell.reserve(m_maxCellsAccumulated); - m_maxRingsAccumulated = std::accumulate(m_nRings.begin(), m_nRings.end(), 0); - - if ( not m_ringsKey.key().empty() ) - CHECK( m_ringsKey.initialize() ); - else - renounce( m_ringsKey ); - - return StatusCode::SUCCESS; -} -//!================================================================================= -xAOD::TrigRingerRings *RingerFex::getRings() { - - // Creating the pattern based on the generated rings. - xAOD::TrigRingerRings *these_rings = 0; - these_rings = new xAOD::TrigRingerRings(); - these_rings->makePrivateStore(); - std::vector<float> ref_rings; - these_rings->setRings(ref_rings); - ref_rings.reserve( m_maxRingsAccumulated ); - - for (std::vector<RingSet>::iterator jt=m_ringsSet.begin(); jt!=m_ringsSet.end(); ++jt) { - ref_rings.insert(ref_rings.end(), jt->pattern().begin(), jt->pattern().end()); - } // end of loop over ringsets - - these_rings->setRings(ref_rings); - - return these_rings; -} -//!================================================================================= -void RingerFex::maxCell (const std::vector<const CaloCell*>& vcell, - double& eta, double& phi, const double& eta_ref, - const double& phi_ref, const double& eta_window, - const double& phi_window) -{ - double current = -999e30; - double this_eta = 0.0; - double this_phi = 0.0; - const CaloCell* c = 0; - const CaloCell* cit = 0; - const double etamin = eta_ref - (0.5 * eta_window); - const double etamax = eta_ref + (0.5 * eta_window); - const double phimin = phi_ref - (0.5 * phi_window); - const double phimax = phi_ref + (0.5 * phi_window); - - //are we, possibly at the wrap-around region for phi? - bool wrap = check_wrap_around(phi_ref, false); - bool reverse_wrap = check_wrap_around(phi_ref, true); - - //get at least the first cell, in case of panic (all zeroes for instance) - for (std::vector<const CaloCell*>::const_iterator it = vcell.begin(); - it != vcell.end(); ++it) { - cit = *it; - this_eta = cit->eta(); - this_phi = cit->phi(); - if (this_eta > etamin && this_eta < etamax){ - double phi_use = this_phi; //use this value for phi (wrap protection) - if (wrap) phi_use = fix_wrap_around(phi_use, false); - if (reverse_wrap) phi_use = fix_wrap_around(phi_use, true); - if (phi_use > phimin && phi_use < phimax){ - if (cit->energy() > current) { - c = cit; - current = cit->energy(); - } - } - } - } // end of loop over cells - if (!c) { - eta = eta_ref; - phi = phi_ref; - } - else { - eta = c->eta(); - phi = c->phi(); - } -} -//!================================================================================= -StatusCode RingerFex::execute(xAOD::TrigEMCluster &rtrigEmCluster, const IRoiDescriptor& roi, const CaloDetDescrElement*& dde) -{ - return execute (rtrigEmCluster, roi, dde, Gaudi::Hive::currentContext()); -} - -StatusCode RingerFex::execute(xAOD::TrigEMCluster &rtrigEmCluster, const IRoiDescriptor& roi, const CaloDetDescrElement*& , const EventContext& context) -{ - m_error = 0x0; - bool accept=false; - float eta=std::fabs(rtrigEmCluster.eta()); - - ATH_MSG_DEBUG( "Event with eta = " << eta ); - - if (m_RingerRegSelTimer) m_RingerFexExecuteTimer->start(); - if (m_getRingsTimer) m_getRingsTimer->start(); - - ///find eta bin - for(unsigned i=0; i<m_etaBins.size();i+=2){ - if((eta > m_etaBins[i]) && (eta <= m_etaBins[i+1])){ - ATH_MSG_DEBUG("Eta bins accept are :" << m_etaBins[i] << " < |eta| <= " << m_etaBins[i+1]); - accept=true; - } - } - - if(!accept) - { - ATH_MSG_DEBUG( "Event with |eta| = " << eta << " was rejected." ); - return StatusCode::SUCCESS; - } - - if ((getCells(roi.etaMinus(), roi.etaPlus(), roi.phiMinus(), roi.phiPlus(), m_ringsSet, m_global_center,/* - */ rtrigEmCluster.eta(), rtrigEmCluster.phi(), m_etaSearchWindowSize, m_phiSearchWindowSize)).isFailure()) { - - ATH_MSG_ERROR( "Failed to get cells from Region Selector." ); - return StatusCode::FAILURE; - } - - // RingSets to xAOD::TrigRingerRings - std::unique_ptr<xAOD::TrigRingerRings> rings(getRings()); - - if (!rings.get()) { - ATH_MSG_ERROR( "Error generating the rings!" ); - return StatusCode::FAILURE; - } - - if (m_getRingsTimer) m_getRingsTimer->stop(); - - // parse between RingerFex and T2CaloEgamma (m_parent) - //rings->setRoIword( rtrigEmCluster.RoIword() ); - if (m_parent) { - m_parent->setRingsFeature(rings.release(),m_key,m_feature); - } else { - if ( not m_ringsKey.key().empty() ) { - ATH_MSG_DEBUG("Recording rings in store with a key: " << m_ringsKey.key() ); - auto handle = SG::makeHandle( m_ringsKey, context ); - CHECK( handle.record( std::move(rings) ) ); - } - } - - if (m_RingerFexExecuteTimer) m_RingerFexExecuteTimer->stop(); - return StatusCode::SUCCESS; -} -//!================================================================================= -StatusCode RingerFex::getCells(double etamin, double etamax, double phimin, double phimax, - std::vector<RingSet>& rset, - bool global_center, - const double& eta, const double& phi, - const double& eta_window, - const double& phi_window) -{ - const CaloCell *it_tmp; - const TileCell *itt_tmp; - unsigned int rs = 0; - - double my_eta = eta; - double my_phi = phi; - - // Are we, possibly at the wrap-around region for phi? - bool wrap = check_wrap_around(phi, false); - bool reverse_wrap = check_wrap_around(phi, true); - if (m_RingerRegSelTimer) - { - m_RingerRegSelTimer->start(); - m_RingerRegSelTimer->pause(); - } - // clear HEC and TILE cells - m_cell.clear(); - - // Getting LAr cells and populating RingSets - // Code has to be repetitve to make it really fast - for (unsigned det = TTEM; det <= TTHEC; det++){ - for (int sampling = 0; sampling < 4; ++sampling, rs++) { - - if (rs == 7) rs--; - else { - rset.at(rs).reset(); - m_cell_for_br[rs].clear(); - } - - // RingSet config layer - const std::vector<CaloSampling::CaloSample>& dets = rset.at(rs).detectors(); - if(dets.empty()) continue; - - if (m_RingerRegSelTimer) m_RingerRegSelTimer->resume(); - m_data->RegionSelector(sampling,etamin,etamax,phimin,phimax, static_cast<DETID> (det)); - if ( m_data->LoadCollections(m_iBegin, m_iEnd).isFailure() ) { - ATH_MSG_ERROR( "Failure while trying to retrieve cell information for the "<< det <<" calorimeter." ); - return StatusCode::FAILURE; - } - if (m_RingerRegSelTimer) m_RingerRegSelTimer->pause(); - std::vector<const CaloCell*> &vecTemp = m_cell_for_br[rs]; - - if(rs < 4){ - if(!global_center){ - double current = -999e30; - double this_eta = 0.0; - double this_phi = 0.0; - const CaloCell* c = 0; - // Note that etamin2 (calculated above) is different from etamin (Region Selector)! - const double etamin2 = eta - (0.5 * eta_window); - const double etamax2 = eta + (0.5 * eta_window); - const double phimin2 = phi - (0.5 * phi_window); - const double phimax2 = phi + (0.5 * phi_window); - - for(m_it = m_iBegin; m_it != m_iEnd; ++m_it) { - it_tmp = (CaloCell *) *m_it; - bool found=false; - for (std::vector<CaloSampling::CaloSample>::const_iterator kt=dets.begin(); kt!=dets.end(); ++kt) { - if (((CaloSampling::CaloSample) (*kt)) == it_tmp->caloDDE()->getSampling()){ - found=true; - break; - } - }// Loop over config layers - if(!found) continue; - - vecTemp.push_back(it_tmp); - this_eta = it_tmp->eta(); - this_phi = it_tmp->phi(); - if (this_eta > etamin2 && this_eta < etamax2){ - double phi_use = this_phi; //use this value for phi (wrap protection) - if (wrap) phi_use = fix_wrap_around(phi_use, false); - if (reverse_wrap) phi_use = fix_wrap_around(phi_use, true); - if (phi_use > phimin2 && phi_use < phimax2){ - if (it_tmp->energy() > current) { - c = it_tmp; - current = c->energy(); - } - } - } - } - if (!c) { - my_eta = eta; - my_phi = phi; - } - else { - my_eta = c->eta(); - my_phi = c->phi(); - } - } // end if not global center - else{ - for(m_it = m_iBegin; m_it != m_iEnd; ++m_it) { - it_tmp = (CaloCell *) *m_it; - bool found=false; - for (std::vector<CaloSampling::CaloSample>::const_iterator kt=dets.begin(); kt!=dets.end(); ++kt) { - if (((CaloSampling::CaloSample) (*kt)) == it_tmp->caloDDE()->getSampling()){ - found=true; - break; - } - }// Loop over config layers - if(!found) continue; - vecTemp.push_back(it_tmp); - } - } - - if ( !(m_cell_for_br[rs]).size() ) { - continue; - } - rset.at(rs).add(m_cell_for_br[rs], my_eta, my_phi); - } // end if rs < 4 - else{ - // this part will hold the HEC part - for(m_it = m_iBegin; m_it != m_iEnd; ++m_it) { - it_tmp = (CaloCell *) *m_it; - //vecTemp.push_back(it_tmp); - m_cell.push_back(it_tmp); - } // end of loop over cells - } // end if rs >= 4 - } // end of loop over samplings - } // end of loop over detectors - - - // Getting TileCal cells and populating RingSets - if (m_RingerRegSelTimer) m_RingerRegSelTimer->resume(); - m_data->RegionSelector(0,etamin,etamax,phimin,phimax,TILE); - //m_cell.clear(); - for (unsigned int iR=0;iR<m_data->TileContSize();++iR) { - if ( m_data->LoadCollections(m_itBegin, m_itEnd,iR,!iR).isFailure() ) { - ATH_MSG_ERROR( "Error retrieving TileCalorimeter cells!" ); - return StatusCode::FAILURE; - } - for(m_itt = m_itBegin; m_itt != m_itEnd; ++m_itt) { //loop over cells - itt_tmp = *m_itt; - m_cell.push_back((CaloCell *) itt_tmp); - } // end of loop over cells - } // end of loop over containers - if (m_RingerRegSelTimer) m_RingerRegSelTimer->stop(); - - rs = 4; - CaloSampling::CaloSample cs_temp; - for (std::vector<RingSet>::iterator jt=rset.begin()+rs; jt!=rset.end(); ++jt, rs++) { - const std::vector<CaloSampling::CaloSample>& dets = jt->detectors(); - for (std::vector<const CaloCell *>::const_iterator ct = m_cell.begin(); ct != m_cell.end(); ++ct) { - //cs_temp = CaloSampling::getSampling(*(*ct)); - cs_temp = (*ct)->caloDDE()->getSampling(); - for (std::vector<CaloSampling::CaloSample>::const_iterator kt=dets.begin(); kt!=dets.end(); ++kt) { - if (((CaloSampling::CaloSample) (*kt)) == cs_temp){ - (m_cell_for_br[rs]).push_back(*ct); - } - } // for relevant detectors - } // end of loop over cells - if ( !(m_cell_for_br[rs]).size() ) { - continue; - } - if (!global_center) { - double my_eta, my_phi; - maxCell(m_cell_for_br[rs], my_eta, my_phi, eta, phi, eta_window, phi_window); - jt->add(m_cell_for_br[rs], my_eta, my_phi); - } - else { - jt->add(m_cell_for_br[rs], eta, phi); - } - } // end of loop over ringsets - - - // debug RingSet - if(msgLvl(MSG::DEBUG)) - { - ATH_MSG_DEBUG("--------------- Cluster Information ----------------"); - for(unsigned rs=0; rs<rset.size(); ++rs){ - ATH_MSG_DEBUG("RingSet number is: " << rs); - for(unsigned i=0;i<rset.at(rs).detectors().size();i++) - ATH_MSG_DEBUG(" Calo layer ID is : "<< rset.at(rs).detectors()[i] ); - ATH_MSG_DEBUG("search eta window: " << eta_window << " search phi window: " << phi_window); - ATH_MSG_DEBUG("deta: " << m_detaRings[rs] << " dphi: " << m_dphiRings[rs]); - ATH_MSG_DEBUG("eta: " << my_eta << " phi: " << my_phi); - ATH_MSG_DEBUG("Pattern has size equal than: " << rset.at(rs).pattern().size()); - for(unsigned i=0;i<rset.at(rs).pattern().size();++i) - ATH_MSG_DEBUG(" sample " << i << " energy: " << rset.at(rs).pattern()[i] << " MeVs."); - }// Loop over ringSets - ATH_MSG_DEBUG("---------------- End of information -----------------"); - } - - return StatusCode::SUCCESS; -} -//!================================================================================= -//!================================================================================= -//!================================================================================= -//!================================================================================= -RingerFex::RingSet::RingSet (unsigned int max, unsigned int maxCells, double etasz, double phisz, const std::vector<CaloSampling::CaloSample> &detectors) - : m_etasz(etasz), - m_phisz(phisz), - m_max(max), - m_maxCells(maxCells), - m_detector(detectors), - m_val(max), - m_cachedOverEtasize(1/etasz), - m_cachedOverPhisize(1/phisz) -{;} -//!================================================================================= -RingerFex::RingSet::RingSet () - : m_etasz(0.1), - m_phisz(0.1), - m_max(0), - m_maxCells(512), - m_detector(0), - m_val(0), - m_cachedOverEtasize(1), - m_cachedOverPhisize(1) -{ -} -//!================================================================================= -RingerFex::RingSet::~RingSet() -{;} -//!================================================================================= -void RingerFex::RingSet::add (const std::vector<const CaloCell*>& c, - const double& eta_center, const double& phi_center) -{ - // some protection - if(m_val.empty() || m_detector.empty()) return; - - typedef std::vector<const CaloCell*> vec_type; - //typedef std::vector<CaloSampling::CaloSample> samp_type; - - // Used later to multiply by the ring energy and get Et instead of E - const double one_over = 1 / std::cosh(std::fabs(eta_center)); - - //are we, possibly at the wrap-around region for phi? - const bool wrap = RingerFex::check_wrap_around(phi_center, false); - const bool reverse_wrap = RingerFex::check_wrap_around(phi_center, true); - - //for all cells - for (vec_type::const_iterator it=c.begin(); it!=c.end(); ++it) { - - //std::cout << "current caloDDE->getSampling() is: " << (*it)->caloDDE()->getSampling() << std::endl; - - //if I get here, is because I have to include the cell energy. It - //calculates which ring the cells should be added to, then, it adds - //up the cell value there and goes to the next cell. No need to do - //anything later, because the sums are already correct! - - double phi_use = (*it)->phi(); //use this value for phi (wrap protection) - if (wrap) phi_use = RingerFex::fix_wrap_around(phi_use, false); - else if (reverse_wrap) phi_use = RingerFex::fix_wrap_around(phi_use, true); - - // Measure delta eta and delta phi to find out on which ring we are - unsigned int i = 0; - const double deltaEta = ((*it)->eta() - eta_center)*m_cachedOverEtasize; - const double deltaPhi = (phi_use - phi_center)*m_cachedOverPhisize; - const double deltaGreater = std::max(fabs(deltaEta), fabs(deltaPhi)); - i = static_cast<unsigned int>( std::floor (deltaGreater) ); - // Certain compilers have problems with round(), so let's do it ourselves - if ( (deltaGreater - (double) i) > 0.5) ++i; - - if (i < m_val.size()) { - //give us Et instead of E - m_val[i] += (*it)->energy(); - } - - } //end for all cells - - for (unsigned i=0; i < m_val.size(); i++) { - m_val[i] *= one_over; - } // end for all rings - -} -//!================================================================================= - diff --git a/Trigger/TrigAlgorithms/TrigT2CaloEgamma/src/RingerFex.h b/Trigger/TrigAlgorithms/TrigT2CaloEgamma/src/RingerFex.h deleted file mode 100644 index 150edd286edc..000000000000 --- a/Trigger/TrigAlgorithms/TrigT2CaloEgamma/src/RingerFex.h +++ /dev/null @@ -1,239 +0,0 @@ -/* - Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration -*/ - -/** - * @file TrigCaloRinger/RingerFex.h - * $Author: damazio $ - * $Revision: 351944 $ - * $Date$ - * - */ - -#ifndef RINGERFEX_H -#define RINGERFEX_H - -#include <string> -#include "xAODTrigRinger/TrigRingerRings.h" -#include "CaloGeoHelpers/CaloSampling.h" -#include "CaloEvent/CaloCell.h" -#include "TrigT2CaloCommon/IAlgToolCalo.h" -#include "T2CaloEgamma.h" - -#include "CxxUtils/checker_macros.h" -ATLAS_NO_CHECK_FILE_THREAD_SAFETY; // legacy trigger code - -class MsgStream; -class TrigEMCluster; // I dont know if put the xAOD prefix here! - -typedef double Feature; -typedef std::vector<Feature> Pattern; - -/** - * This is the Ringer's tool. It creates the rings which are put into - * RingerRings and then looked by a multi-variable hypothesis making - * algorithm or regular LVL2 decision is taken by TrigL2CaloHypo. - * The number, sampling and widths of the rings is fully - * configurable. - */ -class RingerFex : public IAlgToolCalo { - -protected: - - // Helper class used to build ringsets - class RingSet { - - public: //interface - - /** - * Builds a new RingSet, starting from a ring definition. The RingSet - * starts empty. - * - */ - RingSet (unsigned int max, unsigned int maxCells, double etasz, double phisz, const std::vector<CaloSampling::CaloSample> &detectors); - - /** - * to create an empty RingSet is possible, but watch out, you can't do - * much with it... - */ - RingSet (); - - /** - * Virtualises the destructor - */ - virtual ~RingSet(); - - /** - * Access the configuration for this object - */ - inline const double& eta_size(void) const { return m_etasz; } - inline const double& phi_size(void) const { return m_phisz; } - inline size_t max(void) const { return m_max; } - inline size_t maxCells(void) const { return m_maxCells; } - const std::vector<CaloSampling::CaloSample>& detectors(void) const - { return m_detector; } - - /** - * Adds some set of cells to this RingSet. - * - * @param c The cells to add - * @param eta_center Where, in eta, I should center my rings - * @param phi_center Where, in phi, I should center my rings - */ - void add (const std::vector<const CaloCell *>& c, - const double& eta_center, const double& phi_center); - - /** - * Returns the (current) ring values. - */ - inline Pattern& pattern (void) { return m_val; } - - /** - * Resets all current values - */ - inline void reset (void) { for (unsigned int i = 0; i < m_val.size(); ++i) m_val[i] = 0; } - - private: //representation - - double m_etasz; ///< the width of rings, in eta - double m_phisz; ///< the width of rings, in phi - size_t m_max; ///< the amount of rings to produce - size_t m_maxCells; ///< the amount of cells to gather - std::vector<CaloSampling::CaloSample> m_detector; ///< I'm good for those - - Pattern m_val; ///< my current values - - mutable float m_cachedOverEtasize; ///< cached value of 1/m_config.eta_size() for optimizations - mutable float m_cachedOverPhisize; ///< cached value of 1/m_config.phi_size() for optimizations - - }; - - // Start of central methods -public: - - RingerFex (const std::string& type, const std::string& name, const IInterface* parent); - virtual ~RingerFex() { } - - using IAlgToolCalo::execute; - - virtual StatusCode initialize() override; - virtual StatusCode finalize() override; - //StatusCode execute(xAOD::TrigEMCluster &rtrigEmCluster, double etamin, double etamax, double phimin, double phimax); - virtual StatusCode execute(xAOD::TrigEMCluster &rtrigEmCluster, const IRoiDescriptor& roi, - const CaloDetDescrElement*& /*caloDDE*/) override; - virtual StatusCode execute(xAOD::TrigEMCluster &rtrigEmCluster, const IRoiDescriptor& roi, - const CaloDetDescrElement*& /*caloDDE*/, - const EventContext& context); - -private: // Representation - - SG::WriteHandleKey<xAOD::TrigRingerRings> m_ringsKey{ this, "RingsKey", "", "Key for outputting the rings, should not be set for the non-MT running" }; - - std::string m_hlt_feature; - std::string m_feature; - std::string m_key; - - T2CaloEgamma *m_parent; - - std::vector<double> m_detaRings; - std::vector<double> m_dphiRings; - std::vector<unsigned int> m_nRings; - std::vector<unsigned int> m_layersRings; - std::vector<unsigned int> m_nlayersRings; - std::vector<unsigned int> m_maxCells; - std::vector<float> m_etaBins; - - - unsigned int m_maxCellsAccumulated; - unsigned int m_maxRingsAccumulated; - - std::vector<const CaloCell *> m_cell; // Cells at RoI (TODO: use multimap!) - - bool m_global_center; // Should I use a global center at e.m. 2? - double m_etaSearchWindowSize; // The window size in eta for searching the hot cell. - double m_phiSearchWindowSize; // The window size in phi for searching the hot cell. - - std::vector<RingSet> m_ringsSet; // It will containg the raw rings generated and their configuration. - std::vector< std::vector<const CaloCell *> > m_cell_for_br; - - /** - * This method is responsible to generating the rings, by accessing the RoI cells supplied. - * - * @return An object containing the generated rings. - */ - xAOD::TrigRingerRings *getRings(); - inline StatusCode getCells(double etamin, double etamax, double phimin, double phimax, - std::vector<RingSet>& rset, bool global_center, - const double& eta, const double& phi, - const double& eta_window, - const double& phi_window); - //void storeDebugRoI(const std::string &hltFeatureLabel, const xAOD::TrigEMCluster &rtrig); - //void storeDebugRoI(); - -protected: - // For timing - TrigTimer *m_generateClusterTimer, *m_saveRoITimer; ///< For timing. - TrigTimer *m_RingerFexExecuteTimer, *m_getRingsTimer; ///< For timing. - TrigTimer *m_RingerRegSelTimer; ///< For timing. - std::string m_histLabel; - -public: - - const static double PI_THRESHOLD; - const static double ENERGY_THRESHOLD; // Defines the energy threshold for divisions, in MeV's - - /** - * Helper function to identify wrap around cases. - * if reverse_wrap = true, then we check for reverse wrap_arround. - */ - static bool check_wrap_around(const double phi_center, const bool reverse_wrap) { - if (reverse_wrap) return (phi_center < (RingerFex::PI_THRESHOLD - M_PI)); - else return (phi_center > (M_PI - RingerFex::PI_THRESHOLD)); - } - - /** - * Helper function to fix wrap around cases. - * if reverse_wrap = true, then we fix reverse wrap_arround cases. - */ - static double fix_wrap_around(const double phi_value, const bool reverse_wrap) { - if (reverse_wrap) { - if (phi_value > 0.) return (phi_value - 2*M_PI); - } else { - if (phi_value < 0.) return (phi_value + 2*M_PI); - } - return phi_value; - } - -private: - - /** - * Calculates based on the RoI input and on the center previously calculated. - * - * @param vecCells The vector containing cells in this RoI - * @param rset The ring set configuration to use for creating the rings - * @param global_center If this value is set to <code>false</code> a layer based - * center is calculated for the ring center. Otherwise, the values given on - * the following variables are considered. - * @param eta The center to consider when building the rings - * @param phi The center to consider when building the rings - * @param eta_window The window size in eta, to use when considering peak finding - * @param phi_window The window size in phi, to use when considering peak finding - void build_rings(const std::vector<const CaloCell *> &vecCells, - std::vector<RingSet>& rset, bool global_center, - const double& eta, const double& phi, - const double& eta_window, - const double& phi_window); - **/ - - /** - * Calculates the maximum energy cell in a CaloCell collection. - */ - void maxCell (const std::vector<const CaloCell*>& vcell, - double& eta, double& phi, const double& eta_ref, - const double& phi_ref, const double& eta_window, - const double& phi_window); - - protected: - -}; -#endif diff --git a/Trigger/TrigAlgorithms/TrigT2CaloEgamma/src/T2CaloEgamma.cxx b/Trigger/TrigAlgorithms/TrigT2CaloEgamma/src/T2CaloEgamma.cxx deleted file mode 100644 index 125e4311aa12..000000000000 --- a/Trigger/TrigAlgorithms/TrigT2CaloEgamma/src/T2CaloEgamma.cxx +++ /dev/null @@ -1,516 +0,0 @@ -/* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration -*/ - -/* - NAME: T2CaloEgamma.cxx - PACKAGE: Trigger/TrigAlgorithms/TrigT2CaloEgamma - - AUTHOR: M.P. Casado - S.R. Armstrong - - - Add variables for job option controlled region limits, set defaults - to most likely values. - - Add function EtaPhiRange to return the maximum and minimum eta or phi - values to use when calculating energy sums over a region - R. Soluk -*/ - -#include "GaudiKernel/MsgStream.h" -#include "GaudiKernel/IToolSvc.h" -#include "GaudiKernel/StatusCode.h" -#include "AthLinks/ElementLink.h" - -#include "TrigT1Interfaces/RecEmTauRoI.h" -#include "TrigSteeringEvent/TrigRoiDescriptor.h" - -#include "xAODTrigCalo/TrigEMClusterContainer.h" -#include "xAODTrigCalo/TrigEMClusterAuxContainer.h" -#include "xAODTrigRinger/TrigRingerRings.h" -#include "xAODTrigRinger/TrigRingerRingsContainer.h" - -#include "T2CaloEgamma.h" -#include "TrigT2CaloCommon/IAlgToolCalo.h" -#include "TrigT2CaloCalibration/IEgammaCalibration.h" - -#include "CxxUtils/phihelper.h" -#include "egammaUtils/egammaqweta2c.h" - -class ISvcLocator; - -T2CaloEgamma::T2CaloEgamma(const std::string & name, ISvcLocator* pSvcLocator) - : T2CaloBase(name, pSvcLocator), m_calibsBarrel(this), m_calibsEndcap(this), m_storeCells(false) -{ - declareProperty("TrigEMClusterKey",m_trigEmClusterKey = "TrigT2CaloEgamma"); - declareProperty("L1ForceEta",m_l1eta = -10.0); - declareProperty("L1ForcePhi",m_l1phi = -10.0); - declareProperty("CalibListBarrel",m_calibsBarrel,"list of calib tools for the Barrel clusters"); - declareProperty("CalibListEndcap",m_calibsEndcap,"list of calib tools for the EndCap clusters"); - declareProperty("StoreCells",m_storeCells,"store cells in container attached to RoI"); - declareProperty("RhoFirstLayer",m_rhoFirstLayer); - declareProperty("RhoMiddleLayer",m_rhoMiddleLayer); - declareProperty("ZFirstLayer",m_zFirstLayer); - declareProperty("ZMiddleLayer",m_zMiddleLayer); - declareProperty("RhoEta",m_rhoEta); - declareProperty("ZEta",m_zEta); -} - -T2CaloEgamma::~T2CaloEgamma() -{ -} - - -HLT::ErrorCode T2CaloEgamma::hltInitialize() -{ - // Support for new monitoring - declareMonitoredVariable("Eta", m_MonEta); - declareMonitoredVariable("Phi", m_MonPhi); - declareMonitoredObject("Et", m_monitoredCluster,&xAOD::TrigEMCluster::et); - declareMonitoredObject("Had1Et", m_monitoredCluster,&xAOD::TrigEMCluster::ehad1); - declareMonitoredObject("weta2", m_monitoredCluster,&xAOD::TrigEMCluster::weta2); - declareMonitoredObject("frac73", m_monitoredCluster,&xAOD::TrigEMCluster::fracs1); - // More complicated variables to be monitored - declareMonitoredVariable("Rcore", m_rCore ); - declareMonitoredVariable("Eratio",m_eRatio); - declareMonitoredVariable("ConversionErrors", m_conversionError); - declareMonitoredVariable("AlgorithmErrors", m_algorithmError); - if ( m_calibsBarrel.retrieve().isFailure() ) ATH_MSG_DEBUG( "No Calibration Available for the Barrel" ); - if ( m_calibsEndcap.retrieve().isFailure() ) ATH_MSG_DEBUG( "No Calibration Available for the Endcap" ); - - // Sets the name of the key container - ToolHandleArray<IAlgToolCalo>::iterator it = m_emAlgTools.begin(); - for (; it < m_emAlgTools.end(); it++) - (*it)->setCellContainerPointer(&m_Container); - - return HLT::OK; -} - - -HLT::ErrorCode T2CaloEgamma::hltExecute(const HLT::TriggerElement* inputTE, HLT::TriggerElement* outputTE) -{ - // Time total T2CaloEgamma execution time. - if ( m_timersvc ) m_timer[0]->start(); - m_conversionError=0; - m_algorithmError=0; - m_monitoredCluster=0; - - // Necessary to add RingerRings' ElementLink - m_tmpOutputTE = outputTE; - m_rings = 0; - - -#ifndef NDEBUG - ATH_MSG_INFO( "in execute()" ); -#endif - - // Some debug output: -#ifndef NDEBUG - ATH_MSG_DEBUG( "outputTE->getId(): " << outputTE->getId() ); - ATH_MSG_DEBUG( "inputTE->getId(): " << inputTE->getId() ); -#endif - - const TrigRoiDescriptor* roiDescriptor = 0; - - HLT::ErrorCode hltStatus = getFeature(inputTE, roiDescriptor); - - if ( hltStatus == HLT::OK ) { -#ifndef NDEBUG - ATH_MSG_DEBUG( *roiDescriptor ); -#endif - } else { - ATH_MSG_WARNING( " Failed to find RoiDescriptor " ); - return hltStatus; - } - - // Some debug output: - -#ifndef NDEBUG - ATH_MSG_DEBUG( "Message to count events. LVL1 phi=" - << roiDescriptor->phi() - << " & LVL1 eta=" - << roiDescriptor->eta() ); -#endif - - // This will be used to restrict hot cell search - /// sadly, there will be real issues because this uses - /// *floats* rather than doubles - /// - what *exactly* is going on here? Why is the etamin/phimin etc - /// being changed? In the new scheme, this is getting an RoI from - /// somewhere, so the size should be in the roiDescriptor - /// if we want to change the size, we create a new roiDescriptor, - /// and then we should attach it to the navigation - float etaL1, phiL1; - // End LVL1 part - double etamin, etamax, phimin, phimax; - if ( (m_l1eta<-9.9)&&(m_l1phi<-9.9)){ - etamin = std::max( -2.5, roiDescriptor->eta() - m_etaWidth ); - etamax = std::min( 2.5, roiDescriptor->eta() + m_etaWidth ); - - phimin = CxxUtils::wrapToPi( roiDescriptor->phi() - m_phiWidth ); - phimax = CxxUtils::wrapToPi( roiDescriptor->phi() + m_phiWidth ); - - etaL1 = roiDescriptor->eta(); - phiL1 = roiDescriptor->phi(); - } - else { - etamin = std::max( -2.5, m_l1eta-m_etaWidth ); - etamax = std::min( 2.5, m_l1eta+m_etaWidth ); - - phimin = CxxUtils::wrapToPi( m_l1phi-m_phiWidth ); - phimax = CxxUtils::wrapToPi( m_l1phi+m_phiWidth ); - - etaL1 = m_l1eta; - phiL1 = m_l1phi; - } - /// NO!!! wrap to range -pi .. pi - // while (phimin < 0) phimin += 2. * M_PI; - // while (phimax > 2 * M_PI) phimax -= 2. * M_PI; - /// maybe these following 2 lines are because of the - /// float -> double difference in pi? - // if (phiL1+0.001>=M_PI) phiL1-=0.001; - // if (phiL1-0.001<=-M_PI) phiL1+=0.001; - - /// Do we want to create a new roiDescriptor here or not ?? - - /// if we do ... - - TrigRoiDescriptor newroi( roiDescriptor->eta(), etamin, etamax, - roiDescriptor->phi(), phimin, phimax); - - /// NB: !!! this *hasn't* checked that this "max(2.5, eta+etawidth) etc still includes - /// the roi eta in the first place !!! this whole creation of limits and regions - /// should be tidied up - -#ifndef NDEBUG - ATH_MSG_DEBUG( " etamin = "<< etamin ); - ATH_MSG_DEBUG( " etamax = "<< etamax ); - ATH_MSG_DEBUG( " phimin = "<< phimin ); - ATH_MSG_DEBUG( " phimax = "<< phimax ); -#endif - - -#ifndef NDEBUG - ATH_MSG_DEBUG( " Making TrigEMCluster " ); -#endif - - - xAOD::TrigEMCluster* ptrigEmCluster = new xAOD::TrigEMCluster(); - //ptrigEmCluster->setStore(ptrigEmClusterAux); - ptrigEmCluster->makePrivateStore(); - ptrigEmCluster->setEnergy(0.0); - ptrigEmCluster->setEt(0.0); - ptrigEmCluster->setRawEnergy(0.0); - ptrigEmCluster->setRawEt(0.0); - ptrigEmCluster->setE277(0); - ptrigEmCluster->setEmaxs1(0); - ptrigEmCluster->setE2tsts1(0); - ptrigEmCluster->setEhad1(-999); - ptrigEmCluster->setWeta2(-999); - ptrigEmCluster->setFracs1(-999); - ptrigEmCluster->setE233(-999); - ptrigEmCluster->setWstot(-999); - ptrigEmCluster->setEta1(-999); - ptrigEmCluster->setNCells(0); - ptrigEmCluster->setRawEta(-999); - ptrigEmCluster->setRawPhi(-999); - m_monitoredCluster = ptrigEmCluster; - - // It is a good idea to clear the energies - for(int i=0;i<CaloSampling::CaloSample::MINIFCAL0;i++){ - ptrigEmCluster->setEnergy((CaloSampling::CaloSample )i,0.); - ptrigEmCluster->setRawEnergy((CaloSampling::CaloSample )i,0.); - } - // Initial cluster position is the LVL1 position - ptrigEmCluster->setEta(etaL1); - ptrigEmCluster->setPhi(phiL1); - - // Add RoI word to TrigEMCluster - // Dangerous !!!! we need to define a *new* roiDescriptor if we want to - // change the size, so we should be careful about *which* roi descriptor - // we save, and *which* "roiWord" (if any) we store if we need to use it - // again - (*ptrigEmCluster).setRoIword(roiDescriptor->roiWord()); - const CaloDetDescrElement * caloDDE = nullptr; - - // zeros the container per RoI - m_Container = 0; - - ToolHandleArray<IAlgToolCalo>::iterator it = m_emAlgTools.begin(); - if ( m_timersvc ) m_timer[1]->start(); - uint32_t error = 0; - for (; it < m_emAlgTools.end(); it++) { - // if ((*it)->execute(*ptrigEmCluster,etamin,etamax,phimin,phimax).isFailure() ) { - if ((*it)->execute(*ptrigEmCluster, newroi, caloDDE ).isFailure() ) { - ATH_MSG_WARNING( "T2Calo AlgToolEgamma returned Failure" ); - // return HLT::TOOL_FAILURE; - return HLT::ErrorCode(HLT::Action::ABORT_CHAIN,HLT::Reason::USERDEF_1); - } - uint32_t in_error = (*it)->report_error(); - if ( 0x0FFFFFFF & in_error ) m_conversionError++; - if ( 0xF0000000 & in_error ) m_algorithmError++; - error|=in_error; - } - // support to new monitoring - m_rCore=0; - m_eRatio=0; - m_stripRatio=0; - m_MonEta=ptrigEmCluster->eta(); - m_MonPhi=ptrigEmCluster->phi(); - if ( ptrigEmCluster->e277()!=0 ) - m_rCore = ptrigEmCluster->e237()/ptrigEmCluster->e277(); - if ( ptrigEmCluster->emaxs1()+ptrigEmCluster->e2tsts1() !=0){ - m_eRatio = ptrigEmCluster->emaxs1()-ptrigEmCluster->e2tsts1(); - m_eRatio /= ptrigEmCluster->emaxs1()+ptrigEmCluster->e2tsts1(); - } - - // Cluster quality is a collection of possible errors - // No error quality=0 - ptrigEmCluster->setClusterQuality(error); - if ( m_timersvc ) m_timer[1]->stop(); - - if ( ( error & 0xC0000000 ) || ptrigEmCluster->phi() < -M_PI || ptrigEmCluster->phi() > +M_PI - || fabsf ( ptrigEmCluster->eta() ) > 10.0 ) { - // Clustering failed. Transmit ahead L1 - ptrigEmCluster->setEta(etaL1); - ptrigEmCluster->setPhi(phiL1); - ptrigEmCluster->setEnergy(0.0); - ptrigEmCluster->setEt(0.0); - } - - if ( caloDDE != 0 ){ - if ( caloDDE->is_lar_em_barrel() ){ - for( ToolHandleArray<IEgammaCalibration>::iterator - ical=m_calibsBarrel.begin(); - ical != m_calibsBarrel.end(); ++ical ) - (*ical)->makeCorrection(ptrigEmCluster,caloDDE); - }else{ - for( ToolHandleArray<IEgammaCalibration>::iterator - ical=m_calibsEndcap.begin(); - ical != m_calibsEndcap.end(); ++ical ) - (*ical)->makeCorrection(ptrigEmCluster,caloDDE); - } - } - - // Final correction to weta only - if ( caloDDE != 0 ) - ptrigEmCluster->setWeta2( egammaqweta2c::Correct(ptrigEmCluster->eta(),caloDDE->eta(),ptrigEmCluster->weta2()) ); - - - float calZ0 = 0; - /// don't use calculated z position yet ... - // calZ0 = calculateZ0((*ptrigEmCluster).Eta1(), (*ptrigEmCluster).eta()); - - - // Print out Cluster produced - if ( msgLvl(MSG::DEBUG) ) { - ATH_MSG_DEBUG( " Values of Cluster produced: " ); - ATH_MSG_DEBUG( " REGTEST: emEnergy = "<< (*ptrigEmCluster).energy() ); - ATH_MSG_DEBUG( " REGTEST: hadEnergy = "<< (*ptrigEmCluster).ehad1() ); - - if ( ptrigEmCluster->e277()!=0. ) - ATH_MSG_DEBUG( " REGTEST: rCore = " - << ((*ptrigEmCluster).e237() )/ ((*ptrigEmCluster).e277()) ); - else ATH_MSG_DEBUG( " REGTEST: e277 equals to 0" ); - - ATH_MSG_DEBUG( " REGTEST: energyRatio = " - << (((*ptrigEmCluster).emaxs1()-(*ptrigEmCluster).e2tsts1())/ - ((*ptrigEmCluster).emaxs1()+(*ptrigEmCluster).e2tsts1())) - ); - - ATH_MSG_DEBUG( " REGTEST: clusterWidth = " << (*ptrigEmCluster).weta2() ); - ATH_MSG_DEBUG( " REGTEST: frac73 = " << (*ptrigEmCluster).fracs1() ); - ATH_MSG_DEBUG( " REGTEST: e233 = " << (*ptrigEmCluster).e233() ); - ATH_MSG_DEBUG( " REGTEST: wstot = " << (*ptrigEmCluster).wstot() ); - ATH_MSG_DEBUG( " REGTEST: eta = "<< (*ptrigEmCluster).eta() ); - ATH_MSG_DEBUG( " REGTEST: phi = "<< (*ptrigEmCluster).phi() ); - ATH_MSG_DEBUG( " REGTEST: Eta1 = "<< (*ptrigEmCluster).eta1() ); - ATH_MSG_DEBUG( " REGTEST: calZ0 = "<< calZ0 ); - ATH_MSG_DEBUG( " REGTEST: quality = "<< (*ptrigEmCluster).clusterQuality() ); - ATH_MSG_DEBUG( std::hex << " REGTEST: roiWord = 0x" << (*ptrigEmCluster).RoIword() << std::dec ); - } - std::string key = ""; - - hltStatus = recordAndAttachFeature(outputTE, ptrigEmCluster, key, m_trigEmClusterKey); - - if (hltStatus != HLT::OK){ -#ifndef NDEBUG - ATH_MSG_ERROR( "Write of TrigEMCluster into outputTE failed" ); -#endif - if ( m_timersvc ) m_timer[0]->stop(); - return hltStatus; - } - - if ( m_storeCells ) { - if ( m_Container != 0 ) { - hltStatus = recordAndAttachFeature(outputTE, m_Container, key, "TrigT2CaloEgammaCells"); - if (hltStatus != HLT::OK){ -#ifndef NDEBUG - ATH_MSG_ERROR( "Write of TrigEMClusterCells into outputTE failed" ); -#endif - if ( m_timersvc ) m_timer[0]->stop(); - return hltStatus; - } - } // End of if to check whether there is a container - } // End of if to check the option is ok - - // Create a new RoiDescriptor with updated eta and phi. - // Note that the steering will propagate l1Id and roiId automatically - // so no need to set them. (is this true?) - TrigRoiDescriptor* newRoiDescriptor = 0; - - if (calZ0 !=0 ) { - // add z position - if ( calZ0<-225 ) calZ0 = -225; - if ( calZ0> 225 ) calZ0 = 225; - - newRoiDescriptor = - new TrigRoiDescriptor(roiDescriptor->l1Id(), roiDescriptor->roiId(), - ptrigEmCluster->eta(), ptrigEmCluster->eta()-m_etaWidthForID, ptrigEmCluster->eta()+m_etaWidthForID, - ptrigEmCluster->phi(), - CxxUtils::wrapToPi(ptrigEmCluster->phi()-m_phiWidthForID), - CxxUtils::wrapToPi(ptrigEmCluster->phi()+m_phiWidthForID), - calZ0 ); // don't specify widths - then we get the default values of -225, +225 - } - else { - newRoiDescriptor = - new TrigRoiDescriptor(roiDescriptor->l1Id(), roiDescriptor->roiId(), - ptrigEmCluster->eta(), ptrigEmCluster->eta()-m_etaWidthForID, ptrigEmCluster->eta()+m_etaWidthForID, - ptrigEmCluster->phi(), - CxxUtils::wrapToPi(ptrigEmCluster->phi()-m_phiWidthForID), - CxxUtils::wrapToPi(ptrigEmCluster->phi()+m_phiWidthForID) ); - } - - hltStatus = attachFeature(outputTE,newRoiDescriptor,"TrigT2CaloEgamma"); - - if ( hltStatus != HLT::OK ) { - ATH_MSG_ERROR( "Write of update TrigRoiDescriptor into outputTE failed" ); - if ( m_timersvc ) m_timer[0]->stop(); - return hltStatus; - } - - - // record ringer feature if available - if(m_rings){ - hltStatus = recordAndAttachRings(outputTE); - if(hltStatus != HLT::OK){ - ATH_MSG_ERROR( "Can not attach the xAOD::TrigRingerRings features into StoreGate." ); - return hltStatus; - } - - ATH_MSG_DEBUG( "attach xAOD::TrigRingerRings with feature name " << m_ringerFeatureLabel - << " and with roiword 0x" << std::hex << m_rings->emCluster()->RoIword() << std::dec ); - //<< " and with roiword 0x" << std::hex << m_rings->RoIword() << std::dec << endmsg; - } - - -#ifndef NDEBUG - ATH_MSG_DEBUG( "Recorded an RoiDescriptor " << *newRoiDescriptor ); - ATH_MSG_DEBUG( "We assume success, set TE with Id " - << outputTE->getId() << " active to signal positive result." ); -#endif - - // if ( error ) return HLT::TOOL_FAILURE; - if ( error ) - return HLT::ErrorCode(HLT::Action::CONTINUE,HLT::Reason::USERDEF_2); - // Time total T2CaloEgamma execution time. - if ( m_timersvc ) m_timer[0]->stop(); - - return HLT::OK; -} - - -HLT::ErrorCode T2CaloEgamma::hltFinalize(){ - -#ifndef NDEBUG - ATH_MSG_INFO( "in finalize()" ); -#endif - - return HLT::OK; -} - - -void T2CaloEgamma::setRingsFeature(xAOD::TrigRingerRings *rings, std::string &key, const std::string &featureLabel){ - m_rings = rings; - m_ringerKey = key; - m_ringerFeatureLabel = featureLabel; -} - - -HLT::ErrorCode T2CaloEgamma::recordAndAttachRings(HLT::TriggerElement *outputTE) { - HLT::ErrorCode hltStatus; - - if (m_tmpOutputTE) { - ElementLink<xAOD::TrigEMClusterContainer> el_t2calo_clus; - - // retrieve TrigEMCluster using the Navigation methods - hltStatus = getFeatureLink<xAOD::TrigEMClusterContainer,xAOD::TrigEMCluster>(outputTE, el_t2calo_clus); - if (hltStatus != HLT::OK){ - return hltStatus; - } - if(el_t2calo_clus.isValid()){ - ATH_MSG_DEBUG( "ElementLink to xAOD::TrigEMClusterContainer is valid. set into xAOD::TrigRingerRings..." ); - - /* - m_rings->auxdata< ElementLink< xAOD::TrigEMClusterContainer > >("emClusterLink") = el_t2calo_clus;// decoration for now. - if( (*m_log).level() <= MSG::DEBUG){ - static SG::AuxElement::Accessor<ElementLink<xAOD::TrigEMClusterContainer>>orig("emClusterLink"); - if( !orig.isAvailable(*m_rings) || !orig(*m_rings).isValid() ){ - ATH_MSG_DEBUG( "Problem with emClusterLink." ); - } - }*/ - - m_rings->setEmClusterLink( el_t2calo_clus ); - } - - hltStatus = recordAndAttachFeature<xAOD::TrigRingerRings>(m_tmpOutputTE, m_rings, m_ringerKey, m_ringerFeatureLabel); - if (hltStatus != HLT::OK) { - return hltStatus; - } - } else { - return HLT::OK; // Should return error code! - } - return HLT::OK; -} - - - -float T2CaloEgamma::calculateZ0(const float etaLayer1, const float etaLayer2) { - - // etaLayer1: first layer emcl_etaLayer1, etaLayer2: middle layer emcl_eta - // Z = rho*sinh(eta) - // Z0 = (z1*rho2 - z2*rho1) / (rho2 - rho1) - // = rho1*rho2 * (sinh(etaLayer1) - sinh(etaLayer2)) / (rho2-rho1) // barrel - // = z1*z2 * (sinh(etaLayer1) - sinh(etaLayer2)) / (z2*sinh(etaLayer1) - z1*sinh(etaLayer2)) // endcap - - float Z0 = 1e7; - if (m_zEta.size() == 0 ) return Z0; - // crack region: 1.37<|eta(cluster)|<1.52 - if ( fabs(etaLayer1)>=1.37 && fabs(etaLayer1)<=1.52 ) return Z0; - if ( fabs(etaLayer2)>=1.37 && fabs(etaLayer2)<=1.52 ) return Z0; - - float rho1(-1), rho2(-1); // barrel - for (unsigned int i=1; i<m_rhoEta.size(); i++) { - if ( fabs(etaLayer1)<=m_rhoEta[i] && fabs(etaLayer1)>m_rhoEta[i-1] ) rho1 = m_rhoFirstLayer [i-1]; - if ( fabs(etaLayer2)<=m_rhoEta[i] && fabs(etaLayer2)>m_rhoEta[i-1] ) rho2 = m_rhoMiddleLayer[i-1]; - } - bool useRho = (rho1>0) && (rho2>0); - - float z1(-1), z2(-1); // endcap - for (unsigned int i=1; i<m_zEta.size(); i++) { - if ( fabs(etaLayer1)<=m_zEta[i] && fabs(etaLayer1)>m_zEta[i-1] ) z1 = m_zFirstLayer [i-1]; - if ( fabs(etaLayer2)<=m_zEta[i] && fabs(etaLayer2)>m_zEta[i-1] ) z2 = m_zMiddleLayer[i-1]; - } - bool useZ = (z1>0) && (z2>0); - - if (useRho && !useZ) { - Z0 = rho1*rho2 * (sinh(etaLayer1) - sinh(etaLayer2)) / (rho2 - rho1); - } - - if (!useRho && useZ) { - Z0 = z1*z2* (sinh(etaLayer1)-sinh(etaLayer2)) / (z2*sinh(etaLayer1)-z1*sinh(etaLayer2)); - // need to be check why - //Z0 += 1288; - Z0 += (1288 + 92); - } - return Z0; -} - diff --git a/Trigger/TrigAlgorithms/TrigT2CaloEgamma/src/T2CaloEgamma.h b/Trigger/TrigAlgorithms/TrigT2CaloEgamma/src/T2CaloEgamma.h deleted file mode 100755 index eafde767d195..000000000000 --- a/Trigger/TrigAlgorithms/TrigT2CaloEgamma/src/T2CaloEgamma.h +++ /dev/null @@ -1,114 +0,0 @@ -/* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration -*/ - -/** - - NAME: T2CaloEgamma.h - PACKAGE: Trigger/TrigAlgorithms/TrigT2CaloEgamma - - AUTHOR: M.P. Casado - - PURPOSE: Based on T2CaloBase works as main driver for the LVL2 - Calorimeter Egamma Algorithm. Receives and decodes LVL1 - information (RoI position), creates the TrigEMCluster to - be the output of LVL2 Calo with extracted features. Call - IAlgToolCalos to perform FEX. Has support to Ringer - Algorithm. This information create rings of energy - which describe the complete shower shape of the event. - The ringer cluster has an element link to TrigEMCluster - and can be enable into AlgToolList using python config. - **/ - -#ifndef TRIGT2CALOEGAMMA_T2CALOEGAMMA_H -#define TRIGT2CALOEGAMMA_T2CALOEGAMMA_H - -#include <string> -#include "TrigT2CaloCommon/T2CaloBase.h" -#include "xAODTrigCalo/TrigEMCluster.h" -#include "xAODTrigRinger/TrigRingerRings.h" - -class IAlgToolCalo; -class IEgammaCalibration; -class T2CaloEgammaMon; -class MsgStream; - -/** Main LVL2 Algorithm. Processes LVL1 information, call FEX - IAlgToolCalos and produces the TrigEMCluster output. */ -class T2CaloEgamma: public T2CaloBase { - - - public: - /** Constructor */ - T2CaloEgamma(const std::string & name, ISvcLocator* pSvcLocator); - /** Destructor */ - ~T2CaloEgamma(); - - /** hltExecute will call FEX IAlgToolCalo::execute() to process RoI. - called by the Steering per EMRoI. */ - HLT::ErrorCode hltExecute(const HLT::TriggerElement* input, HLT::TriggerElement* outputTE); - /** hltInitialize. Called by the Steering. */ - HLT::ErrorCode hltInitialize(); - /** hltFinalize. Called by the Steering. */ - HLT::ErrorCode hltFinalize(); - /** calculate zo mass */ - float calculateZ0(const float etaLayer1, const float etaLayer2); - - /** Method that allow tools to save the ringers attached to EM Clusters - parse the ringer info between RingerFex and T2CaloEgamma */ - void setRingsFeature(xAOD::TrigRingerRings *rings, std::string &key, const std::string &featureLabel); - /** link trigEMCluster with rings and attach into the storegate */ - HLT::ErrorCode recordAndAttachRings(HLT::TriggerElement *outputTE); - - private: - /** Monitoring Tool */ - // T2CaloEgammaMon* m_monitoring; - /** To support new monitoring. Values must be copied to - this monitored Cluster for each RoI. */ - const xAOD::TrigEMCluster* m_monitoredCluster; - /** To monitor rCore */ - float m_rCore; - /** To monitor eRatio */ - float m_eRatio; - /** To monitor r strips */ - float m_stripRatio; - /** Forced LVL1 eta */ - float m_l1eta; - /** Forced LVL1 phi */ - float m_l1phi; - /** counter for conversion error */ - unsigned int m_conversionError; - /** counter for algorithm error */ - unsigned int m_algorithmError; - /** Monitored Eta and Phi */ - float m_MonEta, m_MonPhi; - - //int m_index; - /** Calibration tools for the Barrel*/ - ToolHandleArray<IEgammaCalibration> m_calibsBarrel; - /** Calibration tools for the Endcap*/ - ToolHandleArray<IEgammaCalibration> m_calibsEndcap; - - // Properties: - std::string m_trigEmClusterKey; - /** Should or not storeCells into a cell container attached to output RoI */ - bool m_storeCells; - /** container pointer */ - CaloCellContainer* m_Container; - - /* Variables to calculate Z0 position */ - std::vector<float> m_rhoFirstLayer, m_rhoMiddleLayer, m_zFirstLayer, m_zMiddleLayer; - std::vector<float> m_rhoEta, m_zEta;/* Variables to calculate Z0 position */ - - /** RingerFex support */ - /** temporary handle to a output TE */ - HLT::TriggerElement *m_tmpOutputTE; - /** Ringer EDM */ - xAOD::TrigRingerRings *m_rings; - /** ringer key */ - std::string m_ringerKey; - /** name of the feature to attach the ringer information into the StoreGate */ - std::string m_ringerFeatureLabel; -}; - -#endif diff --git a/Trigger/TrigAlgorithms/TrigT2CaloEgamma/src/components/TrigT2CaloEgamma_entries.cxx b/Trigger/TrigAlgorithms/TrigT2CaloEgamma/src/components/TrigT2CaloEgamma_entries.cxx index 69e1d3fad951..8d5893ccb34a 100644 --- a/Trigger/TrigAlgorithms/TrigT2CaloEgamma/src/components/TrigT2CaloEgamma_entries.cxx +++ b/Trigger/TrigAlgorithms/TrigT2CaloEgamma/src/components/TrigT2CaloEgamma_entries.cxx @@ -1,27 +1,13 @@ -#include "../T2CaloEgamma.h" #include "../T2CaloEgammaReFastAlgo.h" -#include "../EgammaSamp2Fex.h" -#include "../EgammaSamp1Fex.h" -#include "../EgammaEmEnFex.h" -#include "../EgammaHadEnFex.h" #include "../EgammaReSamp2Fex.h" #include "../EgammaReSamp1Fex.h" #include "../EgammaReEmEnFex.h" #include "../EgammaReHadEnFex.h" -#include "../RingerFex.h" #include "../RingerReFex.h" -#include "../EgammaAllFex.h" -DECLARE_COMPONENT( T2CaloEgamma ) DECLARE_COMPONENT( T2CaloEgammaReFastAlgo ) -DECLARE_COMPONENT( EgammaSamp2Fex ) -DECLARE_COMPONENT( EgammaSamp1Fex ) -DECLARE_COMPONENT( EgammaEmEnFex ) -DECLARE_COMPONENT( EgammaHadEnFex ) DECLARE_COMPONENT( EgammaReSamp2Fex ) DECLARE_COMPONENT( EgammaReSamp1Fex ) DECLARE_COMPONENT( EgammaReEmEnFex ) DECLARE_COMPONENT( EgammaReHadEnFex ) -DECLARE_COMPONENT( RingerFex ) DECLARE_COMPONENT( RingerReFex ) -DECLARE_COMPONENT( EgammaAllFex ) diff --git a/Trigger/TrigAlgorithms/TrigT2MinBias/src/T2MbtsFex.cxx b/Trigger/TrigAlgorithms/TrigT2MinBias/src/T2MbtsFex.cxx deleted file mode 100644 index 63e987fa633b..000000000000 --- a/Trigger/TrigAlgorithms/TrigT2MinBias/src/T2MbtsFex.cxx +++ /dev/null @@ -1,315 +0,0 @@ -/* - Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration -*/ - -#include "T2MbtsFex.h" -#include "xAODTrigMinBias/TrigT2MbtsBits.h" -#include "xAODTrigMinBias/TrigT2MbtsBitsAuxContainer.h" -#include "TileIdentifier/TileTBID.h" -#include "TrigTimeAlgs/TrigTimerSvc.h" -#include "xAODEventInfo/EventInfo.h" -#include <cstdlib> -#include <bitset> - -T2MbtsFex::T2MbtsFex(const std::string &name, ISvcLocator* pSvcLocator): HLT::AllTEAlgo(name, pSvcLocator), - T2MbtsUtils(), - m_timerLoadColl(0), - m_timerAlg(0), - m_timerSave(0), - m_data("TrigDataAccess/TrigDataAccess"), - m_tileTBID(0), - m_error(0), - m_triggerEnergies(xAOD::TrigT2MbtsBits::NUM_MBTS,0.), - m_triggerTimes(xAOD::TrigT2MbtsBits::NUM_MBTS,0.), - m_triggerID(xAOD::TrigT2MbtsBits::NUM_MBTS,0.), - m_useCachedResult(false), - m_t2MbtsBits(0), - m_cachedTE(0) { - - declareProperty("TrigDataAccess",m_data,"Data Access for LVL2 Calo Algorithms"); - - // These properties are used for monitoring only. - declareProperty("Threshold", m_threshold = 40.0/222.0 ); // Value in pC - declareProperty("TimeCut", m_timeCut=-1.0); - declareProperty("GlobalTimeOffset", m_globalTimeOffset=0.0); - declareProperty("TimeOffsetA0", m_timeOffsets[0]=0.0); - declareProperty("TimeOffsetA1", m_timeOffsets[1]=0.0); - declareProperty("TimeOffsetA2", m_timeOffsets[2]=0.0); - declareProperty("TimeOffsetA3", m_timeOffsets[3]=0.0); - declareProperty("TimeOffsetA4", m_timeOffsets[4]=0.0); - declareProperty("TimeOffsetA5", m_timeOffsets[5]=0.0); - declareProperty("TimeOffsetA6", m_timeOffsets[6]=0.0); - declareProperty("TimeOffsetA7", m_timeOffsets[7]=0.0); - declareProperty("TimeOffsetA8", m_timeOffsets[8]=0.0); - declareProperty("TimeOffsetA9", m_timeOffsets[9]=0.0); - declareProperty("TimeOffsetA10", m_timeOffsets[10]=0.0); - declareProperty("TimeOffsetA11", m_timeOffsets[11]=0.0); - declareProperty("TimeOffsetA12", m_timeOffsets[12]=0.0); - declareProperty("TimeOffsetA13", m_timeOffsets[13]=0.0); - declareProperty("TimeOffsetA14", m_timeOffsets[14]=0.0); - declareProperty("TimeOffsetA15", m_timeOffsets[15]=0.0); - declareProperty("TimeOffsetC0", m_timeOffsets[16]=0.0); - declareProperty("TimeOffsetC1", m_timeOffsets[17]=0.0); - declareProperty("TimeOffsetC2", m_timeOffsets[18]=0.0); - declareProperty("TimeOffsetC3", m_timeOffsets[19]=0.0); - declareProperty("TimeOffsetC4", m_timeOffsets[20]=0.0); - declareProperty("TimeOffsetC5", m_timeOffsets[21]=0.0); - declareProperty("TimeOffsetC6", m_timeOffsets[22]=0.0); - declareProperty("TimeOffsetC7", m_timeOffsets[23]=0.0); - declareProperty("TimeOffsetC8", m_timeOffsets[24]=0.0); - declareProperty("TimeOffsetC9", m_timeOffsets[25]=0.0); - declareProperty("TimeOffsetC10", m_timeOffsets[26]=0.0); - declareProperty("TimeOffsetC11", m_timeOffsets[27]=0.0); - declareProperty("TimeOffsetC12", m_timeOffsets[28]=0.0); - declareProperty("TimeOffsetC13", m_timeOffsets[29]=0.0); - declareProperty("TimeOffsetC14", m_timeOffsets[30]=0.0); - declareProperty("TimeOffsetC15", m_timeOffsets[31]=0.0); - - declareMonitoredVariable("MultiplicityEBA", m_mult.first); // Number of counters within cuts, side A - declareMonitoredVariable("MultiplicityEBC", m_mult.second); // Number of counters within cuts, side C - declareMonitoredVariable("TimeDiff_A_C", m_timeDiff_A_C); // Time difference A - C - declareMonitoredVariable("BCID", m_BCID); - declareMonitoredStdContainer("TriggerEnergies", m_triggerEnergies); // Energies deposited in each counter - declareMonitoredStdContainer("TriggerTimes", m_triggerTimes); // Relative times of each of the triggers. - declareMonitoredStdContainer("TriggerID", m_triggerID); // ID of MBTS detectors - - -} -//-------------------------------------------------------------------------------------- - -HLT::ErrorCode T2MbtsFex::hltExecute(std::vector<std::vector<HLT::TriggerElement*> >& tes_in, - unsigned int type_out) { - // Caching. - // First check whether we executed this instance before: - if(m_useCachedResult) { - ATH_MSG_DEBUG("Executing " << name() << " in cached mode"); - - // Get all input TEs (for seeding relation of navigation structure) - HLT::TEVec allTEs; - std::vector<HLT::TEVec>::const_iterator itEnd = tes_in.end(); - for( std::vector<HLT::TEVec>::const_iterator it = tes_in.begin(); it != itEnd; ++it) { - - HLT::TEVec::const_iterator inner_itEnd = (*it).end(); - for (HLT::TEVec::const_iterator inner_it = (*it).begin(); - inner_it != inner_itEnd; ++inner_it) { - allTEs.push_back(*inner_it); - } - } - - // Create an output TE seeded by the inputs - HLT::TriggerElement* outputTE = config()->getNavigation()->addNode(allTEs, type_out); - outputTE->setActiveState(true); - - // Save (cached) feature to output TE: - m_config->getNavigation()->copyAllFeatures( m_cachedTE, outputTE ); - - return HLT::OK; - } - - ATH_MSG_DEBUG("Executing this T2MbtsFex as " << name()); - - // start monitoring - beforeExecMonitors().ignore(); - - // monitor - const xAOD::EventInfo* evinfo(0); - StatusCode sc = store()->retrieve(evinfo); - if( sc.isFailure() ){ - ATH_MSG_ERROR("Cannot retrieve xAOD::EventInfo from SG."); - return HLT::SG_ERROR; - } - else { - m_BCID = evinfo->bcid(); - ATH_MSG_DEBUG("BCID is " << m_BCID); - } - - // Reset errors - m_error=0x0; - - if(timerSvc()) - m_timerLoadColl->start(); - - // Reset Iterators - m_itBegin=m_itEnd; - - if(m_data->LoadMBTS(m_itBegin,m_itEnd).isFailure()){ - m_error|=m_data->report_error(); - return HLT::ErrorCode(HLT::Action::ABORT_CHAIN, HLT::Reason::BAD_JOB_SETUP); - } - - if(m_itBegin == m_itEnd) { - ATH_MSG_WARNING("The MBTS TileCellCollection has no elements!"); - } - - if(timerSvc()){ - m_timerLoadColl->stop(); - m_timerAlg->start(); - } - - uint32_t bit_pos = 0; - - // Clear the monitoring variables. - m_triggerID.clear(); - m_triggerID.resize(xAOD::TrigT2MbtsBits::NUM_MBTS,0); - m_triggerEnergies.clear(); - m_triggerEnergies.resize(xAOD::TrigT2MbtsBits::NUM_MBTS,0); - m_triggerTimes.clear(); - m_triggerTimes.resize(xAOD::TrigT2MbtsBits::NUM_MBTS,0); - - // Pack values into vectors. - for( m_itt=m_itBegin; m_itt != m_itEnd; ++m_itt ){ - Identifier id=(*m_itt)->ID(); - - // MBTS Id type is "side" +/- 1 - int type_id = m_tileTBID->type(id); - - // MBTS Id channel is "eta" 0-1 zero is closer to beam pipe - unsigned int channel_id = m_tileTBID->channel(id); - - // MBTS Id module is "phi" 0-7 - unsigned int module_id = m_tileTBID->module(id); - - ATH_MSG_DEBUG("type_id = " << type_id); - ATH_MSG_DEBUG("channel_id = " << channel_id); - ATH_MSG_DEBUG("module_id = " << module_id); - - // Catch errors - if(abs(type_id) != 1) { - ATH_MSG_WARNING("MBTS identifier type is out of range"); - continue; - } - if( channel_id > 1 ){ - ATH_MSG_WARNING("MBTS identifier channel is out of range"); - continue; - } - if( module_id > 7 ){ - ATH_MSG_WARNING("MBTS identifier module is out of range"); - continue; - } - - bit_pos = 0; // The position of the bit - - if(type_id == -1) { // C-side - bit_pos += 16; - } - - bit_pos += channel_id*8; - bit_pos += module_id; - - unsigned int nTriggerEnergies = m_triggerEnergies.size(); - if(bit_pos > (nTriggerEnergies-1)) { - ATH_MSG_ERROR("Bit pos " << bit_pos << " is greater than the size of the energy vector " << nTriggerEnergies); - } - else { - m_triggerEnergies[bit_pos] = (*m_itt)->energy(); - m_triggerID[bit_pos] = bit_pos; - ATH_MSG_DEBUG("Counter id = " << bit_pos << ", energy = " << m_triggerEnergies[bit_pos] << " pC"); - } - - unsigned int nTriggerTimes = m_triggerTimes.size(); - if(bit_pos > (nTriggerTimes-1)) { - ATH_MSG_ERROR("Bit pos " << bit_pos << " is greater than the size of the time vector " << nTriggerTimes); - } - else { - m_triggerTimes[bit_pos] = (*m_itt)->time(); - ATH_MSG_DEBUG("Counter id = " << bit_pos << ", time = " << m_triggerTimes[bit_pos] << " ns"); - } - } - - if( timerSvc() ){ - m_timerAlg->stop(); - m_timerSave->start(); - } - - m_t2MbtsBits = new xAOD::TrigT2MbtsBits(); - m_t2MbtsBits->makePrivateStore(); - m_t2MbtsBits->setTriggerEnergies(m_triggerEnergies); - m_t2MbtsBits->setTriggerTimes(m_triggerTimes); - - // Calculate the multiplicities to fill the monitoring variables - if(!calculateMultiplicities(m_t2MbtsBits,0,msg(),msgLvl())) { - ATH_MSG_DEBUG("calculateMultiplicities failed"); - return HLT::OK; - } - - // A vector of trigger elements is passed into this function, where - // for each trigger element type provided there is a vector of - // trigger elements. For example, L1_MBTS_1 L2_MBTS_2 L3_MBTS_3 are - // each a vector of one element. Therefore start by concatenating - // the trigger elements. - HLT::TEVec allTEs; - std::vector<HLT::TEVec>::const_iterator itEnd = tes_in.end(); - - for(std::vector<HLT::TEVec>::const_iterator it = tes_in.begin(); it != itEnd; ++it) { - - HLT::TEVec::const_iterator inner_itEnd = (*it).end(); - for(HLT::TEVec::const_iterator inner_it = (*it).begin(); inner_it != inner_itEnd; ++inner_it ){ - ATH_MSG_DEBUG("Creating TE seeded from input TE " << (*inner_it)->getId()); - allTEs.push_back(*inner_it); - } - } - - // Create an output TE seeded by the inputs - HLT::TriggerElement* outputTE = config()->getNavigation()->addNode(allTEs, type_out); - outputTE->setActiveState(true); - - HLT::ErrorCode hltStatus = attachFeature(outputTE, m_t2MbtsBits, "T2Mbts"); - if(hltStatus != HLT::OK) { - ATH_MSG_ERROR("Write of TrigEMCluster into outputTE failed"); - return hltStatus; - } - - if( timerSvc() ) - m_timerSave->stop(); - - // Cache the TE in case this Fex is called again in this event. - m_useCachedResult = true; - m_cachedTE = outputTE; - - // Stop monitoring - afterExecMonitors().ignore(); - - return HLT::OK; -} - -//-------------------------------------------------------------------------------------- - -HLT::ErrorCode T2MbtsFex::hltInitialize() { - - ATH_MSG_INFO("in T2MbtsFex::initialize()"); - - if(m_data.retrieve().isFailure()) { - ATH_MSG_ERROR("Could not get m_data"); - return HLT::BAD_JOB_SETUP; - } - - // Retrieve TileTBID helper from det store - // (The MBTS was added to the Test Beam (TB) list.) - if(detStore()->retrieve(m_tileTBID).isFailure()) { - ATH_MSG_ERROR("Unable to retrieve TileTBID helper from DetectorStore"); - return HLT::BAD_JOB_SETUP; - } - - // Create timers - if(timerSvc()) { - m_timerLoadColl = addTimer("LoadColl"); - m_timerAlg = addTimer("Algorithm"); - m_timerSave = addTimer("Saving"); - } - - return HLT::OK; -} - -//-------------------------------------------------------------------------------------- - -HLT::ErrorCode T2MbtsFex::hltFinalize() { - return HLT::OK; -} - -//-------------------------------------------------------------------------------------- -HLT::ErrorCode T2MbtsFex::hltEndEvent() { - m_useCachedResult = false; - m_t2MbtsBits = 0; - m_cachedTE=0; - return HLT::OK; -} diff --git a/Trigger/TrigAlgorithms/TrigT2MinBias/src/T2MbtsFex.h b/Trigger/TrigAlgorithms/TrigT2MinBias/src/T2MbtsFex.h deleted file mode 100644 index 24514aef3cbe..000000000000 --- a/Trigger/TrigAlgorithms/TrigT2MinBias/src/T2MbtsFex.h +++ /dev/null @@ -1,101 +0,0 @@ -/* - Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration -*/ - -#ifndef T2_MBTS_FEX_H -#define T2_MBTS_FEX_H - -#include "TrigInterfaces/AllTEAlgo.h" -#include "TrigT2CaloCommon/ITrigDataAccess.h" -#include "TileEvent/TileCellCollection.h" -#include "T2MbtsUtils.h" -#include <vector> - -class TileTBID; - -// namespace xAOD{ -// class TrigT2MbtsBits; -// } - -/** @class T2MbtsFex - -@author W. H. Bell <W.Bell@cern.ch> - -A feature extraction algorithm to retrieve the MBTS TileCells from the DSP -*/ -class T2MbtsFex: public HLT::AllTEAlgo, public T2MbtsUtils { - public: - T2MbtsFex(const std::string &name, ISvcLocator* pSvcLocator); - /** - * @brief implementation of the abstract hltExecute method in HLT::AllTEAlgo. - * - * @param input outer vector describeds the different input TE types, - * here we expect: 1st LVL1 energy TE; 2nd Muons; - * inner vector provides all TE instances of the given type - * - * @param output the output TE type - */ - HLT::ErrorCode hltExecute(std::vector<std::vector<HLT::TriggerElement*> >& input, - unsigned int output); - - HLT::ErrorCode hltInitialize(); - HLT::ErrorCode hltFinalize(); - - /** - * @brief This method overwrites the default one (doing nothing) in the algo.h class - * - * This is used to reset the internal caching mechanism of this algorithm - */ - HLT::ErrorCode hltEndEvent(); - - private: - - /** iterators to TileCells. To be used when on/offline - TileCellCont/IDC (fast/slow ByteStream Decoder) are to be used. - Used as input for TrigDataAccess::LoadCollections */ - TileCellCollection::const_iterator m_itBegin; - TileCellCollection::const_iterator m_itEnd; - TileCellCollection::const_iterator m_itt; - - // /** DataHandle to TrigTimerSvc */ - // ServiceHandle<ITrigTimerSvc> m_timersvc; - - // /** Timing measures. - // m_timer[0] is the complete exec timer. m_timer[1] is the - // LoadCollection timer (Data Preparation), m_timer[2] is the - // real algorithm timer and m_timer[3] is the saving data - // timer. */ - // TrigTimer* m_timer[4]; - - TrigTimer *m_timerLoadColl; - TrigTimer *m_timerAlg; - TrigTimer *m_timerSave; - /** Object that provides data access in a Region of - Interest. See TrigDataAccess for more details. */ - ToolHandle<ITrigDataAccess> m_data; - - /** A pointer for access to the Tile Test Beam Identifier helper. */ - const TileTBID* m_tileTBID; - - /** error control */ - uint32_t m_error; - - /** Energy deposited in each counter (pC) */ - std::vector<float> m_triggerEnergies; - - /** Relative trigger times with repect to collision timing */ - std::vector<float> m_triggerTimes; - - /** ID of MBTS ID */ - std::vector<int> m_triggerID; - - bool m_useCachedResult; //!< internal caching: true when the hltExecute will run in cached mode. - xAOD::TrigT2MbtsBits *m_t2MbtsBits; //!< internal caching: MBTS feature from the first execution. - HLT::TriggerElement* m_cachedTE; //!< internal caching: output TE from the first exectution. - - /** event info*/ - unsigned int m_BCID; - -}; - -#endif diff --git a/Trigger/TrigAlgorithms/TrigT2MinBias/src/T2MbtsHypo.cxx b/Trigger/TrigAlgorithms/TrigT2MinBias/src/T2MbtsHypo.cxx deleted file mode 100644 index 8759148d870d..000000000000 --- a/Trigger/TrigAlgorithms/TrigT2MinBias/src/T2MbtsHypo.cxx +++ /dev/null @@ -1,186 +0,0 @@ -/* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration -*/ - -#include "T2MbtsHypo.h" -#include "xAODTrigMinBias/TrigT2MbtsBits.h" - -#include <bitset> -#include <cmath> - -//----------------------------------------------------------------------------- - -T2MbtsHypo::T2MbtsHypo(const std::string &name, - ISvcLocator* pSvcLocator): HLT::HypoAlgo(name, pSvcLocator), - T2MbtsUtils(), - m_acceptAll(false), - m_mbtsCounters(0), - m_coincidence(false), - m_or(false), - m_veto(false), - m_mbtsmode(0), - m_t2MbtsBits(0) { - - declareProperty("AcceptAll", m_acceptAll=false); - declareProperty("MbtsCounters", m_mbtsCounters=2); - declareProperty("Coincidence", m_coincidence=false); - declareProperty("Or", m_or=false); - declareProperty("Veto", m_veto=false); - declareProperty("MBTSMode", m_mbtsmode=0); - declareProperty("Threshold", m_threshold = 40.0/222.0 ); // Value in pC - declareProperty("TimeCut", m_timeCut=-1.0); - declareProperty("GlobalTimeOffset", m_globalTimeOffset=0.0); - declareProperty("TimeOffsetA0", m_timeOffsets[0]=0.0); - declareProperty("TimeOffsetA1", m_timeOffsets[1]=0.0); - declareProperty("TimeOffsetA2", m_timeOffsets[2]=0.0); - declareProperty("TimeOffsetA3", m_timeOffsets[3]=0.0); - declareProperty("TimeOffsetA4", m_timeOffsets[4]=0.0); - declareProperty("TimeOffsetA5", m_timeOffsets[5]=0.0); - declareProperty("TimeOffsetA6", m_timeOffsets[6]=0.0); - declareProperty("TimeOffsetA7", m_timeOffsets[7]=0.0); - declareProperty("TimeOffsetA8", m_timeOffsets[8]=0.0); - declareProperty("TimeOffsetA9", m_timeOffsets[9]=0.0); - declareProperty("TimeOffsetA10", m_timeOffsets[10]=0.0); - declareProperty("TimeOffsetA11", m_timeOffsets[11]=0.0); - declareProperty("TimeOffsetA12", m_timeOffsets[12]=0.0); - declareProperty("TimeOffsetA13", m_timeOffsets[13]=0.0); - declareProperty("TimeOffsetA14", m_timeOffsets[14]=0.0); - declareProperty("TimeOffsetA15", m_timeOffsets[15]=0.0); - declareProperty("TimeOffsetC0", m_timeOffsets[16]=0.0); - declareProperty("TimeOffsetC1", m_timeOffsets[17]=0.0); - declareProperty("TimeOffsetC2", m_timeOffsets[18]=0.0); - declareProperty("TimeOffsetC3", m_timeOffsets[19]=0.0); - declareProperty("TimeOffsetC4", m_timeOffsets[20]=0.0); - declareProperty("TimeOffsetC5", m_timeOffsets[21]=0.0); - declareProperty("TimeOffsetC6", m_timeOffsets[22]=0.0); - declareProperty("TimeOffsetC7", m_timeOffsets[23]=0.0); - declareProperty("TimeOffsetC8", m_timeOffsets[24]=0.0); - declareProperty("TimeOffsetC9", m_timeOffsets[25]=0.0); - declareProperty("TimeOffsetC10", m_timeOffsets[26]=0.0); - declareProperty("TimeOffsetC11", m_timeOffsets[27]=0.0); - declareProperty("TimeOffsetC12", m_timeOffsets[28]=0.0); - declareProperty("TimeOffsetC13", m_timeOffsets[29]=0.0); - declareProperty("TimeOffsetC14", m_timeOffsets[30]=0.0); - declareProperty("TimeOffsetC15", m_timeOffsets[31]=0.0); - - declareMonitoredVariable("MultiplicityEBA", m_mult.first); // Number of counters within cuts, side A - declareMonitoredVariable("MultiplicityEBC", m_mult.second); // Number of counters within cuts, side C - declareMonitoredVariable("TimeDiff_A_C", m_timeDiff_A_C); // Time difference A - C - declareMonitoredVariable("SelMultiplicityEBA", m_selMultEBA); - declareMonitoredVariable("SelMultiplicityEBC", m_selMultEBC); - -} - -//----------------------------------------------------------------------------- -HLT::ErrorCode T2MbtsHypo::hltInitialize() { - ATH_MSG_INFO("Initialising this T2MbtsFex: " << name()); - ATH_MSG_INFO("================ Hypo Settings ================"); - ATH_MSG_INFO(" AcceptAll ------------------- " << (m_acceptAll==true ? "True" : "False")); - ATH_MSG_INFO(" MbtsCounters required ------- " << m_mbtsCounters); - ATH_MSG_INFO(" Coincidence requirement ----- " << (m_coincidence==true ? "True" : "False")); - ATH_MSG_INFO(" Veto requirement ------------ " << (m_veto==true ? "True" : "False")); - ATH_MSG_INFO(" MBTS mode ------------------- " << (m_mbtsmode==0 ? "All" : ( m_mbtsmode==1 ? "Inner" : "Outer"))); - ATH_MSG_INFO(" Threshold ------------------- " << m_threshold << " pC"); - ATH_MSG_INFO(" TimeCut -------------------- "); - if(m_timeCut<0) { - ATH_MSG_INFO("Off"); - } - else { - ATH_MSG_INFO(m_timeCut << " ns"); - ATH_MSG_INFO(" GlobalTimeOffset ----------- " << m_globalTimeOffset << " ns"); - ATH_MSG_INFO(" TimeOffsets (A0 to C16) ----- "); - for(int i=0; i<32; i++) ATH_MSG_INFO(m_timeOffsets[i] << " ns"); - } - ATH_MSG_INFO("==============================================="); - - // little consistency checker - if ( m_or && m_coincidence ) { - ATH_MSG_ERROR("The Or and Coincidence logics can not be used together"); - return HLT::ErrorCode(HLT::Action::ABORT_JOB, HLT::Reason::BAD_JOB_SETUP); - } - - return HLT::OK; -} - -//----------------------------------------------------------------------------- - -HLT::ErrorCode T2MbtsHypo::hltExecute(const HLT::TriggerElement* outputTE, - bool& pass) { - ATH_MSG_DEBUG("Executing this T2MbtsHypo " << name()); - - pass = false; - - // Try to retrieve the TrigT2MbtsBits object produced by the Fex - if(getFeature(outputTE, m_t2MbtsBits, "T2Mbts") != HLT::OK){ - ATH_MSG_WARNING("Failed to retrieve features from TE."); - return HLT::OK; - } - - // If the object is not available the trigger fails without complaint. - if(!m_t2MbtsBits){ - ATH_MSG_DEBUG("No trigger bits formed."); - return HLT::OK; - } - - // Calculate MBTS counter multiplicities after energy and an optional time cut. - if(!calculateMultiplicities(m_t2MbtsBits,m_mbtsmode, msg(),msgLvl())) { - ATH_MSG_DEBUG("calculateMultiplicities failed"); - return HLT::OK; - } - - // move flag here for monitoring - if(m_acceptAll){ - - pass=true; - m_selMultEBA = m_mult.first; - m_selMultEBC = m_mult.second; - - ATH_MSG_DEBUG("Accepting all events in " << name()); - return HLT::OK; - } - - - - if(m_coincidence) { // Coincidence logic - if(!m_veto){ - if(m_mult.first >= m_mbtsCounters && m_mult.second >= m_mbtsCounters) pass = true; - } else { - if(m_mult.first < m_mbtsCounters && m_mult.second < m_mbtsCounters) pass = true; - } - } else { - if ( m_or ) { // Or logic - if(!m_veto) { - if ((m_mult.first >= m_mbtsCounters || m_mult.second >= m_mbtsCounters)) pass = true; - } else { - if ((m_mult.first < m_mbtsCounters || m_mult.second < m_mbtsCounters)) pass = true; - } - } else { // Sum logic - if(!m_veto){ - if((m_mult.first + m_mult.second) >= m_mbtsCounters) pass = true; - } else { - if((m_mult.first + m_mult.second) < m_mbtsCounters) pass = true; - } - } - } - - ATH_MSG_DEBUG("REGTEST: event " << (pass?"accepted":"failed") << " with EBA(" << m_mult.first << ") + EBC(" << m_mult.second << ") hits above threshold."); - - if( pass ){ - m_selMultEBA = m_mult.first; - m_selMultEBC = m_mult.second; - } - else{ - m_selMultEBA = -999; - m_selMultEBC = -999; - } - - return HLT::OK; -} - -//----------------------------------------------------------------------------- - -HLT::ErrorCode T2MbtsHypo::hltFinalize() { - return HLT::OK; -} - -//----------------------------------------------------------------------------- diff --git a/Trigger/TrigAlgorithms/TrigT2MinBias/src/T2MbtsHypo.h b/Trigger/TrigAlgorithms/TrigT2MinBias/src/T2MbtsHypo.h deleted file mode 100644 index 6e334ff56b14..000000000000 --- a/Trigger/TrigAlgorithms/TrigT2MinBias/src/T2MbtsHypo.h +++ /dev/null @@ -1,58 +0,0 @@ -/* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration -*/ - -#ifndef T2_MBTS_HYPO_H -#define T2_MBTS_HYPO_H - -#include "TrigInterfaces/HypoAlgo.h" -#include "T2MbtsUtils.h" -#include <map> - -// namespace xAOD { -// class TrigT2MbtsBits; -// } - -/** @class T2MbtsHypo - -@author W. H. Bell <W.Bell@cern.ch> - -A hypothesis algorithm to read the MBTS DSP energy and time and form a -trigger decision based on the required constraints. -*/ -class T2MbtsHypo: public HLT::HypoAlgo, public T2MbtsUtils { - public: - T2MbtsHypo(const std::string &name, ISvcLocator* pSvcLocator); - - HLT::ErrorCode hltExecute(const HLT::TriggerElement* outputTE, - bool& pass); - HLT::ErrorCode hltInitialize(); - HLT::ErrorCode hltFinalize(); - - private: - - - /** A flag to allow this Hypo to be disabled. */ - bool m_acceptAll; - - /** The number of MBTS counters required to be above threshold */ - unsigned int m_mbtsCounters; - - /** A flag to control if this is a coincidence requirement or not */ - bool m_coincidence; - /** Flag extending above choice to do Or between the two sides of MBTS */ - bool m_or; - /** Flag to select lowe than threshold multiplicities */ - bool m_veto; - /** Flag to count multiplicities only on inner or outer MBTS modules */ - int m_mbtsmode; - /** A pointer to the TrigT2MbtsBits object. */ - const xAOD::TrigT2MbtsBits *m_t2MbtsBits; - - /** for monitoring */ - int m_selMultEBA; - int m_selMultEBC; - -}; - -#endif diff --git a/Trigger/TrigAlgorithms/TrigT2MinBias/src/T2ZdcFex.cxx b/Trigger/TrigAlgorithms/TrigT2MinBias/src/T2ZdcFex.cxx deleted file mode 100644 index 92992e33897e..000000000000 --- a/Trigger/TrigAlgorithms/TrigT2MinBias/src/T2ZdcFex.cxx +++ /dev/null @@ -1,220 +0,0 @@ -/* - Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration -*/ - -#include "T2ZdcFex.h" -#include "TrigTimeAlgs/TrigTimerSvc.h" -#include "TrigSteeringEvent/TrigRoiDescriptor.h" -#include "ZdcIdentifier/ZdcID.h" -#include "ZdcConditions/ZdcCablingService.h" -#include "xAODTrigMinBias/TrigT2ZdcSignals.h" - - -T2ZdcFex::T2ZdcFex(const std::string &name, ISvcLocator* pSvcLocator): - HLT::AllTEAlgo(name, pSvcLocator), - m_timerLoadColl(nullptr), m_timerAlg(nullptr), m_timerSave(nullptr), - m_data("TrigDataAccess/TrigDataAccess"), - m_zdcID(nullptr), - m_triggerEnergies(xAOD::TrigT2ZdcSignals::NUM_ZDC,0.), - m_triggerTimes(xAOD::TrigT2ZdcSignals::NUM_ZDC,0.), - m_triggerEntries(xAOD::TrigT2ZdcSignals::NUM_ZDC,0.), - m_useCachedResult(false), - m_zdcSignals(nullptr), - m_cachedTE(nullptr) { - declareProperty("TrigDataAccess",m_data,"Data Access for LVL2 Calo Algorithms"); - declareProperty("ZdcEnRecoOption", m_ZdcEnRecoOpt=0); - declareProperty("ZdcTimeRecoOption", m_ZdcTimeRecoOpt=0); - declareProperty("ZcdEnThreshold" , m_en_threshold=0); - declareProperty("ZcdTimeThreshold", m_time_threshold=0); - declareProperty("ZcdChiThreshold" , m_chi_threshold=0); - declareMonitoredStdContainer("TriggerEnergies", m_triggerEnergies); // Energies deposited in each counter. - declareMonitoredStdContainer("TriggerTimes", m_triggerTimes); // Relative times of each of the triggers. -} - -//-------------------------------------------------------------------------------------- - -HLT::ErrorCode T2ZdcFex::hltExecute(std::vector<std::vector<HLT::TriggerElement*> >& tes_in, - unsigned int type_out) { - // Caching. - // First check whether we executed this instance before: - if(m_useCachedResult) { - ATH_MSG_DEBUG("Executing " << name() << " in cached mode"); - - // Get all input TEs (for seeding relation of navigation structure) - HLT::TEVec allTEs; - std::vector<HLT::TEVec>::const_iterator itEnd = tes_in.end(); - for( std::vector<HLT::TEVec>::const_iterator it = tes_in.begin(); it != itEnd; ++it) { - - HLT::TEVec::const_iterator inner_itEnd = (*it).end(); - for (HLT::TEVec::const_iterator inner_it = (*it).begin(); - inner_it != inner_itEnd; ++inner_it) { - allTEs.push_back(*inner_it); - } - } - - // Create an output TE seeded by the inputs - HLT::TriggerElement* outputTE = config()->getNavigation()->addNode(allTEs, type_out); - outputTE->setActiveState(true); - - // Save (cached) feature to output TE: - m_config->getNavigation()->copyAllFeatures( m_cachedTE, outputTE ); - - return HLT::OK; - } - - ATH_MSG_DEBUG("Executing this T2ZdcFex as " << name()); - - // start monitoring - beforeExecMonitors().ignore(); - - if(timerSvc()) - m_timerLoadColl->start(); - - // Reset Iterators - m_zBegin=m_zEnd; - - if( m_data->LoadZdcCollection(m_zBegin,m_zEnd).isFailure() ){ - return HLT::ErrorCode(HLT::Action::ABORT_CHAIN, HLT::Reason::BAD_JOB_SETUP); - // return StatusCode::FAILURE; - } - - if(timerSvc()){ - m_timerLoadColl->stop(); - m_timerAlg->start(); - } - - // Clear the variables which hold the processed signals. - m_triggerEnergies.clear(); - m_triggerEnergies.resize(xAOD::TrigT2ZdcSignals::NUM_ZDC,0); - m_triggerTimes.clear(); - m_triggerTimes.resize(xAOD::TrigT2ZdcSignals::NUM_ZDC,0); - m_triggerEntries.clear(); - m_triggerEntries.resize(xAOD::TrigT2ZdcSignals::NUM_ZDC,0.); - - for( m_zt = m_zBegin; m_zt!=m_zEnd; ++m_zt){ // loop on ZdcRawChannelCollection iterators - const ZdcRawChannel* zdc = (*m_zt); - const Identifier& id = zdc->identify(); - // type = 0 (1 is pixel) - // module = 0,1,2,3 - // side = -1 (C), 1 (A) - // channel = 0 - int type = m_zdcID->type(id); - if(type!=0) continue; // dont consider pixel - int side = m_zdcID->side(id); - int module = m_zdcID->module(id); - //int m_channel = m_zdcID->channel(id); //Not currently used - - int my_module = ((1.-side)/2)*4 + module; - - float energy = zdc->getEnergy(m_ZdcEnRecoOpt); - float time = zdc->getTime(m_ZdcTimeRecoOpt); - float chi = zdc->getChi(m_ZdcEnRecoOpt); - if(energy > m_en_threshold && (chi < m_chi_threshold || m_chi_threshold<0 ) ){ - ++m_triggerEntries[my_module]; - m_triggerEnergies[my_module] += energy; - m_triggerTimes[my_module] = time/m_triggerEntries[my_module] + - m_triggerTimes[my_module]*(1.-(1./m_triggerEntries[my_module])); - } - } - - if( timerSvc() ){ - m_timerAlg->stop(); - m_timerSave->start(); - } - - - // Create the T2ZdcSignals output object. - m_zdcSignals = new xAOD::TrigT2ZdcSignals; - m_zdcSignals->makePrivateStore(); - m_zdcSignals->setTriggerEnergies(m_triggerEnergies); - m_zdcSignals->setTriggerTimes(m_triggerTimes); - - // A vector of trigger elements is passed into this function, where - // for each trigger element type provided there is a vector of - // trigger elements. For example, L1_MBTS_1 L2_MBTS_2 L3_MBTS_3 are - // each a vector of one element. Therefore start by concatenating - // the trigger elements. - HLT::TEVec allTEs; - std::vector<HLT::TEVec>::const_iterator itEnd = tes_in.end(); - - for(std::vector<HLT::TEVec>::const_iterator it = tes_in.begin(); it != itEnd; ++it) { - - HLT::TEVec::const_iterator inner_itEnd = (*it).end(); - for(HLT::TEVec::const_iterator inner_it = (*it).begin(); inner_it != inner_itEnd; ++inner_it ){ - ATH_MSG_DEBUG("Creating TE seeded from input TE " << (*inner_it)->getId()); - allTEs.push_back(*inner_it); - } - } - - // Create an output TE seeded by the inputs - HLT::TriggerElement* outputTE = config()->getNavigation()->addNode(allTEs, type_out); - outputTE->setActiveState(true); - - HLT::ErrorCode hltStatus = attachFeature(outputTE, m_zdcSignals, "zdcsignals"); - if(hltStatus != HLT::OK) { - ATH_MSG_ERROR("Write of TrigEMCluster into outputTE failed"); - return hltStatus; - } - - if( timerSvc() ) - m_timerSave->stop(); - - // Cache the TE in case this Fex is called again in this event. - m_useCachedResult = true; - m_cachedTE = outputTE; - - // Stop monitoring - afterExecMonitors().ignore(); - - return HLT::OK; -} - -//-------------------------------------------------------------------------------------- - -HLT::ErrorCode T2ZdcFex::hltInitialize() { - - ATH_MSG_INFO("in T2ZdcFex::initialize()"); - - if(m_data.retrieve().isFailure()) { - ATH_MSG_ERROR("Could not get m_data"); - return HLT::BAD_JOB_SETUP; - } - - StoreGateSvc* detStore(0); - if ( service("DetectorStore",detStore).isFailure() ) { - ATH_MSG_ERROR("Could not get detStore"); - return HLT::BAD_JOB_SETUP; - } - - const ZdcID* zdcID = 0; - if ( detStore->retrieve( zdcID ).isFailure() ) { - //if ( detSvc()->retrieve( zdcID ).isFailure() ) { - ATH_MSG_ERROR("Could not get ZdcIDs"); - return HLT::BAD_JOB_SETUP; - } - - m_zdcID = zdcID; - - // Create timers - if(timerSvc()) { - m_timerLoadColl = addTimer("LoadColl"); - m_timerAlg = addTimer("Algorithm"); - m_timerSave = addTimer("Saving"); - } - - return HLT::OK; -} - -//-------------------------------------------------------------------------------------- - -HLT::ErrorCode T2ZdcFex::hltFinalize() { - return HLT::OK; -} - -//-------------------------------------------------------------------------------------- -HLT::ErrorCode T2ZdcFex::hltEndEvent() { - m_useCachedResult = false; - m_zdcSignals = 0; - m_cachedTE=0; - return HLT::OK; -} diff --git a/Trigger/TrigAlgorithms/TrigT2MinBias/src/T2ZdcFex.h b/Trigger/TrigAlgorithms/TrigT2MinBias/src/T2ZdcFex.h deleted file mode 100644 index d238c3f58894..000000000000 --- a/Trigger/TrigAlgorithms/TrigT2MinBias/src/T2ZdcFex.h +++ /dev/null @@ -1,88 +0,0 @@ -/* - Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration -*/ - -#ifndef T2_ZDC_FEX_H -#define T2_ZDC_FEX_H - -#include "TrigInterfaces/AllTEAlgo.h" -#include "TrigT2CaloCommon/ITrigDataAccess.h" -#include "ZdcEvent/ZdcRawChannelCollection.h" -#include "xAODTrigMinBias/TrigT2ZdcSignals.h" -#include <vector> - -class ZdcID; - -/* - -@author D. O. Damazio <Denis.Oliveira.Damazio@cern.ch> - -A feature extraction algorithm to retrieve the ZDC Cells -*/ -class T2ZdcFex: public HLT::AllTEAlgo { - public: - T2ZdcFex(const std::string &name, ISvcLocator* pSvcLocator); - - - /** - * @brief implementation of the abstract hltExecute method in HLT::AllTEAlgo. - * - * @param input outer vector describeds the different input TE types, - * here we expect: 1st LVL1 energy TE; 2nd Muons; - * inner vector provides all TE instances of the given type - * - * @param output the output TE type - */ - HLT::ErrorCode hltExecute(std::vector<std::vector<HLT::TriggerElement*> >& tes_in, - unsigned int type_out); - - HLT::ErrorCode hltInitialize(); - HLT::ErrorCode hltFinalize(); - - /** - * @brief This method overwrites the default one (doing nothing) in the algo.h class - * - * This is used to reset the internal caching mechanism of this algorithm - */ - HLT::ErrorCode hltEndEvent(); - - - private: - - /** iterators to ZdcCells. To be used when online - are to be used. - Used as input for TrigDataAccess::LoadCollections */ - ZdcRawChannelCollection::const_iterator m_zBegin; - ZdcRawChannelCollection::const_iterator m_zEnd; - ZdcRawChannelCollection::const_iterator m_zt; - - TrigTimer *m_timerLoadColl; - TrigTimer *m_timerAlg; - TrigTimer *m_timerSave; - - /** Object that provides data access in a Region of - Interest. See TrigDataAccess for more details. */ - ToolHandle<ITrigDataAccess> m_data; - - /** zdc ID manipulation to get some geometry */ - const ZdcID* m_zdcID; - - - /** Energy deposited in each detector */ - std::vector<float> m_triggerEnergies; - - /** Relative trigger times with repect to collision timing */ - std::vector<float> m_triggerTimes; - - /** number of entries per module */ - std::vector<int> m_triggerEntries; - - bool m_useCachedResult; //!< internal caching: true when the hltExecute will run in cached mode. - xAOD::TrigT2ZdcSignals *m_zdcSignals; //!< internal caching: ZDC feature from the first execution. - HLT::TriggerElement* m_cachedTE; //!< internal caching: output TE from the first exectution. - int m_ZdcEnRecoOpt; // ZDC Reconstruction options (Energies) - int m_ZdcTimeRecoOpt; // ZDC Reconstruction options (Time) - float m_en_threshold, m_time_threshold, m_chi_threshold; -}; - -#endif diff --git a/Trigger/TrigAlgorithms/TrigT2MinBias/src/T2ZdcHypo.cxx b/Trigger/TrigAlgorithms/TrigT2MinBias/src/T2ZdcHypo.cxx deleted file mode 100644 index 68e7878dfece..000000000000 --- a/Trigger/TrigAlgorithms/TrigT2MinBias/src/T2ZdcHypo.cxx +++ /dev/null @@ -1,230 +0,0 @@ -/* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration -*/ - -#include "T2ZdcHypo.h" -#include "xAODTrigMinBias/TrigT2ZdcSignals.h" - -#include <bitset> -#include <cmath> - -//----------------------------------------------------------------------------- - -T2ZdcHypo::T2ZdcHypo(const std::string &name, - ISvcLocator* pSvcLocator): HLT::HypoAlgo(name, pSvcLocator), - // T2ZdcUtils(), - m_acceptAll(false), - m_t2ZdcSignals(0) { - - declareProperty("AcceptAll", m_acceptAll=false); - // declareProperty("Threshold", m_threshold = 40.0/222.0 ); // Value in pC - // declareProperty("GlobalTimeOffset", m_globalTimeOffset=0.0); - - declareProperty("TimeLogic", m_timeLogic=0); // 0 no cut, 1 In the window, 2 out of window - declareProperty("EnergyLogic", m_energyLogic=1);// 0 no cut, 1 AND, 2 = OR - declareProperty("MultiplicityLogic", m_multiLogic=0); - - declareProperty("TimeOffset", m_timeOffset); - declareProperty("Pedestal", m_EnergyPed); - declareProperty("EnergyCalibration", m_EnergyCal); - - declareProperty("TimeModuleCut", m_timeModuleCut=99999.); - - declareProperty("SumEnergyCut", m_SumEn); - declareProperty("MultCut", m_Mult); - declareProperty("TimeCut", m_timeCut=-1.0); - - - declareMonitoredVariable("MultiplicityZDC_A", m_mult.first); // Number of counters within cuts, side A - declareMonitoredVariable("MultiplicityZDC_C", m_mult.second); // Number of counters within cuts, side C - declareMonitoredVariable("TimeZDC_A", m_meanTime.first); // Mean Time A - declareMonitoredVariable("TimeZDC_C", m_meanTime.second); // Mean Time C - declareMonitoredVariable("SumEnergyZDC_A", m_sumEn.first); - declareMonitoredVariable("SumEnergyZDC_C", m_sumEn.second); - declareMonitoredVariable("TimeDiff_A_C", m_timeDiff_A_C); // Time difference A - C - - declareMonitoredVariable("SelMultiplicityZDC_A", m_selMult_A); - declareMonitoredVariable("SelMultiplicityZDC_C", m_selMult_C); - declareMonitoredVariable("SelTimeZDC_A", m_selMeanTime_A); // Mean Time A - declareMonitoredVariable("SelTimeZDC_C", m_selMeanTime_C); // Mean Time C - declareMonitoredVariable("SelSumEnergyZDC_A", m_selSumEn_A); - declareMonitoredVariable("SelSumEnergyZDC_C", m_selSumEn_C); - declareMonitoredVariable("SelTimeDiff_A_C", m_seltimeDiff_A_C); // Time difference A - C - - -} - -//----------------------------------------------------------------------------- -HLT::ErrorCode T2ZdcHypo::hltInitialize() { - ATH_MSG_INFO("Initialising this T2ZdcFex: " << name()); - ATH_MSG_INFO("================ Hypo Settings ================"); - ATH_MSG_INFO(" AcceptAll ------------------- " << (m_acceptAll==true ? "True" : "False")); - ATH_MSG_INFO(" SelectionLogic -------------- Time: " << m_timeLogic << " Energy:" << m_energyLogic << " Multi:" << m_multiLogic); - for(int ic=0;ic< ZDC_MOD*2 ;++ic){ - ATH_MSG_INFO(" TimeOffset[" << ic << " ] " << m_timeOffset[ic] << " Pedestal" << m_EnergyPed[ic] << " EnergyModuleCalibrations: " << m_EnergyCal[ic]); - } - ATH_MSG_INFO(" TimeModuleCut" << m_timeModuleCut); - ATH_MSG_INFO(" TimeDiffCut" << m_timeCut); - ATH_MSG_INFO(" EnergyCut: SideA " << m_SumEn[0] << " " << m_SumEn[1]); - ATH_MSG_INFO(" EnergyCut: SideC " << m_SumEn[2] << " " << m_SumEn[3]); - ATH_MSG_INFO(" MultiCut: SideA " << m_Mult[0] << " SideC " << m_Mult[1]); - ATH_MSG_INFO("==============================================="); - return HLT::OK; -} - -//----------------------------------------------------------------------------- - -HLT::ErrorCode T2ZdcHypo::hltExecute(const HLT::TriggerElement* outputTE, - bool& pass) { - ATH_MSG_DEBUG("Executing this T2ZdcHypo " << name()); - - pass = false; - bool passflags[3]; - for(int ib=0; ib<3; ++ib) passflags[ib]=false; - - - // Try to retrieve the TrigT2ZdcSignals object produced by the Fex - if(getFeature(outputTE, m_t2ZdcSignals, "zdcsignals") != HLT::OK){ - ATH_MSG_WARNING("Failed to retrieve features from TE."); - return HLT::OK; - } - - // If the object is not available the trigger fails without complaint. - if(!m_t2ZdcSignals){ - ATH_MSG_DEBUG("No trigger bits formed."); - return HLT::OK; - } - - // Calculate ZDC counter multiplicities, time mean and energy sums after energy and an optional time cut. - if(!calculateSumMean()) { - ATH_MSG_DEBUG("calculateSumMean failed"); - return HLT::OK; - } - - - if(m_acceptAll){ - ATH_MSG_DEBUG("Accepting all events in " << name()); - pass=true; - m_selMult_A = m_mult.first; - m_selMult_C = m_mult.second; - m_selSumEn_A=m_sumEn.first; - m_selSumEn_C=m_sumEn.second; - m_selMeanTime_A = m_meanTime.first; - m_selMeanTime_C = m_meanTime.second; - m_seltimeDiff_A_C = m_timeDiff_A_C; - return HLT::OK; - } - - if(m_timeLogic==2){ // selects out of window - if(fabs(m_timeDiff_A_C)>m_timeCut) passflags[0] = true; - } - if(m_timeLogic==1){ // selects in time of window - if(fabs(m_timeDiff_A_C)<=m_timeCut) passflags[0] = true; - } - - if(m_energyLogic==1){ // AND - if(m_sumEn.first>= m_SumEn[0] && m_sumEn.first<= m_SumEn[1]){ - if(m_sumEn.second>= m_SumEn[2] && m_sumEn.second<= m_SumEn[3]){ - passflags[1] = true; - } - } - } else if (m_energyLogic==2){ // OR - if((m_sumEn.first>= m_SumEn[0] && m_sumEn.first<= m_SumEn[1]) || (m_sumEn.second>= m_SumEn[2] && m_sumEn.second<= m_SumEn[3])){ - passflags[1] = true; - } - } - - if(m_multiLogic==1){ // AND - if(m_mult.first >= m_Mult[0] && m_mult.second >= m_Mult[1]){ - passflags[2] = true; - } - } else if(m_multiLogic==2){ // OR - if(m_mult.first >= m_Mult[0] || m_mult.second >= m_Mult[1]){ - passflags[2] = true; - } - } - - if( ((m_timeLogic==0) || passflags[0]) && - ((m_energyLogic==0) || passflags[1]) && - ((m_multiLogic==0) || passflags[2])){ - pass=true; - m_selMult_A = m_mult.first; - m_selMult_C = m_mult.second; - m_selSumEn_A=m_sumEn.first; - m_selSumEn_C=m_sumEn.second; - m_selMeanTime_A = m_meanTime.first; - m_selMeanTime_C = m_meanTime.second; - m_seltimeDiff_A_C = m_timeDiff_A_C; - } else { - m_selMult_A = -999; - m_selMult_C = -999; - m_selSumEn_A = -999.; - m_selSumEn_C = -999.; - m_selMeanTime_A = -999.; - m_selMeanTime_C = -999.; - m_seltimeDiff_A_C = -999.; - } - return HLT::OK; - -} - -//----------------------------------------------------------------------------- - -HLT::ErrorCode T2ZdcHypo::hltFinalize() { - return HLT::OK; -} - -//----------------------------------------------------------------------------- - - -int T2ZdcHypo::calculateSumMean(){ - m_mult = std::make_pair(0,0); - m_meanTime = std::make_pair(0.,0.); - m_sumEn = std::make_pair(0.,0.); - if(!m_t2ZdcSignals){ - ATH_MSG_WARNING("Cannot access T2ZdcSignals "); - return 0; - } - std::vector<float> triggerEnergies = m_t2ZdcSignals->triggerEnergies(); - std::vector<float> triggerTimes = m_t2ZdcSignals->triggerTimes(); - - if(triggerEnergies.size() != ZDC_MOD*2 || triggerTimes.size() != ZDC_MOD*2 ) { - ATH_MSG_WARNING("Vector sizes " << triggerEnergies.size() << " / " << triggerTimes.size() << " are not equal to number of ZDC counters: " << ZDC_MOD*2); - // return 0; - } - - // side A - float sumEnA=0.; - float timeA=0.; - int multA=0; - float sumEnC=0.; - float timeC=0.; - int multC=0; - // for(int izdc=0; izdc< (TrigT2ZdcSignals::NUM_ZDC); izdc++) { - for(int izdc=0; izdc< ZDC_MOD*2; izdc++) { - float time_diff = triggerTimes[izdc]-m_timeOffset[izdc]; - if(triggerEnergies[izdc] <= m_EnergyPed[izdc]) continue; - if( (fabs(time_diff)>= m_timeModuleCut)) continue; - if(izdc< ZDC_MOD ){ - // if(izdc<((TrigT2ZdcSignals::NUM_ZDC)/2)){ - sumEnA += m_EnergyCal[izdc] *triggerEnergies[izdc]; - ++multA; - timeA += time_diff; - } else { - sumEnC += m_EnergyCal[izdc] *triggerEnergies[izdc]; - ++multC; - timeC += time_diff; - } - } - - if(multA>=1) - timeA /= multA; - if(multC>=1) - timeC /= multC; - - m_mult = std::make_pair(multA,multC); - m_sumEn = std::make_pair(sumEnA,sumEnC); - m_meanTime = std::make_pair(timeA,timeC); - m_timeDiff_A_C = timeA-timeC; - return 1; -} diff --git a/Trigger/TrigAlgorithms/TrigT2MinBias/src/T2ZdcHypo.h b/Trigger/TrigAlgorithms/TrigT2MinBias/src/T2ZdcHypo.h deleted file mode 100644 index c70ccd1d12e7..000000000000 --- a/Trigger/TrigAlgorithms/TrigT2MinBias/src/T2ZdcHypo.h +++ /dev/null @@ -1,95 +0,0 @@ -/* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration -*/ - -#ifndef T2ZDCHYPO_H -#define T2ZDCHYPO_H - -#include "TrigInterfaces/HypoAlgo.h" -#include "xAODTrigMinBias/TrigT2ZdcSignals.h" - -#include <map> - -#define ZDC_MOD 4 -//#define MY_DEBUG -/** @class T2ZdcHypo - -@author Antonio Sidoti <antonio.sidoti@roma1.infn.it> -dato che Will Bell ha fatto solo danni - - -A hypothesis algorithm to read the ZDC energy and time and form a -trigger decision based on the required constraints. -*/ -class T2ZdcHypo: public HLT::HypoAlgo { - public: - T2ZdcHypo(const std::string &name, ISvcLocator* pSvcLocator); - - HLT::ErrorCode hltExecute(const HLT::TriggerElement* outputTE, - bool& pass); - HLT::ErrorCode hltInitialize(); - HLT::ErrorCode hltFinalize(); - - private: - - /** A flag to allow this Hypo to be disabled. */ - bool m_acceptAll; - - - /** Flags to control the logic of the selection */ - int m_timeLogic; - int m_energyLogic; - int m_multiLogic; - - - /** Monitored variables */ - int m_selMult_A, m_selMult_C; - float m_selMeanTime_A, m_selMeanTime_C; - float m_selSumEn_A, m_selSumEn_C; - float m_seltimeDiff_A_C; - - /** A pointer to the TrigT2ZdcSignals object. */ - const xAOD::TrigT2ZdcSignals *m_t2ZdcSignals; - - - /** Energy threshold in pC */ - // float m_threshold; - - - - /** Offsets with respect to the global offset of all counters. */ - std::vector<float> m_timeOffset; - - /** Energy Pedestals */ - std::vector<float> m_EnergyPed; - - /** Energy Calibrations */ - std::vector<float> m_EnergyCal; - - /** cut on Energy and Multiplicities */ - - std::vector<float> m_SumEn; - std::vector<float> m_Mult; - - /** A time cut in ns. Values <= 0 disable the time cut */ - float m_timeCut; - - /** Time difference from A to C side */ - float m_timeDiff_A_C; - - /** Hit multiplicity after energy and optional time cut. */ - std::pair<int, int> m_mult; - - /** Mean time after energy and optional time cut. */ - std::pair<float, float> m_meanTime; - - /** Energy sum after energy and optional time cut. */ - std::pair<float, float> m_sumEn; - /** cut on time_difference of modules */ - float m_timeModuleCut; - - int calculateSumMean(); - -}; - -#endif diff --git a/Trigger/TrigAlgorithms/TrigT2MinBias/src/components/TrigT2MinBias_entries.cxx b/Trigger/TrigAlgorithms/TrigT2MinBias/src/components/TrigT2MinBias_entries.cxx index 9c4744f05fbf..7af8cbeb781b 100644 --- a/Trigger/TrigAlgorithms/TrigT2MinBias/src/components/TrigT2MinBias_entries.cxx +++ b/Trigger/TrigAlgorithms/TrigT2MinBias/src/components/TrigT2MinBias_entries.cxx @@ -1,11 +1,7 @@ -#include "../T2MbtsFex.h" -#include "../T2MbtsHypo.h" #include "../TrigCountSpacePoints.h" #include "../TrigCountSpacePointsHypo.h" #include "../TrigCountTrtHits.h" #include "../TrigCountTrtHitsHypo.h" -#include "../T2ZdcFex.h" -#include "../T2ZdcHypo.h" #include "../TrigCountSpacePointsMT.h" #include "../SPCountHypoAlgMT.h" #include "../SPCountHypoTool.h" @@ -13,14 +9,10 @@ #include "../MbtsHypoAlg.h" #include "../MbtsHypoTool.h" -DECLARE_COMPONENT( T2MbtsFex ) -DECLARE_COMPONENT( T2MbtsHypo ) DECLARE_COMPONENT( TrigCountSpacePoints ) DECLARE_COMPONENT( TrigCountSpacePointsHypo ) DECLARE_COMPONENT( TrigCountTrtHits ) DECLARE_COMPONENT( TrigCountTrtHitsHypo ) -DECLARE_COMPONENT( T2ZdcFex ) -DECLARE_COMPONENT( T2ZdcHypo ) DECLARE_COMPONENT( TrigCountSpacePointsMT ) DECLARE_COMPONENT( SPCountHypoAlgMT ) DECLARE_COMPONENT( SPCountHypoTool ) diff --git a/Trigger/TrigMonitoring/TrigCaloMonitoring/TrigCaloMonitoring/HLTCaloFEBTool.h b/Trigger/TrigMonitoring/TrigCaloMonitoring/TrigCaloMonitoring/HLTCaloFEBTool.h deleted file mode 100644 index 68b13c64e86e..000000000000 --- a/Trigger/TrigMonitoring/TrigCaloMonitoring/TrigCaloMonitoring/HLTCaloFEBTool.h +++ /dev/null @@ -1,81 +0,0 @@ -/* - Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration -*/ - -#ifndef HLTCALOFEBTOOL_H -#define HLTCALOFEBTOOL_H - -#include "TrigHLTMonitoring/IHLTMonTool.h" -#include "GaudiKernel/ToolHandle.h" -#include "LArRecEvent/LArFebEnergyCollection.h" - -// Simple description to come - -class StoreGateSvc; -class IAlgToolEFCalo; -class LArCablingLegacyService; -class LArOnlineID; -class MsgStream; -class ITrigDataAccess; -class ICaloNoiseTool; -//class LArFebEnergyCollection; -class HWIdentifier; -class LArFebEnergy; - - -class HLTCaloFEBTool : public IHLTMonTool { - -public: - // Constructor - HLTCaloFEBTool (const std::string & type, const std::string & name, const IInterface* parent); - virtual ~HLTCaloFEBTool(); - StatusCode init(); // Empty for the moment. -#ifdef ManagedMonitorToolBase_Uses_API_201401 - StatusCode book(); // called by bookHistograms -#else - StatusCode book(bool newEventsBlock, bool newLumiBlock, bool newRun); // called by bookHistograms -#endif - StatusCode fill(); // called by fillHistograms -#ifdef ManagedMonitorToolBase_Uses_API_201401 - StatusCode proc() { return StatusCode::SUCCESS; } // called by procHistograms -#else - StatusCode proc(bool /*endOfEventsBlock*/, bool /*endOfLumiBlock*/, bool /*endOfRun*/) { return StatusCode::SUCCESS; } // called by procHistograms -#endif - -private: - /** EF Calorimeter tools for calorimeter data unpacking. */ - ToolHandleArray<IAlgToolEFCalo> m_tcrAlgTools; - /** use or not ntuples */ - bool m_ntuple; - const LArOnlineID * m_onlineHelper; - ToolHandle<LArCablingLegacyService> m_cablingSvc; - ITrigDataAccess *m_data; - /** Noise tool for offline cell by cell check */ - ToolHandle<ICaloNoiseTool> m_noisetool; - - /** energy threshold used at the DSP */ - float m_threshold; - /** number of sigma to check that a cell has signal (absolute threshold above used if sigma==0 */ - float m_nsigma; - - bool m_useloadfullcoll; - - float m_difflimit; - std::vector<LArFebEnergy> m_larfebcol; - std::vector<LArFebEnergy> m_larfebcol_hec; - std::vector<LArFebEnergy> m_larfebcol_em; - std::vector<LArFebEnergy> m_larfebcol_fcal; - /*LArFebEnergyCollection m_larfebcol; - LArFebEnergyCollection m_larfebcol_hec; - LArFebEnergyCollection m_larfebcol_em; - LArFebEnergyCollection m_larfebcol_fcal;*/ - LArFebEnergyCollection::const_iterator m_tbegin; - LArFebEnergyCollection::const_iterator m_tend; - /** EF Calorimeter tools for calorimeter data unpacking. */ - - void doComparison(std::vector<LArFebEnergy> &febcoll, std::map<HWIdentifier,std::pair<LArFebEnergy,LArFebEnergy> > *larfebmap,int &count,int &count_not_found,int &countp,double &total,double &totalx,double &totaly,double &totalz,double &x,double &y,double &z); - - -}; - -#endif diff --git a/Trigger/TrigMonitoring/TrigCaloMonitoring/src/HLTCaloFEBTool.cxx b/Trigger/TrigMonitoring/TrigCaloMonitoring/src/HLTCaloFEBTool.cxx deleted file mode 100644 index 149e560d00ad..000000000000 --- a/Trigger/TrigMonitoring/TrigCaloMonitoring/src/HLTCaloFEBTool.cxx +++ /dev/null @@ -1,1085 +0,0 @@ -/* - Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration -*/ - -#include "TrigCaloMonitoring/HLTCaloFEBTool.h" -#include "GaudiKernel/MsgStream.h" -#include "StoreGate/StoreGateSvc.h" -#include "TrigCaloRec/IAlgToolEFCalo.h" -#include "CaloEvent/CaloCellContainer.h" - -#include "LArIdentifier/LArIdManager.h" -#include "LArIdentifier/LArOnlineID.h" -#include "LArCabling/LArCablingLegacyService.h" - -#include "TrigSteeringEvent/TrigRoiDescriptor.h" - -#include "TrigT2CaloCommon/ITrigDataAccess.h" -#include "CaloInterface/ICaloNoiseTool.h" -#include "GaudiKernel/IToolSvc.h" -#include "CaloGeoHelpers/CaloSampling.h" - - -#include "TH1F.h" -#include "TH2F.h" -#include "TNtuple.h" -#include <string> - -HLTCaloFEBTool::HLTCaloFEBTool(const std::string & type, const std::string & name, const IInterface* parent) : IHLTMonTool(type,name,parent), - m_tcrAlgTools(this), - m_onlineHelper(0), - m_cablingSvc("LArCablingLegacyService"), - m_data(NULL), - m_noisetool("CaloNoiseTool/CaloNoiseToolDefault"), - m_threshold(100.0), - m_nsigma(5.0), - m_useloadfullcoll(false), - m_difflimit(0.){ - declareProperty ("TCRTools", m_tcrAlgTools); - declareProperty ("DoNtuple", m_ntuple = false); - declareProperty("NoiseTool",m_noisetool); - declareProperty ("threshold", m_threshold); - declareProperty ("sigma", m_nsigma); - declareProperty ("useLoadFullCollection", m_useloadfullcoll); - declareProperty ("DiffLimit", m_difflimit); - // Nothing for the moment - return; -} - -HLTCaloFEBTool::~HLTCaloFEBTool() { -} - -StatusCode HLTCaloFEBTool::init() { - ATH_MSG_DEBUG( "Initializing" ); - - if ( m_tcrAlgTools.retrieve().isFailure() ) { - ATH_MSG_ERROR( "Failed to retrieve helper tools: " << m_tcrAlgTools ); - return StatusCode::FAILURE; - } else { - ATH_MSG_DEBUG( "Retrieved " << m_tcrAlgTools ); - } - if ( m_cablingSvc.retrieve().isFailure() ) { - ATH_MSG_ERROR( "Failed to retrieve helper tools: " << m_cablingSvc ); - return StatusCode::FAILURE; - } else { - ATH_MSG_INFO( "Retrieved " << m_cablingSvc ); - } - - const LArIdManager* larMgr; - if ( (detStore()->retrieve(larMgr)).isFailure() ) { - ATH_MSG_ERROR( "Unable to retrieve LArIdManager from DetectorStore" ); - return StatusCode::FAILURE; - } else { - ATH_MSG_DEBUG( "Successfully retrieved LArIdManager from DetectorStore" ); - } - m_onlineHelper = larMgr->getOnlineID(); - if (!m_onlineHelper) { - ATH_MSG_ERROR( "Could not access LArOnlineID helper" ); - return StatusCode::FAILURE; - } else { - ATH_MSG_DEBUG( "Successfully accessed LArOnlineID helper" ); - } - - if ( toolSvc()->retrieveTool("TrigDataAccess",m_data).isFailure() ){ - ATH_MSG_ERROR( "Failed to retrieve helper tools: " << m_data ); - return StatusCode::FAILURE; - } else { - ATH_MSG_INFO( "Retrieved " << m_data ); - } - - ATH_CHECK(m_noisetool.retrieve()); - - return StatusCode::SUCCESS; - -} - -#ifdef ManagedMonitorToolBase_Uses_API_201401 -StatusCode HLTCaloFEBTool::book() { -#else -StatusCode HLTCaloFEBTool::book(bool newEventsBlock, bool newLumiBlock, bool newRun) { -#endif - - addMonGroup( new MonGroup(this,"HLT/CaloFEBMon",run) ); - - if ( newRunFlag() ) { - - addHistogram(new TH1I("NEMLArFEBs","Number of HLT EM LAr FEBs; Number of HLT FEBs; Number of Events",100,0,1500)); - addHistogram(new TH1I("NHECLArFEBs","Number of HLT HEC LAr FEBs; Number of HLT FEBs; Number of Events",100,0,500)); - addHistogram(new TH1I("NFCALLArFEBs","Number of HLT FCAL LAr FEBs; Number of HLT FEBs; Number of Events",100,0,1500)); - addHistogram(new TH1I("NEMBadLArFEBs","Number of Bad EM LAr FEBs; Number of Bad FEBs; Number of Events",150,0,150)); - addHistogram(new TH1I("NHECBadLArFEBs","Number of Bad HEC LAr FEBs; Number of Bad FEBs; Number of Events",150,0,150)); - addHistogram(new TH1I("NFCALBadLArFEBs","Number of Bad FCAL LAr FEBs; Number of Bad FEBs; Number of Events",150,0,150)); - - addHistogram(new TH1F("PercentDiffLAr","Percentual Difference in LAr; %; Number of Events",80,0,10.0) ); - addHistogram(new TH1F("conversionErrors","Number of conversionErrors per Event; conversionErrors; Number of Events",20,0,20.0) ); - addHistogram(new TH2F("etaphiEMBAFEBLAr","Position of EMB A-side LAr FEBs with some important difference; \\eta; \\phi",100,-5.,5.,64,-3.2,3.2) ); - addHistogram(new TH2F("etaphiHECAFEBLAr","Position of HEC A-side LAr FEBs with some important difference; \\eta; \\phi",100,-5.,5.,64,-3.2,3.2) ); - addHistogram(new TH2F("etaphiFCALAFEBLAr","Position of FCAL A-side LAr FEBs with some important difference; \\eta; \\phi",100,-5.,5.,64,-3.2,3.2) ); - addHistogram(new TH2F("etaphiEMBCFEBLAr","Position of EMB C-side LAr FEBs with some important difference; \\eta; \\phi",100,-5.,5.,64,-3.2,3.2) ); - addHistogram(new TH2F("etaphiHECCFEBLAr","Position of HEC C-side LAr FEBs with some important difference; \\eta; \\phi",100,-5.,5.,64,-3.2,3.2) ); - addHistogram(new TH2F("etaphiFCALCFEBLAr","Position of FCAL C-side LAr FEBs with some important difference; \\eta; \\phi",100,-5.,5.,64,-3.2,3.2) ); - addHistogram(new TH2F("etaphiEMCAFEBLAr","Position of EMC A-side LAr FEBs with some important difference; \\eta; \\phi",100,-5.,5.,64,-3.2,3.2) ); - addHistogram(new TH2F("etaphiEMCCFEBLAr","Position of EMC C-side LAr FEBs with some important difference; \\eta; \\phi",100,-5.,5.,64,-3.2,3.2) ); -// EMB A historgrams - //addHistogram(new TH1F("deltaetaEMBAFEBLAr","EMB A-side #Delta#eta(online,offline); #Delta#eta;",64,-3.2,3.2) ); - //addHistogram(new TH1F("deltaphiEMBAFEBLAr","EMB A-side #Delta#phi(online,offline); #Delta#phi",100,-5.,5.) ); - addHistogram(new TH1F("deltaEnexEMBAFEBLAr","EMB A-side #Delta Ex(online,offline); #Delta E_{x} (MeV)",100,-200.,200.) ); - addHistogram(new TH1F("deltaEneyEMBAFEBLAr","EMB A-side #Delta Ey(online,offline); #Delta E_{y} (MeV)",100,-200.,200.) ); - addHistogram(new TH1F("deltaEnezEMBAFEBLAr","EMB A-side #Delta Ez(online,offline); #Delta E_{z} (MeV)",100,-200.,200.) ); - addHistogram(new TH1F("deltaTotEneEMBAFEBLAr","EMB A-side #Delta TotE(online,offline); #Delta E (MeV)",100,-2000.,2000.) ); -// EMC A historgrams - //addHistogram(new TH1F("deltaetaEMCAFEBLAr","EMC A-side #Delta#eta(online,offline); #Delta#eta;",64,-3.2,3.2) ); - //addHistogram(new TH1F("deltaphiEMCAFEBLAr","EMC A-side #Delta#phi(online,offline); #Delta#phi",100,-5.,5.) ); - addHistogram(new TH1F("deltaEnexEMCAFEBLAr","EMC A-side #Delta Ex(online,offline); #Delta E_{x} (MeV)",100,-200.,200.) ); - addHistogram(new TH1F("deltaEneyEMCAFEBLAr","EMC A-side #Delta Ey(online,offline); #Delta E_{y} (MeV)",100,-200.,200.) ); - addHistogram(new TH1F("deltaEnezEMCAFEBLAr","EMC A-side #Delta Ez(online,offline); #Delta E_{z} (MeV)",100,-200.,200.) ); - addHistogram(new TH1F("deltaTotEneEMCAFEBLAr","EMC A-side #Delta TotE(online,offline); #Delta E (MeV)",100,-2000.,2000.) ); -// HEC A historgrams - //addHistogram(new TH1F("deltaetaHECAFEBLAr","HEC A-side #Delta#eta(online,offline); #Delta#eta;",64,-3.2,3.2) ); - //addHistogram(new TH1F("deltaphiHECAFEBLAr","HEC A-side #Delta#phi(online,offline); #Delta#phi",100,-5.,5.) ); - addHistogram(new TH1F("deltaEnexHECAFEBLAr","HEC A-side #Delta Ex(online,offline); #Delta E_{x} (MeV)",100,-200.,200.) ); - addHistogram(new TH1F("deltaEneyHECAFEBLAr","HEC A-side #Delta Ey(online,offline); #Delta E_{y} (MeV)",100,-200.,200.) ); - addHistogram(new TH1F("deltaEnezHECAFEBLAr","HEC A-side #Delta Ez(online,offline); #Delta E_{z} (MeV)",100,-200.,200.) ); - addHistogram(new TH1F("deltaTotEneHECAFEBLAr","HEC A-side #Delta TotE(online,offline); #Delta E (MeV)",100,-2000.,2000.) ); -// FCAL A historgrams - //addHistogram(new TH1F("deltaetaFCALAFEBLAr","FCAL A-side #Delta#eta(online,offline); #Delta #eta;",64,-3.2,3.2) ); - //addHistogram(new TH1F("deltaphiFCALAFEBLAr","FCAL A-side #Delta#phi(online,offline); #Delta#phi",100,-5.,5.) ); - addHistogram(new TH1F("deltaEnexFCALAFEBLAr","FCAL A-side #Delta Ex(online,offline); #Delta E_{x} (MeV)",100,-200.,200.) ); - addHistogram(new TH1F("deltaEneyFCALAFEBLAr","FCAL A-side #Delta Ey(online,offline); #Delta E_{y} (MeV)",100,-200.,200.) ); - addHistogram(new TH1F("deltaEnezFCALAFEBLAr","FCAL A-side #Delta Ez(online,offline); #Delta E_{z} (MeV)",100,-200.,200.) ); - addHistogram(new TH1F("deltaTotEneFCALAFEBLAr","FCAL A-side #Delta TotE(online,offline); #Delta E (MeV)",100,-2000.,2000.) ); -// EMB C historgrams - //addHistogram(new TH1F("deltaetaEMBCFEBLAr","EMB C-side #Delta#eta(online,offline); #Delta#eta;",64,-3.2,3.2) ); - //addHistogram(new TH1F("deltaphiEMBCFEBLAr","EMB C-side #Delta#phi(online,offline); #Delta#phi",100,-5.,5.) ); - addHistogram(new TH1F("deltaEnexEMBCFEBLAr","EMB C-side #Delta Ex(online,offline); #Delta E_{x} (MeV)",100,-200.,200.) ); - addHistogram(new TH1F("deltaEneyEMBCFEBLAr","EMB C-side #Delta Ey(online,offline); #Delta E_{y} (MeV)",100,-200.,200.) ); - addHistogram(new TH1F("deltaEnezEMBCFEBLAr","EMB C-side #Delta Ez(online,offline); #Delta E_{z} (MeV)",100,-200.,200.) ); - addHistogram(new TH1F("deltaTotEneEMBCFEBLAr","EMB C-side #Delta TotE(online,offline); #Delta E (MeV)",100,-2000.,2000.) ); -// EMC C historgrams - //addHistogram(new TH1F("deltaetaEMCCFEBLAr","EMC C-side #Delta#eta(online,offline); #Delta#eta;",64,-3.2,3.2) ); - //addHistogram(new TH1F("deltaphiEMCCFEBLAr","EMC C-side #Delta#phi(online,offline); #Delta#phi",100,-5.,5.) ); - addHistogram(new TH1F("deltaEnexEMCCFEBLAr","EMC C-side #Delta Ex(online,offline); #Delta E_{x} (MeV)",100,-200.,200.) ); - addHistogram(new TH1F("deltaEneyEMCCFEBLAr","EMC C-side #Delta Ey(online,offline); #Delta E_{y} (MeV)",100,-200.,200.) ); - addHistogram(new TH1F("deltaEnezEMCCFEBLAr","EMC C-side #Delta Ez(online,offline); #Delta E_{z} (MeV)",100,-200.,200.) ); - addHistogram(new TH1F("deltaTotEneEMCCFEBLAr","EMC C-side #Delta TotE(online,offline); #Delta E (MeV)",100,-2000.,2000.) ); -// HEC C historgrams - //addHistogram(new TH1F("deltaetaHECCFEBLAr","HEC C-side #Delta#eta(online,offline); #Delta#eta;",64,-3.2,3.2) ); - //addHistogram(new TH1F("deltaphiHECCFEBLAr","HEC C-side #Delta#phi(online,offline); #Delta#phi",100,-5.,5.) ); - addHistogram(new TH1F("deltaEnexHECCFEBLAr","HEC C-side #Delta Ex(online,offline); #Delta E_{x} (MeV)",100,-200.,200.) ); - addHistogram(new TH1F("deltaEneyHECCFEBLAr","HEC C-side #Delta Ey(online,offline); #Delta E_{y} (MeV)",100,-200.,200.) ); - addHistogram(new TH1F("deltaEnezHECCFEBLAr","HEC C-side #Delta Ez(online,offline); #Delta E_{z} (MeV)",100,-200.,200.) ); - addHistogram(new TH1F("deltaTotEneHECCFEBLAr","HEC C-side #Delta TotE(online,offline); #Delta E (MeV)",100,-2000.,2000.) ); -// FCAL C historgrams - //addHistogram(new TH1F("deltaetaFCALCFEBLAr","FCAL C-side #Delta#eta(online,offline); #Delta #eta;",64,-3.2,3.2) ); - //addHistogram(new TH1F("deltaphiFCALCFEBLAr","FCAL C-side #Delta#phi(online,offline); #Delta#phi",100,-5.,5.) ); - addHistogram(new TH1F("deltaEnexFCALCFEBLAr","FCAL C-side #Delta Ex(online,offline); #Delta E_{x} (MeV)",100,-200.,200.) ); - addHistogram(new TH1F("deltaEneyFCALCFEBLAr","FCAL C-side #Delta Ey(online,offline); #Delta E_{y} (MeV)",100,-200.,200.) ); - addHistogram(new TH1F("deltaEnezFCALCFEBLAr","FCAL C-side #Delta Ez(online,offline); #Delta E_{z} (MeV)",100,-200.,200.) ); - addHistogram(new TH1F("deltaTotEneFCALCFEBLAr","FCAL C-side #Delta TotE(online,offline); #Delta E (MeV)",100,-2000.,2000.) ); - // lartile=0?lar:tile - if ( m_ntuple ) - addTree( new TNtuple("Details","Details","et:eta:phi:gain:tet:teta:tphi:tgain:lartile") ); - - }else if ( newEventsBlockFlag() || newLumiBlockFlag() ){ - return StatusCode::SUCCESS; - } - - ATH_MSG_DEBUG( "End of book" ); - return StatusCode::SUCCESS; -} - -StatusCode HLTCaloFEBTool::fill() { - - const DataHandle<CaloCellContainer> AllCalo; - if ( evtStore()->retrieve(AllCalo,"AllCalo").isFailure() ){ - ATH_MSG_DEBUG( "No Calo Cell Container found" ); - return StatusCode::SUCCESS; - } -#ifndef NDEBUG - ATH_MSG_DEBUG( "Got container " << "Size : " << AllCalo->size() ); -#endif - - CaloCellContainer* pCaloCellContainer - = new CaloCellContainer(SG::VIEW_ELEMENTS); - ToolHandleArray<IAlgToolEFCalo>::iterator itrtcr = m_tcrAlgTools.begin(); - ToolHandleArray<IAlgToolEFCalo>::iterator endtcr = m_tcrAlgTools.end(); - double etamin, etamax,phimin, phimax; - etamin=-4.8; - etamax=4.8; - for (; itrtcr!=endtcr; ++itrtcr) { - -#ifndef NDEBUG - ATH_MSG_VERBOSE( "Tool name : " << (*itrtcr).name() ); -#endif - phimin=-M_PI; - phimax=M_PI; - // Fix for stupid RS problem - if ( (*itrtcr).name().find("Tile")!=std::string::npos ){ - phimin=0; - phimax=2*M_PI; - } - StatusCode sc; - float eta0=(etamax+etamin)/2; - float phi0=(phimax+phimin)/2; - if((*itrtcr).name() == "FullCaloCellContMaker") { - sc= (*itrtcr)->execute(*pCaloCellContainer); - } else { - sc = (*itrtcr)->execute(*pCaloCellContainer, TrigRoiDescriptor( eta0, etamin, etamax, phi0, phimin, phimax ) ); - } - if ( sc.isFailure() ) { - ATH_MSG_ERROR( "Problem with filling the cont" ); - } - } // End of loop over tools - - CaloCellContainer::const_iterator beg = pCaloCellContainer->begin(); - CaloCellContainer::const_iterator end = pCaloCellContainer->end(); - - std::map<HWIdentifier,LArFebEnergy> larfebmap; - /*std::map<HWIdentifier,LArFebEnergy> larfebmap_fcal, larfebmap_fcalnoise; - std::map<HWIdentifier,LArFebEnergy> larfebmap_em,larfebmap_emnoise; - std::map<HWIdentifier,LArFebEnergy> larfebmap_hec, larfebmap_hecnoise, larfebmap_em,larfebmap_emnoise;*/ - std::map<HWIdentifier,std::pair<LArFebEnergy,LArFebEnergy> > larfebmap_fcal; - std::map<HWIdentifier,std::pair<LArFebEnergy,LArFebEnergy> > larfebmap_em; - std::map<HWIdentifier,std::pair<LArFebEnergy,LArFebEnergy> > larfebmap_hec; - std::map<HWIdentifier,LArFebEnergy>::iterator it; - - for(; beg!=end ; ++beg){ - const CaloCell* cell = (*beg); - if ( cell && cell->caloDDE() - && cell->caloDDE()->getSubCalo() < CaloCell_ID::TILE ){ - Identifier idh = cell->ID(); - const CaloDetDescrElement *detdescr = cell->caloDDE(); - //IdentifierHash idh = cell->caloDDE()->calo_hash(); - HWIdentifier channel_hw = m_cablingSvc->createSignalChannelID(idh); - HWIdentifier feb_hw = m_onlineHelper->feb_Id(channel_hw); - Identifier32::value_type feb_hw_n = feb_hw.get_identifier32().get_compact(); - float cellnoise=0; - if ( m_nsigma != 0 ){ - cellnoise = m_noisetool->totalNoiseRMS(cell->caloDDE(),cell->gain()); - m_threshold = m_nsigma * cellnoise; - //m_threshold = m_nsigma * m_noisetool->totalNoiseRMS(cell->caloDDE(),cell->gain()); - //std::cout << "cell energy = " << cell->energy() << std::endl; - } - if ( cell->energy() > m_threshold ) { - int ienergy = (int) floorf(cell->energy()/64.0); - float energy = (float)(64.0*ienergy); - float et, ex, ey, ez; - et = energy * cell->caloDDE()->sinTh(); - ex= et * cell->caloDDE()->cosPhi(); - ey= et * cell->caloDDE()->sinPhi(); - ez= et * cell->caloDDE()->cotTh(); - double tmpx = cellnoise*cell->caloDDE()->sinTh()*cell->caloDDE()->cosPhi(); - double tmpy = cellnoise*cell->caloDDE()->sinTh()*cell->caloDDE()->sinPhi(); - double tmpz = cellnoise*cell->caloDDE()->sinTh()*cell->caloDDE()->cotTh(); - double sigmax = (tmpx*tmpx); - double sigmay = (tmpy*tmpy); - double sigmaz = (tmpz*tmpz); - //std::cout << "just test " << cell->caloDDE()->sinTh() << " " << 1./cosh ( cell->eta() ) << " " << cell->caloDDE()->cosPhi() << " " << cos ( cell->phi() ) << " " << cell->caloDDE()->sinTh()* cell->caloDDE()->cotTh() << " " << tanh(cell->eta() ) << " " << m_threshold << std::endl; -#ifndef NDEBUG - if ( energy > 0 ) { - ATH_MSG_VERBOSE( " All cells that compose feb : " - << std::hex - << feb_hw << " " - << idh << " " - << channel_hw << " " - << std::dec - << energy << " " - << cell->energy() << " " - << et << " " - << ex << " " - << ey << " " - << ez ); - } -#endif - if ( (it = larfebmap.find(feb_hw)) != larfebmap.end() ){ - // fill -#ifndef NDEBUG - ATH_MSG_VERBOSE( "filling created FEB " - << "with size = " << larfebmap.size() ); -#endif - LArFebEnergy* larfebenergy = - &((*it).second); - double tmpex = larfebenergy->getFebEx(); - double tmpey = larfebenergy->getFebEy(); - double tmpez = larfebenergy->getFebEz(); -#ifndef NDEBUG - ATH_MSG_VERBOSE( "current ex = " << tmpex ); - ATH_MSG_VERBOSE( "current ey = " << tmpey ); - ATH_MSG_VERBOSE( "current ez = " << tmpez ); -#endif - larfebenergy->setFebEx( - ex + tmpex); - larfebenergy->setFebEy( - ey + tmpey); - larfebenergy->setFebEz( - ez + tmpez); - } else { - LArFebEnergy larfebenergy = - LArFebEnergy(feb_hw_n,ex,ey,ez,0.); - larfebmap.insert(std::pair<HWIdentifier,LArFebEnergy>(feb_hw,larfebenergy)); - } - CaloCell_ID::CaloSample s = detdescr->getSampling(); - //std::map<HWIdentifier,LArFebEnergy>::iterator myit; - std::map<HWIdentifier,std::pair<LArFebEnergy,LArFebEnergy> >::iterator myit; - switch(s){ - case CaloCell_ID::PreSamplerB: - case CaloCell_ID::PreSamplerE: - case CaloCell_ID::EMB1: - case CaloCell_ID::EMB2: - case CaloCell_ID::EMB3: - case CaloCell_ID::EME1: - case CaloCell_ID::EME2: - case CaloCell_ID::EME3: - //std::map<HWIdentifier,LArFebEnergy>::iterator myit; - if( (myit = larfebmap_em.find(feb_hw)) != larfebmap_em.end() ){ - LArFebEnergy* larfebenergy = - &((*myit).second.first); - double tmpex = larfebenergy->getFebEx(); - double tmpey = larfebenergy->getFebEy(); - double tmpez = larfebenergy->getFebEz(); - larfebenergy->setFebEx( - ex + tmpex); - larfebenergy->setFebEy( - ey + tmpey); - larfebenergy->setFebEz( - ez + tmpez); - LArFebEnergy* larfebnoise = - &((*myit).second.second); - double tmpsx = larfebnoise->getFebEx(); - double tmpsy = larfebnoise->getFebEy(); - double tmpsz = larfebnoise->getFebEz(); - larfebnoise->setFebEx( - sigmax + tmpsx); - larfebnoise->setFebEy( - sigmay + tmpsy); - larfebnoise->setFebEz( - sigmaz + tmpsz); - } else { - LArFebEnergy larfebenergy = - LArFebEnergy(feb_hw_n,ex,ey,ez,0.); - LArFebEnergy larfebnoise = - LArFebEnergy(feb_hw_n,sigmax,sigmay,sigmaz,0.); - //larfebmap_em.insert(std::pair<HWIdentifier,LArFebEnergy>(feb_hw,larfebenergy)); - larfebmap_em.insert(std::pair<HWIdentifier,std::pair<LArFebEnergy,LArFebEnergy> >(feb_hw,std::make_pair(larfebenergy,larfebnoise))); - } - break; - case CaloCell_ID::HEC0: - case CaloCell_ID::HEC1: - case CaloCell_ID::HEC2: - case CaloCell_ID::HEC3: - //std::map<HWIdentifier,LArFebEnergy>::iterator myit; - if( (myit = larfebmap_hec.find(feb_hw)) != larfebmap_hec.end() ){ - LArFebEnergy* larfebenergy = - &((*myit).second.first); - double tmpex = larfebenergy->getFebEx(); - double tmpey = larfebenergy->getFebEy(); - double tmpez = larfebenergy->getFebEz(); - larfebenergy->setFebEx( - ex + tmpex); - larfebenergy->setFebEy( - ey + tmpey); - larfebenergy->setFebEz( - ez + tmpez); - LArFebEnergy* larfebnoise = - &((*myit).second.second); - double tmpsx = larfebnoise->getFebEx(); - double tmpsy = larfebnoise->getFebEy(); - double tmpsz = larfebnoise->getFebEz(); - larfebnoise->setFebEx( - sigmax + tmpsx); - larfebnoise->setFebEy( - sigmay + tmpsy); - larfebnoise->setFebEz( - sigmaz + tmpsz); - } else { - LArFebEnergy larfebenergy = - LArFebEnergy(feb_hw_n,ex,ey,ez,0.); - LArFebEnergy larfebnoise = - LArFebEnergy(feb_hw_n,sigmax,sigmay,sigmaz,0.); - //larfebmap_hec.insert(std::pair<HWIdentifier,LArFebEnergy>(feb_hw,larfebenergy)); - larfebmap_hec.insert(std::pair<HWIdentifier,std::pair<LArFebEnergy,LArFebEnergy> >(feb_hw,std::make_pair(larfebenergy,larfebnoise))); - } - break; - case CaloCell_ID::FCAL0: - case CaloCell_ID::FCAL1: - case CaloCell_ID::FCAL2: - //std::map<HWIdentifier,LArFebEnergy>::iterator myit; - if( (myit = larfebmap_fcal.find(feb_hw)) != larfebmap_fcal.end() ){ - LArFebEnergy* larfebenergy = - &((*myit).second.first); - double tmpex = larfebenergy->getFebEx(); - double tmpey = larfebenergy->getFebEy(); - double tmpez = larfebenergy->getFebEz(); - larfebenergy->setFebEx( - ex + tmpex); - larfebenergy->setFebEy( - ey + tmpey); - larfebenergy->setFebEz( - ez + tmpez); - LArFebEnergy* larfebnoise = - &((*myit).second.second); - double tmpsx = larfebnoise->getFebEx(); - double tmpsy = larfebnoise->getFebEy(); - double tmpsz = larfebnoise->getFebEz(); - larfebnoise->setFebEx( - sigmax + tmpsx); - larfebnoise->setFebEy( - sigmay + tmpsy); - larfebnoise->setFebEz( - sigmaz + tmpsz); - } else { - LArFebEnergy larfebenergy = - LArFebEnergy(feb_hw_n,ex,ey,ez,0.); - LArFebEnergy larfebnoise = - LArFebEnergy(feb_hw_n,sigmax,sigmay,sigmaz,0.); - larfebmap_fcal.insert(std::pair<HWIdentifier,std::pair<LArFebEnergy,LArFebEnergy> >(feb_hw,std::make_pair(larfebenergy,larfebnoise))); - } - break; - case CaloCell_ID::TileBar0: - case CaloCell_ID::TileBar1: - case CaloCell_ID::TileBar2: - case CaloCell_ID::TileExt0: - case CaloCell_ID::TileExt1: - case CaloCell_ID::TileExt2: - case CaloCell_ID::TileGap1: - case CaloCell_ID::TileGap2: - case CaloCell_ID::TileGap3: - case CaloCell_ID::MINIFCAL0: - case CaloCell_ID::MINIFCAL1: - case CaloCell_ID::MINIFCAL2: - case CaloCell_ID::MINIFCAL3: - case CaloCell_ID::Unknown: - break; - } - } - } // End of basic cell checks - - } -#ifndef NDEBUG - ATH_MSG_DEBUG( " Number of Offline FEBs : " - << larfebmap.size() ); - ATH_MSG_DEBUG( "COMPARISON " ); -#endif - //LArFebEnergyCollection m_larfebcol; - m_larfebcol.clear(); - m_larfebcol_hec.clear(); - m_larfebcol_em.clear(); - m_larfebcol_fcal.clear(); - //m_larfebcol.clear(SG::VIEW_ELEMENTS); - //LArFebEnergyCollection::const_iterator tit,tbegin,tend; - //LArFebEnergyCollection::const_iterator tit; - bool prepare=true; - if(m_useloadfullcoll){ - if(m_data->LoadFullCollections(m_tbegin,m_tend,TTEM,prepare).isFailure()){ - ATH_MSG_ERROR( "Problems reading LoadFullCollection" ); - return StatusCode::FAILURE; - } - } else { - double etamin = -4.8; - double etamax = 4.8; - double phimin = -M_PI; - double phimax = M_PI; - //if ( m_data->LoadFullCollections(tbegin,tend,TTEM).isFailure() ) { - m_data->RegionSelector(0,etamin,etamax,phimin,phimax, TTEM); - //LArFebEnergyCollection::const_iterator titem0,tbeginem0,tendem0; - if ( m_data->LoadCollections(m_tbegin,m_tend,0).isFailure() ) { - ATH_MSG_ERROR( "Problems to read FEB info" ); - return StatusCode::FAILURE; - } - //LArFebEnergy *feb = new LArFebEnergy(); - for(LArFebEnergyCollection::const_iterator tit= m_tbegin; tit!=m_tend; ++tit) { - LArFebEnergy feb = LArFebEnergy((*tit)->getFebId(),(*tit)->getFebEx(),(*tit)->getFebEy(),(*tit)->getFebEz(),0.); - /*feb->setFebEx((*tit)->getFebEx()); - feb->setFebEy((*tit)->getFebEy()); - feb->setFebEz((*tit)->getFebEz());*/ -#ifndef NDEBUG - ATH_MSG_VERBOSE( "TTEM 0 FEB ID = " << feb.getFebId() ); - ATH_MSG_VERBOSE( "TTEM 0 FEB Ex = " << feb.getFebEx() ); - ATH_MSG_VERBOSE( "TTEM 0 FEB Ey = " << feb.getFebEy() ); - ATH_MSG_VERBOSE( "TTEM 0 FEB Ez = " << feb.getFebEz() ); -#endif - m_larfebcol_em.push_back(feb); - } - m_data->RegionSelector(1,etamin,etamax,phimin,phimax,TTEM); - //LArFebEnergyCollection::const_iterator tbeginem1; - //LArFebEnergyCollection::const_iterator tendem1; - if ( m_data->LoadCollections(m_tbegin,m_tend,1).isFailure() ) { - ATH_MSG_ERROR( "Problems to read FEB info" ); - return StatusCode::FAILURE; - } - for(LArFebEnergyCollection::const_iterator tit = m_tbegin; tit!=m_tend; ++tit) { - //LArFebEnergy *feb = new LArFebEnergy((*tit)->getFebId()); - LArFebEnergy feb = LArFebEnergy((*tit)->getFebId(),(*tit)->getFebEx(),(*tit)->getFebEy(),(*tit)->getFebEz(),0.); - /*feb->setFebEx((*tit)->getFebEx()); - feb->setFebEy((*tit)->getFebEy()); - feb->setFebEz((*tit)->getFebEz());*/ -#ifndef NDEBUG - ATH_MSG_VERBOSE( "TTEM 1 FEB ID = " << (*tit)->getFebId() ); - ATH_MSG_VERBOSE( "TTEM 1 FEB Ex = " << (*tit)->getFebEx() ); - ATH_MSG_VERBOSE( "TTEM 1 FEB Ey = " << (*tit)->getFebEy() ); - ATH_MSG_VERBOSE( "TTEM 1 FEB Ez = " << (*tit)->getFebEz() ); -#endif - m_larfebcol_em.push_back(feb); - } - m_data->RegionSelector(2,etamin,etamax,phimin,phimax, TTEM); - //LArFebEnergyCollection::const_iterator titem2,tbeginem2,tendem2; - if ( m_data->LoadCollections(m_tbegin,m_tend,2).isFailure() ) { - ATH_MSG_ERROR( "Problems to read FEB info" ); - return StatusCode::FAILURE; - } - for( LArFebEnergyCollection::const_iterator tit= m_tbegin; tit!=m_tend; ++tit) { - //LArFebEnergy *feb = new LArFebEnergy((*tit)->getFebId()); - LArFebEnergy feb = LArFebEnergy((*tit)->getFebId(),(*tit)->getFebEx(),(*tit)->getFebEy(),(*tit)->getFebEz(),0.); - /*feb->setFebEx((*tit)->getFebEx()); - feb->setFebEy((*tit)->getFebEy()); - feb->setFebEz((*tit)->getFebEz());*/ -#ifndef NDEBUG - ATH_MSG_VERBOSE( "TTEM 2 FEB ID = " << (*tit)->getFebId() ); - ATH_MSG_VERBOSE( "TTEM 2 FEB Ex = " << (*tit)->getFebEx() ); - ATH_MSG_VERBOSE( "TTEM 2 FEB Ey = " << (*tit)->getFebEy() ); - ATH_MSG_VERBOSE( "TTEM 2 FEB Ez = " << (*tit)->getFebEz() ); -#endif - m_larfebcol_em.push_back(feb); - } - m_data->RegionSelector(3,etamin,etamax,phimin,phimax, TTEM); - //LArFebEnergyCollection::const_iterator titem3,tbeginem3,tendem3; - if ( m_data->LoadCollections(m_tbegin,m_tend,3).isFailure() ) { - ATH_MSG_ERROR( "Problems to read FEB info" ); - return StatusCode::FAILURE; - } - for(LArFebEnergyCollection::const_iterator tit= m_tbegin; tit!=m_tend; ++tit) { - LArFebEnergy feb = LArFebEnergy((*tit)->getFebId(),(*tit)->getFebEx(),(*tit)->getFebEy(),(*tit)->getFebEz(),0.); - /*feb->setFebEx((*tit)->getFebEx()); - feb->setFebEy((*tit)->getFebEy()); - feb->setFebEz((*tit)->getFebEz());*/ -#ifndef NDEBUG - ATH_MSG_VERBOSE( "TTEM 3 FEB ID = " << (*tit)->getFebId() ); - ATH_MSG_VERBOSE( "TTEM 3 FEB Ex = " << (*tit)->getFebEx() ); - ATH_MSG_VERBOSE( "TTEM 3 FEB Ey = " << (*tit)->getFebEy() ); - ATH_MSG_VERBOSE( "TTEM 3 FEB Ez = " << (*tit)->getFebEz() ); -#endif - m_larfebcol_em.push_back(feb); - } - m_data->RegionSelector(0,etamin,etamax,phimin,phimax, TTHEC); - //LArFebEnergyCollection::const_iterator tithec0,tbeginhec0,tendhec0; - if ( m_data->LoadCollections(m_tbegin,m_tend).isFailure() ) { - ATH_MSG_ERROR( "Problems to read FEB info" ); - return StatusCode::FAILURE; - } - for(LArFebEnergyCollection::const_iterator tit = m_tbegin; tit!=m_tend; ++tit) { - LArFebEnergy feb = LArFebEnergy((*tit)->getFebId(),(*tit)->getFebEx(),(*tit)->getFebEy(),(*tit)->getFebEz(),0.); - /*feb->setFebEx((*tit)->getFebEx()); - feb->setFebEy((*tit)->getFebEy()); - feb->setFebEz((*tit)->getFebEz());*/ -#ifndef NDEBUG - ATH_MSG_VERBOSE( "TTHEC 0 FEB ID = " << (*tit)->getFebId() ); - ATH_MSG_VERBOSE( "TTHEC 0 FEB Ex = " << (*tit)->getFebEx() ); - ATH_MSG_VERBOSE( "TTHEC 0 FEB Ey = " << (*tit)->getFebEy() ); - ATH_MSG_VERBOSE( "TTHEC 0 FEB Ez = " << (*tit)->getFebEz() ); -#endif - //m_larfebcol.push_back(feb); - m_larfebcol_hec.push_back(feb); - } - m_data->RegionSelector(0,etamin,etamax,phimin,phimax, FCALHAD); - if ( m_data->LoadCollections(m_tbegin,m_tend).isFailure() ) { - ATH_MSG_ERROR( "Problems to read FEB info" ); - return StatusCode::FAILURE; - } - for(LArFebEnergyCollection::const_iterator tit = m_tbegin; tit!=m_tend; ++tit) { - LArFebEnergy feb = LArFebEnergy((*tit)->getFebId(),(*tit)->getFebEx(),(*tit)->getFebEy(),(*tit)->getFebEz(),0.); - /*feb->setFebEx((*tit)->getFebEx()); - feb->setFebEy((*tit)->getFebEy()); - feb->setFebEz((*tit)->getFebEz());*/ -#ifndef NDEBUG - ATH_MSG_VERBOSE( "FCALHAD 0 FEB ID = " << (*tit)->getFebId() ); - ATH_MSG_VERBOSE( "FCALHAD 0 FEB Ex = " << (*tit)->getFebEx() ); - ATH_MSG_VERBOSE( "FCALHAD 0 FEB Ey = " << (*tit)->getFebEy() ); - ATH_MSG_VERBOSE( "FCALHAD 0 FEB Ez = " << (*tit)->getFebEz() ); -#endif - m_larfebcol_fcal.push_back(feb); - } - m_data->RegionSelector(1,etamin,etamax,phimin,phimax, FCALHAD); - if ( m_data->LoadCollections(m_tbegin,m_tend).isFailure() ) { - ATH_MSG_ERROR( "Problems to read FEB info" ); - return StatusCode::FAILURE; - } - for(LArFebEnergyCollection::const_iterator tit = m_tbegin; tit!=m_tend; ++tit) { - LArFebEnergy feb = LArFebEnergy((*tit)->getFebId(),(*tit)->getFebEx(),(*tit)->getFebEy(),(*tit)->getFebEz(),0.); - /*feb->setFebEx((*tit)->getFebEx()); - feb->setFebEy((*tit)->getFebEy()); - feb->setFebEz((*tit)->getFebEz());*/ -#ifndef NDEBUG - ATH_MSG_VERBOSE( "FCALHAD 1 FEB ID = " << (*tit)->getFebId() ); - ATH_MSG_VERBOSE( "FCALHAD 1 FEB Ex = " << (*tit)->getFebEx() ); - ATH_MSG_VERBOSE( "FCALHAD 1 FEB Ey = " << (*tit)->getFebEy() ); - ATH_MSG_VERBOSE( "FCALHAD 1 FEB Ez = " << (*tit)->getFebEz() ); -#endif - m_larfebcol_fcal.push_back(feb); - } - m_data->RegionSelector(0,etamin,etamax,phimin,phimax, FCALEM); - if ( m_data->LoadCollections(m_tbegin,m_tend).isFailure() ) { - ATH_MSG_ERROR( "Problems to read FEB info" ); - return StatusCode::FAILURE; - } - for(LArFebEnergyCollection::const_iterator tit = m_tbegin; tit!=m_tend; ++tit) { - LArFebEnergy feb = LArFebEnergy((*tit)->getFebId(),(*tit)->getFebEx(),(*tit)->getFebEy(),(*tit)->getFebEz(),0.); - /*feb->setFebEx((*tit)->getFebEx()); - feb->setFebEy((*tit)->getFebEy()); - feb->setFebEz((*tit)->getFebEz());*/ -#ifndef NDEBUG - ATH_MSG_VERBOSE( "FCALEM 0 FEB ID = " << (*tit)->getFebId() ); - ATH_MSG_VERBOSE( "FCALEM 0 FEB Ex = " << (*tit)->getFebEx() ); - ATH_MSG_VERBOSE( "FCALEM 0 FEB Ey = " << (*tit)->getFebEy() ); - ATH_MSG_VERBOSE( "FCALEM 0 FEB Ez = " << (*tit)->getFebEz() ); -#endif - m_larfebcol_fcal.push_back(feb); - } - } - int counthec = 0; - int counthec_not_found = 0; - int countphec = 0; - double totalhec = 0; - double totalhecx = 0; - double totalhecy = 0; - double totalhecz = 0; - double offlinehecx = 0; - double offlinehecy = 0; - double offlinehecz = 0; - ATH_MSG_DEBUG( "Compare FEBs in HEC" ); - doComparison(m_larfebcol_hec,&larfebmap_hec,counthec,counthec_not_found,countphec,totalhec,totalhecx,totalhecy,totalhecz, offlinehecx,offlinehecy,offlinehecz); - hist("NHECLArFEBs")->Fill(counthec); - hist("NHECBadLArFEBs")->Fill(countphec); -#ifndef NDEBUG - if ( msgLvl(MSG::DEBUG) ){ - float tothecene = sqrt(pow(totalhecx,2) + pow(totalhecy,2) + pow(totalhecz,2)); - msg() << MSG::DEBUG << "HLT HEC FEBs found : " << counthec << endmsg; - msg() << "HEC FEBs not found : " << counthec_not_found << endmsg; - msg() << "HEC FEBs with problems : " << countphec << endmsg; - msg() << "HEC FEBs using difflimit : " << m_difflimit << endmsg; - - msg() << MSG::DEBUG << "HEC HLT FEB total energy = " << tothecene; - msg() << MSG::DEBUG << "; HEC HLT FEB total energy x = " << totalhecx; - msg() << MSG::DEBUG << "; HEC HLT FEB total energy y = " << totalhecy; - msg() << MSG::DEBUG << "; HEC HLT FEB total energy z = " << totalhecz << endmsg; - float offlinehecene = sqrt(offlinehecx*offlinehecx + offlinehecy*offlinehecy + offlinehecz*offlinehecz); - msg() << MSG::DEBUG << "HEC offline FEB total energy = " << offlinehecene; - msg() << MSG::DEBUG << "; HEC offline FEB total energy x = " << offlinehecx; - msg() << MSG::DEBUG << "; HEC offline FEB total energy y = " << offlinehecy; - msg() << MSG::DEBUG << "; HEC offline FEB total energy z = " << offlinehecz << endmsg; - } -#endif -// now do EM - int countem = 0; - int countem_not_found = 0; - int countpem = 0; - double totalem = 0; - double totalemx = 0; - double totalemy = 0; - double totalemz = 0; - double offlineemx = 0; - double offlineemy = 0; - double offlineemz = 0; - ATH_MSG_DEBUG( "Compare FEBs in EM " ); - doComparison(m_larfebcol_em,&larfebmap_em,countem,countem_not_found,countpem,totalem,totalemx,totalemy,totalemz,offlineemx,offlineemy,offlineemz); - hist("NEMLArFEBs")->Fill(countem); - hist("NEMBadLArFEBs")->Fill(countpem); -#ifndef NDEBUG - if ( msgLvl(MSG::DEBUG) ){ - float totemene = sqrt(pow(totalemx,2) + pow(totalemy,2) + pow(totalemz,2)); - msg() << MSG::DEBUG << "HLT EM FEBs found : " << countem << endmsg; - msg() << "EM FEBs not found : " << countem_not_found << endmsg; - msg() << "EM FEBs with problems : " << countpem << endmsg; - msg() << "EM FEBs using difflimit : " << m_difflimit << endmsg; - msg() << MSG::DEBUG << "EM HLT FEB total energy = " << totemene; - msg() << MSG::DEBUG << "; EM HLT FEB total energy x = " << totalemx; - msg() << MSG::DEBUG << "; EM HLT FEB total energy y = " << totalemy; - msg() << MSG::DEBUG << "; EM HLT FEB total energy z = " << totalemz << endmsg; - float offlineemene = sqrt(offlineemx*offlineemx + offlineemy*offlineemy + offlineemz*offlineemz); - msg() << MSG::DEBUG << "EM offline FEB total energy = " << offlineemene; - msg() << MSG::DEBUG << "; EM offline FEB total energy x = " << offlineemx; - msg() << MSG::DEBUG << "; EM offline FEB total energy y = " << offlineemy; - msg() << MSG::DEBUG << "; EM offline FEB total energy z = " << offlineemz << endmsg; - } -#endif - -// now do FCAL - int countfcal = 0; - int countfcal_not_found = 0; - int countpfcal = 0; - double totalfcal = 0; - double totalfcalx = 0; - double totalfcaly = 0; - double totalfcalz = 0; - double offlinefcalx = 0; - double offlinefcaly = 0; - double offlinefcalz = 0; - ATH_MSG_DEBUG( "Compare FEBs in FCAL " ); - doComparison(m_larfebcol_fcal,&larfebmap_fcal,countfcal,countfcal_not_found,countpfcal,totalfcal,totalfcalx,totalfcaly,totalfcalz,offlinefcalx,offlinefcaly,offlinefcalz); - hist("NFCALLArFEBs")->Fill(countfcal); - hist("NFCALBadLArFEBs")->Fill(countpfcal); -#ifndef NDEBUG - if ( msgLvl(MSG::DEBUG) ){ - float totfcalene = sqrt(pow(totalfcalx,2) + pow(totalfcaly,2) + pow(totalfcalz,2)); - msg() << MSG::DEBUG << "HLT FCAL FEBs found : " << countfcal << endmsg; - msg() << "FCAL FEBs not found : " << countfcal_not_found << endmsg; - msg() << "FCAL FEBs with problems : " << countpfcal << endmsg; - msg() << "FCAL FEBs using difflimit : " << m_difflimit << endmsg; - msg() << MSG::DEBUG << "FCAL HLT FEB total energy = " << totfcalene; - msg() << MSG::DEBUG << "; FCAL HLT FEB total energy x = " << totalfcalx; - msg() << MSG::DEBUG << "; FCAL HLT FEB total energy y = " << totalfcaly; - msg() << MSG::DEBUG << "; FCAL HLT FEB total energy z = " << totalfcalz << endmsg; - float offlinefcalene = sqrt(offlinefcalx*offlinefcalx + offlinefcaly*offlinefcaly + offlinefcalz*offlinefcalz); - msg() << MSG::DEBUG << "FCAL offline FEB total energy = " << offlinefcalene; - msg() << MSG::DEBUG << "; FCAL offline FEB total energy x = " << offlinefcalx; - msg() << MSG::DEBUG << "; FCAL offline FEB total energy y = " << offlinefcaly; - msg() << MSG::DEBUG << "; FCAL offline FEB total energy z = " << offlinefcalz << endmsg; - } -#endif - -#ifndef NDEBUG - double febcellx = 0; - double febcelly = 0; - double febcellz = 0; - for( it = larfebmap.begin(); it!=larfebmap.end();++it){ - LArFebEnergy larfebenergy = (*it).second; - if ( msgLvl(MSG::VERBOSE) ){ - msg() << MSG::VERBOSE << "FEB from cell ID "; - msg() << MSG::VERBOSE << std::hex; - msg() << MSG::VERBOSE << larfebenergy.getFebId() << " "; - msg() << MSG::VERBOSE << std::dec; - msg() << MSG::VERBOSE << endmsg; - msg() << MSG::VERBOSE << "FEB from cell ex = " << larfebenergy.getFebEx(); - msg() << MSG::VERBOSE << "FEB from cell ey = " << larfebenergy.getFebEy(); - msg() << MSG::VERBOSE << "FEB from cell ez = " << larfebenergy.getFebEz() << endmsg; - } - febcellx += larfebenergy.getFebEx(); - febcelly += larfebenergy.getFebEy(); - febcellz += larfebenergy.getFebEz(); - // Delete the pointers now. Don't use after this point. - //delete larfebenergy; - } - double febcelltot = sqrt(pow(febcellx,2) + pow(febcelly,2) + pow(febcellz,2)); - ATH_MSG_DEBUG( "FEB from cell total ene = " << febcelltot - << "; FEB from cell Ex = " << febcellx - << "; FEB from cell Ey = " << febcelly - << "; FEB from cell Ez = " << febcellz ); - -#endif - //larfebmap.clear(); - //m_larfebcol.clear(); - - delete pCaloCellContainer; - return StatusCode::SUCCESS; - -} - - -void HLTCaloFEBTool::doComparison(std::vector<LArFebEnergy> &febcoll,std::map<HWIdentifier,std::pair<LArFebEnergy,LArFebEnergy> >* larfebmap,int &count,int &count_not_found,int &countp,double &total,double &totalx,double &totaly,double &totalz,double &offlinefebex, double &offlinefebey, double &offlinefebez){ - - std::map<HWIdentifier,std::pair<LArFebEnergy,LArFebEnergy> >::iterator it; - for(it = larfebmap->begin(); it!=larfebmap->end();++it){ - LArFebEnergy larfebenergy = (*it).second.first; - offlinefebex += larfebenergy.getFebEx(); - offlinefebey += larfebenergy.getFebEy(); - offlinefebez += larfebenergy.getFebEz(); - } -// -// outer loop on online FEBs: -// - for( std::vector<LArFebEnergy>::const_iterator tit= febcoll.begin(); tit!=febcoll.end(); ++tit) { - double ex = (*tit).getFebEx(); - double ey = (*tit).getFebEy(); - double ez = (*tit).getFebEz(); - total = ex*ex; - total += ey*ey; - total += ez*ez; - total = sqrt (total); - totalx += ex; - totaly += ey; - totalz += ez; - //if ( total > 1e3 ) { - if(!(ex==0&&ey==0&&ez==0)){ - count++; -#ifdef DONTDO - ATH_MSG_VERBOSE( "validation FEB ID = " << std::hex << (*tit)->getFebId() << std::dec - << "FEB Ex = " << ex - << "FEB Ey = " << ey - << "FEB Ez = " << ez ); -#endif - } - bool found = false; -// -// start inner loop on offline FEBs -// - for(it = larfebmap->begin(); it!=larfebmap->end();++it){ - LArFebEnergy larfebenergy = (*it).second.first; - unsigned int febid = (*tit).getFebId(); - unsigned int febidshort = febid/0x1000000; - if ( febid == larfebenergy.getFebId() ){ - float offFebEx = larfebenergy.getFebEx(); - float offFebEy = larfebenergy.getFebEy(); - float offFebEz = larfebenergy.getFebEz(); - //float offFebE = sqrt(offFebEx*offFebEx + offFebEy*offFebEy - //+ offFebEz*offFebEz); - found = true; - float diffx = std::abs(offFebEx - - (*tit).getFebEx() ); - //float diffxp = 0; - //if ( std::abs ((*tit).getFebEx()) > 0.2 ) - // diffxp = 100*diffx/(*tit).getFebEx(); - float diffy = std::abs(offFebEy - - (*tit).getFebEy() ); - //float diffyp = 0; - //if ( std::abs ((*tit).getFebEy()) > 0.2 ) - // diffyp = 100*diffy/(*tit).getFebEy(); - float diffz = std::abs(offFebEz - - (*tit).getFebEz() ); - //float diffzp = 0; - //float offFebPhi = atan2f(offFebEy,offFebEx); - //float offFebEta = atanh(offFebEz/offFebE); - float febene = sqrt( ((*tit).getFebEx())*((*tit).getFebEx()) + - ((*tit).getFebEy())*((*tit).getFebEy()) + - ((*tit).getFebEz())*((*tit).getFebEz()) ); - float febex = (*tit).getFebEx(); - float febey = (*tit).getFebEy(); - float febez = (*tit).getFebEz(); - //if ( std::abs ((*tit).getFebEz()) > 0.2 ) - // diffzp = 100*diffz/(*tit).getFebEz(); - if ( ((diffx >= m_difflimit) || - (diffy >= m_difflimit) || - (diffz >= m_difflimit)) && febene!=0 ){ - countp++; - float febphi = 999999; - float febeta = 999999; - LArFebEnergy larfebnoise = (*it).second.second; - if(febene!=0){ - febphi = atan2f((*tit).getFebEy(),(*tit).getFebEx()); - febeta = atanh((*tit).getFebEz()/febene); - } -//#ifndef NDEBUG - if ( msgLvl(MSG::DEBUG) ) { - float offFebSEx = larfebnoise.getFebEx(); - float offFebSEy = larfebnoise.getFebEy(); - float offFebSEz = larfebnoise.getFebEz(); - msg() << MSG::DEBUG; - msg() << "Found Prob in : "; - //msg() << std::hex; - msg() << std::hex; - msg() << "Offline ID " << larfebenergy.getFebId() << " "; - msg() << "HLT ID " << (*tit).getFebId() << " "; - msg() << std::dec; - msg() << "Offline Ex " << larfebenergy.getFebEx() << " "; - msg() << "Online Ex " << (*tit).getFebEx() << " "; - msg() << "Offline Ey " << larfebenergy.getFebEy() << " "; - msg() << "Online Ey " << (*tit).getFebEy() << " "; - msg() << "Offline Ez " << larfebenergy.getFebEz() << " "; - msg() << "Online Ez " << (*tit).getFebEz() << " "; - msg() << "Offline sigma Ex " << offFebSEx << " "; - msg() << "Offline sigma Ey " << offFebSEy << " "; - msg() << "Offline sigma Ez " << offFebSEz << " "; - msg() << endmsg; - } -//#endif - if(febidshort == 0x38) { -#ifndef NDEBUG - ATH_MSG_VERBOSE( "This is in the C-side EM barrel" ); - ATH_MSG_VERBOSE( "febeta = " << febeta ); - ATH_MSG_VERBOSE( "febphi = " << febphi ); -#endif - hist2("etaphiEMBCFEBLAr")->Fill(febeta,febphi); - //hist("deltaetaEMBCFEBLAr")->Fill(febeta-offFebEta); - //hist("deltaphiEMBCFEBLAr")->Fill(febphi-offFebPhi); - hist("deltaEnexEMBCFEBLAr")->Fill(febex-offFebEx); - hist("deltaEneyEMBCFEBLAr")->Fill(febey-offFebEy); - hist("deltaEnezEMBCFEBLAr")->Fill(febez-offFebEz); - hist("deltaTotEneEMBCFEBLAr")->Fill( - sqrt(pow(febex,2)+pow(febey,2)+pow(febez,2)) - - sqrt(pow(offFebEx,2)+pow(offFebEy,2)+pow(offFebEz,2)) ); - } - else if(febidshort == 0x39){ -#ifndef NDEBUG - ATH_MSG_VERBOSE( "This is in the A-side EM barrel" ); - ATH_MSG_VERBOSE( "febeta = " << febeta ); - ATH_MSG_VERBOSE( "febphi = " << febphi ); -#endif - hist2("etaphiEMBAFEBLAr")->Fill(febeta,febphi); - //hist("deltaetaEMBAFEBLAr")->Fill(febeta-offFebEta); - //hist("deltaphiEMBAFEBLAr")->Fill(febphi-offFebPhi); - hist("deltaEnexEMBAFEBLAr")->Fill(febex-offFebEx); - hist("deltaEneyEMBAFEBLAr")->Fill(febey-offFebEy); - hist("deltaEnezEMBAFEBLAr")->Fill(febez-offFebEz); - hist("deltaTotEneEMBAFEBLAr")->Fill( - sqrt(pow(febex,2)+pow(febey,2)+pow(febez,2)) - - sqrt(pow(offFebEx,2)+pow(offFebEy,2)+pow(offFebEz,2)) ); - } - else if(febidshort == 0x3a) - switch(febid){ - case 0x3a300000: - case 0x3a308000: - case 0x3a310000: - case 0x3a318000: - case 0x3a320000: - case 0x3a328000: - case 0x3a330000: - case 0x3a340000: - case 0x3a348000: - case 0x3a350000: - case 0x3a358000: - case 0x3a360000: - case 0x3a368000: - case 0x3a370000: -#ifndef NDEBUG - ATH_MSG_VERBOSE( "This is in the C-side fcal" ); -#endif - hist2("etaphiFCALCFEBLAr")->Fill(febeta,febphi); - //hist("deltaetaFCALCFEBLAr")->Fill(febeta-offFebEta); - //hist("deltaphiFCALCFEBLAr")->Fill(febphi-offFebPhi); - hist("deltaEnexFCALCFEBLAr")->Fill(febex-offFebEx); - hist("deltaEneyFCALCFEBLAr")->Fill(febey-offFebEy); - hist("deltaEnezFCALCFEBLAr")->Fill(febez-offFebEz); - hist("deltaTotEneFCALCFEBLAr")->Fill( - sqrt(pow(febex,2)+pow(febey,2)+pow(febez,2)) - - sqrt(pow(offFebEx,2)+pow(offFebEy,2)+pow(offFebEz,2)) ); - break; - case 0x3a520000: - case 0x3a528000: - case 0x3a1a0000: - case 0x3a1a8000: - case 0x3ab20000: - case 0x3ab28000: - case 0x3a820000: - case 0x3a828000: - case 0x3a530000: - case 0x3a538000: - case 0x3a1b0000: - case 0x3a1b8000: - case 0x3ab30000: - case 0x3ab38000: - case 0x3a830000: - case 0x3a838000: - case 0x3a540000: - case 0x3a548000: - case 0x3a1c0000: - case 0x3a1c8000: - case 0x3ab40000: - case 0x3ab48000: - case 0x3a840000: - case 0x3a848000: -#ifndef NDEBUG - ATH_MSG_VERBOSE( "This is in the C-side HEC " ); -#endif - hist2("etaphiHECCFEBLAr")->Fill(febeta,febphi); - //hist("deltaetaHECCFEBLAr")->Fill(febeta-offFebEta); - //hist("deltaphiHECCFEBLAr")->Fill(febphi-offFebPhi); - hist("deltaEnexHECCFEBLAr")->Fill(febex-offFebEx); - hist("deltaEneyHECCFEBLAr")->Fill(febey-offFebEy); - hist("deltaEnezHECCFEBLAr")->Fill(febez-offFebEz); - hist("deltaTotEneHECCFEBLAr")->Fill( - sqrt(pow(febex,2)+pow(febey,2)+pow(febez,2)) - - sqrt(pow(offFebEx,2)+pow(offFebEy,2)+pow(offFebEz,2)) ); - break; - default: -#ifndef NDEBUG - ATH_MSG_VERBOSE( "This is in the C-side EMC" ); -#endif - hist2("etaphiEMCCFEBLAr")->Fill(febeta,febphi); - //hist("deltaetaEMCCFEBLAr")->Fill(febeta-offFebEta); - //hist("deltaphiEMCCFEBLAr")->Fill(febphi-offFebPhi); - hist("deltaEnexEMCCFEBLAr")->Fill(febex-offFebEx); - hist("deltaEneyEMCCFEBLAr")->Fill(febey-offFebEy); - hist("deltaEnezEMCCFEBLAr")->Fill(febez-offFebEz); - hist("deltaTotEneEMCCFEBLAr")->Fill( - sqrt(pow(febex,2)+pow(febey,2)+pow(febez,2)) - - sqrt(pow(offFebEx,2)+pow(offFebEy,2)+pow(offFebEz,2)) ); - break; - } - else if(febidshort == 0x3b) - switch(febid){ - case 0x3b300000: - case 0x3b308000: - case 0x3b310000: - case 0x3b318000: - case 0x3b320000: - case 0x3b328000: - case 0x3b330000: - case 0x3b340000: - case 0x3b348000: - case 0x3b350000: - case 0x3b358000: - case 0x3b360000: - case 0x3b368000: - case 0x3b370000: -#ifndef NDEBUG - ATH_MSG_VERBOSE( "This is in the A-side fcal" ); -#endif - hist2("etaphiFCALAFEBLAr")->Fill(febeta,febphi); - //hist("deltaetaFCALAFEBLAr")->Fill(febeta-offFebEta); - //hist("deltaphiFCALAFEBLAr")->Fill(febphi-offFebPhi); - hist("deltaEnexFCALAFEBLAr")->Fill(febex-offFebEx); - hist("deltaEneyFCALAFEBLAr")->Fill(febey-offFebEy); - hist("deltaEnezFCALAFEBLAr")->Fill(febez-offFebEz); - hist("deltaTotEneFCALAFEBLAr")->Fill( - sqrt(pow(febex,2)+pow(febey,2)+pow(febez,2)) - - sqrt(pow(offFebEx,2)+pow(offFebEy,2)+pow(offFebEz,2)) ); - break; - case 0x3b520000: - case 0x3b528000: - case 0x3b1a0000: - case 0x3b1a8000: - case 0x3bb20000: - case 0x3bb28000: - case 0x3b820000: - case 0x3b828000: - case 0x3b530000: - case 0x3b538000: - case 0x3b1b0000: - case 0x3b1b8000: - case 0x3bb30000: - case 0x3bb38000: - case 0x3b830000: - case 0x3b838000: - case 0x3b540000: - case 0x3b548000: - case 0x3b1c0000: - case 0x3b1c8000: - case 0x3bb40000: - case 0x3bb48000: - case 0x3b840000: - case 0x3b848000: -#ifndef NDEBUG - ATH_MSG_VERBOSE( "This is in the A-side HEC " ); -#endif - hist2("etaphiHECAFEBLAr")->Fill(febeta,febphi); - //hist("deltaetaHECAFEBLAr")->Fill(febeta-offFebEta); - //hist("deltaphiHECAFEBLAr")->Fill(febphi-offFebPhi); - hist("deltaEnexHECAFEBLAr")->Fill(febex-offFebEx); - hist("deltaEneyHECAFEBLAr")->Fill(febey-offFebEy); - hist("deltaEnezHECAFEBLAr")->Fill(febez-offFebEz); - hist("deltaTotEneHECAFEBLAr")->Fill( - sqrt(pow(febex,2)+pow(febey,2)+pow(febez,2)) - - sqrt(pow(offFebEx,2)+pow(offFebEy,2)+pow(offFebEz,2)) ); - break; - default: -#ifndef NDEBUG - ATH_MSG_VERBOSE( "This is in the A-side EMC" ); -#endif - hist2("etaphiEMCAFEBLAr")->Fill(febeta,febphi); - //hist("deltaetaEMCAFEBLAr")->Fill(febeta-offFebEta); - //hist("deltaphiEMCAFEBLAr")->Fill(febphi-offFebPhi); - hist("deltaEnexEMCAFEBLAr")->Fill(febex-offFebEx); - hist("deltaEneyEMCAFEBLAr")->Fill(febey-offFebEy); - hist("deltaEnezEMCAFEBLAr")->Fill(febez-offFebEz); - hist("deltaTotEneEMCAFEBLAr")->Fill( - sqrt(pow(febex,2)+pow(febey,2)+pow(febez,2)) - - sqrt(pow(offFebEx,2)+pow(offFebEy,2)+pow(offFebEz,2)) ); - break; - } - } // end if matched FEB within limit - break; - } // enf if matching FEB Ids - } // end for loop over FEBs from offline - - if ( (!found)&&(ex!=0||ey!=0||ez!=0) ) count_not_found++; - //} - } -} diff --git a/Trigger/TrigMonitoring/TrigCaloMonitoring/src/components/TrigCaloMonitoring_entries.cxx b/Trigger/TrigMonitoring/TrigCaloMonitoring/src/components/TrigCaloMonitoring_entries.cxx index 243bde237950..ca25c5e67cb1 100644 --- a/Trigger/TrigMonitoring/TrigCaloMonitoring/src/components/TrigCaloMonitoring_entries.cxx +++ b/Trigger/TrigMonitoring/TrigCaloMonitoring/src/components/TrigCaloMonitoring_entries.cxx @@ -5,7 +5,6 @@ #include "../HLTCalo_L2CaloEMClustersMonitor.h" #include "../HLTCalo_TopoCaloClustersMonitor.h" #include "TrigCaloMonitoring/HLTCaloTool.h" -#include "TrigCaloMonitoring/HLTCaloFEBTool.h" #include "TrigCaloMonitoring/HLTCaloToolL2.h" #include "TrigCaloMonitoring/HLTCaloClusterTool.h" #include "TrigCaloMonitoring/HLTCaloESD_xAODTrigEMClusters.h" @@ -16,7 +15,6 @@ DECLARE_COMPONENT( HLTCalo_L2CaloEMClustersMonitor ) DECLARE_COMPONENT( HLTCalo_TopoCaloClustersMonitor ) DECLARE_COMPONENT( HLTCaloTool ) -DECLARE_COMPONENT( HLTCaloFEBTool ) DECLARE_COMPONENT( HLTCaloToolL2 ) DECLARE_COMPONENT( HLTCaloClusterTool ) DECLARE_COMPONENT( HLTCaloESD_xAODTrigEMClusters ) -- GitLab From aab7b08e5b13a7032bb96fa8d4fedb9218c934e2 Mon Sep 17 00:00:00 2001 From: Denis Damazio <damazio@mail.cern.ch> Date: Tue, 16 Feb 2021 08:55:44 +0100 Subject: [PATCH 2/9] removing some python code (more to come) --- .../python/TrigT2CaloEgammaConfig.py | 47 +------------------ .../TriggerJobOpts/share/runHLT_standalone.py | 6 +-- 2 files changed, 4 insertions(+), 49 deletions(-) diff --git a/Trigger/TrigAlgorithms/TrigT2CaloEgamma/python/TrigT2CaloEgammaConfig.py b/Trigger/TrigAlgorithms/TrigT2CaloEgamma/python/TrigT2CaloEgammaConfig.py index b5a302711f06..8fd0196cdc6d 100644 --- a/Trigger/TrigAlgorithms/TrigT2CaloEgamma/python/TrigT2CaloEgammaConfig.py +++ b/Trigger/TrigAlgorithms/TrigT2CaloEgamma/python/TrigT2CaloEgammaConfig.py @@ -6,7 +6,6 @@ _EgammaSamp2Fex=CompFactory.EgammaSamp2Fex _EgammaEmEnFex=CompFactory.EgammaEmEnFex _EgammaHadEnFex=CompFactory.EgammaHadEnFex _RingerFex=CompFactory.RingerFex -_EgammaAllFex=CompFactory.EgammaAllFex #from TrigT2CaloEgamma.TrigT2CaloEgammaConf import EgammaReSamp1Fex #from TrigT2CaloEgamma.TrigT2CaloEgammaConf import EgammaReSamp2Fex @@ -21,16 +20,11 @@ from TrigT2CaloCalibration.EgammaCalibrationConfig import EgammaHitsCalibrationB from TrigT2CaloCalibration.EgammaCalibrationConfig import EgammaTransitionRegionsConfig from TrigT2CaloCalibration.EgammaCalibrationConfig import EgammaSshapeCalibrationBarrelConfig, EgammaSshapeCalibrationEndcapConfig -from TrigT2CaloEgamma.TrigT2CaloEgammaMonitoring import TrigT2CaloEgammaValMonitoring, TrigT2CaloEgammaCosmicMonitoring, TrigT2CaloEgammaOnMonitoring, TrigT2CaloEgammaTimeMonitoring, TrigT2CaloEgammaAllTimeMonitoring, TrigT2CaloEgammaRingerTimeMonitoring +from TrigT2CaloEgamma.TrigT2CaloEgammaMonitoring import TrigT2CaloEgammaValMonitoring, TrigT2CaloEgammaCosmicMonitoring, TrigT2CaloEgammaOnMonitoring, TrigT2CaloEgammaTimeMonitoring, TrigT2CaloEgammaRingerTimeMonitoring from TrigTimeMonitor.TrigTimeHistToolConfig import TrigTimeHistToolConfig t2catime = TrigTimeHistToolConfig("Time") -class EgammaAllFex (_EgammaAllFex): - __slots__ = [] - def __init__ (self, name="EgammaAllFex"): - super(EgammaAllFex, self).__init__(name) - class EgammaSamp2Fex (_EgammaSamp2Fex): __slots__ = [] def __init__ (self, name="EgammaSamp2Fex"): @@ -177,45 +171,6 @@ class T2CaloEgamma_eGamma (CompFactory.T2CaloEgamma): self.ZEta = [1.50, 1.55, 1.60, 1.65, 1.70, 1.75, 1.80, 1.85, 1.90, 1.95, 2.00, 2.05, 2.10, 2.15, 2.20, 2.25, 2.30, 2.35, 2.40, 2.45, 2.50, 2.55] -class EgammaAllFexHadConfig (EgammaAllFex): - __slots__ = [] - def __init__ (self, name="EgammaAllFexHadConfig"): - super(EgammaAllFexHadConfig, self).__init__(name) - self.IncludeHad=True - - -class T2CaloEgamma_All (CompFactory.T2CaloEgamma): - __slots__ = [] - def __init__ (self, name="T2CaloEgamma_All"): - super(T2CaloEgamma_All, self).__init__(name) - self.IAlgToolList= [EgammaAllFexHadConfig()] - self.EtaWidth = 0.1 - self.PhiWidth = 0.1 - self.EtaWidthForID = 0.1 - self.PhiWidthForID = 0.1 - self.TrigEMClusterKey="TrigT2CaloAll" - self.AthenaMonTools += [ TrigT2CaloEgammaValMonitoring(), - TrigT2CaloEgammaCosmicMonitoring(), - TrigT2CaloEgammaOnMonitoring(), - TrigT2CaloEgammaAllTimeMonitoring()] - self.doTiming=True - -class T2CaloEgamma_AllEm (CompFactory.T2CaloEgamma): - __slots__ = [] - def __init__ (self, name="T2CaloEgamma_AllEm"): - super(T2CaloEgamma_AllEm, self).__init__(name) - self.IAlgToolList= [EgammaAllFex()] - self.EtaWidth = 0.1 - self.PhiWidth = 0.1 - self.EtaWidthForID = 0.1 - self.PhiWidthForID = 0.1 - self.TrigEMClusterKey="TrigT2CaloAll" - self.AthenaMonTools += [ TrigT2CaloEgammaValMonitoring(), - TrigT2CaloEgammaCosmicMonitoring(), - TrigT2CaloEgammaOnMonitoring(), - TrigT2CaloEgammaAllTimeMonitoring()] - self.doTiming=True - class T2CaloEgamma_cells (CompFactory.T2CaloEgamma): __slots__ = [] def __init__ (self, name="T2CaloEgamma_cells"): diff --git a/Trigger/TriggerCommon/TriggerJobOpts/share/runHLT_standalone.py b/Trigger/TriggerCommon/TriggerJobOpts/share/runHLT_standalone.py index df8163813a40..d850955d7fc2 100644 --- a/Trigger/TriggerCommon/TriggerJobOpts/share/runHLT_standalone.py +++ b/Trigger/TriggerCommon/TriggerJobOpts/share/runHLT_standalone.py @@ -373,10 +373,10 @@ if ConfigFlags.Trigger.doID: include("InDetRecExample/InDetRecConditionsAccess.py") if ConfigFlags.Trigger.doCalo: - from TrigT2CaloCommon.TrigT2CaloCommonConfig import TrigDataAccess - svcMgr.ToolSvc += TrigDataAccess() + from TrigT2CaloCommon.CaloDef import setMinimalCaloSetup + setMinimalCaloSetup() if ConfigFlags.Input.Format == 'POOL': - ConfigFlags.Trigger.doTransientByteStream = True # enable transient BS if TrigDataAccess is used with pool data + ConfigFlags.Trigger.doTransientByteStream = True # enable transient BS if TrigCaloDataAccessSvc is used with pool data if ConfigFlags.Trigger.doMuon: TriggerFlags.MuonSlice.doTrigMuonConfig=True -- GitLab From 0b74c1fc75819122c8cecf490558f1a63de3e23c Mon Sep 17 00:00:00 2001 From: Denis Damazio <damazio@mail.cern.ch> Date: Tue, 16 Feb 2021 13:06:30 +0100 Subject: [PATCH 3/9] readding missing algorithms and preparing python --- .../TrigCaloRec/python/TrigCaloRecConfig.py | 339 ------------------ .../python/TrigT2CaloEgammaConfig.py | 283 +-------------- .../components/TrigT2CaloEgamma_entries.cxx | 2 + 3 files changed, 3 insertions(+), 621 deletions(-) diff --git a/Trigger/TrigAlgorithms/TrigCaloRec/python/TrigCaloRecConfig.py b/Trigger/TrigAlgorithms/TrigCaloRec/python/TrigCaloRecConfig.py index e5e8f3b313a8..46941c4c884f 100755 --- a/Trigger/TrigAlgorithms/TrigCaloRec/python/TrigCaloRecConfig.py +++ b/Trigger/TrigAlgorithms/TrigCaloRec/python/TrigCaloRecConfig.py @@ -3,19 +3,11 @@ from TrigCaloRec.TrigCaloRecConf import (TrigCaloClusterMakerMT, TrigCaloTowerMakerMT, TrigCaloClusterCalibratorMT, - TrigCaloCellMaker, - TrigFullCaloCellMaker, TrigCaloTowerMaker, TrigCaloClusterMaker, TrigCaloTopoTowerAlgorithm, TrigCaloCell2ClusterMapper, TrigFullCaloClusterMaker, - RoILArEMCellContMaker, - RoILArHadCellContMaker, - RoITileCellContMaker, - RoIFCalEmCellContMaker, - RoIFCalHadCellContMaker, - FullCaloCellContMaker, TrigLArNoisyROAlg, TrigL1BSTowerHypo) @@ -24,8 +16,6 @@ from CaloRec.CaloRecConf import (CaloCellContainerCorrectorTool, CaloCellContainerCheckerTool) from TrigTimeMonitor.TrigTimeHistToolConfig import TrigTimeHistToolConfig -from TrigCaloRec.TrigCaloCellMakerMonitoring import TrigCaloCellMakerValidationMonitoring, TrigCaloCellMakerFCalValidationMonitoring, TrigCaloCellMakerOnlineMonitoring, TrigCaloCellMakerCosmicMonitoring -from TrigCaloRec.TrigCaloCellMakerMonitoring import TrigFullCaloCellMakerValidationMonitoring, TrigFullCaloCellMakerOnlineMonitoring, TrigFullCaloCellMakerCosmicMonitoring from TrigCaloRec.TrigCaloTowerMakerMonitoring import TrigCaloTowerMakerValidationMonitoring, TrigCaloTowerMakerOnlineMonitoring, TrigCaloTowerMakerCosmicMonitoring from TrigCaloRec.TrigCaloClusterMakerMonitoring import TrigCaloClusterMakerValidationMonitoring, TrigCaloClusterMakerOnlineMonitoring, TrigCaloClusterMakerCosmicMonitoring from TrigCaloRec.TrigCaloClusterMakerMonitoring import TrigFullCaloClusterMakerValidationMonitoring, TrigFullCaloClusterMakerOnlineMonitoring, TrigFullCaloClusterMakerCosmicMonitoring @@ -47,62 +37,6 @@ class TrigCaloCell2ClusterMapperBase (TrigCaloCell2ClusterMapper): def __init__(self, name): super( TrigCaloCell2ClusterMapperBase, self ).__init__(name) -class TrigCaloCellMakerBase (TrigCaloCellMaker): - __slots__ = [] - def __init__(self, name): - super( TrigCaloCellMakerBase, self ).__init__(name) - - cellvalidation = TrigCaloCellMakerValidationMonitoring() - cellonline = TrigCaloCellMakerOnlineMonitoring() - cellcosmic = TrigCaloCellMakerCosmicMonitoring() - - celltime = TrigTimeHistToolConfig("TrigCaloCellMaker_Time") - - self.AthenaMonTools = [ cellvalidation, cellonline, celltime, cellcosmic] - -class TrigCaloCellMakerFCalBase (TrigCaloCellMaker): - __slots__ = [] - def __init__(self, name): - super( TrigCaloCellMakerFCalBase, self ).__init__(name) - - cellvalidation = TrigCaloCellMakerFCalValidationMonitoring() - cellonline = TrigCaloCellMakerOnlineMonitoring() - cellcosmic = TrigCaloCellMakerCosmicMonitoring() - - celltime = TrigTimeHistToolConfig("TrigCaloCellMaker_Time") - - self.AthenaMonTools = [ cellvalidation, cellonline, celltime, cellcosmic] - -# use the TrigCaloCellMaker as base class, yet -# use the fullcalo monitoring -class TrigFullCaloCellMakerFCalBase (TrigCaloCellMaker): - __slots__ = [] - def __init__(self, name): - super( TrigFullCaloCellMakerFCalBase, self ).__init__(name) - - cellvalidation = TrigFullCaloCellMakerValidationMonitoring() - cellonline = TrigFullCaloCellMakerOnlineMonitoring() - cellcosmic = TrigFullCaloCellMakerCosmicMonitoring() - - celltime = TrigTimeHistToolConfig("TrigFullCaloCellMaker_Time") - - self.AthenaMonTools = [ cellvalidation, cellonline, celltime, cellcosmic] - - -class TrigFullCaloCellMakerBase (TrigFullCaloCellMaker): - __slots__ = [] - def __init__(self, name): - super( TrigFullCaloCellMakerBase, self ).__init__(name) - - fullcellvalidation = TrigFullCaloCellMakerValidationMonitoring() - fullcellonline = TrigFullCaloCellMakerOnlineMonitoring() - fullcellcosmic = TrigFullCaloCellMakerCosmicMonitoring() - - fullcelltime = TrigTimeHistToolConfig("TrigFullCaloCellMaker_Time") - - self.AthenaMonTools = [ fullcellvalidation, fullcellonline, fullcelltime, fullcellcosmic] - - class TrigCaloTowerMakerBase (TrigCaloTowerMaker): __slots__ = [] def __init__(self, name): @@ -154,279 +88,6 @@ class TrigFullCaloClusterMakerBase (TrigFullCaloClusterMaker): self.AthenaMonTools = [ clvalidation, clonline, cltime, clcosmic] -class TrigCaloCellMaker_eGamma (TrigCaloCellMakerBase): - __slots__ = [] - def __init__ (self, name='TrigCaloCellMaker_eGamma'): - super(TrigCaloCellMaker_eGamma, self).__init__(name) - - self.eta_size = 16 - self.phi_size = 16 - - self.CreateRoiForID = True - self.EtaWidthForID = 0.1 - self.PhiWidthForID = 0.1 - - from CaloTools.CaloNoiseToolDefault import CaloNoiseToolDefault - theCaloNoiseTool=CaloNoiseToolDefault() - from AthenaCommon.AppMgr import ToolSvc - ToolSvc+=theCaloNoiseTool - - from CaloTools.CaloNoiseCondAlg import CaloNoiseCondAlg - CaloNoiseCondAlg() - - roilaremcellcontmaker = RoILArEMCellContMaker() - roilaremcellcontmaker.CaloNoiseTool = theCaloNoiseTool - roilarhadcellcontmaker = RoILArHadCellContMaker() - roilarhadcellcontmaker.CaloNoiseTool = theCaloNoiseTool - roilaremcellcontmaker.DoLArCellsNoiseSuppression = 0 - roilarhadcellcontmaker.DoLArCellsNoiseSuppression = 0 - - roitilehadcellcontmaker = RoITileCellContMaker() - roitilehadcellcontmaker.CaloNoiseTool = theCaloNoiseTool - - self.TCRTools = [roilaremcellcontmaker, - roilarhadcellcontmaker, - roitilehadcellcontmaker] - - self.ContainerTools = [CaloCellContainerCorrectorTool("LArCellCorrectorTool").getFullName(), - CaloCellContainerFinalizerTool().getFullName(), - CaloCellContainerCheckerTool().getFullName()] - -class TrigCaloCellMaker_eGamma_LargeRoI (TrigCaloCellMakerBase): - __slots__ = [] - def __init__ (self, name='TrigCaloCellMaker_eGamma_LargeRoI'): - super(TrigCaloCellMaker_eGamma_LargeRoI, self).__init__(name) - - self.eta_size = 24 - self.phi_size = 24 - - self.CreateRoiForID = True - self.EtaWidthForID = 0.1 - self.PhiWidthForID = 0.1 - - from CaloTools.CaloNoiseToolDefault import CaloNoiseToolDefault - theCaloNoiseTool=CaloNoiseToolDefault() - from AthenaCommon.AppMgr import ToolSvc - ToolSvc+=theCaloNoiseTool - - roilaremcellcontmaker = RoILArEMCellContMaker() - roilaremcellcontmaker.CaloNoiseTool = theCaloNoiseTool - roilarhadcellcontmaker = RoILArHadCellContMaker() - roilarhadcellcontmaker.CaloNoiseTool = theCaloNoiseTool - roilaremcellcontmaker.DoLArCellsNoiseSuppression = 0 - roilarhadcellcontmaker.DoLArCellsNoiseSuppression = 0 - roitilehadcellcontmaker = RoITileCellContMaker() - roitilehadcellcontmaker.CaloNoiseTool = theCaloNoiseTool - - self.TCRTools = [roilaremcellcontmaker, - roilarhadcellcontmaker, - roitilehadcellcontmaker] - - self.ContainerTools = [CaloCellContainerCorrectorTool("LArCellCorrectorTool").getFullName(), - CaloCellContainerFinalizerTool().getFullName(), - CaloCellContainerCheckerTool().getFullName()] - - - -class TrigCaloCellMaker_eGamma_cells (TrigCaloCellMaker_eGamma): - __slots__ = [] - def __init__ (self, name='TrigCaloCellMaker_eGamma_cells'): - super(TrigCaloCellMaker_eGamma_cells, self).__init__(name) - - self.PersistencyPrescaleFactor=1 - self.PersistencyKeyName="TrigCaloCellMaker_eGamma" - -class TrigCaloCellMaker_jet (TrigCaloCellMakerFCalBase): - __slots__ = [] - def __init__ (self, name='TrigCaloCellMaker_jet', eta_size=64, phi_size=64, doNoise=1, AbsE = False): - super(TrigCaloCellMaker_jet, self).__init__(name) - - self.eta_size = eta_size - self.phi_size = phi_size - - from CaloTools.CaloNoiseToolDefault import CaloNoiseToolDefault - theCaloNoiseTool=CaloNoiseToolDefault() - from AthenaCommon.AppMgr import ToolSvc - ToolSvc+=theCaloNoiseTool - - roilaremcellcontmaker = RoILArEMCellContMaker() - roilaremcellcontmaker.CaloNoiseTool = theCaloNoiseTool - roilarhadcellcontmaker = RoILArHadCellContMaker() - roilarhadcellcontmaker.CaloNoiseTool = theCaloNoiseTool - roifcalemcellcontmaker = RoIFCalEmCellContMaker() - roifcalemcellcontmaker.CaloNoiseTool = theCaloNoiseTool - roifcalhadcellcontmaker = RoIFCalHadCellContMaker() - roifcalhadcellcontmaker.CaloNoiseTool = theCaloNoiseTool - - roilaremcellcontmaker.DoLArCellsNoiseSuppression = doNoise - roilaremcellcontmaker.AbsEinSigma = AbsE - roilarhadcellcontmaker.DoLArCellsNoiseSuppression = doNoise - roilarhadcellcontmaker.AbsEinSigma = AbsE - roifcalemcellcontmaker.DoLArCellsNoiseSuppression = doNoise - roifcalhadcellcontmaker.DoLArCellsNoiseSuppression = doNoise - roitilehadcellcontmaker = RoITileCellContMaker() - roitilehadcellcontmaker.CaloNoiseTool = theCaloNoiseTool - - self.TCRTools = [roilaremcellcontmaker, - roilarhadcellcontmaker, - roitilehadcellcontmaker, - roifcalemcellcontmaker, - roifcalhadcellcontmaker] - - self.ContainerTools = [CaloCellContainerCorrectorTool("LArCellCorrectorTool").getFullName(), - CaloCellContainerFinalizerTool().getFullName(), - CaloCellContainerCheckerTool().getFullName()] - - -class TrigCaloCellMaker_super (TrigCaloCellMaker_jet): - __slots__ = [] - def __init__ (self, name='TrigCaloCellMaker_super', eta_size=64, phi_size=64, doNoise=1, AbsE = False): - super(TrigCaloCellMaker_super, self).__init__(name) - self.TrustRoiLimits = True - - -class TrigCaloCellMaker_jet_super (TrigCaloCellMakerFCalBase): - __slots__ = [] - def __init__ (self, name='TrigCaloCellMaker_jet_super', eta_size=64, phi_size=64, doNoise=1, AbsE = False): - super(TrigCaloCellMaker_jet_super, self).__init__(name) - - self.TrustRoiLimits = True - - from CaloTools.CaloNoiseToolDefault import CaloNoiseToolDefault - theCaloNoiseTool=CaloNoiseToolDefault() - from AthenaCommon.AppMgr import ToolSvc - ToolSvc+=theCaloNoiseTool - - roilaremcellcontmaker = RoILArEMCellContMaker() - roilaremcellcontmaker.CaloNoiseTool = theCaloNoiseTool - roilarhadcellcontmaker = RoILArHadCellContMaker() - roilarhadcellcontmaker.CaloNoiseTool = theCaloNoiseTool - roifcalemcellcontmaker = RoIFCalEmCellContMaker() - roifcalemcellcontmaker.CaloNoiseTool = theCaloNoiseTool - roifcalhadcellcontmaker = RoIFCalHadCellContMaker() - roifcalhadcellcontmaker.CaloNoiseTool = theCaloNoiseTool - - roilaremcellcontmaker.DoLArCellsNoiseSuppression = doNoise - roilaremcellcontmaker.AbsEinSigma = AbsE - roilarhadcellcontmaker.DoLArCellsNoiseSuppression = doNoise - roilarhadcellcontmaker.AbsEinSigma = AbsE - roifcalemcellcontmaker.DoLArCellsNoiseSuppression = doNoise - roifcalhadcellcontmaker.DoLArCellsNoiseSuppression = doNoise - roitilehadcellcontmaker = RoITileCellContMaker() - roitilehadcellcontmaker.CaloNoiseTool = theCaloNoiseTool - - self.TCRTools = [roilaremcellcontmaker, - roilarhadcellcontmaker, - roitilehadcellcontmaker, - roifcalemcellcontmaker, - roifcalhadcellcontmaker] - - self.ContainerTools = [CaloCellContainerCorrectorTool("LArCellCorrectorTool").getFullName(), - CaloCellContainerFinalizerTool().getFullName(), - CaloCellContainerCheckerTool().getFullName()] - - - -class TrigCaloCellMaker_jet_fullcalo (TrigFullCaloCellMakerFCalBase): - __slots__ = [] - def __init__ (self, name='TrigCaloCellMaker_jet_fullcallo', eta_size=64, phi_size=64, doNoise=1, AbsE=False, doPers=False): - super(TrigCaloCellMaker_jet_fullcalo, self).__init__(name) - - # these aren't actually used in this instance - # self.eta_size = eta_size - # self.phi_size = phi_size - - # self.FullScanEnabled = True - - self.TrustRoiLimits = True - - from CaloTools.CaloNoiseToolDefault import CaloNoiseToolDefault - theCaloNoiseTool=CaloNoiseToolDefault() - from AthenaCommon.AppMgr import ToolSvc - ToolSvc+=theCaloNoiseTool - - fullcalocellcontmaker = FullCaloCellContMaker(DoLArCellsNoiseSuppression = doNoise, AbsEinSigma = AbsE,CaloNoiseTool = theCaloNoiseTool) - - self.TCRTools = [fullcalocellcontmaker] - - self.ContainerTools = [CaloCellContainerCorrectorTool("LArCellCorrectorTool").getFullName()] - - if doPers: - self.PersistencyPrescaleFactor=1 - self.PersistencyKeyName="TrigCaloCellMaker_jet_fullcalo" - - - -class TrigCaloCellMaker_fullcalo (TrigFullCaloCellMakerBase): - __slots__ = [] - def __init__ (self, name='TrigCaloCellMaker_fullcalo'): - super(TrigCaloCellMaker_fullcalo, self).__init__(name) - - from CaloTools.CaloNoiseToolDefault import CaloNoiseToolDefault - theCaloNoiseTool=CaloNoiseToolDefault() - from AthenaCommon.AppMgr import ToolSvc - ToolSvc+=theCaloNoiseTool - - fullcalocellcontmaker = FullCaloCellContMaker() - fullcalocellcontmaker.CaloNoiseTool = theCaloNoiseTool - - self.TCRTools = [fullcalocellcontmaker] - - self.ContainerTools = [CaloCellContainerCorrectorTool("LArCellCorrectorTool").getFullName()] - # CaloCellContainerFinalizerTool().getFullName(), - # CaloCellContainerCheckerTool().getFullName()] - - self.ContainerTools = [CaloCellContainerCorrectorTool("LArCellCorrectorTool").getFullName()] - - #### configure TrigDataAccess for loadFullCollections - from TrigT2CaloCommon.TrigT2CaloCommonConfig import TrigDataAccess - ToolSvc+=TrigDataAccess() - ToolSvc.TrigDataAccess.loadFullCollections = True - - -class TrigCaloCellMaker_tau (TrigCaloCellMakerBase): - __slots__ = [] - def __init__ (self, name='TrigCaloCellMaker_tau'): - super(TrigCaloCellMaker_tau, self).__init__(name) - - self.eta_size = 32 - self.phi_size = 32 - - self.CreateRoiForID = True - self.EtaWidthForID = 0.2 - self.PhiWidthForID = 0.2 - - from CaloTools.CaloNoiseToolDefault import CaloNoiseToolDefault - theCaloNoiseTool=CaloNoiseToolDefault() - from AthenaCommon.AppMgr import ToolSvc - ToolSvc+=theCaloNoiseTool - - roilaremcellcontmaker = RoILArEMCellContMaker() - roilaremcellcontmaker.CaloNoiseTool = theCaloNoiseTool - roilaremcellcontmaker.DoLArCellsNoiseSuppression = 0 - roilarhadcellcontmaker = RoILArHadCellContMaker() - roilarhadcellcontmaker.CaloNoiseTool = theCaloNoiseTool - roilarhadcellcontmaker.DoLArCellsNoiseSuppression = 0 - roitilehadcellcontmaker = RoITileCellContMaker() - roitilehadcellcontmaker.CheckCellWithinRoI = True - roitilehadcellcontmaker.CaloNoiseTool = theCaloNoiseTool - - self.TCRTools = [roilaremcellcontmaker, - roilarhadcellcontmaker, - roitilehadcellcontmaker] - - self.ContainerTools = [CaloCellContainerCorrectorTool("LArCellCorrectorTool").getFullName(), - CaloCellContainerFinalizerTool().getFullName(), - CaloCellContainerCheckerTool().getFullName()] - -class TrigCaloCellMaker_tau_cells (TrigCaloCellMaker_tau): - __slots__ = [] - def __init__ (self, name='TrigCaloCellMaker_tau_cells'): - super(TrigCaloCellMaker_tau_cells, self).__init__(name) - - self.PersistencyPrescaleFactor=1 - self.PersistencyKeyName="TrigCaloCellMaker_tau" - class TrigCaloTowerMaker_eGamma (TrigCaloTowerMakerBase): __slots__ = [] def __init__ (self, name='TrigCaloTowerMaker_eGamma'): diff --git a/Trigger/TrigAlgorithms/TrigT2CaloEgamma/python/TrigT2CaloEgammaConfig.py b/Trigger/TrigAlgorithms/TrigT2CaloEgamma/python/TrigT2CaloEgammaConfig.py index 8fd0196cdc6d..837105626ac7 100644 --- a/Trigger/TrigAlgorithms/TrigT2CaloEgamma/python/TrigT2CaloEgammaConfig.py +++ b/Trigger/TrigAlgorithms/TrigT2CaloEgamma/python/TrigT2CaloEgammaConfig.py @@ -1,11 +1,6 @@ # Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration from AthenaConfiguration.ComponentFactory import CompFactory -_EgammaSamp1Fex=CompFactory.EgammaSamp1Fex -_EgammaSamp2Fex=CompFactory.EgammaSamp2Fex -_EgammaEmEnFex=CompFactory.EgammaEmEnFex -_EgammaHadEnFex=CompFactory.EgammaHadEnFex -_RingerFex=CompFactory.RingerFex #from TrigT2CaloEgamma.TrigT2CaloEgammaConf import EgammaReSamp1Fex #from TrigT2CaloEgamma.TrigT2CaloEgammaConf import EgammaReSamp2Fex @@ -25,293 +20,27 @@ from TrigTimeMonitor.TrigTimeHistToolConfig import TrigTimeHistToolConfig t2catime = TrigTimeHistToolConfig("Time") -class EgammaSamp2Fex (_EgammaSamp2Fex): - __slots__ = [] - def __init__ (self, name="EgammaSamp2Fex"): - super(EgammaSamp2Fex, self).__init__(name) - -class EgammaSamp1Fex (_EgammaSamp1Fex): - __slots__ = [] - def __init__ (self, name="EgammaSamp1Fex"): - super(EgammaSamp1Fex, self).__init__(name) - -class EgammaEmEnFex (_EgammaEmEnFex): - __slots__ = [] - def __init__ (self, name="EgammaEmEnFex"): - super(EgammaEmEnFex, self).__init__(name) - -class EgammaHadEnFex (_EgammaHadEnFex): - __slots__ = [] - def __init__ (self, name="EgammaHadEnFex"): - super(EgammaHadEnFex, self).__init__(name) - -class RingerFex (_RingerFex): - __slots__ = [] - def __init__ (self, name="RingerFex"): - super(RingerFex, self).__init__(name) - -class EgammaSamp2FexConfig (CompFactory.EgammaSamp2Fex): - __slots__ = [] - def __init__ (self, name="EgammaSamp2FexConfig"): - super(EgammaSamp2FexConfig, self).__init__(name) - self.MaxDetaHotCell=0.15 - self.MaxDphiHotCell=0.15 - class EgammaReSamp2FexConfig (CompFactory.EgammaReSamp2Fex): __slots__ = [] - def __init__ (self, name="EgammaReSamp2FexConfig", *args, **kwargs): + def __init__ (self, name="EgammaReSamp2Fex", *args, **kwargs): super(EgammaReSamp2FexConfig, self).__init__(name, *args, **kwargs) - self.MaxDetaHotCell=0.15 - self.MaxDphiHotCell=0.15 - -class EgammaSamp2FexNoTimerConfig (CompFactory.EgammaSamp2Fex): - __slots__ = [] - def __init__ (self, name="EgammaSamp2FexNoTimerConfig"): - super(EgammaSamp2FexNoTimerConfig, self).__init__(name) - self.MaxDetaHotCell=0.15 - self.MaxDphiHotCell=0.15 - self.TrigTimerSvc="" class EgammaReSamp1FexConfig (CompFactory.EgammaReSamp1Fex): __slots__ = [] def __init__ (self, name="EgammaReSamp1Fex", *args, **kwargs): super(EgammaReSamp1FexConfig, self).__init__(name, *args, **kwargs) -class EgammaSamp1FexNoTimerConfig (CompFactory.EgammaSamp1Fex): - __slots__ = [] - def __init__ (self, name="EgammaSamp1Fex"): - super(EgammaSamp1FexNoTimerConfig, self).__init__(name) - self.TrigTimerSvc="" class EgammaReEmEnFexConfig (CompFactory.EgammaReEmEnFex): __slots__ = [] def __init__ (self, name="EgammaReEmEnFex", *args, **kwargs): super(EgammaReEmEnFexConfig, self).__init__(name, *args, **kwargs) -class EgammaEmEnFexNoTimerConfig (CompFactory.EgammaEmEnFex): - __slots__ = [] - def __init__ (self, name="EgammaEmEnFex"): - super(EgammaEmEnFexNoTimerConfig, self).__init__(name) - self.TrigTimerSvc="" - class EgammaReHadEnFexConfig (CompFactory.EgammaReHadEnFex): __slots__ = [] def __init__ (self, name="EgammaReHadEnFex", *args, **kwargs): super(EgammaReHadEnFexConfig, self).__init__(name, *args, **kwargs) -class EgammaHadEnFexConfig (CompFactory.EgammaHadEnFex): - __slots__ = [] - def __init__ (self, name="EgammaHadEnFex"): - super(EgammaHadEnFexConfig, self).__init__(name) - -class T2CaloEgamma_eGamma (CompFactory.T2CaloEgamma): - __slots__ = [] - def __init__ (self, name="T2CaloEgamma_eGamma"): - super(T2CaloEgamma_eGamma, self).__init__(name) - # here put your customizations - samp2 = EgammaSamp2FexConfig() - samp1 = EgammaSamp1Fex() - sampe = EgammaEmEnFex() - samph = EgammaHadEnFex() - self.IAlgToolList= [ samp2, samp1, sampe, samph ] - self.EtaWidth = 0.2 - self.PhiWidth = 0.2 - self.EtaWidthForID = 0.1 - self.PhiWidthForID = 0.1 - #self.TimerNtuple="T2CaloEgamma.T2CaEgtTot" - self.TrigEMClusterKey="TrigT2CaloEgamma" - #self.Monitoring=False - #self.OutputLevel = 1 - # detailed timing - #t2catime=TrigTimeTreeToolConfig("T2CaloEgammaTimer") - #t2catime=TrigTimeHistToolConfig("T2CaloEgammaTimer") - #t2catime.Key = ["ESamp2.ESamp2Total","ESamp2.ESamp2RegSel","ESamp2.ESamp2BSCnv","ESamp2.ESamp2Algor","ESamp2.ESamp2SaveEM","ESamp2.ESamp2Eta","ESamp2.ESamp2Total:ESamp2Eta"] - #t2catime.TimerHistLimits = [0,20] - self.AthenaMonTools += [ TrigT2CaloEgammaValMonitoring(), - TrigT2CaloEgammaCosmicMonitoring(), - TrigT2CaloEgammaOnMonitoring(name="TrigT2CaloEgammaOnMonitoring_doTimeHist",doTimeHist=True), - TrigT2CaloEgammaTimeMonitoring()] - self.CalibListEndcap=[EgammaSshapeCalibrationEndcapConfig()] - self.CalibListBarrel=[EgammaSshapeCalibrationBarrelConfig()] - self.CalibListBarrel+=[EgammaHitsCalibrationBarrelConfig()] - self.CalibListBarrel+=[EgammaGapCalibrationConfig()] - self.CalibListBarrel+=[EgammaTransitionRegionsConfig()] - self.CalibListEndcap+=[EgammaHitsCalibrationEndcapConfig()] - self.CalibListEndcap+=[EgammaGapCalibrationConfig()] - self.doTiming=True - # code to suport Z of the vertex calculation - self.RhoFirstLayer = [1542.22, 1543.34, 1542.56, 1543.39, 1543.10, # Eta range: 0.00 ~ 0.05 ~ 0.10 ~ 0.15 ~ 0.20 ~ 0.25 - 1543.91, 1543.19, 1541.05, 1540.18, 1538.67, # Eta range: 0.25 ~ 0.30 ~ 0.35 ~ 0.40 ~ 0.45 ~ 0.50 - 1538.55, 1536.49, 1535.31, 1535.93, 1536.14, # Eta range: 0.50 ~ 0.55 ~ 0.60 ~ 0.65 ~ 0.70 ~ 0.75 - 1535.93, 1524.32, 1524.82, 1525.86, 1523.97, # Eta range: 0.75 ~ 0.80 ~ 0.85 ~ 0.90 ~ 0.95 ~ 1.00 - 1526.66, 1524.73, 1524.00, 1522.18, 1520.65, # Eta range: 1.00 ~ 1.05 ~ 1.10 ~ 1.15 ~ 1.20 ~ 1.25 - 1519.67, 1517.90] # Eta range: 1.25 ~ 1.30 ~ 1.37 - - self.RhoMiddleLayer= [1756.75, 1757.91, 1757.06, 1758.25, 1757.40, # Eta range: 0.00 ~ 0.05 ~ 0.10 ~ 0.15 ~ 0.20 ~ 0.25 - 1758.75, 1757.90, 1756.01, 1754.76, 1748.07, # Eta range: 0.25 ~ 0.30 ~ 0.35 ~ 0.40 ~ 0.45 ~ 0.50 - 1740.84, 1735.52, 1732.03, 1721.71, 1716.65, # Eta range: 0.50 ~ 0.55 ~ 0.60 ~ 0.65 ~ 0.70 ~ 0.75 - 1710.82, 1739.15, 1728.36, 1722.92, 1716.45, # Eta range: 0.75 ~ 0.80 ~ 0.85 ~ 0.90 ~ 0.95 ~ 1.00 - 1707.56, 1697.96, 1689.75, 1684.23, 1671.07, # Eta range: 1.00 ~ 1.05 ~ 1.10 ~ 1.15 ~ 1.20 ~ 1.25 - 1663.98, 1662.04] # Eta range: 1.25 ~ 1.30 ~ 1.37 - - self.RhoEta = [0, 0.05, 0.10, 0.15, 0.20, 0.25, 0.30, 0.35, 0.40, 0.45, 0.50, 0.55, # eta point - 0.60, 0.65, 0.70, 0.75, 0.80, 0.85, 0.90, 0.95, 1.00, 1.05, 1.10, 1.15, # eta point - 1.20, 1.25, 1.30, 1.37] - - self.ZFirstLayer = [3790.00, 3790.00, 3790.00, 3790.00, 3790.00, # 1.52 - 1.55 ~ 1.60 - 1.65 ~ 1.70 - 1.75 - 3790.00, 3790.00, 3790.00, 3790.00, 3790.00, # 1.75 - 1.80 ~ 1.85 - 1.90 ~ 1.95 - 2.00 - 3790.00, 3790.00, 3790.00, 3790.00, 3790.00, # 2.00 - 2.05 ~ 2.10 - 2.15 ~ 2.20 - 2.25 - 3790.00, 3781.74, 3778.00, 3778.00, 3778.00, 3778.00] # 2.25 - 2.30 ~ 2.35 - 2.40 ~ 2.45 - 2.50 ~ 2.55 - - self.ZMiddleLayer= [4006.00, 4006.00, 4002.00, 4002.00, 4002.00, # 1.52 - 1.55 ~ 1.60 - 1.65 ~ 1.70 - 1.75 - 3990.00, 3990.00, 3990.00, 3990.00, 3990.00, # 1.75 - 1.80 ~ 1.85 - 1.90 ~ 1.95 - 2.00 - 3986.21, 3979.21, 3978.00, 3974.47, 3963.42, # 2.00 - 2.05 ~ 2.10 - 2.15 ~ 2.20 - 2.25 - 3962.00, 3952.39, 3940.42, 3934.71, 3934.00, 3934.00] # 2.25 - 2.30 ~ 2.35 - 2.40 ~ 2.45 - 2.50 ~ 2.55 - - self.ZEta = [1.50, 1.55, 1.60, 1.65, 1.70, 1.75, 1.80, 1.85, 1.90, 1.95, 2.00, - 2.05, 2.10, 2.15, 2.20, 2.25, 2.30, 2.35, 2.40, 2.45, 2.50, 2.55] - -class T2CaloEgamma_cells (CompFactory.T2CaloEgamma): - __slots__ = [] - def __init__ (self, name="T2CaloEgamma_cells"): - super(T2CaloEgamma_cells, self).__init__(name) - # here put your customizations - self.IAlgToolList= [EgammaSamp2FexConfig('EgammaSamp2FexConfigDebug'), - EgammaSamp1Fex('EgammaSamp1FexDebug'), - EgammaEmEnFex('EgammaEmEnFexDebug') , - EgammaHadEnFex('EgammaHadEnFexDebug')] - # Save cells - for item in self.IAlgToolList: - item.SaveCellsInContainer=True - item.ThresholdKeepCells=400.0 - if item.name() == 'EgammaHadEnFexDebug': # HadEn should have a different threshold - item.ThresholdKeepCells=150.0 - self.StoreCells=True - self.EtaWidth = 0.2 - self.PhiWidth = 0.2 - self.EtaWidthForID = 0.1 - self.PhiWidthForID = 0.1 - #self.TimerNtuple="T2CaloEgamma.T2CaEgtTot" - self.TrigEMClusterKey="TrigT2CaloEgamma" - #t2catime.TimerHistLimits = [0,20] - #self.AthenaMonTools += [t2catime] - self.AthenaMonTools += [ TrigT2CaloEgammaValMonitoring(), - TrigT2CaloEgammaCosmicMonitoring(), - TrigT2CaloEgammaOnMonitoring(), - TrigT2CaloEgammaTimeMonitoring()] - self.CalibListEndcap=[EgammaSshapeCalibrationEndcapConfig()] - self.CalibListBarrel=[EgammaSshapeCalibrationBarrelConfig()] - self.CalibListBarrel+=[EgammaHitsCalibrationBarrelConfig()] - self.CalibListBarrel+=[EgammaGapCalibrationConfig()] - self.CalibListBarrel+=[EgammaTransitionRegionsConfig()] - self.CalibListEndcap+=[EgammaHitsCalibrationEndcapConfig()] - self.CalibListEndcap+=[EgammaGapCalibrationConfig()] - self.doTiming=True - - -class T2CaloEgamma_eGamma_NoHad (CompFactory.T2CaloEgamma): - __slots__ = [] - def __init__ (self, name="T2CaloEgamma_eGamma_NoHad"): - super(T2CaloEgamma_eGamma_NoHad, self).__init__(name) - # here put your customizations - self.IAlgToolList= [EgammaSamp2Fex(), - EgammaSamp1Fex(), - EgammaEmEnFex()] - self.EtaWidth = 0.2 - self.PhiWidth = 0.2 - self.EtaWidthForID = 0.1 - self.PhiWidthForID = 0.1 - #self.TimerNtuple="T2CaloEgamma.T2CaEgtTot" - self.TrigEMClusterKey="TrigT2CaloEgamma" - #self.Monitoring=False - #self.AthenaMonTools += [t2catime] - self.AthenaMonTools = [ TrigT2CaloEgammaValMonitoring(), - TrigT2CaloEgammaCosmicMonitoring(), - TrigT2CaloEgammaOnMonitoring() ] - #self.CalibList=[] - self.CalibListEndcap=[EgammaSshapeCalibrationEndcapConfig()] - self.CalibListBarrel=[EgammaSshapeCalibrationBarrelConfig()] - self.CalibListBarrel+=[EgammaHitsCalibrationBarrelConfig()] - self.CalibListBarrel+=[EgammaGapCalibrationConfig()] - self.CalibListBarrel+=[EgammaTransitionRegionsConfig()] - self.CalibListEndcap+=[EgammaHitsCalibrationEndcapConfig()] - self.CalibListEndcap+=[EgammaGapCalibrationConfig()] - -# for single-beam chains starting from MBTS+BPTX -class T2CaloEgamma_MBTSA (CompFactory.T2CaloEgamma): - __slots__ = [] - def __init__ (self, name="T2CaloEgamma_MBTSA"): - super(T2CaloEgamma_MBTSA, self).__init__(name) - # here put your customizations - self.IAlgToolList= [EgammaSamp2FexConfig(), - EgammaSamp1Fex(), - EgammaEmEnFex() , - EgammaHadEnFex()] - self.L1ForceEta =-1.6 - self.L1ForcePhi =-1.5 - self.EtaWidth = 0.2 - self.PhiWidth = 1.6 - self.EtaWidthForID = 0.1 - self.PhiWidthForID = 0.1 - #self.TimerNtuple="T2CaloEgamma.T2CaEgtTot" - self.TrigEMClusterKey="TrigT2CaloEgamma" - #self.AthenaMonTools += [t2catime] - self.AthenaMonTools += [ TrigT2CaloEgammaValMonitoring(), - TrigT2CaloEgammaCosmicMonitoring(), - TrigT2CaloEgammaOnMonitoring()] - -class T2CaloEgamma_MBTSC (CompFactory.T2CaloEgamma): - __slots__ = [] - def __init__ (self, name="T2CaloEgamma_MBTSC"): - super(T2CaloEgamma_MBTSC, self).__init__(name) - # here put your customizations - self.IAlgToolList= [EgammaSamp2FexConfig(), - EgammaSamp1Fex(), - EgammaEmEnFex() , - EgammaHadEnFex()] - self.L1ForceEta = 1.6 - self.L1ForcePhi =-1.5 - self.EtaWidth = 0.2 - self.PhiWidth = 1.6 - self.EtaWidthForID = 0.1 - self.PhiWidthForID = 0.1 - #self.TimerNtuple="T2CaloEgamma.T2CaEgtTot" - self.TrigEMClusterKey="TrigT2CaloEgamma" - #self.AthenaMonTools += [t2catime] - self.AthenaMonTools += [ TrigT2CaloEgammaValMonitoring(), - TrigT2CaloEgammaCosmicMonitoring(), - TrigT2CaloEgammaOnMonitoring()] - - -class RingerFexConfig( CompFactory.RingerFex ): - __slots__ = [] - def __init__(self, name = "RingerFexConfig"): - super(RingerFexConfig, self).__init__(name) - #self.TrigTimerSvc="" - self.HltFeature = "HLT_TrigT2CaloEgamma" - self.Feature = "TrigT2CaloEgamma" - self.EtaBins = [0.0000, 2.5000] # bin pairs: min < eta <= max, PS,barrel,crack,endcap - self.GlobalCenter = False - self.EtaSearchWindowSize = 0.1 - self.PhiSearchWindowSize = 0.1 - - from TrigT2CaloEgamma.RingerConstants import Layer - - self.DEtaRings = [0.025, 0.003125, 0.025, 0.05, 0.1, 0.1, 0.1] - self.DPhiRings = [0.098174770424681, 0.098174770424681, 0.024543692606170, 0.024543692606170, 0.098174770424681, 0.098174770424681, 0.098174770424681] - self.NRings = [8, 64, 8, 8, 4, 4, 4] - self.LayersRings = [Layer.PreSamplerB,Layer.PreSamplerE, - Layer.EMB1, Layer.EME1, - Layer.EMB2, Layer.EME2, - Layer.EMB3, Layer.EME3, - Layer.HEC0, Layer.TileBar0, Layer.TileGap2, Layer.TileExt0, - Layer.HEC1, Layer.HEC2, Layer.TileBar1, Layer.TileGap0, Layer.TileExt1, - Layer.HEC3, Layer.TileBar2, Layer.TileGap1, Layer.TileExt2] - - self.NLayersRings = [2, 2, 2, 2, 4, 5, 4] - self.NMaxCells = [320, 512, 272, 128, 128, 128, 128] - - class RingerReFexConfig( CompFactory.RingerReFex ): __slots__ = [] @@ -347,16 +76,6 @@ class RingerReFexConfig( CompFactory.RingerReFex ): self.MonTool = monTool -class T2CaloEgamma_Ringer (T2CaloEgamma_eGamma): - __slots__ = [] - def __init__ (self, name="T2CaloEgamma_Ringer"): - super(T2CaloEgamma_Ringer, self).__init__(name) - # here put your customizations - self.IAlgToolList += [RingerFexConfig()] - self.TimerNtuple="T2CaloEgamma.T2CaEgtTotRinger" - self.AthenaMonTools += [TrigT2CaloEgammaRingerTimeMonitoring()] - - class T2CaloEgamma_ReFastAlgo (CompFactory.T2CaloEgammaReFastAlgo): __slots__ = [] def __init__ (self, name="T2CaloEgamma_ReFastAlgo", ClustersName="HLT_FastCaloEMClusters", doRinger=False, RingerKey="HLT_FastCaloRinger"): diff --git a/Trigger/TrigAlgorithms/TrigT2CaloEgamma/src/components/TrigT2CaloEgamma_entries.cxx b/Trigger/TrigAlgorithms/TrigT2CaloEgamma/src/components/TrigT2CaloEgamma_entries.cxx index 8d5893ccb34a..9202a7dd801c 100644 --- a/Trigger/TrigAlgorithms/TrigT2CaloEgamma/src/components/TrigT2CaloEgamma_entries.cxx +++ b/Trigger/TrigAlgorithms/TrigT2CaloEgamma/src/components/TrigT2CaloEgamma_entries.cxx @@ -4,6 +4,7 @@ #include "../EgammaReEmEnFex.h" #include "../EgammaReHadEnFex.h" #include "../RingerReFex.h" +#include "../EgammaAllFex.h" DECLARE_COMPONENT( T2CaloEgammaReFastAlgo ) DECLARE_COMPONENT( EgammaReSamp2Fex ) @@ -11,3 +12,4 @@ DECLARE_COMPONENT( EgammaReSamp1Fex ) DECLARE_COMPONENT( EgammaReEmEnFex ) DECLARE_COMPONENT( EgammaReHadEnFex ) DECLARE_COMPONENT( RingerReFex ) +DECLARE_COMPONENT( EgammaAllFex ) -- GitLab From 783510523e544cb206081c480a01110ec734c721 Mon Sep 17 00:00:00 2001 From: Denis Damazio <damazio@mail.cern.ch> Date: Tue, 16 Feb 2021 21:16:58 +0100 Subject: [PATCH 4/9] adding back missing algorithm --- .../python/TrigT2CaloEgammaConfig.py | 56 ++++++++- .../TrigT2CaloEgamma/src/EgammaAllFex.cxx | 114 ++++++++++++++++++ .../TrigT2CaloEgamma/src/EgammaAllFex.h | 59 +++++++++ 3 files changed, 228 insertions(+), 1 deletion(-) create mode 100644 Trigger/TrigAlgorithms/TrigT2CaloEgamma/src/EgammaAllFex.cxx create mode 100644 Trigger/TrigAlgorithms/TrigT2CaloEgamma/src/EgammaAllFex.h diff --git a/Trigger/TrigAlgorithms/TrigT2CaloEgamma/python/TrigT2CaloEgammaConfig.py b/Trigger/TrigAlgorithms/TrigT2CaloEgamma/python/TrigT2CaloEgammaConfig.py index 837105626ac7..0235421e9df6 100644 --- a/Trigger/TrigAlgorithms/TrigT2CaloEgamma/python/TrigT2CaloEgammaConfig.py +++ b/Trigger/TrigAlgorithms/TrigT2CaloEgamma/python/TrigT2CaloEgammaConfig.py @@ -30,7 +30,6 @@ class EgammaReSamp1FexConfig (CompFactory.EgammaReSamp1Fex): def __init__ (self, name="EgammaReSamp1Fex", *args, **kwargs): super(EgammaReSamp1FexConfig, self).__init__(name, *args, **kwargs) - class EgammaReEmEnFexConfig (CompFactory.EgammaReEmEnFex): __slots__ = [] def __init__ (self, name="EgammaReEmEnFex", *args, **kwargs): @@ -41,6 +40,17 @@ class EgammaReHadEnFexConfig (CompFactory.EgammaReHadEnFex): def __init__ (self, name="EgammaReHadEnFex", *args, **kwargs): super(EgammaReHadEnFexConfig, self).__init__(name, *args, **kwargs) +class EgammaAllFex (CompFactory.EgammaAllFex): + __slots__ = [] + def __init__ (self, name="EgammaAllFex"): + super(EgammaAllFex, self).__init__(name) + +class EgammaAllFexHadConfig (CompFactory.EgammaAllFex): + __slots__ = [] + def __init__ (self, name="EgammaAllFexHadConfig"): + super(EgammaAllFexHadConfig, self).__init__(name) + self.IncludeHad=True + class RingerReFexConfig( CompFactory.RingerReFex ): __slots__ = [] @@ -76,6 +86,50 @@ class RingerReFexConfig( CompFactory.RingerReFex ): self.MonTool = monTool +class T2CaloEgamma_All (CompFactory.T2CaloEgamma): + __slots__ = [] + def __init__ (self, name="T2CaloEgamma_All"): + super(T2CaloEgamma_All, self).__init__(name) + self.IAlgToolList= [EgammaAllFexHadConfig()] + self.EtaWidth = 0.1 + self.PhiWidth = 0.1 + self.EtaWidthForID = 0.1 + self.PhiWidthForID = 0.1 + self.TrigEMClusterKey="TrigT2CaloAll" + self.AthenaMonTools += [ TrigT2CaloEgammaValMonitoring(), + TrigT2CaloEgammaCosmicMonitoring(), + TrigT2CaloEgammaOnMonitoring(), + TrigT2CaloEgammaAllTimeMonitoring()] + self.doTiming=True + +class T2CaloEgamma_AllEm (CompFactory.T2CaloEgamma): + __slots__ = [] + def __init__ (self, name="T2CaloEgamma_AllEm"): + super(T2CaloEgamma_AllEm, self).__init__(name) + self.IAlgToolList= [EgammaAllFex()] + self.EtaWidth = 0.1 + self.PhiWidth = 0.1 + self.EtaWidthForID = 0.1 + self.PhiWidthForID = 0.1 + self.TrigEMClusterKey="TrigT2CaloAll" + self.AthenaMonTools = [ ] + self.doTiming=True + +class T2CaloEgamma_AllEm (CompFactory.T2CaloEgamma): + __slots__ = [] + def __init__ (self, name="T2CaloEgamma_AllEm"): + super(T2CaloEgamma_AllEm, self).__init__(name) + self.IAlgToolList= [EgammaAllFex()] + self.EtaWidth = 0.1 + self.PhiWidth = 0.1 + self.EtaWidthForID = 0.1 + self.PhiWidthForID = 0.1 + self.TrigEMClusterKey="TrigT2CaloAll" + self.AthenaMonTools = [ ] + self.doTiming=True + + + class T2CaloEgamma_ReFastAlgo (CompFactory.T2CaloEgammaReFastAlgo): __slots__ = [] def __init__ (self, name="T2CaloEgamma_ReFastAlgo", ClustersName="HLT_FastCaloEMClusters", doRinger=False, RingerKey="HLT_FastCaloRinger"): diff --git a/Trigger/TrigAlgorithms/TrigT2CaloEgamma/src/EgammaAllFex.cxx b/Trigger/TrigAlgorithms/TrigT2CaloEgamma/src/EgammaAllFex.cxx new file mode 100644 index 000000000000..be1e87ad9905 --- /dev/null +++ b/Trigger/TrigAlgorithms/TrigT2CaloEgamma/src/EgammaAllFex.cxx @@ -0,0 +1,114 @@ +/* + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration +*/ + +// ******************************************************************** +// +// NAME: EgammaAllFex.cxx +// PACKAGE: Trigger/TrigAlgorithms/TrigT2CaloEgamma +// +// AUTHOR: D.O. Damazio +// +// +// ******************************************************************** + +#include "CaloIdentifier/LArEM_ID.h" + +//#include "TrigCaloEvent/TrigEMCluster.h" +#include "xAODTrigCalo/TrigEMCluster.h" +#include "CaloGeoHelpers/CaloSampling.h" + +#include "EgammaAllFex.h" +#include "TrigT2CaloCommon/Calo_Def.h" + +#include "TrigSteeringEvent/TrigRoiDescriptor.h" + +EgammaAllFex::EgammaAllFex(const std::string & type, const std::string & name, + const IInterface* parent): IReAlgToolCalo(type, name, parent) + { + declareProperty("IncludeHad", m_includeHad = false ); +#ifndef NDEBUG + // Create Geometry object + // 0 -> CaloType EM, 2 -> Second Layer + // m_geometry[0] = new T2Geometry(0,2); +#endif +} + +EgammaAllFex::~EgammaAllFex(){ +} + +StatusCode EgammaAllFex::execute(xAOD::TrigEMCluster &rtrigEmCluster, + const IRoiDescriptor& roi, + const CaloDetDescrElement*& /*caloDDE*/, + const EventContext& context) const { + + // Time total AlgTool time + // reset error + int ncells = 0; + // LVL1 positions + float etaL1=rtrigEmCluster.eta(); + float phiL1=rtrigEmCluster.phi(); + + double totalEnergy = 0; + double totalEnergyEM = 0; + CaloSampling::CaloSample samp; + + ATH_MSG_DEBUG( "in execute(TrigEMCluster&)" ); + + // Time to access RegionSelector + + for(DETID dd = TTEM; dd <= TTHEC; dd=(DETID)( ((int)dd)+1) ){ + for(int sampling=0;sampling<4;sampling++) { + LArTT_Selector<LArCellCont> sel; + ATH_CHECK( m_dataSvc->loadCollections(context, roi, dd, sampling, sel) ); + + + for(const LArCell* larcell : sel) { + + double energyCell = larcell->energy(); + totalEnergy += energyCell; + if( dd==TTEM) totalEnergyEM += energyCell; + //samp = CaloSampling::getSampling(*larcell); + samp = larcell->caloDDE()->getSampling(); + rtrigEmCluster.setEnergy(samp,rtrigEmCluster.energy(samp) + energyCell); + rtrigEmCluster.setRawEnergy(samp,rtrigEmCluster.rawEnergy(samp) + energyCell); + ncells++; + + } // end of loop over sampling + } // end of loop over all samples + } // end of loop over DetID + + // TileCAL + // Finished to access RegionSelector + TileCellCollection seltile; + ATH_CHECK(m_dataSvc->loadCollections(context, roi, seltile)); + + + for(const TileCell* tilecell : seltile) { + + double energyCell = tilecell->energy(); + totalEnergy += energyCell; + //samp = CaloSampling::getSampling(*tilecell); + samp = tilecell->caloDDE()->getSampling(); + rtrigEmCluster.setEnergy(samp,rtrigEmCluster.energy(samp) + energyCell); + rtrigEmCluster.setRawEnergy(samp,rtrigEmCluster.rawEnergy(samp) + energyCell); + ncells++; + + } // end of loop over sampling + + + // Update cluster Variables + + if ( m_includeHad ) + rtrigEmCluster.setEnergy(totalEnergy); + else + rtrigEmCluster.setEnergy(totalEnergyEM); + rtrigEmCluster.setEta(etaL1); + rtrigEmCluster.setPhi(phiL1); + rtrigEmCluster.setNCells(ncells); + + // Finished save EMShowerMinimal time + + + return StatusCode::SUCCESS; +} diff --git a/Trigger/TrigAlgorithms/TrigT2CaloEgamma/src/EgammaAllFex.h b/Trigger/TrigAlgorithms/TrigT2CaloEgamma/src/EgammaAllFex.h new file mode 100644 index 000000000000..ac715dbdf148 --- /dev/null +++ b/Trigger/TrigAlgorithms/TrigT2CaloEgamma/src/EgammaAllFex.h @@ -0,0 +1,59 @@ +/* + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration +*/ + +/******************************************************************** + + NAME: EgammaSamp2Fex.h + PACKAGE: Trigger/TrigAlgorithms/TrigT2CaloEgamma + + AUTHOR: M.P. Casado + + PURPOSE: Calculates energy weighted cluster position around + hottest cell in RoI. Also, calculates energy in + a 3x7 and in a 7x7 cluster (rCore = 3x7/7x7). + *******************************************************************/ + +#ifndef TRIGT2CALOEGAMMA_CALOALLFEXEGAMMA_H +#define TRIGT2CALOEGAMMA_CALOALLFEXEGAMMA_H + + +#include "TrigT2CaloCommon/IReAlgToolCalo.h" +#include "GaudiKernel/AlgTool.h" +#include "CaloGeoHelpers/CaloSampling.h" +#include "TrigSteeringEvent/TrigRoiDescriptor.h" +#include "TrigT2CaloCommon/Calo_Def.h" +#include "CxxUtils/phihelper.h" + +#include "CxxUtils/checker_macros.h" +ATLAS_NO_CHECK_FILE_THREAD_SAFETY; // legacy trigger code + +class IRoiDescriptor; + +/** Feature extraction Tool for LVL2 Calo. Second EM Calorimeter sample. */ +class EgammaAllFex: public IReAlgToolCalo { + public: + + /** Constructor */ + EgammaAllFex(const std::string & type, const std::string & name, + const IInterface* parent); + /** Destructor */ + virtual ~EgammaAllFex(); + + /** @brief execute feature extraction for the EM Calorimeter + * second layer + * @param[out] rtrigEmCluster is the output cluster. + * @param[in] eta/phi-min/max = RoI definition. + */ + virtual StatusCode execute(xAOD::TrigEMCluster &rtrigEmCluster, + const IRoiDescriptor& roi, + const CaloDetDescrElement*& /*caloDDE*/, + const EventContext& context ) const override; + + private: + bool m_includeHad; + +}; + + +#endif -- GitLab From 714f4b5de8721a77376819223e77c33dd02e8ab0 Mon Sep 17 00:00:00 2001 From: Denis Damazio <damazio@mail.cern.ch> Date: Wed, 17 Feb 2021 08:46:16 +0100 Subject: [PATCH 5/9] recovering EgammaReSamp2 configuration --- .../python/TrigT2CaloEgammaConfig.py | 27 +++++-------------- 1 file changed, 7 insertions(+), 20 deletions(-) diff --git a/Trigger/TrigAlgorithms/TrigT2CaloEgamma/python/TrigT2CaloEgammaConfig.py b/Trigger/TrigAlgorithms/TrigT2CaloEgamma/python/TrigT2CaloEgammaConfig.py index 0235421e9df6..1c911b4e7a61 100644 --- a/Trigger/TrigAlgorithms/TrigT2CaloEgamma/python/TrigT2CaloEgammaConfig.py +++ b/Trigger/TrigAlgorithms/TrigT2CaloEgamma/python/TrigT2CaloEgammaConfig.py @@ -22,8 +22,10 @@ t2catime = TrigTimeHistToolConfig("Time") class EgammaReSamp2FexConfig (CompFactory.EgammaReSamp2Fex): __slots__ = [] - def __init__ (self, name="EgammaReSamp2Fex", *args, **kwargs): + def __init__ (self, name="EgammaReSamp2FexConfig", *args, **kwargs): super(EgammaReSamp2FexConfig, self).__init__(name, *args, **kwargs) + self.MaxDetaHotCell=0.15 + self.MaxDphiHotCell=0.15 class EgammaReSamp1FexConfig (CompFactory.EgammaReSamp1Fex): __slots__ = [] @@ -86,11 +88,11 @@ class RingerReFexConfig( CompFactory.RingerReFex ): self.MonTool = monTool -class T2CaloEgamma_All (CompFactory.T2CaloEgamma): +class T2CaloEgamma_All (CompFactory.T2CaloEgammaReFastAlgo): __slots__ = [] def __init__ (self, name="T2CaloEgamma_All"): super(T2CaloEgamma_All, self).__init__(name) - self.IAlgToolList= [EgammaAllFexHadConfig()] + self.IReAlgToolList= [EgammaAllFexHadConfig()] self.EtaWidth = 0.1 self.PhiWidth = 0.1 self.EtaWidthForID = 0.1 @@ -102,11 +104,11 @@ class T2CaloEgamma_All (CompFactory.T2CaloEgamma): TrigT2CaloEgammaAllTimeMonitoring()] self.doTiming=True -class T2CaloEgamma_AllEm (CompFactory.T2CaloEgamma): +class T2CaloEgamma_AllEm (CompFactory.T2CaloEgammaReFastAlgo): __slots__ = [] def __init__ (self, name="T2CaloEgamma_AllEm"): super(T2CaloEgamma_AllEm, self).__init__(name) - self.IAlgToolList= [EgammaAllFex()] + self.IReAlgToolList= [EgammaAllFex()] self.EtaWidth = 0.1 self.PhiWidth = 0.1 self.EtaWidthForID = 0.1 @@ -115,21 +117,6 @@ class T2CaloEgamma_AllEm (CompFactory.T2CaloEgamma): self.AthenaMonTools = [ ] self.doTiming=True -class T2CaloEgamma_AllEm (CompFactory.T2CaloEgamma): - __slots__ = [] - def __init__ (self, name="T2CaloEgamma_AllEm"): - super(T2CaloEgamma_AllEm, self).__init__(name) - self.IAlgToolList= [EgammaAllFex()] - self.EtaWidth = 0.1 - self.PhiWidth = 0.1 - self.EtaWidthForID = 0.1 - self.PhiWidthForID = 0.1 - self.TrigEMClusterKey="TrigT2CaloAll" - self.AthenaMonTools = [ ] - self.doTiming=True - - - class T2CaloEgamma_ReFastAlgo (CompFactory.T2CaloEgammaReFastAlgo): __slots__ = [] def __init__ (self, name="T2CaloEgamma_ReFastAlgo", ClustersName="HLT_FastCaloEMClusters", doRinger=False, RingerKey="HLT_FastCaloRinger"): -- GitLab From 97f886393610082816106741a8fb66799e508922 Mon Sep 17 00:00:00 2001 From: Denis Damazio <damazio@mail.cern.ch> Date: Thu, 18 Feb 2021 08:33:00 +0100 Subject: [PATCH 6/9] Removing deprecated tools from python configuration in HLTCalo Monitoring --- .../python/TrigCaloMonitoringConfig.py | 74 +------------------ 1 file changed, 1 insertion(+), 73 deletions(-) diff --git a/Trigger/TrigMonitoring/TrigCaloMonitoring/python/TrigCaloMonitoringConfig.py b/Trigger/TrigMonitoring/TrigCaloMonitoring/python/TrigCaloMonitoringConfig.py index 248fad1bf028..dbe56461f56c 100644 --- a/Trigger/TrigMonitoring/TrigCaloMonitoring/python/TrigCaloMonitoringConfig.py +++ b/Trigger/TrigMonitoring/TrigCaloMonitoring/python/TrigCaloMonitoringConfig.py @@ -8,74 +8,8 @@ def HLTCaloMonitoringTool(): if 'DQMonFlags' not in dir(): from AthenaMonitoring.DQMonFlags import DQMonFlags if DQMonFlags.monManEnvironment == 'tier0Raw': - from TrigCaloRec.TrigCaloRecConf import RoILArEMCellContMaker, RoILArHadCellContMaker, RoITileCellContMaker, RoIFCalEmCellContMaker, RoIFCalHadCellContMaker - from TrigCaloMonitoring.TrigCaloMonitoringConf import HLTCaloTool,HLTCaloFEBTool - from CaloTools.CaloNoiseToolDefault import CaloNoiseToolDefault - theCaloNoiseTool=CaloNoiseToolDefault() - from AthenaCommon.AppMgr import ToolSvc - if not hasattr(ToolSvc,"CaloNoiseToolDefault"): - ToolSvc+=theCaloNoiseTool - - from TrigT2CaloCommon.TrigT2CaloCommonConfig import TrigDataAccess - ToolSvc+=TrigDataAccess() - - roilaremcellcontmaker = RoILArEMCellContMaker() - roilaremcellcontmaker.CaloNoiseTool = theCaloNoiseTool - roilarhadcellcontmaker = RoILArHadCellContMaker() - roilarhadcellcontmaker.CaloNoiseTool = theCaloNoiseTool - roilaremcellcontmaker.DoLArCellsNoiseSuppression = 0 - roilarhadcellcontmaker.DoLArCellsNoiseSuppression = 0 - roifcalemcellcontmaker = RoIFCalEmCellContMaker() - roifcalemcellcontmaker.CaloNoiseTool = theCaloNoiseTool - roifcalemcellcontmaker.DoLArCellsNoiseSuppression = 0 - roifcalhadcellcontmaker = RoIFCalHadCellContMaker() - roifcalhadcellcontmaker.CaloNoiseTool = theCaloNoiseTool - roifcalhadcellcontmaker.DoLArCellsNoiseSuppression = 0 - #from TrigCaloRec.TrigCaloRecConf import FullCaloCellContMaker - #fullcalocellcontmaker = FullCaloCellContMaker() - #fullcalocellcontmaker.CaloNoiseTool = theCaloNoiseTool - #fullcalocellcontmaker.DoLArCellsNoiseSuppression = 0 - - - HLTCalo = HLTCaloTool(name = 'HLTCalo', - histoPathBase = "/Trigger/HLT") - HLTCalo.TCRTools = [roilaremcellcontmaker, - roilarhadcellcontmaker, - roifcalemcellcontmaker, - roifcalhadcellcontmaker, - RoITileCellContMaker()] - - # From Ignacio - HLTCaloFEB = HLTCaloFEBTool(name = 'HLTCaloFEB', - histoPathBase = "/Trigger/HLT") - HLTCaloFEB.TCRTools = [roilaremcellcontmaker, - roilarhadcellcontmaker, - roifcalemcellcontmaker, - roifcalhadcellcontmaker, - RoITileCellContMaker()] - HLTCaloFEB.sigma = 3 - - HLTCaloFEB.NoiseTool=theCaloNoiseTool - -# - # Add Region Selector if there is none - from AthenaCommon.AppMgr import ServiceMgr - if not hasattr(ServiceMgr,"RegSelSvcDefault"): - from RegionSelector.RegSelSvcDefault import RegSelSvcDefault - regsel = RegSelSvcDefault() - regsel.enableCalo = True - ServiceMgr += regsel - - #HLTFullCalo = HLTCaloTool(name = 'HLTFullCalo', - # histoPathBase = "/Trigger/HLT") - #HLTFullCalo.TCRTools = [fullcalocellcontmaker] - #ToolSvc += HLTCalo - list = [ HLTCalo ] - #ToolSvc += HLTCaloFEB - list += [ HLTCaloFEB ] - #ToolSvc += HLTFullCalo; - #list += [ "HLTCaloTool/HLTFullCalo" ]; + list = [] return list #elif DQMonFlags.monManEnvironment == 'tier0ESD': @@ -105,13 +39,7 @@ def HLTCaloMonitoringTool(): #HLTCaloCluster = HLTCaloClusterTool( name = 'HLTCaloCluster', # histoPathBase = "/Trigger/HLT") from AthenaCommon.AppMgr import ToolSvc - #ToolSvc += HLTCaloL2; - #ToolSvc += xAODTrigEMClusters - #list = [ "HLTCaloToolL2/HLTCaloL2" ]; list = [ xAODTrigEMClusters ] - #ToolSvc += HLTCaloCluster; - #ToolSvc += xAODCaloClusters - #list += [ "HLTCaloClusterTool/HLTCaloCluster" ]; list += [ xAODCaloClustersFS ] list += [ xAODCaloClustersRoI ] list += [ xAODCaloClustersLC ] -- GitLab From bdc02325c5e5255ca7c8cafd6506554746c9a9a4 Mon Sep 17 00:00:00 2001 From: Denis Damazio <damazio@mail.cern.ch> Date: Thu, 18 Feb 2021 14:31:30 +0100 Subject: [PATCH 7/9] remove unused configurables from python files --- .../TrigAlgorithms/TrigCaloRec/python/TrigCaloRecConfig.py | 6 +++--- .../TrigT2CaloEgamma/python/TrigT2CaloEgammaConfig.py | 5 ++--- .../TrigCaloMonitoring/python/TrigCaloMonitoringConfig.py | 3 --- 3 files changed, 5 insertions(+), 9 deletions(-) diff --git a/Trigger/TrigAlgorithms/TrigCaloRec/python/TrigCaloRecConfig.py b/Trigger/TrigAlgorithms/TrigCaloRec/python/TrigCaloRecConfig.py index 46941c4c884f..7047c5a65241 100755 --- a/Trigger/TrigAlgorithms/TrigCaloRec/python/TrigCaloRecConfig.py +++ b/Trigger/TrigAlgorithms/TrigCaloRec/python/TrigCaloRecConfig.py @@ -11,9 +11,9 @@ from TrigCaloRec.TrigCaloRecConf import (TrigCaloClusterMakerMT, TrigLArNoisyROAlg, TrigL1BSTowerHypo) -from CaloRec.CaloRecConf import (CaloCellContainerCorrectorTool, - CaloCellContainerFinalizerTool, - CaloCellContainerCheckerTool) +#from CaloRec.CaloRecConf import (CaloCellContainerCorrectorTool, +# CaloCellContainerFinalizerTool, +# CaloCellContainerCheckerTool) from TrigTimeMonitor.TrigTimeHistToolConfig import TrigTimeHistToolConfig from TrigCaloRec.TrigCaloTowerMakerMonitoring import TrigCaloTowerMakerValidationMonitoring, TrigCaloTowerMakerOnlineMonitoring, TrigCaloTowerMakerCosmicMonitoring diff --git a/Trigger/TrigAlgorithms/TrigT2CaloEgamma/python/TrigT2CaloEgammaConfig.py b/Trigger/TrigAlgorithms/TrigT2CaloEgamma/python/TrigT2CaloEgammaConfig.py index 1c911b4e7a61..22e0695445f3 100644 --- a/Trigger/TrigAlgorithms/TrigT2CaloEgamma/python/TrigT2CaloEgammaConfig.py +++ b/Trigger/TrigAlgorithms/TrigT2CaloEgamma/python/TrigT2CaloEgammaConfig.py @@ -15,7 +15,7 @@ from TrigT2CaloCalibration.EgammaCalibrationConfig import EgammaHitsCalibrationB from TrigT2CaloCalibration.EgammaCalibrationConfig import EgammaTransitionRegionsConfig from TrigT2CaloCalibration.EgammaCalibrationConfig import EgammaSshapeCalibrationBarrelConfig, EgammaSshapeCalibrationEndcapConfig -from TrigT2CaloEgamma.TrigT2CaloEgammaMonitoring import TrigT2CaloEgammaValMonitoring, TrigT2CaloEgammaCosmicMonitoring, TrigT2CaloEgammaOnMonitoring, TrigT2CaloEgammaTimeMonitoring, TrigT2CaloEgammaRingerTimeMonitoring +from TrigT2CaloEgamma.TrigT2CaloEgammaMonitoring import TrigT2CaloEgammaValMonitoring, TrigT2CaloEgammaCosmicMonitoring, TrigT2CaloEgammaOnMonitoring from TrigTimeMonitor.TrigTimeHistToolConfig import TrigTimeHistToolConfig t2catime = TrigTimeHistToolConfig("Time") @@ -100,8 +100,7 @@ class T2CaloEgamma_All (CompFactory.T2CaloEgammaReFastAlgo): self.TrigEMClusterKey="TrigT2CaloAll" self.AthenaMonTools += [ TrigT2CaloEgammaValMonitoring(), TrigT2CaloEgammaCosmicMonitoring(), - TrigT2CaloEgammaOnMonitoring(), - TrigT2CaloEgammaAllTimeMonitoring()] + TrigT2CaloEgammaOnMonitoring()] self.doTiming=True class T2CaloEgamma_AllEm (CompFactory.T2CaloEgammaReFastAlgo): diff --git a/Trigger/TrigMonitoring/TrigCaloMonitoring/python/TrigCaloMonitoringConfig.py b/Trigger/TrigMonitoring/TrigCaloMonitoring/python/TrigCaloMonitoringConfig.py index dbe56461f56c..37d052afddb4 100644 --- a/Trigger/TrigMonitoring/TrigCaloMonitoring/python/TrigCaloMonitoringConfig.py +++ b/Trigger/TrigMonitoring/TrigCaloMonitoring/python/TrigCaloMonitoringConfig.py @@ -38,13 +38,10 @@ def HLTCaloMonitoringTool(): #from TrigCaloMonitoring.TrigCaloMonitoringConf import HLTCaloClusterTool #HLTCaloCluster = HLTCaloClusterTool( name = 'HLTCaloCluster', # histoPathBase = "/Trigger/HLT") - from AthenaCommon.AppMgr import ToolSvc list = [ xAODTrigEMClusters ] list += [ xAODCaloClustersFS ] list += [ xAODCaloClustersRoI ] list += [ xAODCaloClustersLC ] - #ToolSvc += CaloCells - list += [ CaloCells ] return list else: -- GitLab From 2216820a3700707d79336bed1b57928f843a6590 Mon Sep 17 00:00:00 2001 From: Denis Damazio <damazio@mail.cern.ch> Date: Thu, 18 Feb 2021 14:32:22 +0100 Subject: [PATCH 8/9] some small count differences --- .../share/ref_RDOtoRDOTrig_v1Dev_build.ref | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/Trigger/TrigValidation/TrigAnalysisTest/share/ref_RDOtoRDOTrig_v1Dev_build.ref b/Trigger/TrigValidation/TrigAnalysisTest/share/ref_RDOtoRDOTrig_v1Dev_build.ref index 0a464fa8aba5..42d3466bf6d4 100644 --- a/Trigger/TrigValidation/TrigAnalysisTest/share/ref_RDOtoRDOTrig_v1Dev_build.ref +++ b/Trigger/TrigValidation/TrigAnalysisTest/share/ref_RDOtoRDOTrig_v1Dev_build.ref @@ -4169,17 +4169,17 @@ HLT_xe110_tcpufit_L1XE50: stepFeatures: 0: 6 HLT_xe30_cell_L1XE10: - eventCount: 17 + eventCount: 16 stepCounts: - 0: 17 + 0: 16 stepFeatures: - 0: 17 + 0: 16 HLT_xe30_cell_xe30_tcpufit_L1XE10: - eventCount: 14 + eventCount: 13 stepCounts: - 0: 14 + 0: 13 stepFeatures: - 0: 31 + 0: 30 HLT_xe30_cvfpufit_L1XE10: eventCount: 14 stepCounts: -- GitLab From 161c99f7b9eef6bc37bc83480a6561c801f201e0 Mon Sep 17 00:00:00 2001 From: Denis Damazio <damazio@mail.cern.ch> Date: Thu, 18 Feb 2021 20:39:57 +0100 Subject: [PATCH 9/9] Fix python configuration removing unused tools --- .../TrigCaloMonitoring/python/TrigCaloMonitoringConfig.py | 2 -- 1 file changed, 2 deletions(-) diff --git a/Trigger/TrigMonitoring/TrigCaloMonitoring/python/TrigCaloMonitoringConfig.py b/Trigger/TrigMonitoring/TrigCaloMonitoring/python/TrigCaloMonitoringConfig.py index 37d052afddb4..488df17ed0a4 100644 --- a/Trigger/TrigMonitoring/TrigCaloMonitoring/python/TrigCaloMonitoringConfig.py +++ b/Trigger/TrigMonitoring/TrigCaloMonitoring/python/TrigCaloMonitoringConfig.py @@ -16,7 +16,6 @@ def HLTCaloMonitoringTool(): elif ( ( DQMonFlags.monManEnvironment == 'tier0ESD' ) or ( DQMonFlags.monManEnvironment == 'tier0' ) ) : from TrigCaloMonitoring.TrigCaloMonitoringConf import HLTCaloESD_xAODTrigEMClusters from TrigCaloMonitoring.TrigCaloMonitoringConf import HLTCaloESD_xAODCaloClusters - from TrigCaloMonitoring.TrigCaloMonitoringConf import HLTCaloESD_CaloCells xAODTrigEMClusters = HLTCaloESD_xAODTrigEMClusters("xAODTrigEMClusters") xAODCaloClustersFS = HLTCaloESD_xAODCaloClusters ("xAODCaloClustersFS", @@ -28,7 +27,6 @@ def HLTCaloMonitoringTool(): xAODCaloClustersLC = HLTCaloESD_xAODCaloClusters ("xAODCaloClustersLC", HLTContainerRun2 = "", HLTContainerRun3 = "HLT_TopoCaloClustersLC") - CaloCells = HLTCaloESD_CaloCells ("CaloCells") #from TrigCaloMonitoring.TrigCaloMonitoringConf import HLTCaloToolL2 #HLTCaloL2 = HLTCaloToolL2(name = 'HLTCaloL2', -- GitLab