From b966c7f92b9e94dfda9cbdca8bea0e389f815cea Mon Sep 17 00:00:00 2001
From: Walter Lampl <Walter.Lampl@cern.ch>
Date: Mon, 8 Oct 2018 16:41:17 +0200
Subject: [PATCH] fist step towards removing the offline-id accessors of
 LArElecCalib-classes. This commit removes the accssor for ILArAutoCorr,
 ILArDCA2UA, ILArMinBias, ILArMinBiasAverage, ILArMphysOverMcal, ILArNoise,
 ILArOFC, ILArPedestal, ILArRamp, ILArShape,ILArfSampl, ILAruA2MeV and adjusts
 teh following clients: CaloMBAverageTool, CaloNoiseTool
 LArCellBuilderFromLArHitTool and LArPileupTool. AFAIK, ony the LArPileupTool
 is actually used in production today.

Former-commit-id: 5b3d932677f7fdd89245d2cba14e4674e3e8d050
---
 .../CaloTools/CaloTools/CaloMBAverageTool.h   |  6 ++++
 .../CaloTools/src/CaloMBAverageTool.cxx       | 14 +++++---
 Calorimeter/CaloTools/src/CaloNoiseTool.cxx   | 19 ++++++-----
 .../src/LArCellBuilderFromLArHitTool.cxx      | 12 ++++---
 .../src/LArCellBuilderFromLArHitTool.h        |  6 ++--
 .../LArDigitization/LArPileUpTool.h           |  2 +-
 .../LArDigitization/src/LArPileUpTool.cxx     | 34 +++++++++----------
 .../LArElecCalib/LArElecCalib/ILArAutoCorr.h  |  4 ---
 .../LArElecCalib/LArElecCalib/ILArDAC2uA.h    |  5 +--
 .../LArElecCalib/LArElecCalib/ILArMinBias.h   |  7 ----
 .../LArElecCalib/ILArMinBiasAverage.h         |  4 ---
 .../LArElecCalib/ILArMphysOverMcal.h          |  3 --
 .../LArElecCalib/LArElecCalib/ILArNoise.h     |  3 --
 .../LArElecCalib/LArElecCalib/ILArOFC.h       | 16 ---------
 .../LArElecCalib/LArElecCalib/ILArPedestal.h  |  8 -----
 .../LArElecCalib/LArElecCalib/ILArRamp.h      |  2 --
 .../LArElecCalib/LArElecCalib/ILArShape.h     | 12 -------
 .../LArElecCalib/LArElecCalib/ILArfSampl.h    |  3 --
 .../LArElecCalib/LArElecCalib/ILAruA2MeV.h    |  3 --
 .../LArRawConditions/LArDAC2uASym.h           |  2 --
 .../LArRawConditions/LArMinBiasSym.h          |  2 --
 .../LArRawConditions/LArNoiseSym.h            |  2 --
 .../LArRawConditions/LArRampSym.h             |  4 +--
 .../LArRawConditions/LArfSamplSym.h           |  3 +-
 .../LArRawConditions/LAruA2MeVSym.h           |  4 +--
 .../LArRawConditions/src/LArDAC2uASym.cxx     |  5 +--
 .../LArRawConditions/src/LArMinBiasSym.cxx    |  5 +--
 .../LArRawConditions/src/LArNoiseSym.cxx      |  4 ---
 .../LArRawConditions/src/LArRampSym.cxx       |  4 ---
 .../LArRawConditions/src/LArfSamplSym.cxx     |  6 +---
 .../LArRawConditions/src/LAruA2MeVSym.cxx     |  5 ---
 31 files changed, 62 insertions(+), 147 deletions(-)

diff --git a/Calorimeter/CaloTools/CaloTools/CaloMBAverageTool.h b/Calorimeter/CaloTools/CaloTools/CaloMBAverageTool.h
index 3766d25ea9a..9dc8a1552e8 100644
--- a/Calorimeter/CaloTools/CaloTools/CaloMBAverageTool.h
+++ b/Calorimeter/CaloTools/CaloTools/CaloMBAverageTool.h
@@ -28,7 +28,9 @@ class CaloDetDescrElement;
 #include "StoreGate/DataHandle.h"
 #include "CaloInterface/ICaloMBAverageTool.h"
 #include "AthenaKernel/IOVSvcDefs.h"
+#include "GaudiKernel/ToolHandle.h"
 
+class LArCablingService;
 
 class CaloMBAverageTool
   : public extends<AthAlgTool, ICaloMBAverageTool>
@@ -49,6 +51,7 @@ private:
   int m_deltaBunch;
   std::string m_keyShape, m_keyfSampl, m_keyMinBiasAverage;
 
+  ToolHandle<LArCablingService> m_cabling;
   unsigned int m_ncell;
   std::vector<float> m_shift;
 
@@ -57,6 +60,9 @@ private:
 
   virtual StatusCode LoadCalibration(IOVSVC_CALLBACK_ARGS) override;
 
+
+
+
 public:    
   
   CaloMBAverageTool(const std::string& type, 
diff --git a/Calorimeter/CaloTools/src/CaloMBAverageTool.cxx b/Calorimeter/CaloTools/src/CaloMBAverageTool.cxx
index 72dfde5030e..bfc8e70b98f 100644
--- a/Calorimeter/CaloTools/src/CaloMBAverageTool.cxx
+++ b/Calorimeter/CaloTools/src/CaloMBAverageTool.cxx
@@ -7,7 +7,7 @@
 #include "CaloEvent/CaloCell.h"
 #include "CaloIdentifier/CaloCell_ID.h"
 #include "CaloIdentifier/CaloIdManager.h"
-
+#include "LArCabling/LArCablingService.h"
 
 CaloMBAverageTool::CaloMBAverageTool (const std::string& type, 
 				  const std::string& name, 
@@ -16,6 +16,7 @@ CaloMBAverageTool::CaloMBAverageTool (const std::string& type,
     m_OFCTool("LArOFCTool"),
     m_calo_id(nullptr),
     m_Nminbias(-1),m_deltaBunch(1),m_keyShape("LArShape"), m_keyfSampl("LArfSampl"), m_keyMinBiasAverage("LArMinBiasAverage"),
+    m_cabling("LArCablingService"),
     m_ncell(0)
 { 
   declareInterface<ICaloMBAverageTool>(this);
@@ -76,6 +77,9 @@ StatusCode CaloMBAverageTool::initialize() {
                                 &ICaloMBAverageTool::LoadCalibration,dynamic_cast<ICaloMBAverageTool*>(this),true) );
   ATH_MSG_INFO( "Registered callbacks for LArOFCTool -> CaloMBAverageTool" );
 
+
+  ATH_CHECK(m_cabling.retrieve());
+
   return StatusCode::SUCCESS;
 }
 
@@ -91,22 +95,22 @@ StatusCode CaloMBAverageTool::LoadCalibration(IOVSVC_CALLBACK_ARGS_K(keys))
   for (unsigned int icell=0;icell<m_ncell;icell++) {
     IdentifierHash cellHash = icell;
     Identifier id = m_calo_id->cell_id(cellHash);
-
+    HWIdentifier hwid=m_cabling->createSignalChannelID(id);
     if (m_calo_id->is_em(cellHash) || m_calo_id->is_hec(cellHash) || m_calo_id->is_fcal(cellHash)) {
 
       //  get MinBiasAverage
-      float MinBiasAverage = m_dd_minbiasAverage->minBiasAverage(id);
+      float MinBiasAverage = m_dd_minbiasAverage->minBiasAverage(hwid);
 
       if (MinBiasAverage<0.) MinBiasAverage=0.;
 
       //  get fSampl
-      const float fSampl = m_dd_fsampl->FSAMPL(id);
+      const float fSampl = m_dd_fsampl->FSAMPL(hwid);
       const float inv_fSampl = 1. / fSampl;
 
       for (int igain=0;igain<3;igain++) {
  
          //  get Shape
-         ILArShape::ShapeRef_t Shape = m_dd_shape->Shape(id,igain);
+         ILArShape::ShapeRef_t Shape = m_dd_shape->Shape(hwid,igain);
 
          //  get OFC
          ILArOFCTool::OFCRef_t OFC = m_OFCTool->OFC_a(id, igain, m_Nminbias) ;
diff --git a/Calorimeter/CaloTools/src/CaloNoiseTool.cxx b/Calorimeter/CaloTools/src/CaloNoiseTool.cxx
index 908b6cdf1b5..0048aaecc13 100644
--- a/Calorimeter/CaloTools/src/CaloNoiseTool.cxx
+++ b/Calorimeter/CaloTools/src/CaloNoiseTool.cxx
@@ -1098,6 +1098,9 @@ CaloNoiseTool::retrieveCellDatabase(const IdentifierHash & idCaloHash,
 
   //:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
   //ADC2MEV
+
+  HWIdentifier hwid=m_cablingService->createSignalChannelID(id);
+
   if(m_retrieve[iADC2MEV])
   {
     if(m_WorkMode==0) 
@@ -1118,10 +1121,10 @@ CaloNoiseTool::retrieveCellDatabase(const IdentifierHash & idCaloHash,
   if(m_retrieve[iSIGMANOISE])
   {
     if(m_isMC)
-      m_SigmaNoise = m_dd_noise->noise(id,igain);
+      m_SigmaNoise = m_dd_noise->noise(hwid,igain);
     else          
     {
-      m_RMSpedestal = m_dd_pedestal->pedestalRMS(id,igain);
+      m_RMSpedestal = m_dd_pedestal->pedestalRMS(hwid,igain);
       if(m_RMSpedestal>(1.0+LArElecCalib::ERRORCODE)) 
 	m_SigmaNoise = m_RMSpedestal;
       else
@@ -1140,7 +1143,7 @@ CaloNoiseTool::retrieveCellDatabase(const IdentifierHash & idCaloHash,
   //AUTOCORR
   if(m_retrieve[iAUTOCORR])
   {
-    m_AutoCorr = m_dd_acorr->autoCorr(id,igain);
+    m_AutoCorr = m_dd_acorr->autoCorr(hwid,igain);
     ////////// 
     if(PRINT) {
       std::cout<<"AutoCorr= ";
@@ -1154,8 +1157,8 @@ CaloNoiseTool::retrieveCellDatabase(const IdentifierHash & idCaloHash,
   //OFC
   if(m_retrieve[iOFC])
   {
-    if(m_WorkMode==0) m_OFC = m_detDHOFC->OFC_a(id, igain, 0) ;
-    else              m_OFC = m_OFCTool->OFC_a(id, igain) ;
+    if(m_WorkMode==0) m_OFC = m_detDHOFC->OFC_a(hwid, igain, 0) ;
+    else              m_OFC = m_OFCTool->OFC_a(hwid, igain) ;
     /////////
     if(PRINT) {
       std::cout<<"OFC= ";
@@ -1169,7 +1172,7 @@ CaloNoiseTool::retrieveCellDatabase(const IdentifierHash & idCaloHash,
   //SHAPE
   if(m_retrieve[iSHAPE])
   {
-    m_Shape = m_dd_shape->Shape(id,0);
+    m_Shape = m_dd_shape->Shape(hwid,0);
     //////////
     if(PRINT) {
       std::cout<<"Shape= ";
@@ -1183,7 +1186,7 @@ CaloNoiseTool::retrieveCellDatabase(const IdentifierHash & idCaloHash,
   //MinimumBias RMS 
   if(m_retrieve[iMINBIASRMS])
   {
-    m_MinBiasRMS = m_dd_minbias->minBiasRMS(id);
+    m_MinBiasRMS = m_dd_minbias->minBiasRMS(hwid);
     if(PRINT) std::cout<<"MinBiasRMS="<<m_MinBiasRMS<<std::endl;
   }
 
@@ -1191,7 +1194,7 @@ CaloNoiseTool::retrieveCellDatabase(const IdentifierHash & idCaloHash,
   //SAMPLING FRACTION
   if(m_retrieve[iFSAMPL])
   {
-    m_fSampl = m_dd_fsampl->FSAMPL(id);
+    m_fSampl = m_dd_fsampl->FSAMPL(hwid);
     if(PRINT) std::cout<<"fSampl="<<m_fSampl<<std::endl;
   }
 
diff --git a/LArCalorimeter/LArCellRec/src/LArCellBuilderFromLArHitTool.cxx b/LArCalorimeter/LArCellRec/src/LArCellBuilderFromLArHitTool.cxx
index 2eec6eca660..0308a1034d6 100644
--- a/LArCalorimeter/LArCellRec/src/LArCellBuilderFromLArHitTool.cxx
+++ b/LArCalorimeter/LArCellRec/src/LArCellBuilderFromLArHitTool.cxx
@@ -371,6 +371,9 @@ StatusCode LArCellBuilderFromLArHitTool::process( CaloCellContainer * theCellCon
 {
   const EventContext& ctx = Gaudi::Hive::currentContext();
 
+  SG::ReadCondHandle<LArOnOffIdMapping> cablingHdl{m_cablingKey,ctx};
+  const LArOnOffIdMapping* cabling(*cablingHdl);
+
   ATH_MSG_DEBUG ("Executing LArCellBuilderFromLArHitTool");
 
   unsigned int nCells0 = theCellContainer->size();
@@ -398,8 +401,9 @@ StatusCode LArCellBuilderFromLArHitTool::process( CaloCellContainer * theCellCon
 	if (e < m_eHitThreshold) continue;
       }
       
-      Identifier id  = hit->cellID();
-
+      const Identifier id  = hit->cellID();
+      const HWIdentifier hwid=cabling->createSignalChannelID(id);
+      
       //FIXME
       //log << MSG::DEBUG << " Hit : " << m_atlas_id->show_to_string(id)
       //	  << " energy " << e << endmsg ;
@@ -432,7 +436,7 @@ StatusCode LArCellBuilderFromLArHitTool::process( CaloCellContainer * theCellCon
       else
 	{	
 	  // directly make the cells and add them to theCellContainer
-	  e/= m_dd_fSampl->FSAMPL(id);	  
+	  e/= m_dd_fSampl->FSAMPL(hwid);	  
 
 	  //FIXME
 	  //  log << MSG::DEBUG << " .. new e " << e << endmsg ;
@@ -484,7 +488,7 @@ StatusCode LArCellBuilderFromLArHitTool::process( CaloCellContainer * theCellCon
       double e = hit ? hit->energy() : 0;
 
       // scale     
-      e/= m_dd_fSampl->FSAMPL( info.caloDDE()->identify() ); 
+      e/= m_dd_fSampl->FSAMPL(cabling->createSignalChannelID(info.caloDDE()->identify()) ); 
 
       // choose the gain   
 
diff --git a/LArCalorimeter/LArCellRec/src/LArCellBuilderFromLArHitTool.h b/LArCalorimeter/LArCellRec/src/LArCellBuilderFromLArHitTool.h
index ce7f868b627..3f2b4d7ebcd 100644
--- a/LArCalorimeter/LArCellRec/src/LArCellBuilderFromLArHitTool.h
+++ b/LArCalorimeter/LArCellRec/src/LArCellBuilderFromLArHitTool.h
@@ -56,7 +56,7 @@ process(CaloCellContainer * theCellContainer)
 #include "StoreGate/DataHandle.h"
 #include "StoreGate/ReadHandleKey.h"
 #include "StoreGate/ReadHandleKeyArray.h"
-
+#include "StoreGate/ReadCondHandleKey.h"
 #include "Identifier/IdentifierHash.h"
 #include "CaloIdentifier/CaloCell_ID.h"
 #include "LArHitInfo.h"
@@ -68,6 +68,7 @@ process(CaloCellContainer * theCellContainer)
 
 #include <CLHEP/Random/Randomize.h>
 
+#include "LArCabling/LArOnOffIdMapping.h"
 
 class CaloDetDescrManager; 
 class Identifier; 
@@ -138,11 +139,10 @@ private:
   const DataHandle<ILArfSampl> m_dd_fSampl;
 
 
-
 //
   std::string     m_LArRegion;         //Region to build  
   SG::ReadHandleKeyArray<LArHitContainer> m_HitContainerKeys;      //Hit containers
-  
+  SG::ReadCondHandleKey<LArOnOffIdMapping> m_cablingKey { this, "CablingKey","LArOnOffIdMap","SG Key of LArOnOffIdMapping object"};
 //THRESHOLDS on E
   bool m_applyHitEnergyThreshold ;
   
diff --git a/LArCalorimeter/LArDigitization/LArDigitization/LArPileUpTool.h b/LArCalorimeter/LArDigitization/LArDigitization/LArPileUpTool.h
index 9975bdc2d01..59c22081bf0 100755
--- a/LArCalorimeter/LArDigitization/LArDigitization/LArPileUpTool.h
+++ b/LArCalorimeter/LArDigitization/LArDigitization/LArPileUpTool.h
@@ -104,7 +104,7 @@ class LArPileUpTool : virtual public ILArPileUpTool, public PileUpToolBase
                    const LArDigit * rndm_digit, const std::vector<std::pair<float,float> > *TimeE_DigiHSTruth = nullptr);
 
 
-  StatusCode ConvertHits2Samples(const Identifier & cellId,
+  StatusCode ConvertHits2Samples(const Identifier & cellId, HWIdentifier ch_id,
                    CaloGain::CaloGain igain,
                    //const std::vector<std::pair<float,float> >  *TimeE);
                    const std::vector<std::pair<float,float> >  *TimeE,  std::vector<double> &sampleList);
diff --git a/LArCalorimeter/LArDigitization/src/LArPileUpTool.cxx b/LArCalorimeter/LArDigitization/src/LArPileUpTool.cxx
index a45598d883f..adc400dcab2 100755
--- a/LArCalorimeter/LArDigitization/src/LArPileUpTool.cxx
+++ b/LArCalorimeter/LArDigitization/src/LArPileUpTool.cxx
@@ -1991,7 +1991,7 @@ StatusCode LArPileUpTool::MakeDigit(const Identifier & cellId,
 
 // ........ retrieve data (1/2) ................................
 //
-  SF=m_dd_fSampl->FSAMPL(cellId);
+  SF=m_dd_fSampl->FSAMPL(ch_id);
 
 //
 // ....... dump info ................................
@@ -2025,9 +2025,9 @@ StatusCode LArPileUpTool::MakeDigit(const Identifier & cellId,
   if (m_useBad) isDead = m_maskingTool->cellShouldBeMasked(ch_id);
 
   if (!isDead) {
-    if( this->ConvertHits2Samples(cellId,initialGain,TimeE, m_Samples) == StatusCode::FAILURE ) return StatusCode::SUCCESS;
+    if( this->ConvertHits2Samples(cellId,ch_id,initialGain,TimeE, m_Samples) == StatusCode::FAILURE ) return StatusCode::SUCCESS;
     if(m_doDigiTruth){
-      if( this->ConvertHits2Samples(cellId,initialGain,TimeE_DigiHSTruth, m_Samples_DigiHSTruth) == StatusCode::FAILURE ) return StatusCode::SUCCESS;
+      if( this->ConvertHits2Samples(cellId,ch_id,initialGain,TimeE_DigiHSTruth, m_Samples_DigiHSTruth) == StatusCode::FAILURE ) return StatusCode::SUCCESS;
     }
   }
 
@@ -2043,7 +2043,7 @@ StatusCode LArPileUpTool::MakeDigit(const Identifier & cellId,
   if (polynom_adc2mev->size() > 1) {
      float adc2energy = SF * ((*polynom_adc2mev)[1]);
      const std::vector<short> & rndm_digit_samples = rndmEvtDigit->samples() ;
-     float Pedestal = m_dd_pedestal->pedestal(cellId,rndmEvtDigit->gain());
+     float Pedestal = m_dd_pedestal->pedestal(ch_id,rndmEvtDigit->gain());
      if (Pedestal <= (1.0+LArElecCalib::ERRORCODE)) {
        ATH_MSG_WARNING("  Pedestal not found in database for this channel offID " << cellId << " Use sample 0 for random");
        Pedestal = rndm_digit_samples[0];
@@ -2103,7 +2103,7 @@ StatusCode LArPileUpTool::MakeDigit(const Identifier & cellId,
     //    HighGain  <---  MediumGain  --->  LowGain
 
   float pseudoADC3;
-  float Pedestal = m_dd_pedestal->pedestal(cellId,CaloGain::LARMEDIUMGAIN);
+  float Pedestal = m_dd_pedestal->pedestal(ch_id,CaloGain::LARMEDIUMGAIN);
   if (Pedestal <= (1.0+LArElecCalib::ERRORCODE)) {
    ATH_MSG_DEBUG(" Pedestal not found for medium gain ,cellID " << cellId <<  " assume 1000 ");
    Pedestal=1000.;
@@ -2141,9 +2141,9 @@ StatusCode LArPileUpTool::MakeDigit(const Identifier & cellId,
      }
 
      if (!isDead) {
-       if( this->ConvertHits2Samples(cellId,igain,TimeE, m_Samples) == StatusCode::FAILURE ) return StatusCode::SUCCESS;
+       if( this->ConvertHits2Samples(cellId,ch_id,igain,TimeE, m_Samples) == StatusCode::FAILURE ) return StatusCode::SUCCESS;
        if(m_doDigiTruth){
-         if( this->ConvertHits2Samples(cellId,igain,TimeE_DigiHSTruth, m_Samples_DigiHSTruth) == StatusCode::FAILURE ) return StatusCode::SUCCESS;
+         if( this->ConvertHits2Samples(cellId,ch_id,igain,TimeE_DigiHSTruth, m_Samples_DigiHSTruth) == StatusCode::FAILURE ) return StatusCode::SUCCESS;
        }
      }
 
@@ -2167,9 +2167,9 @@ StatusCode LArPileUpTool::MakeDigit(const Identifier & cellId,
   {
      if ( !m_RndmEvtOverlay ) {
         if (!m_pedestalNoise) {
-          SigmaNoise =m_dd_noise->noise(cellId,igain );
+          SigmaNoise =m_dd_noise->noise(ch_id,igain );
         } else {
-          float noise = m_dd_pedestal->pedestalRMS(cellId,igain);
+          float noise = m_dd_pedestal->pedestalRMS(ch_id,igain);
           if (noise >= (1.0+LArElecCalib::ERRORCODE) ) SigmaNoise = noise;
           else SigmaNoise=0.;
         }
@@ -2192,7 +2192,7 @@ StatusCode LArPileUpTool::MakeDigit(const Identifier & cellId,
 //
 // ......... convert into adc counts  ................................
 //
-  Pedestal = m_dd_pedestal->pedestal(cellId,igain);
+  Pedestal = m_dd_pedestal->pedestal(ch_id,igain);
   if (Pedestal <= (1.0+LArElecCalib::ERRORCODE)) {
      ATH_MSG_WARNING(" pedestal not found for cellId " << cellId << " assume 1000" );
      Pedestal=1000.;
@@ -2294,9 +2294,9 @@ StatusCode LArPileUpTool::MakeDigit(const Identifier & cellId,
 
 // ----------------------------------------------------------------------------------------------------------------------------------
 
-StatusCode LArPileUpTool::ConvertHits2Samples(const Identifier & cellId, CaloGain::CaloGain igain,
-                   //const std::vector<std::pair<float,float> >  *TimeE)
-                   const std::vector<std::pair<float,float> >  *TimeE, std::vector<double> &sampleList)
+StatusCode LArPileUpTool::ConvertHits2Samples(const Identifier & cellId, const HWIdentifier ch_id, CaloGain::CaloGain igain,
+					      //const std::vector<std::pair<float,float> >  *TimeE)
+					      const std::vector<std::pair<float,float> >  *TimeE, std::vector<double> &sampleList)
 
 {
 // Converts  hits of a particular LAr cell into energy samples
@@ -2310,8 +2310,8 @@ StatusCode LArPileUpTool::ConvertHits2Samples(const Identifier & cellId, CaloGai
 
 // ........ retrieve data (1/2) ................................
 //
-   ILArShape::ShapeRef_t Shape = m_dd_shape->Shape(cellId,igain);
-   ILArShape::ShapeRef_t ShapeDer = m_dd_shape->ShapeDer(cellId,igain);
+   ILArShape::ShapeRef_t Shape = m_dd_shape->Shape(ch_id,igain);
+   ILArShape::ShapeRef_t ShapeDer = m_dd_shape->ShapeDer(ch_id,igain);
 
   nsamples = Shape.size();
   nsamples_der = ShapeDer.size();
@@ -2398,8 +2398,8 @@ StatusCode LArPileUpTool::ConvertHits2Samples(const Identifier & cellId, CaloGai
 
       double dtime = time - ( 25.*((float)(ishift)) - timeBinWidth*tbin);
 
-      Shape = m_dd_shape->Shape(cellId,igain,tbin);
-      ShapeDer = m_dd_shape->ShapeDer(cellId,igain,tbin);
+      Shape = m_dd_shape->Shape(ch_id,igain,tbin);
+      ShapeDer = m_dd_shape->ShapeDer(ch_id,igain,tbin);
 
       nsamples = Shape.size();
       nsamples_der = ShapeDer.size();
diff --git a/LArCalorimeter/LArElecCalib/LArElecCalib/ILArAutoCorr.h b/LArCalorimeter/LArElecCalib/LArElecCalib/ILArAutoCorr.h
index e37060c15e9..66dae9af445 100644
--- a/LArCalorimeter/LArElecCalib/LArElecCalib/ILArAutoCorr.h
+++ b/LArCalorimeter/LArElecCalib/LArElecCalib/ILArAutoCorr.h
@@ -8,7 +8,6 @@
 
 #include "CLIDSvc/CLASS_DEF.h" 
 #include "Identifier/HWIdentifier.h"
-#include "Identifier/Identifier.h"
 #include "LArElecCalib/LArVectorProxy.h"
 
 /** This class defines the interface for accessing AutoCorrelation 
@@ -37,9 +36,6 @@ class ILArAutoCorr {
 
   //online ID
   virtual AutoCorrRef_t autoCorr( const HWIdentifier&  CellID, int gain) const=0 ;
-
-  // offline ID
-  virtual AutoCorrRef_t autoCorr( const Identifier&  CellID, int gain) const = 0 ;
   
 } ;
 
diff --git a/LArCalorimeter/LArElecCalib/LArElecCalib/ILArDAC2uA.h b/LArCalorimeter/LArElecCalib/LArElecCalib/ILArDAC2uA.h
index 7f80149766e..7b3078d3d01 100644
--- a/LArCalorimeter/LArElecCalib/LArElecCalib/ILArDAC2uA.h
+++ b/LArCalorimeter/LArElecCalib/LArElecCalib/ILArDAC2uA.h
@@ -33,10 +33,7 @@ class ILArDAC2uA {
   */ 
   // online ID
   virtual const float& DAC2UA(const HWIdentifier& id )  const = 0 ;
-  
-  // offline ID 
-  virtual const float& DAC2UA(const Identifier& id )  const =0;
-  
+    
   enum {ERRORCODE = LArElecCalib::ERRORCODE};
 
 } ;
diff --git a/LArCalorimeter/LArElecCalib/LArElecCalib/ILArMinBias.h b/LArCalorimeter/LArElecCalib/LArElecCalib/ILArMinBias.h
index 826ddc1664f..9981a6add6b 100644
--- a/LArCalorimeter/LArElecCalib/LArElecCalib/ILArMinBias.h
+++ b/LArCalorimeter/LArElecCalib/LArElecCalib/ILArMinBias.h
@@ -7,7 +7,6 @@
 
 #include "CLIDSvc/CLASS_DEF.h" 
 #include "LArElecCalib/LArCalibErrorCode.h"
-class Identifier;
 class HWIdentifier;
 
 
@@ -28,17 +27,11 @@ class ILArMinBias {
   // online ID
   virtual const float& minBiasRMS(const HWIdentifier& id)  const = 0 ;
   
-  // offline ID 
-  virtual const float& minBiasRMS(const Identifier& id)  const =0;
-
   enum {ERRORCODE = LArElecCalib::ERRORCODE};  
 } ;
 
 CLASS_DEF( ILArMinBias, 197482938 ,1) 
-
 #include "AthenaKernel/CondCont.h"
 CLASS_DEF( CondCont<ILArMinBias>,88954252 , 1 )
 
-
-
 #endif 
diff --git a/LArCalorimeter/LArElecCalib/LArElecCalib/ILArMinBiasAverage.h b/LArCalorimeter/LArElecCalib/LArElecCalib/ILArMinBiasAverage.h
index 7faabc48046..d4a25ee173d 100755
--- a/LArCalorimeter/LArElecCalib/LArElecCalib/ILArMinBiasAverage.h
+++ b/LArCalorimeter/LArElecCalib/LArElecCalib/ILArMinBiasAverage.h
@@ -7,7 +7,6 @@
 
 #include "CLIDSvc/CLASS_DEF.h" 
 #include "LArElecCalib/LArCalibErrorCode.h"
-class Identifier;
 class HWIdentifier;
 
 
@@ -28,9 +27,6 @@ class ILArMinBiasAverage {
   // online ID
   virtual const float& minBiasAverage(const HWIdentifier& id)  const = 0 ;
   
-  // offline ID 
-  virtual const float& minBiasAverage(const Identifier& id)  const =0;
-
   enum {ERRORCODE = LArElecCalib::ERRORCODE};  
 } ;
 #include "AthenaKernel/CondCont.h"
diff --git a/LArCalorimeter/LArElecCalib/LArElecCalib/ILArMphysOverMcal.h b/LArCalorimeter/LArElecCalib/LArElecCalib/ILArMphysOverMcal.h
index a7db859b888..8a8179e6ca5 100644
--- a/LArCalorimeter/LArElecCalib/LArElecCalib/ILArMphysOverMcal.h
+++ b/LArCalorimeter/LArElecCalib/LArElecCalib/ILArMphysOverMcal.h
@@ -26,9 +26,6 @@ class ILArMphysOverMcal {
   // online ID
   virtual const float& MphysOverMcal(const HWIdentifier& id , int gain)  const = 0 ;
   
-  // offline ID 
-  virtual const float& MphysOverMcal(const Identifier& id , int gain)  const =0;
-  
   enum {ERRORCODE = LArElecCalib::ERRORCODE};
 };
 
diff --git a/LArCalorimeter/LArElecCalib/LArElecCalib/ILArNoise.h b/LArCalorimeter/LArElecCalib/LArElecCalib/ILArNoise.h
index cfc4c94a030..315736c43d9 100644
--- a/LArCalorimeter/LArElecCalib/LArElecCalib/ILArNoise.h
+++ b/LArCalorimeter/LArElecCalib/LArElecCalib/ILArNoise.h
@@ -7,7 +7,6 @@
 
 #include "CLIDSvc/CLASS_DEF.h" 
 #include "LArElecCalib/LArCalibErrorCode.h"
-class Identifier;
 class HWIdentifier;
 
 class ILArNoise {
@@ -37,8 +36,6 @@ public:
 
   virtual const float& noise( const HWIdentifier& id, int gain) const =0 ;
 
-  virtual const float& noise( const Identifier& id, int gain ) const = 0 ;
-
   enum {ERRORCODE = LArElecCalib::ERRORCODE};
 
 } ;
diff --git a/LArCalorimeter/LArElecCalib/LArElecCalib/ILArOFC.h b/LArCalorimeter/LArElecCalib/LArElecCalib/ILArOFC.h
index 9f36bdb0730..1dcfb447315 100644
--- a/LArCalorimeter/LArElecCalib/LArElecCalib/ILArOFC.h
+++ b/LArCalorimeter/LArElecCalib/LArElecCalib/ILArOFC.h
@@ -8,7 +8,6 @@
 #include "CLIDSvc/CLASS_DEF.h" 
 #include "LArElecCalib/LArVectorProxy.h"
 #include "Identifier/HWIdentifier.h"
-#include "Identifier/Identifier.h"
 
 #include <vector> 
 
@@ -39,28 +38,13 @@ class ILArOFC {
                          int tbin=0) const =0 ;
   
   
-  /** access to OFCs by offline ID, gain, and tbin (!=0 for testbeam)
-   */ 
-  
-  virtual OFCRef_t OFC_a(const Identifier& id,
-                         int gain,
-                         int tbin=0) const =0;
-  
-  virtual OFCRef_t OFC_b(const Identifier& id,
-                         int gain,
-                         int tbin=0) const =0;
-
-  
-  virtual float timeOffset(const Identifier&  CellID, int gain) const =0;   //Useful only in the TB case
   virtual float timeOffset(const HWIdentifier&  CellID, int gain) const =0; //Useful only in the TB case
 
   //For the TB / cosmic case: retrieve the number of time-bins (aka "phases")
   virtual unsigned nTimeBins(const HWIdentifier&  CellID, int gain) const =0;
-  virtual unsigned nTimeBins(const Identifier&  CellID, int gain) const =0;
  
   //For the TB / cosmic case: retrieve the witdth of the time bin (default 24 bins in 25 ns)
   virtual float timeBinWidth(const HWIdentifier&  CellID, int gain) const=0;
-  virtual float timeBinWidth(const Identifier&  CellID, int gain) const=0;
 } ;
 
 CLASS_DEF( ILArOFC, 204091343, 1) 
diff --git a/LArCalorimeter/LArElecCalib/LArElecCalib/ILArPedestal.h b/LArCalorimeter/LArElecCalib/LArElecCalib/ILArPedestal.h
index ad29680c6ac..bd42e4f6db6 100644
--- a/LArCalorimeter/LArElecCalib/LArElecCalib/ILArPedestal.h
+++ b/LArCalorimeter/LArElecCalib/LArElecCalib/ILArPedestal.h
@@ -7,7 +7,6 @@
 
 #include "CLIDSvc/CLASS_DEF.h" 
 #include "Identifier/HWIdentifier.h"
-#include "Identifier/Identifier.h"
 #include "LArElecCalib/LArCalibErrorCode.h"
 
 class ILArPedestal {
@@ -39,19 +38,12 @@ public:
   // online ID
   virtual float pedestal(const HWIdentifier& id, int gain ) const =0 ;
   
-  // offline ID
-  virtual float pedestal(const Identifier& id, int gain) const = 0 ;
-  
-
   /** access to RMS of Pedestal 
       index by Identifier, and gain setting
   */ 
   // online ID
   virtual float pedestalRMS(const HWIdentifier& id, int gain ) const =0;
 
-  // offline ID
-  virtual float pedestalRMS(const Identifier& id, int gain) const = 0 ;
-
   enum {ERRORCODE = LArElecCalib::ERRORCODE};
 
 } ;
diff --git a/LArCalorimeter/LArElecCalib/LArElecCalib/ILArRamp.h b/LArCalorimeter/LArElecCalib/LArElecCalib/ILArRamp.h
index 356dc42bd56..1c35751c63d 100644
--- a/LArCalorimeter/LArElecCalib/LArElecCalib/ILArRamp.h
+++ b/LArCalorimeter/LArElecCalib/LArElecCalib/ILArRamp.h
@@ -7,7 +7,6 @@
 
 #include "CLIDSvc/CLASS_DEF.h" 
 #include "Identifier/HWIdentifier.h"
-#include "Identifier/Identifier.h"
 #include "LArElecCalib/LArVectorProxy.h"
 
 class ILArRamp {
@@ -34,7 +33,6 @@ class ILArRamp {
   virtual ~ILArRamp() {};
 
   virtual RampRef_t ADC2DAC(const HWIdentifier& id, int gain )  const =0;
-  virtual RampRef_t ADC2DAC(const Identifier& id, int gain )  const =0;
   
 } ;
 
diff --git a/LArCalorimeter/LArElecCalib/LArElecCalib/ILArShape.h b/LArCalorimeter/LArElecCalib/LArElecCalib/ILArShape.h
index 34e64c40e9f..45946c8073a 100644
--- a/LArCalorimeter/LArElecCalib/LArElecCalib/ILArShape.h
+++ b/LArCalorimeter/LArElecCalib/LArElecCalib/ILArShape.h
@@ -7,7 +7,6 @@
 
 #include "CLIDSvc/CLASS_DEF.h" 
 #include "LArElecCalib/LArVectorProxy.h"
-class Identifier;
 class HWIdentifier;
 
 
@@ -38,17 +37,6 @@ class ILArShape {
                               int tbin = 0,
                               int mode = 0 )  const = 0 ;
   
-  // offline ID
-  virtual ShapeRef_t Shape   (const Identifier& id,
-                              int gain,
-                              int tbin = 0,
-                              int mode = 0 )  const = 0 ;  
-  virtual ShapeRef_t ShapeDer(const Identifier& id,
-                              int gain,
-                              int tbin = 0,
-                              int mode = 0 )  const = 0 ;
-  
-  
 } ;
 
 CLASS_DEF( ILArShape,245731716,1) 
diff --git a/LArCalorimeter/LArElecCalib/LArElecCalib/ILArfSampl.h b/LArCalorimeter/LArElecCalib/LArElecCalib/ILArfSampl.h
index c9f586fe8d6..5624e1ae9d0 100644
--- a/LArCalorimeter/LArElecCalib/LArElecCalib/ILArfSampl.h
+++ b/LArCalorimeter/LArElecCalib/LArElecCalib/ILArfSampl.h
@@ -33,9 +33,6 @@ class ILArfSampl {
   // online ID
   virtual const float& FSAMPL(const HWIdentifier& id )  const = 0 ;
   
-  // offline ID 
-  virtual const float& FSAMPL(const Identifier& id )  const=0;
-
   enum {ERRORCODE = LArElecCalib::ERRORCODE};
   
 } ;
diff --git a/LArCalorimeter/LArElecCalib/LArElecCalib/ILAruA2MeV.h b/LArCalorimeter/LArElecCalib/LArElecCalib/ILAruA2MeV.h
index 893f19860a2..b4046e09927 100644
--- a/LArCalorimeter/LArElecCalib/LArElecCalib/ILAruA2MeV.h
+++ b/LArCalorimeter/LArElecCalib/LArElecCalib/ILAruA2MeV.h
@@ -32,9 +32,6 @@ class ILAruA2MeV {
 
   virtual const float& UA2MEV(const HWIdentifier& id )  const = 0 ;
   
-  // offline ID 
-  virtual const float& UA2MEV(const Identifier& id )  const =0;
-  
   enum {ERRORCODE = LArElecCalib::ERRORCODE};
 
 } ;
diff --git a/LArCalorimeter/LArRawConditions/LArRawConditions/LArDAC2uASym.h b/LArCalorimeter/LArRawConditions/LArRawConditions/LArDAC2uASym.h
index 14cb8f6e443..ec3b13103b0 100644
--- a/LArCalorimeter/LArRawConditions/LArRawConditions/LArDAC2uASym.h
+++ b/LArCalorimeter/LArRawConditions/LArRawConditions/LArDAC2uASym.h
@@ -23,8 +23,6 @@ class LArDAC2uASym: virtual public ILArDAC2uA {
   
   virtual const float& DAC2UA(const HWIdentifier& hwid) const override;
   
-  virtual const float& DAC2UA(const Identifier& CellID) const override;
-  
  private: 
 
   const LArMCSym* m_mcSym;
diff --git a/LArCalorimeter/LArRawConditions/LArRawConditions/LArMinBiasSym.h b/LArCalorimeter/LArRawConditions/LArRawConditions/LArMinBiasSym.h
index a935f82a0cc..2c18a1c5adc 100644
--- a/LArCalorimeter/LArRawConditions/LArRawConditions/LArMinBiasSym.h
+++ b/LArCalorimeter/LArRawConditions/LArRawConditions/LArMinBiasSym.h
@@ -23,8 +23,6 @@ class LArMinBiasSym: virtual public ILArMinBias {
   
   virtual const float& minBiasRMS(const HWIdentifier& hwid) const override;
   
-  virtual const float& minBiasRMS(const Identifier& CellID) const override;
-  
  private: 
 
   const LArMCSym* m_mcSym;
diff --git a/LArCalorimeter/LArRawConditions/LArRawConditions/LArNoiseSym.h b/LArCalorimeter/LArRawConditions/LArRawConditions/LArNoiseSym.h
index d39a7bf5cc2..c5c7d18df0b 100644
--- a/LArCalorimeter/LArRawConditions/LArRawConditions/LArNoiseSym.h
+++ b/LArCalorimeter/LArRawConditions/LArRawConditions/LArNoiseSym.h
@@ -23,8 +23,6 @@ class LArNoiseSym: virtual public ILArNoise {
   
   virtual const float& noise(const HWIdentifier& hwid, int gain) const override;
   
-  virtual const float& noise(const Identifier& CellID, int gain) const override;
-  
  private: 
 
   const LArMCSym* m_mcSym;
diff --git a/LArCalorimeter/LArRawConditions/LArRawConditions/LArRampSym.h b/LArCalorimeter/LArRawConditions/LArRawConditions/LArRampSym.h
index e1640facf4c..165b7f4e4fd 100644
--- a/LArCalorimeter/LArRawConditions/LArRawConditions/LArRampSym.h
+++ b/LArCalorimeter/LArRawConditions/LArRawConditions/LArRampSym.h
@@ -22,9 +22,7 @@ class LArRampSym: public ILArRamp {
   virtual ~LArRampSym( );
   
   virtual  RampRef_t ADC2DAC(const HWIdentifier&  CellID, int gain) const override;
-  
-  virtual  RampRef_t ADC2DAC(const Identifier&  CellID, int gain) const override;
-  
+   
  private: 
 
   const LArMCSym* m_mcSym;
diff --git a/LArCalorimeter/LArRawConditions/LArRawConditions/LArfSamplSym.h b/LArCalorimeter/LArRawConditions/LArRawConditions/LArfSamplSym.h
index 81e8df164da..1e3e7a87ca3 100644
--- a/LArCalorimeter/LArRawConditions/LArRawConditions/LArfSamplSym.h
+++ b/LArCalorimeter/LArRawConditions/LArRawConditions/LArfSamplSym.h
@@ -28,8 +28,7 @@ class LArfSamplSym: virtual public ILArfSampl {
   // retrieving fSampl using online ID
   
   virtual const float& FSAMPL(const HWIdentifier&  CellID) const override;
-  
-  virtual const float& FSAMPL(const Identifier&  CellID) const override;
+ 
     
  private: 
   
diff --git a/LArCalorimeter/LArRawConditions/LArRawConditions/LAruA2MeVSym.h b/LArCalorimeter/LArRawConditions/LArRawConditions/LAruA2MeVSym.h
index 85aff46a1ad..1c457d2767b 100644
--- a/LArCalorimeter/LArRawConditions/LArRawConditions/LAruA2MeVSym.h
+++ b/LArCalorimeter/LArRawConditions/LArRawConditions/LAruA2MeVSym.h
@@ -22,9 +22,7 @@ class LAruA2MeVSym: virtual public ILAruA2MeV {
   virtual ~LAruA2MeVSym( );
   
   virtual const float& UA2MEV(const HWIdentifier& hwid) const override;
-  
-  virtual const float& UA2MEV(const Identifier& CellID) const override;
-  
+   
  private: 
 
   const LArMCSym* m_mcSym;
diff --git a/LArCalorimeter/LArRawConditions/src/LArDAC2uASym.cxx b/LArCalorimeter/LArRawConditions/src/LArDAC2uASym.cxx
index 3388099d10a..274258bfb5e 100644
--- a/LArCalorimeter/LArRawConditions/src/LArDAC2uASym.cxx
+++ b/LArCalorimeter/LArRawConditions/src/LArDAC2uASym.cxx
@@ -20,7 +20,4 @@ const float&  LArDAC2uASym::DAC2UA(const HWIdentifier&  hwid) const {
   return m_DAC2uAComplete->DAC2UA(symhwid);
 }
   
-const float& LArDAC2uASym::DAC2UA(const Identifier&  id) const {
-  HWIdentifier symhwid=m_mcSym->ZPhiSymOfl(id);
-  return m_DAC2uAComplete->DAC2UA(symhwid);
-}
+
diff --git a/LArCalorimeter/LArRawConditions/src/LArMinBiasSym.cxx b/LArCalorimeter/LArRawConditions/src/LArMinBiasSym.cxx
index 7fb7f09189b..5a70e91ce19 100644
--- a/LArCalorimeter/LArRawConditions/src/LArMinBiasSym.cxx
+++ b/LArCalorimeter/LArRawConditions/src/LArMinBiasSym.cxx
@@ -20,7 +20,4 @@ const float&  LArMinBiasSym::minBiasRMS(const HWIdentifier&  hwid) const {
   return m_MinBiasComplete->minBiasRMS(symhwid);
 }
   
-const float& LArMinBiasSym::minBiasRMS(const Identifier&  id) const {
-  HWIdentifier symhwid=m_mcSym->ZPhiSymOfl(id);
-  return m_MinBiasComplete->minBiasRMS(symhwid);
-}
+
diff --git a/LArCalorimeter/LArRawConditions/src/LArNoiseSym.cxx b/LArCalorimeter/LArRawConditions/src/LArNoiseSym.cxx
index 75264908e48..f225ed8090a 100644
--- a/LArCalorimeter/LArRawConditions/src/LArNoiseSym.cxx
+++ b/LArCalorimeter/LArRawConditions/src/LArNoiseSym.cxx
@@ -20,7 +20,3 @@ const float&  LArNoiseSym::noise(const HWIdentifier&  hwid, int gain) const {
   return m_noiseComplete->noise(symhwid,gain);
 }
   
-const float& LArNoiseSym::noise(const Identifier&  id, int gain) const {
-  HWIdentifier symhwid=m_mcSym->ZPhiSymOfl(id);
-  return m_noiseComplete->noise(symhwid,gain);
-}
diff --git a/LArCalorimeter/LArRawConditions/src/LArRampSym.cxx b/LArCalorimeter/LArRawConditions/src/LArRampSym.cxx
index b6ac8cd7033..d9ade178597 100644
--- a/LArCalorimeter/LArRawConditions/src/LArRampSym.cxx
+++ b/LArCalorimeter/LArRawConditions/src/LArRampSym.cxx
@@ -21,7 +21,3 @@ ILArRamp::RampRef_t LArRampSym::ADC2DAC(const HWIdentifier&  hwid, int gain) con
   return m_rampComplete->ADC2DAC(symhwid,gain);
 }
   
-ILArRamp::RampRef_t LArRampSym::ADC2DAC(const Identifier&  id, int gain) const {
-  HWIdentifier symhwid=m_mcSym->ZPhiSymOfl(id);
-  return m_rampComplete->ADC2DAC(symhwid,gain);
-}
diff --git a/LArCalorimeter/LArRawConditions/src/LArfSamplSym.cxx b/LArCalorimeter/LArRawConditions/src/LArfSamplSym.cxx
index a0024efc53e..05653578642 100644
--- a/LArCalorimeter/LArRawConditions/src/LArfSamplSym.cxx
+++ b/LArCalorimeter/LArRawConditions/src/LArfSamplSym.cxx
@@ -18,8 +18,4 @@ const float& LArfSamplSym::FSAMPL(const HWIdentifier&  hwid) const {
   HWIdentifier symhwid=m_mcSym->ZPhiSymOnl(hwid);
   return m_fSamplComplete->FSAMPL(symhwid);
 }
-  
-const float& LArfSamplSym::FSAMPL(const Identifier&  id) const {
-  HWIdentifier symhwid=m_mcSym->ZPhiSymOfl(id);
-  return m_fSamplComplete->FSAMPL(symhwid);
-}
+
diff --git a/LArCalorimeter/LArRawConditions/src/LAruA2MeVSym.cxx b/LArCalorimeter/LArRawConditions/src/LAruA2MeVSym.cxx
index 7b455daf1bb..db071e29b37 100644
--- a/LArCalorimeter/LArRawConditions/src/LAruA2MeVSym.cxx
+++ b/LArCalorimeter/LArRawConditions/src/LAruA2MeVSym.cxx
@@ -19,8 +19,3 @@ const float&  LAruA2MeVSym::UA2MEV(const HWIdentifier&  hwid) const {
   HWIdentifier symhwid=m_mcSym->ZPhiSymOnl(hwid);
   return m_uA2MeVComplete->UA2MEV(symhwid);
 }
-  
-const float& LAruA2MeVSym::UA2MEV(const Identifier&  id) const {
-  HWIdentifier symhwid=m_mcSym->ZPhiSymOfl(id);
-  return m_uA2MeVComplete->UA2MEV(symhwid);
-}
-- 
GitLab