diff --git a/Pr/PrKernel/include/PrKernel/UTGeomCache.h b/Pr/PrKernel/include/PrKernel/UTGeomCache.h index c85cded9f456f0dc4aa1364ed5b72dddb0f54616..c81834f8c1075421d327e1e58a05b8fcd6cff5a6 100644 --- a/Pr/PrKernel/include/PrKernel/UTGeomCache.h +++ b/Pr/PrKernel/include/PrKernel/UTGeomCache.h @@ -38,21 +38,21 @@ namespace LHCb::Pr::UT { UTGeomCache( const DeUTDetector& utDet, const IUTReadoutTool& ro, const IUTReadoutTool::ReadoutInfo& roInfo ) { sectors.fill( nullptr ); for ( unsigned int srcId = 0; srcId < ro.nBoard( &roInfo ); srcId++ ) { - for ( const auto& [idx, sector] : + for ( const auto& [idx, subsector] : range::enumerate( ro.findBySourceID( srcId, &roInfo ), ro.TELLNumberToSourceID( srcId + 1, &roInfo ) * static_cast<unsigned>( UTInfo::SectorNumbers::MaxSectorsPerBoard ) ) ) { assert( idx < UTInfo::MaxSectorsAllBoards ); #ifdef USE_DD4HEP if ( sectors[idx].isValid() ) throw std::runtime_error( "UTGeomCache: duplicate sector???" ); - sectors[idx] = utDet.getSector( sector ); + sectors[idx] = utDet.getSector( subsector ); #else if ( sectors[idx] ) throw std::runtime_error( "UTGeomCache: duplicate sector???" ); - sectors[idx] = &utDet.getSector( sector ); + sectors[idx] = &utDet.getSector( subsector ); #endif - fullchan[idx] = {LHCb::UTDAQ::sectorFullID( sector.side(), sector.layer(), sector.stave(), sector.face(), - sector.module(), sector.sector() ), - sector.channelID()}; + fullchan[idx] = {LHCb::UTDAQ::sectorFullID( subsector.side(), subsector.layer(), subsector.stave(), + subsector.face(), subsector.module(), subsector.sector() ), + subsector.getFullSector()}; } } }