Functions | |
template<typename HPDDIGITIZER , typename SIPMDIGITIZER > | |
void | fillCells (std::vector< DetId > &allCells, HPDDIGITIZER *hpdDigitizer, SIPMDIGITIZER *siPMDigitizer) |
template<typename SIPMDIGITIZER > | |
void | fillSiPMCells (std::vector< int > &siPMCells, SIPMDIGITIZER *siPMDigitizer) |
void HcalDigitizerImpl::fillCells | ( | std::vector< DetId > & | allCells, |
HPDDIGITIZER * | hpdDigitizer, | ||
SIPMDIGITIZER * | siPMDigitizer | ||
) |
Definition at line 57 of file HcalDigitizer.cc.
References python::multivaluedict::sort().
Referenced by HcalDigitizer::updateGeometry().
{ // if both digitizers exist, split up the cells if(siPMDigitizer && hpdDigitizer) { std::vector<DetId> siPMDetIds = siPMDigitizer->detIds(); std::sort(siPMDetIds.begin(), siPMDetIds.end()); std::vector<DetId> sortedCells = allCells; std::sort(sortedCells.begin(), sortedCells.end()); std::vector<DetId> hpdCells; std::set_difference(sortedCells.begin(), sortedCells.end(), siPMDetIds.begin(), siPMDetIds.end(), std::back_inserter(hpdCells) ); hpdDigitizer->setDetIds(hpdCells); } else { if(siPMDigitizer) siPMDigitizer->setDetIds(allCells); if(hpdDigitizer) hpdDigitizer->setDetIds(allCells); } }
void HcalDigitizerImpl::fillSiPMCells | ( | std::vector< int > & | siPMCells, |
SIPMDIGITIZER * | siPMDigitizer | ||
) |
Definition at line 42 of file HcalDigitizer.cc.
Referenced by HcalDigitizer::HcalDigitizer().
{
std::vector<DetId> siPMDetIds;
siPMDetIds.reserve(siPMCells.size());
for(std::vector<int>::const_iterator idItr = siPMCells.begin();
idItr != siPMCells.end(); ++idItr)
{
siPMDetIds.emplace_back(*idItr);
}
siPMDigitizer->setDetIds(siPMDetIds);
}