diff --git a/Calorimeter/CaloTools/CaloTools/CaloLumiBCIDTool.h b/Calorimeter/CaloTools/CaloTools/CaloLumiBCIDTool.h index de006bf824295f9bfd4d3b0c8a8ca31c8826513a..59529862621b64c9fb5f97a394d89511e150d66f 100755 --- a/Calorimeter/CaloTools/CaloTools/CaloLumiBCIDTool.h +++ b/Calorimeter/CaloTools/CaloTools/CaloLumiBCIDTool.h @@ -102,7 +102,7 @@ public: float average(const CaloDetDescrElement* caloDDE,unsigned int bcid); - + float average(const Identifier caloDDE,unsigned int bcid); }; #endif diff --git a/Calorimeter/CaloTools/src/CaloLumiBCIDTool.cxx b/Calorimeter/CaloTools/src/CaloLumiBCIDTool.cxx index 0ec79df58bc7c6cbcd61062dd8bb4fd18eb2ae49..2590ceb530c0139326fb75f172b5661cd9e15a0f 100755 --- a/Calorimeter/CaloTools/src/CaloLumiBCIDTool.cxx +++ b/Calorimeter/CaloTools/src/CaloLumiBCIDTool.cxx @@ -406,10 +406,28 @@ float CaloLumiBCIDTool::average(const CaloDetDescrElement* caloDDE,unsigned int StatusCode sc = this->computeValues(bcid); if (sc.isFailure()) return 0.; } - const Identifier CellID = caloDDE->identify(); + // const Identifier CellID = caloDDE->identify(); + //if (m_calocell_id->is_tile(CellID)) return 0.; - if (m_calocell_id->is_tile(CellID)) return 0.; + if (caloDDE->is_tile()) return 0; + int i2 = (int) caloDDE->calo_hash();//(m_calocell_id->calo_cell_hash(CellID)); + if (i2>=m_ncell) return 0.; + unsigned int index = m_symCellIndex[i2]; + if (index>=m_eshift_sym.size()) return 0.; + return m_eshift_sym[index]; +} + +//------------------------------------------------- + +float CaloLumiBCIDTool::average(const Identifier CellID,unsigned int bcid) +{ + if (bcid != m_bcid && bcid !=0 ) m_cacheValid=false; + if (!m_cacheValid) { + StatusCode sc = this->computeValues(bcid); + if (sc.isFailure()) return 0.; + } + if (m_calocell_id->is_tile(CellID)) return 0.; int i2 = (int) (m_calocell_id->calo_cell_hash(CellID)); if (i2>=m_ncell) return 0.; unsigned int index = m_symCellIndex[i2]; diff --git a/Calorimeter/CaloTools/src/CaloNoiseTool.cxx b/Calorimeter/CaloTools/src/CaloNoiseTool.cxx index e67ba962dbfc6017de80ae874ea56ee8b28a15d0..5c474ca13b5003738cae3f8f45b7b31e64bed397 100755 --- a/Calorimeter/CaloTools/src/CaloNoiseTool.cxx +++ b/Calorimeter/CaloTools/src/CaloNoiseTool.cxx @@ -284,7 +284,7 @@ CaloNoiseTool::geoInit(IOVSVC_CALLBACK_ARGS) m_CachedGetNoiseCDDE=&CaloNoiseTool::totalNoiseRMS; m_CachedGetNoiseCELL=&CaloNoiseTool::totalNoiseRMS; } - if(m_CachedGetNoiseCELL==NULL || + if(m_CachedGetNoiseCDDE==NULL || m_CachedGetNoiseCELL==NULL) { log << MSG::ERROR << "Unknown noise !" << endreq; return StatusCode::FAILURE;