diff --git a/Trigger/TrigT1/TrigT1CaloCalibToolInterfaces/TrigT1CaloCalibToolInterfaces/IL1CaloOfflineTriggerTowerTools.h b/Trigger/TrigT1/TrigT1CaloCalibToolInterfaces/TrigT1CaloCalibToolInterfaces/IL1CaloOfflineTriggerTowerTools.h index d80ce3140a368c86b812354087084dc210c402a9..9f4d5392054b607f514e2284bca14aff80b56d3d 100644 --- a/Trigger/TrigT1/TrigT1CaloCalibToolInterfaces/TrigT1CaloCalibToolInterfaces/IL1CaloOfflineTriggerTowerTools.h +++ b/Trigger/TrigT1/TrigT1CaloCalibToolInterfaces/TrigT1CaloCalibToolInterfaces/IL1CaloOfflineTriggerTowerTools.h @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ // *************************************************************************** // * Author: John Morris (john.morris@cern.ch) * @@ -20,6 +20,9 @@ #include <map> #include "TrigT1CaloEvent/TriggerTowerCollection.h" +#include "StoreGate/ReadCondHandleKey.h" +#include "LArElecCalib/ILArHVScaleCorr.h" +#include "LArCabling/LArOnOffIdMapping.h" class CaloCell; class CaloCellContainer; @@ -28,7 +31,6 @@ class TileDigitsContainer; class Identifier; class TileTTL1Cell; class CondAttrListCollection; -class ILArHVCorrTool; class L1CaloRxCoolChannelId; namespace coral{ @@ -165,7 +167,8 @@ namespace LVL1{ virtual unsigned int RxStatus(const coral::AttributeList* attrList) const = 0; - virtual void LArHV(ToolHandle<ILArHVCorrTool>& LArHV) = 0; + virtual void LArHV(const SG::ReadCondHandleKey<ILArHVScaleCorr>& scaleCorrKey, + const SG::ReadCondHandleKey<LArOnOffIdMapping>& cablingKey) = 0; virtual void caloCells(const CaloCellContainer* cells) = 0; virtual void larDigits(const LArDigitContainer* lar) = 0; virtual void tileDigits(const TileDigitsContainer* tile) = 0; @@ -192,9 +195,15 @@ namespace LVL1{ virtual std::vector<std::vector<const CaloCell*> > sortEMCrackCells(const std::vector<const CaloCell*> &cells) const = 0; virtual float LArNonNominalHV(const std::vector<const CaloCell*> &cells) const = 0; - virtual float LArNonNominalHV(const CaloCell* cell) const = 0; + virtual float LArNonNominalHV(const CaloCell* cell, + const ILArHVScaleCorr* scaleCorr, + const ILArHVScaleCorr* onlineScaleCorr, + const LArOnOffIdMapping* cabling) const = 0; virtual float LArHVScale(const std::vector<const CaloCell*> &cells) const = 0; - virtual float LArHVScale(const CaloCell* cell) const = 0; + virtual float LArHVScale(const CaloCell* cell, + const ILArHVScaleCorr* scaleCorr, + const ILArHVScaleCorr* onlineScaleCorr, + const LArOnOffIdMapping* cabling) const = 0; virtual float TileNonNominal(const std::vector<const CaloCell*> &cells) const = 0; virtual float TileNonNominal(const CaloCell* cell) const = 0; diff --git a/Trigger/TrigT1/TrigT1CaloCalibToolInterfaces/TrigT1CaloCalibToolInterfaces/IL1CaloxAODOfflineTriggerTowerTools.h b/Trigger/TrigT1/TrigT1CaloCalibToolInterfaces/TrigT1CaloCalibToolInterfaces/IL1CaloxAODOfflineTriggerTowerTools.h index 45442d0fd7b2fb300d21166eacc8499bc868170f..c1e0e17ada4c4fc01d4f89ae0910eabceeb035ff 100644 --- a/Trigger/TrigT1/TrigT1CaloCalibToolInterfaces/TrigT1CaloCalibToolInterfaces/IL1CaloxAODOfflineTriggerTowerTools.h +++ b/Trigger/TrigT1/TrigT1CaloCalibToolInterfaces/TrigT1CaloCalibToolInterfaces/IL1CaloxAODOfflineTriggerTowerTools.h @@ -22,7 +22,6 @@ class TileDigitsContainer; class Identifier; class TileTTL1Cell; class CondAttrListCollection; -class ILArHVCorrTool; class L1CaloRxCoolChannelId; namespace coral{ diff --git a/Trigger/TrigT1/TrigT1CaloCalibTools/TrigT1CaloCalibTools/L1CaloOfflineTriggerTowerTools.h b/Trigger/TrigT1/TrigT1CaloCalibTools/TrigT1CaloCalibTools/L1CaloOfflineTriggerTowerTools.h index 650560033b6d93d367b6ecc4a7ac1afdbff6beaf..d2d367683be30f74fe583dd8a745370a5a454d18 100644 --- a/Trigger/TrigT1/TrigT1CaloCalibTools/TrigT1CaloCalibTools/L1CaloOfflineTriggerTowerTools.h +++ b/Trigger/TrigT1/TrigT1CaloCalibTools/TrigT1CaloCalibTools/L1CaloOfflineTriggerTowerTools.h @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ // *************************************************************************** // * Author: John Morris (john.morris@cern.ch) * @@ -20,11 +20,14 @@ #include "CoralBase/AttributeListSpecification.h" #include "AthenaPoolUtilities/AthenaAttributeList.h" #include "AthenaPoolUtilities/CondAttrListCollection.h" +#include "LArElecCalib/ILArHVScaleCorr.h" +#include "LArCabling/LArOnOffIdMapping.h" // ID includes #include "Identifier/Identifier.h" #include "Identifier/IdentifierHash.h" #include "Identifier/HWIdentifier.h" +#include "StoreGate/ReadCondHandleKey.h" // L1 includes #include "TrigT1CaloEvent/TriggerTower.h" @@ -49,7 +52,6 @@ // LAr includes #include "LArRawEvent/LArDigitContainer.h" #include "LArIdentifier/LArOnlineID.h" -#include "LArElecCalib/ILArHVCorrTool.h" // Tile includes #include "TileEvent/TileDigitsContainer.h" @@ -85,168 +87,175 @@ public: typedef std::vector<const CaloCell*>::const_iterator Itr_vCaloCells; typedef std::vector<std::vector<const CaloCell*> >::const_iterator Itr_vvCaloCells; - virtual StatusCode initialize(); - virtual StatusCode finalize(); + virtual StatusCode initialize() override; + virtual StatusCode finalize() override; // Location, ID and Navigation Information - int emPpmCrate(const TriggerTower* tt) const; - int emPpmModule(const TriggerTower* tt) const; - int emPpmSubmodule(const TriggerTower* tt) const; - int emPpmChannel(const TriggerTower* tt) const; - unsigned int emCoolChannelId(const TriggerTower* tt) const; - std::vector<int> emLocation(const TriggerTower* tt) const; - std::vector<unsigned int> emRxId(const TriggerTower* tt) const; - - int hadPpmCrate(const TriggerTower* tt) const; - int hadPpmModule(const TriggerTower* tt) const; - int hadPpmSubmodule(const TriggerTower* tt) const; - int hadPpmChannel(const TriggerTower* tt) const; - unsigned int hadCoolChannelId(const TriggerTower* tt) const; - std::vector<int> hadLocation(const TriggerTower* tt) const; - std::vector<unsigned int> hadRxId(const TriggerTower* tt) const; - int hadIsTile(const TriggerTower* tt) const; + virtual int emPpmCrate(const TriggerTower* tt) const override; + virtual int emPpmModule(const TriggerTower* tt) const override; + virtual int emPpmSubmodule(const TriggerTower* tt) const override; + virtual int emPpmChannel(const TriggerTower* tt) const override; + virtual unsigned int emCoolChannelId(const TriggerTower* tt) const override; + virtual std::vector<int> emLocation(const TriggerTower* tt) const override; + virtual std::vector<unsigned int> emRxId(const TriggerTower* tt) const override; + + virtual int hadPpmCrate(const TriggerTower* tt) const override; + virtual int hadPpmModule(const TriggerTower* tt) const override; + virtual int hadPpmSubmodule(const TriggerTower* tt) const override; + virtual int hadPpmChannel(const TriggerTower* tt) const override; + virtual unsigned int hadCoolChannelId(const TriggerTower* tt) const override; + virtual std::vector<int> hadLocation(const TriggerTower* tt) const override; + virtual std::vector<unsigned int> hadRxId(const TriggerTower* tt) const override; + virtual int hadIsTile(const TriggerTower* tt) const override; // Energy, Et and Layer Information - std::vector<const CaloCell*> emCells(const TriggerTower* tt) const; - int emNCells(const TriggerTower* tt) const; - std::vector<int> emNCellsByLayer(const TriggerTower* tt) const; - std::vector<int> emNCellsByReceiver(const TriggerTower* tt) const; - std::vector<std::vector<int> > emNCellsByReceiverByLayer(const TriggerTower* tt) const; - std::vector<int> emTTCellsLayerNames(const TriggerTower* tt) const; - std::vector<std::vector<int> > emTTCellsLayerNamesByReceiver(const TriggerTower* tt) const; - float emTTCellsEnergy(const TriggerTower* tt) const; - std::vector<float> emTTCellsEnergyByLayer(const TriggerTower* tt) const; - std::vector<float> emTTCellsEnergyByReceiver(const TriggerTower* tt, const int mode = 0) const; - float emTTCellsEt(const TriggerTower* tt) const; - std::vector<float> emTTCellsEtByLayer(const TriggerTower* tt) const; - std::vector<float> emTTCellsEtByReceiver(const TriggerTower* tt, const int mode = 0) const; - float emLArTowerEnergy(const TriggerTower* tt) const; - - std::vector<const CaloCell*> hadCells(const TriggerTower* tt) const; - int hadNCells(const TriggerTower* tt) const; - std::vector<int> hadNCellsByLayer(const TriggerTower* tt) const; - std::vector<int> hadNCellsByReceiver(const TriggerTower* tt) const; - std::vector<std::vector<int> > hadNCellsByReceiverByLayer(const TriggerTower* tt) const; - std::vector<int> hadTTCellsLayerNames(const TriggerTower* tt) const; - std::vector<std::vector<int> > hadTTCellsLayerNamesByReceiver(const TriggerTower* tt) const; - float hadTTCellsEnergy(const TriggerTower* tt) const; - std::vector<float> hadTTCellsEnergyByLayer(const TriggerTower* tt) const; - std::vector<float> hadTTCellsEnergyByReceiver(const TriggerTower* tt, const int mode = 0) const; - float hadTTCellsEt(const TriggerTower* tt) const; - std::vector<float> hadTTCellsEtByLayer(const TriggerTower* tt) const; - std::vector<float> hadTTCellsEtByReceiver(const TriggerTower* tt, const int mode = 0) const; - float hadLArTowerEnergy(const TriggerTower* tt) const; - float tileCellEnergy(const TriggerTower* tt, IdTTL1CellMapType& map) const; + virtual std::vector<const CaloCell*> emCells(const TriggerTower* tt) const override; + virtual int emNCells(const TriggerTower* tt) const override; + virtual std::vector<int> emNCellsByLayer(const TriggerTower* tt) const override; + virtual std::vector<int> emNCellsByReceiver(const TriggerTower* tt) const override; + virtual std::vector<std::vector<int> > emNCellsByReceiverByLayer(const TriggerTower* tt) const override; + virtual std::vector<int> emTTCellsLayerNames(const TriggerTower* tt) const override; + virtual std::vector<std::vector<int> > emTTCellsLayerNamesByReceiver(const TriggerTower* tt) const override; + virtual float emTTCellsEnergy(const TriggerTower* tt) const override; + virtual std::vector<float> emTTCellsEnergyByLayer(const TriggerTower* tt) const override; + virtual std::vector<float> emTTCellsEnergyByReceiver(const TriggerTower* tt, const int mode = 0) const override; + virtual float emTTCellsEt(const TriggerTower* tt) const override; + virtual std::vector<float> emTTCellsEtByLayer(const TriggerTower* tt) const override; + virtual std::vector<float> emTTCellsEtByReceiver(const TriggerTower* tt, const int mode = 0) const override; + virtual float emLArTowerEnergy(const TriggerTower* tt) const override; + + virtual std::vector<const CaloCell*> hadCells(const TriggerTower* tt) const override; + virtual int hadNCells(const TriggerTower* tt) const override; + virtual std::vector<int> hadNCellsByLayer(const TriggerTower* tt) const override; + virtual std::vector<int> hadNCellsByReceiver(const TriggerTower* tt) const override; + virtual std::vector<std::vector<int> > hadNCellsByReceiverByLayer(const TriggerTower* tt) const override; + virtual std::vector<int> hadTTCellsLayerNames(const TriggerTower* tt) const override; + virtual std::vector<std::vector<int> > hadTTCellsLayerNamesByReceiver(const TriggerTower* tt) const override; + virtual float hadTTCellsEnergy(const TriggerTower* tt) const override; + virtual std::vector<float> hadTTCellsEnergyByLayer(const TriggerTower* tt) const override; + virtual std::vector<float> hadTTCellsEnergyByReceiver(const TriggerTower* tt, const int mode = 0) const override; + virtual float hadTTCellsEt(const TriggerTower* tt) const override; + virtual std::vector<float> hadTTCellsEtByLayer(const TriggerTower* tt) const override; + virtual std::vector<float> hadTTCellsEtByReceiver(const TriggerTower* tt, const int mode = 0) const override; + virtual float hadLArTowerEnergy(const TriggerTower* tt) const override; + virtual float tileCellEnergy(const TriggerTower* tt, IdTTL1CellMapType& map) const override; // Bad Calo, High Voltage Information - int emBadCalo(const TriggerTower* tt) const; - float emCaloQuality(const TriggerTower* tt) const; - float emNCellsNonNominal(const TriggerTower* tt) const; - std::vector<float> emNCellsNonNominalByLayer(const TriggerTower* tt) const; - std::vector<std::vector<float> > emNCellsNonNominalByReceiverByLayer(const TriggerTower* tt) const; - float emNonNominalMeanScale(const TriggerTower* tt) const; - std::vector<float> emNonNominalMeanScaleByLayer(const TriggerTower* tt) const; - std::vector<float> emNonNominalMeanScaleByReceiver(const TriggerTower* tt) const; - std::vector<std::vector<float> > emNonNominalMeanScaleByReceiverByLayer(const TriggerTower* tt) const; - - int hadBadCalo(const TriggerTower* tt, IdTTL1CellMapType& map) const; - float hadCaloQuality(const TriggerTower* tt) const; - float hadNCellsNonNominal(const TriggerTower* tt) const; - std::vector<float> hadNCellsNonNominalByLayer(const TriggerTower* tt) const; - std::vector<std::vector<float> > hadNCellsNonNominalByReceiverByLayer(const TriggerTower* tt) const; - float hadNonNominalMeanScale(const TriggerTower* tt) const; - std::vector<float> hadNonNominalMeanScaleByLayer(const TriggerTower* tt) const; - std::vector<float> hadNonNominalMeanScaleByReceiver(const TriggerTower* tt) const; - std::vector<std::vector<float> > hadNonNominalMeanScaleByReceiverByLayer(const TriggerTower* tt) const; + virtual int emBadCalo(const TriggerTower* tt) const override; + virtual float emCaloQuality(const TriggerTower* tt) const override; + virtual float emNCellsNonNominal(const TriggerTower* tt) const override; + virtual std::vector<float> emNCellsNonNominalByLayer(const TriggerTower* tt) const override; + virtual std::vector<std::vector<float> > emNCellsNonNominalByReceiverByLayer(const TriggerTower* tt) const override; + virtual float emNonNominalMeanScale(const TriggerTower* tt) const override; + virtual std::vector<float> emNonNominalMeanScaleByLayer(const TriggerTower* tt) const override; + virtual std::vector<float> emNonNominalMeanScaleByReceiver(const TriggerTower* tt) const override; + virtual std::vector<std::vector<float> > emNonNominalMeanScaleByReceiverByLayer(const TriggerTower* tt) const override; + + virtual int hadBadCalo(const TriggerTower* tt, IdTTL1CellMapType& map) const override; + virtual float hadCaloQuality(const TriggerTower* tt) const override; + virtual float hadNCellsNonNominal(const TriggerTower* tt) const override; + virtual std::vector<float> hadNCellsNonNominalByLayer(const TriggerTower* tt) const override; + virtual std::vector<std::vector<float> > hadNCellsNonNominalByReceiverByLayer(const TriggerTower* tt) const override; + virtual float hadNonNominalMeanScale(const TriggerTower* tt) const override; + virtual std::vector<float> hadNonNominalMeanScaleByLayer(const TriggerTower* tt) const override; + virtual std::vector<float> hadNonNominalMeanScaleByReceiver(const TriggerTower* tt) const override; + virtual std::vector<std::vector<float> > hadNonNominalMeanScaleByReceiverByLayer(const TriggerTower* tt) const override; // Database Attributes - const coral::AttributeList* emDbAttributes(const TriggerTower* tt, const CondAttrListCollection* dbAttrList) const; - std::vector<const coral::AttributeList*> emDbRxGainsAttributes(const TriggerTower* tt, const CondAttrListCollection* dbAttrList) const; + virtual const coral::AttributeList* emDbAttributes(const TriggerTower* tt, const CondAttrListCollection* dbAttrList) const override; + virtual std::vector<const coral::AttributeList*> emDbRxGainsAttributes(const TriggerTower* tt, const CondAttrListCollection* dbAttrList) const override; - const coral::AttributeList* hadDbAttributes(const TriggerTower* tt, const CondAttrListCollection* dbAttrList) const; - std::vector<const coral::AttributeList*> hadDbRxGainsAttributes(const TriggerTower* tt, const CondAttrListCollection* dbAttrList) const; + virtual const coral::AttributeList* hadDbAttributes(const TriggerTower* tt, const CondAttrListCollection* dbAttrList) const override; + virtual std::vector<const coral::AttributeList*> hadDbRxGainsAttributes(const TriggerTower* tt, const CondAttrListCollection* dbAttrList) const override; // Phase 1 SuperCells std::vector<int> emSuperCellIdentifiers(const TriggerTower* tt) const; std::vector<int> hadSuperCellIdentifiers(const TriggerTower* tt) const; // Database access - unsigned int ModuleId(const coral::AttributeList* attrList) const; - unsigned int ErrorCode(const coral::AttributeList* attrList) const; - unsigned long long PprDacScanResultsTimeStamp(const coral::AttributeList* attrList) const; - unsigned long long PprPedestalRunResultsTimeStamp(const coral::AttributeList* attrList) const; - unsigned long long PprNoiseRunResultsTimeStamp(const coral::AttributeList* attrList) const; - unsigned long long PprTimingResultsTimeStamp(const coral::AttributeList* attrList) const; - unsigned long long PprSatBcidResultsTimeStamp(const coral::AttributeList* attrList) const; - unsigned long long PprFirFilterResultsTimeStamp(const coral::AttributeList* attrList) const; - unsigned long long PprLutValuesResultsTimeStamp(const coral::AttributeList* attrList) const; - double DacOffset(const coral::AttributeList* attrList) const; - double DacSlope(const coral::AttributeList* attrList) const; - double PedMean(const coral::AttributeList* attrList) const; - unsigned int PedValue(const coral::AttributeList* attrList) const; - unsigned int FullDelayData(const coral::AttributeList* attrList) const; - unsigned short int SyncDelayBcid(const coral::AttributeList* attrList) const; - unsigned short int InBcidNegedge(const coral::AttributeList* attrList) const; - unsigned short int ExtBcidThreshold(const coral::AttributeList* attrList) const; - unsigned short int SatBcidThreshLow(const coral::AttributeList* attrList) const; - unsigned short int SatBcidThreshHigh(const coral::AttributeList* attrList) const; - unsigned short int SatBcidLevel(const coral::AttributeList* attrList) const; - unsigned short int BcidEnergyRangeLow(const coral::AttributeList* attrList) const; - unsigned short int BcidEnergyRangeHigh(const coral::AttributeList* attrList) const; - unsigned short int FirStartBit(const coral::AttributeList* attrList) const; - short FirCoeff1(const coral::AttributeList* attrList) const; - short FirCoeff2(const coral::AttributeList* attrList) const; - short FirCoeff3(const coral::AttributeList* attrList) const; - short FirCoeff4(const coral::AttributeList* attrList) const; - short FirCoeff5(const coral::AttributeList* attrList) const; - unsigned short LutStrategy(const coral::AttributeList* attrList) const; - unsigned short LutOffset(const coral::AttributeList* attrList) const; - unsigned short LutNoiseCut(const coral::AttributeList* attrList) const; - unsigned short LutSlope(const coral::AttributeList* attrList) const; - - unsigned int DeadChannel(const coral::AttributeList* attrList) const; - unsigned int DisabledTower(const coral::AttributeList* attrList) const; - - float RxGain(const coral::AttributeList* attrList) const; - unsigned int RxStatus(const coral::AttributeList* attrList) const; - - - void LArHV(ToolHandle<ILArHVCorrTool>& LArHV); - void caloCells(const CaloCellContainer* cells); - void larDigits(const LArDigitContainer* lar); - void tileDigits(const TileDigitsContainer* tile); - void l1CaloLArTowerEnergy(const CaloCellContainer* cells, const TriggerTowerCollection* ttc); - Identifier ID(const double eta, const double phi, int layer) const; - Identifier emID(const double eta, const double phi) const; - Identifier hadID(const double eta, const double phi) const; + virtual unsigned int ModuleId(const coral::AttributeList* attrList) const override; + virtual unsigned int ErrorCode(const coral::AttributeList* attrList) const override; + virtual unsigned long long PprDacScanResultsTimeStamp(const coral::AttributeList* attrList) const override; + virtual unsigned long long PprPedestalRunResultsTimeStamp(const coral::AttributeList* attrList) const override; + virtual unsigned long long PprNoiseRunResultsTimeStamp(const coral::AttributeList* attrList) const override; + virtual unsigned long long PprTimingResultsTimeStamp(const coral::AttributeList* attrList) const override; + virtual unsigned long long PprSatBcidResultsTimeStamp(const coral::AttributeList* attrList) const override; + virtual unsigned long long PprFirFilterResultsTimeStamp(const coral::AttributeList* attrList) const override; + virtual unsigned long long PprLutValuesResultsTimeStamp(const coral::AttributeList* attrList) const override; + virtual double DacOffset(const coral::AttributeList* attrList) const override; + virtual double DacSlope(const coral::AttributeList* attrList) const override; + virtual double PedMean(const coral::AttributeList* attrList) const override; + virtual unsigned int PedValue(const coral::AttributeList* attrList) const override; + virtual unsigned int FullDelayData(const coral::AttributeList* attrList) const override; + virtual unsigned short int SyncDelayBcid(const coral::AttributeList* attrList) const override; + virtual unsigned short int InBcidNegedge(const coral::AttributeList* attrList) const override; + virtual unsigned short int ExtBcidThreshold(const coral::AttributeList* attrList) const override; + virtual unsigned short int SatBcidThreshLow(const coral::AttributeList* attrList) const override; + virtual unsigned short int SatBcidThreshHigh(const coral::AttributeList* attrList) const override; + virtual unsigned short int SatBcidLevel(const coral::AttributeList* attrList) const override; + virtual unsigned short int BcidEnergyRangeLow(const coral::AttributeList* attrList) const override; + virtual unsigned short int BcidEnergyRangeHigh(const coral::AttributeList* attrList) const override; + virtual unsigned short int FirStartBit(const coral::AttributeList* attrList) const override; + virtual short FirCoeff1(const coral::AttributeList* attrList) const override; + virtual short FirCoeff2(const coral::AttributeList* attrList) const override; + virtual short FirCoeff3(const coral::AttributeList* attrList) const override; + virtual short FirCoeff4(const coral::AttributeList* attrList) const override; + virtual short FirCoeff5(const coral::AttributeList* attrList) const override; + virtual unsigned short LutStrategy(const coral::AttributeList* attrList) const override; + virtual unsigned short LutOffset(const coral::AttributeList* attrList) const override; + virtual unsigned short LutNoiseCut(const coral::AttributeList* attrList) const override; + virtual unsigned short LutSlope(const coral::AttributeList* attrList) const override; + + virtual unsigned int DeadChannel(const coral::AttributeList* attrList) const override; + virtual unsigned int DisabledTower(const coral::AttributeList* attrList) const override; + + virtual float RxGain(const coral::AttributeList* attrList) const override; + virtual unsigned int RxStatus(const coral::AttributeList* attrList) const override; + + + virtual void LArHV(const SG::ReadCondHandleKey<ILArHVScaleCorr>& scaleCorrKey, + const SG::ReadCondHandleKey<LArOnOffIdMapping>& cablingKey) override; + virtual void caloCells(const CaloCellContainer* cells) override; + virtual void larDigits(const LArDigitContainer* lar) override; + virtual void tileDigits(const TileDigitsContainer* tile) override; + virtual void l1CaloLArTowerEnergy(const CaloCellContainer* cells, const TriggerTowerCollection* ttc) override; + Identifier ID(const double eta, const double phi, int layer) const; + virtual Identifier emID(const double eta, const double phi) const override; + virtual Identifier hadID(const double eta, const double phi) const override; protected: - int pos_neg_z(const double eta) const; - int region(const double eta) const; - int ieta(const double eta) const; - int iphi(const double eta, const double phi) const; -// Identifier emID(const double eta,const double phi) const; -// Identifier hadID(const double eta,const double phi) const; - - std::vector<L1CaloRxCoolChannelId> emReceivers(const TriggerTower* tt) const; - std::vector<L1CaloRxCoolChannelId> hadReceivers(const TriggerTower* tt) const; - - virtual std::vector<std::vector<const CaloCell*> > sortFCAL23Cells(const std::vector<const CaloCell*> &cells, const double eta) const; - virtual std::vector<std::vector<const CaloCell*> > sortFCAL23Cells(const std::vector<const CaloCell*> &cells, const std::vector<unsigned int>& rxId) const; - - std::vector<std::vector<const CaloCell*> > sortEMCrackCells(const std::vector<const CaloCell*> &cells) const; - - virtual float LArNonNominalHV(const std::vector<const CaloCell*> &cells) const; - virtual float LArNonNominalHV(const CaloCell* cell) const; - virtual float LArHVScale(const std::vector<const CaloCell*> &cells) const; - virtual float LArHVScale(const CaloCell* cell) const; - virtual float TileNonNominal(const std::vector<const CaloCell*> &cells) const; - virtual float TileNonNominal(const CaloCell* cell) const; - - float LArCaloQuality(const std::vector<const CaloCell*> &cells) const; - float TileCaloQuality(const std::vector<const CaloCell*> &cells) const; + virtual int pos_neg_z(const double eta) const override; + virtual int region(const double eta) const override; + virtual int ieta(const double eta) const override; + virtual int iphi(const double eta, const double phi) const override; +// virtual Identifier emID(const double eta,const double phi) const override; +// virtual Identifier hadID(const double eta,const double phi) const override; + + virtual std::vector<L1CaloRxCoolChannelId> emReceivers(const TriggerTower* tt) const override; + virtual std::vector<L1CaloRxCoolChannelId> hadReceivers(const TriggerTower* tt) const override; + + virtual std::vector<std::vector<const CaloCell*> > sortFCAL23Cells(const std::vector<const CaloCell*> &cells, const double eta) const override; + virtual std::vector<std::vector<const CaloCell*> > sortFCAL23Cells(const std::vector<const CaloCell*> &cells, const std::vector<unsigned int>& rxId) const override; + + virtual std::vector<std::vector<const CaloCell*> > sortEMCrackCells(const std::vector<const CaloCell*> &cells) const override; + + virtual float LArNonNominalHV(const std::vector<const CaloCell*> &cells) const override; + virtual float LArNonNominalHV(const CaloCell* cell, + const ILArHVScaleCorr* scaleCorr, + const ILArHVScaleCorr* onlineScaleCorr, + const LArOnOffIdMapping* cabling) const override; + virtual float LArHVScale(const std::vector<const CaloCell*> &cells) const override; + virtual float LArHVScale(const CaloCell* cell, + const ILArHVScaleCorr* scaleCorr, + const ILArHVScaleCorr* onlineScaleCorr, + const LArOnOffIdMapping* cabling) const override; + virtual float TileNonNominal(const std::vector<const CaloCell*> &cells) const override; + virtual float TileNonNominal(const CaloCell* cell) const override; + + virtual float LArCaloQuality(const std::vector<const CaloCell*> &cells) const override; + virtual float TileCaloQuality(const std::vector<const CaloCell*> &cells) const override; std::vector<int> SuperCellIdentifiers(const std::vector<const CaloCell*> &cells) const; @@ -265,8 +274,9 @@ private: // LAr HV bool m_isLArHVCorrToolSet; - ToolHandle<ILArHVCorrTool> m_LArHVCorrTool; double m_LArHVNonNomPara; + SG::ReadCondHandleKey<ILArHVScaleCorr> m_scaleCorrKey; + SG::ReadCondHandleKey<LArOnOffIdMapping> m_cablingKey; // Tile HV const TileHWID* m_tileHWID; @@ -275,6 +285,8 @@ private: // FCAL 23 Mapping ToolHandle<LVL1::IL1CaloFcal23Cells2RxMappingTool> m_rxMapTool; + SG::ReadCondHandleKey<ILArHVScaleCorr> m_onlineScaleCorrKey + { this, "OnlineLArHVScaleCorr", "LArHVScaleCorr", "" }; }; } // end of namespace #endif diff --git a/Trigger/TrigT1/TrigT1CaloCalibTools/src/L1CaloOfflineTriggerTowerTools.cxx b/Trigger/TrigT1/TrigT1CaloCalibTools/src/L1CaloOfflineTriggerTowerTools.cxx index 6555e1f9f6abb5c0c8e070540e64171a14eff432..12155165758c6a213c259f1e004446cce06b5a4c 100644 --- a/Trigger/TrigT1/TrigT1CaloCalibTools/src/L1CaloOfflineTriggerTowerTools.cxx +++ b/Trigger/TrigT1/TrigT1CaloCalibTools/src/L1CaloOfflineTriggerTowerTools.cxx @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ // *************************************************************************** // * Author: John Morris (john.morris@cern.ch) * @@ -9,6 +9,7 @@ // Like it says above, please chop up this code until it does what you want ! #include "TrigT1CaloCalibTools/L1CaloOfflineTriggerTowerTools.h" +#include "StoreGate/ReadCondHandle.h" namespace LVL1 { @@ -17,7 +18,9 @@ namespace LVL1 { m_l1CaloTTIdTools("LVL1::L1CaloTTIdTools/L1CaloTTIdTools"), m_cells2tt("LVL1::L1CaloCells2TriggerTowers/L1CaloCells2TriggerTowers"), m_larEnergy("LVL1::L1CaloLArTowerEnergy/L1CaloLArTowerEnergy"), - m_scidtool ("CaloSuperCellIDTool"), + m_scidtool ("CaloSuperCellIDTool"), + m_scaleCorrKey(""), + m_cablingKey(""), m_tileBadChanTool("TileBadChanTool"), m_rxMapTool("LVL1::L1CaloFcal23Cells2RxMappingTool/L1CaloFcal23Cells2RxMappingTool") { @@ -30,7 +33,6 @@ namespace LVL1 { m_isLArHVCorrToolSet = false; m_tileHWID = 0; - declareProperty("LArHVCorrTool",m_LArHVCorrTool); declareProperty("LArHVNonNomPara",m_LArHVNonNomPara = 1.003); declareProperty("TileBadChanTool", m_tileBadChanTool); declareProperty("RxMappingTool",m_rxMapTool); @@ -721,33 +723,52 @@ namespace LVL1 { // LAr Member Functions float L1CaloOfflineTriggerTowerTools::LArNonNominalHV(const std::vector<const CaloCell*> &cells) const{ + const EventContext& ctx = Gaudi::Hive::currentContext(); + SG::ReadCondHandle<LArOnOffIdMapping> cabling (m_cablingKey, ctx); + SG::ReadCondHandle<ILArHVScaleCorr> scaleCorr (m_scaleCorrKey, ctx); + SG::ReadCondHandle<ILArHVScaleCorr> onlineScaleCorr (m_onlineScaleCorrKey, ctx); float nonNominal(0.0); for(Itr_vCaloCells i=cells.begin();i!=cells.end();++i){ - nonNominal += this->LArNonNominalHV( (*i) ); + nonNominal += this->LArNonNominalHV( (*i), scaleCorr.cptr(), onlineScaleCorr.cptr(), cabling.cptr() ); } return nonNominal; } - float L1CaloOfflineTriggerTowerTools::LArNonNominalHV(const CaloCell* cell) const{ + float L1CaloOfflineTriggerTowerTools::LArNonNominalHV(const CaloCell* cell, + const ILArHVScaleCorr* scaleCorr, + const ILArHVScaleCorr* onlineScaleCorr, + const LArOnOffIdMapping* cabling) const{ float nonNominal(0.0); - if(m_LArHVCorrTool->Scale( cell->ID() ) > m_LArHVNonNomPara){ + HWIdentifier hwid=cabling->createSignalChannelID(cell->ID()); + float corr = scaleCorr->HVScaleCorr( hwid ) * onlineScaleCorr->HVScaleCorr( hwid ); + if(corr > m_LArHVNonNomPara){ nonNominal = 1.0; } return nonNominal; } float L1CaloOfflineTriggerTowerTools::LArHVScale(const std::vector<const CaloCell*> &cells) const{ + const EventContext& ctx = Gaudi::Hive::currentContext(); + SG::ReadCondHandle<LArOnOffIdMapping> cabling (m_cablingKey, ctx); + SG::ReadCondHandle<ILArHVScaleCorr> scaleCorr (m_scaleCorrKey, ctx); + SG::ReadCondHandle<ILArHVScaleCorr> onlineScaleCorr (m_onlineScaleCorrKey, ctx); + float scale(0.0),count(0.0); for(Itr_vCaloCells i=cells.begin();i!=cells.end();++i){ - scale += this->LArHVScale( (*i) ); + scale += this->LArHVScale( (*i), scaleCorr.cptr(), onlineScaleCorr.cptr(), cabling.cptr() ); count++; } if(count < 1.0){return 0.0;} return scale / count; } - float L1CaloOfflineTriggerTowerTools::LArHVScale(const CaloCell* cell) const{ - return m_LArHVCorrTool->Scale( cell->ID() ); + float L1CaloOfflineTriggerTowerTools::LArHVScale(const CaloCell* cell, + const ILArHVScaleCorr* scaleCorr, + const ILArHVScaleCorr* onlineScaleCorr, + const LArOnOffIdMapping* cabling) const + { + HWIdentifier hwid=cabling->createSignalChannelID(cell->ID()); + return scaleCorr->HVScaleCorr( hwid ) * onlineScaleCorr->HVScaleCorr( hwid ); } @@ -890,6 +911,7 @@ namespace LVL1 { std::vector<float> L1CaloOfflineTriggerTowerTools::emNCellsNonNominalByLayer(const TriggerTower* tt) const{ std::vector<float> nNonNomHV; if(m_isLArHVCorrToolSet == false){return nNonNomHV;} + Identifier Id = this->emID(tt->eta(),tt->phi()); std::vector<std::vector<const CaloCell*> > cells = m_cells2tt->caloCellsByLayer(Id); for(Itr_vvCaloCells i=cells.begin();i!=cells.end();++i){ @@ -945,7 +967,6 @@ namespace LVL1 { std::vector<float> output; if(m_isLArHVCorrToolSet == false){return output;} - std::vector<L1CaloRxCoolChannelId> rx = this->emReceivers(tt); Identifier Id = this->emID(tt->eta(),tt->phi()); std::vector<const CaloCell*> cells = m_cells2tt->caloCells(Id); @@ -1042,9 +1063,7 @@ namespace LVL1 { Identifier Id = this->hadID(tt->eta(),tt->phi()); bool isTile = m_lvl1Helper->is_tile(Id); std::vector<std::vector<const CaloCell*> > cells = m_cells2tt->caloCellsByLayer(Id); - if(isTile == false && m_isLArHVCorrToolSet == false){return nNonNomHV;} - if(isTile == false && m_isLArHVCorrToolSet == true){ for(Itr_vvCaloCells i=cells.begin();i!=cells.end();++i){ nNonNomHV.push_back( this->LArNonNominalHV( (*i) ) ); @@ -1066,7 +1085,6 @@ namespace LVL1 { Identifier Id = this->hadID(tt->eta(),tt->phi()); bool isTile = m_lvl1Helper->is_tile(Id); if(isTile == false && m_isLArHVCorrToolSet == false){return nNonNomHV;} - std::vector<unsigned int> rx = this->hadRxId(tt); std::vector<float> v1; std::vector<float> v2; @@ -1109,7 +1127,6 @@ namespace LVL1 { if(isTile == true){return NonNomHV;} if(m_isLArHVCorrToolSet == false){return NonNomHV;} - std::vector<std::vector<const CaloCell*> > cells = m_cells2tt->caloCellsByLayer(Id); for(Itr_vvCaloCells i=cells.begin();i!=cells.end();++i){ @@ -1122,7 +1139,6 @@ namespace LVL1 { std::vector<float> output; if(m_isLArHVCorrToolSet == false){return output;} - std::vector<unsigned int> rx = this->hadRxId(tt); Identifier Id = this->hadID(tt->eta(),tt->phi()); @@ -1151,7 +1167,6 @@ namespace LVL1 { Identifier Id = this->hadID(tt->eta(),tt->phi()); bool isTile = m_lvl1Helper->is_tile(Id); if(isTile == true || m_isLArHVCorrToolSet == false){return output;} - std::vector<unsigned int> rx = this->hadRxId(tt); std::vector<float> v1; std::vector<float> v2; @@ -1691,12 +1706,7 @@ namespace LVL1 { StatusCode L1CaloOfflineTriggerTowerTools::initialize(){ - StatusCode sc; - - - - sc = detStore()->retrieve(m_caloMgr); - if(sc.isFailure()){ATH_MSG_ERROR("Unable to retrieve CaloIdManager from DetectorStore");return sc;} + ATH_CHECK( detStore()->retrieve(m_caloMgr) ); m_ttOnlineIdHelper = m_caloMgr->getTTOnlineID(); if(!m_ttOnlineIdHelper){ATH_MSG_ERROR("Could not access TTOnlineId helper");return StatusCode::FAILURE;} @@ -1704,57 +1714,42 @@ namespace LVL1 { m_lvl1Helper = m_caloMgr->getLVL1_ID(); if(!m_lvl1Helper){ATH_MSG_ERROR("Could not access CaloLVL1_ID helper");return StatusCode::FAILURE;} - sc = detStore()->retrieve(m_tileHWID); - if(sc.isFailure()){ATH_MSG_ERROR("Unable to retrieve TileHWID helper from DetectorStore");return sc;} - - sc = m_tileBadChanTool.retrieve(); - if(sc.isFailure()){ATH_MSG_ERROR("Could not access tileBadChanTool");return sc;} - - sc = m_rxMapTool.retrieve(); - if(sc.isFailure()){ATH_MSG_ERROR("Cannot get L1CaloFcal23Cells2RxMappingTool !");return sc;} - - sc = detStore()->retrieve(m_larOnlineID,"LArOnlineID"); - if(sc.isFailure()){ATH_MSG_ERROR("Could not access LAr Online ID");return sc;} - - sc = m_l1CaloTTIdTools.retrieve(); - if(sc.isFailure()){ATH_MSG_ERROR("Cannot get L1CaloTTIdTools !");return sc;} - - sc = m_cells2tt.retrieve(); - if(sc.isFailure()){ATH_MSG_ERROR("Cannot get L1CaloCells2TriggerTowers !");return sc;} + ATH_CHECK( detStore()->retrieve(m_tileHWID) ); + ATH_CHECK( m_tileBadChanTool.retrieve() ); + ATH_CHECK( m_rxMapTool.retrieve() ); + ATH_CHECK( detStore()->retrieve(m_larOnlineID,"LArOnlineID") ); + ATH_CHECK( m_l1CaloTTIdTools.retrieve() ); + ATH_CHECK( m_cells2tt.retrieve() ); + ATH_CHECK( m_larEnergy.retrieve() ); - sc = m_larEnergy.retrieve(); - if(sc.isFailure()){ATH_MSG_ERROR("Cannot get L1CaloLArTowerEnergy !");return sc;} + ATH_CHECK( detStore()->retrieve (m_caloMgr, "CaloIdManager") ); + ATH_CHECK( m_scidtool.retrieve() ); - CHECK( detStore()->retrieve (m_caloMgr, "CaloIdManager") ); - CHECK( m_scidtool.retrieve() ); - -// sc = m_ttSvc.retrieve(); -// if(sc.isFailure()){ATH_MSG_ERROR("Cannot get CaloTriggerTowerService !");return sc;} - //Retrieve cabling & tt services ISvcLocator* svcLoc = Gaudi::svcLocator( ); - IToolSvc* toolSvc; + IToolSvc* toolSvc = nullptr; - sc = svcLoc->service( "ToolSvc",toolSvc ); - if(sc.isSuccess()) { - sc = toolSvc->retrieveTool("CaloTriggerTowerService",m_ttSvc); - if(sc.isFailure()){ATH_MSG_ERROR("Could not retrieve CaloTriggerTowerService Tool");return sc;} - } + ATH_CHECK( svcLoc->service( "ToolSvc",toolSvc ) ); + ATH_CHECK( toolSvc->retrieveTool("CaloTriggerTowerService",m_ttSvc) ); // DB Access - sc = service("L1CaloCondSvc", m_l1CondSvc); - if(sc.isFailure()){ATH_MSG_ERROR("Could not retrieve L1CaloCondSvc");return sc;} + ATH_CHECK( service("L1CaloCondSvc", m_l1CondSvc) ); + + ATH_CHECK( m_onlineScaleCorrKey.initialize() ); ATH_MSG_INFO("L1Calo L1CaloOfflineTriggerTowerTools initialize() success!"); - return sc; + return StatusCode::SUCCESS; } StatusCode L1CaloOfflineTriggerTowerTools::finalize(){ return StatusCode::SUCCESS; } - void L1CaloOfflineTriggerTowerTools::LArHV(ToolHandle<ILArHVCorrTool>& LArHV){ - m_LArHVCorrTool = LArHV; + void L1CaloOfflineTriggerTowerTools::LArHV(const SG::ReadCondHandleKey<ILArHVScaleCorr>& scaleCorrKey, + const SG::ReadCondHandleKey<LArOnOffIdMapping>& cablingKey) + { + m_scaleCorrKey = scaleCorrKey; + m_cablingKey = cablingKey; m_isLArHVCorrToolSet = true; } diff --git a/Trigger/TrigT1/TrigT1CaloCalibUtils/TrigT1CaloCalibUtils/L1CaloHVCorrectionsForDB.h b/Trigger/TrigT1/TrigT1CaloCalibUtils/TrigT1CaloCalibUtils/L1CaloHVCorrectionsForDB.h index 1b47adbdbd365f1f2a40a6a03cc1834f9ed6982d..6932fb82aefca9b6d44ea7bf3acf8e57b9b0300b 100644 --- a/Trigger/TrigT1/TrigT1CaloCalibUtils/TrigT1CaloCalibUtils/L1CaloHVCorrectionsForDB.h +++ b/Trigger/TrigT1/TrigT1CaloCalibUtils/TrigT1CaloCalibUtils/L1CaloHVCorrectionsForDB.h @@ -1,11 +1,14 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ #ifndef L1CALOHVCORRECTIONSFORDB_H #define L1CALOHVCORRECTIONSFORDB_H #include "AthenaBaseComps/AthAlgorithm.h" +#include "LArElecCalib/ILArHVScaleCorr.h" +#include "LArCabling/LArOnOffIdMapping.h" +#include "StoreGate/ReadCondHandleKey.h" #include "GaudiKernel/ToolHandle.h" #include <string> @@ -14,7 +17,6 @@ // forward declrations class L1CaloRxLayersContainer; class L1CaloHVCorrectionsContainer; -class ILArHVCorrTool; namespace LVL1{ class IL1TriggerTowerTool; @@ -45,7 +47,10 @@ class L1CaloHVCorrectionsForDB : public AthAlgorithm ToolHandle<LVL1::IL1TriggerTowerTool> m_ttTool; ToolHandle<LVL1::IL1CaloCells2TriggerTowers> m_cells2tt; ToolHandle<LVL1::IL1CaloOfflineTriggerTowerTools> m_jmTools; - ToolHandle<ILArHVCorrTool> m_LArHVCorrTool; + SG::ReadCondHandleKey<ILArHVScaleCorr> m_scaleCorrKey + { this, "LArHVScaleCorr", "LArHVScaleCorrRecomputed", "" }; + SG::ReadCondHandleKey<LArOnOffIdMapping> m_cablingKey + { this, "CablingKey", "LArOnOffIdMap", "SG Key of LArOnOffIdMapping object" }; boost::scoped_ptr<L1CaloRxLayersContainer> m_rxLayersContainer; boost::scoped_ptr<L1CaloHVCorrectionsContainer> m_hvCorrectionsContainer; diff --git a/Trigger/TrigT1/TrigT1CaloCalibUtils/share/LArL1Calo_DumpHVCorr.py b/Trigger/TrigT1/TrigT1CaloCalibUtils/share/LArL1Calo_DumpHVCorr.py index 23d575a9bdd1c5aa51853481e9f906fee629fb6b..3b70b41ef5d73a73396e110d6f98d3c9c429f377 100644 --- a/Trigger/TrigT1/TrigT1CaloCalibUtils/share/LArL1Calo_DumpHVCorr.py +++ b/Trigger/TrigT1/TrigT1CaloCalibUtils/share/LArL1Calo_DumpHVCorr.py @@ -125,19 +125,14 @@ include( "LArCondAthenaPool/LArCondAthenaPool_joboptions.py" ) from LArConditionsCommon import LArHVDB #Sets HV Calbling and DCS Database folders #conddb.addOverride("/LAR/IdentifierOfl/HVLineToElectrodeMap","LARIdentifierOflHVLineToElectrodeMap-UPD3-00") -from LArCondUtils.LArCondUtilsConf import LArHVToolDB -theLArHVToolDB = LArHVToolDB("LArHVToolDB") -ToolSvc += theLArHVToolDB -from LArRecUtils.LArRecUtilsConf import LArHVCorrTool -theLArHVCorrTool = LArHVCorrTool("LArHVCorrTool") -theLArHVCorrTool.keyOutput = keyOutput -theLArHVCorrTool.HVTool = theLArHVToolDB -ToolSvc += theLArHVCorrTool +from LArConditionsCommon import LArHVDB -#from LArCalibUtils.LArCalibUtilsConf import LArHVCorrMaker -#theLArHVCorrMaker = LArHVCorrMaker("LArHVCorrMaker") -#topSequence += theLArHVCorrMaker +from LArCalibUtils.LArCalibUtilsConf import LArHVCorrMaker +theLArHVCorrMaker = LArHVCorrMaker("LArHVCorrMaker") +theLArHVCorrMaker.keyOutput = keyOutput +theLArHVCorrMaker.folderName = LArHVScaleCorrFolder +topSequence += theLArHVCorrMaker from TrigT1CaloCalibUtils.TrigT1CaloCalibUtilsConf import L1CaloHVDummyContainers theL1CaloHVDummyContainers = L1CaloHVDummyContainers("L1CaloHVDummyContainers") @@ -161,10 +156,6 @@ ToolSvc += LVL1__L1CaloOfflineTriggerTowerTools("L1CaloOfflineTriggerTowerTools" # configure actual db maker algorithm from TrigT1CaloCalibUtils.TrigT1CaloCalibUtilsConf import L1CaloHVCorrectionsForDB topSequence += L1CaloHVCorrectionsForDB() -#from LArRecUtils.LArHVCorrToolDefault import LArHVCorrToolDefault -#theLArHVCorrTool = LArHVCorrToolDefault() -#ToolSvc += theLArHVCorrTool -topSequence.L1CaloHVCorrectionsForDB.LArHVCorrTool = theLArHVCorrTool # configure writing of calib database from RegistrationServices.OutputConditionsAlg import OutputConditionsAlg diff --git a/Trigger/TrigT1/TrigT1CaloCalibUtils/src/L1CaloHVCorrectionsForDB.cxx b/Trigger/TrigT1/TrigT1CaloCalibUtils/src/L1CaloHVCorrectionsForDB.cxx index 0f211d0d6fdc9408fffa3fdb6e8b576814feadb0..a145d444ac82e138a41c609c32d264ba03359116 100644 --- a/Trigger/TrigT1/TrigT1CaloCalibUtils/src/L1CaloHVCorrectionsForDB.cxx +++ b/Trigger/TrigT1/TrigT1CaloCalibUtils/src/L1CaloHVCorrectionsForDB.cxx @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ #include "TrigT1CaloCalibUtils/L1CaloHVCorrectionsForDB.h" @@ -16,7 +16,6 @@ #include "TrigT1CaloToolInterfaces/IL1TriggerTowerTool.h" #include "TrigT1CaloEvent/TriggerTowerCollection.h" #include "CaloEvent/CaloCellContainer.h" -#include "LArElecCalib/ILArHVCorrTool.h" L1CaloHVCorrectionsForDB::L1CaloHVCorrectionsForDB(const std::string& name, ISvcLocator *pSvcLocator) : AthAlgorithm(name, pSvcLocator), @@ -25,14 +24,12 @@ L1CaloHVCorrectionsForDB::L1CaloHVCorrectionsForDB(const std::string& name, ISvc m_ttTool("LVL1::L1TriggerTowerTool/L1TriggerTowerTool"), m_cells2tt("LVL1::L1CaloCells2TriggerTowers/L1CaloCells2TriggerTowers"), m_jmTools("LVL1::L1CaloOfflineTriggerTowerTools/L1CaloOfflineTriggerTowerTools"), - m_LArHVCorrTool("LArHVCorrTool"), m_rxLayersContainer(0), m_hvCorrectionsContainer(0), m_firstEvent(true) { declareProperty("TriggerTowerCollectionName", m_triggerTowerCollectionName); declareProperty("CaloCellContainerName", m_caloCellContainerName); - declareProperty("LArHVCorrTool",m_LArHVCorrTool); } L1CaloHVCorrectionsForDB::~L1CaloHVCorrectionsForDB() @@ -41,32 +38,13 @@ L1CaloHVCorrectionsForDB::~L1CaloHVCorrectionsForDB() StatusCode L1CaloHVCorrectionsForDB::initialize() { - StatusCode sc; + ATH_CHECK( m_ttTool.retrieve() ); + ATH_CHECK( m_cells2tt.retrieve() ); + ATH_CHECK( m_jmTools.retrieve() ); - sc = m_ttTool.retrieve(); - if(sc.isFailure()){ - msg(MSG::ERROR) << "Cannot retrieve L1TriggerTowerTool" << endmsg; - return sc; - } - - sc = m_cells2tt.retrieve(); - if(sc.isFailure()){ - msg(MSG::ERROR) << "Cannot retrieve L1CaloCells2TriggerTowers" << endmsg; - return sc; - } - - sc = m_jmTools.retrieve(); - if(sc.isFailure()){ - msg(MSG::ERROR) << "Cannot retrieve L1CaloOfflineTriggerTowerTools" << endmsg; - return sc; - } - - sc = m_LArHVCorrTool.retrieve(); - if(sc.isFailure()){ - msg(MSG::ERROR) << "Cannot retrieve LArHVCorrTool" << endmsg; - return sc; - } - m_jmTools->LArHV(m_LArHVCorrTool); + ATH_CHECK( m_scaleCorrKey.initialize() ); + ATH_CHECK( m_cablingKey.initialize() ); + m_jmTools->LArHV(m_scaleCorrKey, m_cablingKey); m_rxLayersContainer.reset(new L1CaloRxLayersContainer()); m_hvCorrectionsContainer.reset(new L1CaloHVCorrectionsContainer());