Commit be244f85 authored by Walter Lampl's avatar Walter Lampl Committed by Graeme Stewart
Browse files

CaloLumiBCIDTool: Add accessor with Identifier (obo Naoko) (CaloTools-00-09-46)

	* CaloLumiBCIDTool: Add accessor with Identifier (obo Naoko)
	* tag CaloTools-00-09-46

2014-11-14 Walter Lampl <walter.lampl@ cern.ch>
	* use hash from CaloDDE instead of re-computing it
	* tag CaloTools-00-09-45

2014-11-08  scott snyder  <snyder@bnl.gov>

        * Tagging CaloTools-00-09-44.
	* Fix coverity warning.
parent 7c5402f5
......@@ -102,7 +102,7 @@ public:
float average(const CaloDetDescrElement* caloDDE,unsigned int bcid);
float average(const Identifier caloDDE,unsigned int bcid);
};
#endif
......@@ -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];
......
......@@ -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;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment