From 6f5dec810ec14d12c21808b363794ee19dd20a36 Mon Sep 17 00:00:00 2001 From: sutt <sutt@cern.ch> Date: Mon, 5 Oct 2020 22:14:02 +0200 Subject: [PATCH] Added some outstanding algorithms that needed to be modified The RegSelTestAlg, TRTRawDataProvider and the RoIPEBInfoWriterTool were still accessing the old RegSelSvc, the TRTRawDataPRovider was just overlooked, whereas the other two were looping over the RegSelEnum to call the RegSelSvc on all the systems. These have been fixed now. --- .../RegSelSvcTest/src/RegSelTestAlg.cxx | 5 +- .../RegionSelector/src/RegSelSvc.cxx | 19 +- .../RegionSelector/src/obsolete.h | 178 -- .../RegionSelector/src/obsolete.icc | 1594 ----------------- .../src/TRTRawDataProvider.cxx | 5 +- .../src/TRTRawDataProvider.h | 5 +- .../share/InDetReadBS_jobOptions.py | 4 +- .../python/TrigFastTrackFinder_Config.py | 4 +- .../src/RoIPEBInfoWriterTool.cxx | 58 +- .../src/RoIPEBInfoWriterTool.h | 19 +- .../TrigInDetConfig/python/InDetPT.py | 8 + .../src/TrigSpacePointConversionTool.cxx | 7 +- .../src/TrigSpacePointConversionTool.h | 4 +- .../TrigP1Test/share/PEBDSTest.py | 8 + .../EventBuildingSequenceSetup.py | 6 + 15 files changed, 112 insertions(+), 1812 deletions(-) delete mode 100644 DetectorDescription/RegionSelector/src/obsolete.h delete mode 100644 DetectorDescription/RegionSelector/src/obsolete.icc diff --git a/DetectorDescription/RegSelSvcTest/src/RegSelTestAlg.cxx b/DetectorDescription/RegSelSvcTest/src/RegSelTestAlg.cxx index 0e29bb5d560..1673c294949 100644 --- a/DetectorDescription/RegSelSvcTest/src/RegSelTestAlg.cxx +++ b/DetectorDescription/RegSelSvcTest/src/RegSelTestAlg.cxx @@ -73,7 +73,7 @@ StatusCode RegSelTestAlg::dumpOne( const std::string& message, double eta, const StatusCode RegSelTestAlg::dump() const { // generate list of RoIs for ID - CHECK( dumpOne("Inner Detector ", 2.5, { PIXEL, SCT, TRT } ) ); + // CHECK( dumpOne("Inner Detector ", 2.5, { PIXEL, SCT, TRT } ) ); CHECK( dumpOne("Calorimeters ", 5., { LAR, TTEM, TTHEC, TILE, FCALEM, FCALHAD } ) ); CHECK( dumpOne("Muons ", 5., { MDT, RPC, TGC, CSC } ) ); return StatusCode::SUCCESS; @@ -185,7 +185,8 @@ StatusCode RegSelTestAlg::mt() const { std::vector<ParallelCallTest*> tests; - for ( auto detector: {PIXEL, SCT, TRT, LAR, TTEM, TTHEC, TILE, MDT, RPC, TGC, CSC, FCALEM, FCALHAD, FTK} ) { + // for ( auto detector: {PIXEL, SCT, TRT, LAR, TTEM, TTHEC, TILE, MDT, RPC, TGC, CSC, FCALEM, FCALHAD, FTK} ) { + for ( auto detector: { LAR, TTEM, TTHEC, TILE, MDT, RPC, TGC, CSC, FCALEM, FCALHAD } ) { for ( auto& roi : rois ) { tests.push_back( new RoIReqTest( roi, detector, msg(), m_regSelSvc ) ); } diff --git a/DetectorDescription/RegionSelector/src/RegSelSvc.cxx b/DetectorDescription/RegionSelector/src/RegSelSvc.cxx index 564a5ba1ec9..aa6c71ae682 100755 --- a/DetectorDescription/RegionSelector/src/RegSelSvc.cxx +++ b/DetectorDescription/RegionSelector/src/RegSelSvc.cxx @@ -628,7 +628,7 @@ void RegSelSvc::getRoIData(DETID detectorID, case PIXEL: case SCT: case TRT: { - ATH_MSG_ERROR( "RegSelSvc: should no longer be called for ID" << detectorID ); + ATH_MSG_ERROR( "RegSelSvc: should no longer be called for ID: " << detectorID ); break; } case RPC: { // RPC (obviously) @@ -703,7 +703,7 @@ void RegSelSvc::DetHashIDList(DETID detectorID, case PIXEL: case SCT: case TRT: { // TRT (obviously) - ATH_MSG_ERROR( "RegSelSvc: should no longer be called for ID" << detectorID ); + ATH_MSG_ERROR( "RegSelSvc: should no longer be called for ID: " << detectorID ); break; } case MDT: { // etc @@ -803,7 +803,7 @@ void RegSelSvc::DetHashIDList(DETID detectorID, long layer, case PIXEL: case SCT: case TRT: { // TRT (obviously) - ATH_MSG_ERROR( "RegSelSvc: should no longer be called for ID" << detectorID ); + ATH_MSG_ERROR( "RegSelSvc: should no longer be called for ID: " << detectorID ); break; } case MDT: { @@ -886,7 +886,7 @@ void RegSelSvc::DetHashIDList(DETID detectorID, case PIXEL: case SCT: case TRT: { // TRT (obviously) - ATH_MSG_ERROR( "RegSelSvc: should no longer be called for ID" << detectorID ); + ATH_MSG_ERROR( "RegSelSvc: should no longer be called for ID: " << detectorID ); break; } case MDT: { @@ -969,7 +969,7 @@ void RegSelSvc::DetHashIDList(DETID detectorID, long layer, case PIXEL: case SCT: case TRT: { // TRT (obviously) - ATH_MSG_ERROR( "RegSelSvc: should no longer be called for ID" << detectorID ); + ATH_MSG_ERROR( "RegSelSvc: should no longer be called for ID: " << detectorID ); break; } case MDT: { @@ -1068,7 +1068,7 @@ void RegSelSvc::DetROBIDListUint(DETID detectorID, case PIXEL: case SCT: case TRT: { // TRT - ATH_MSG_ERROR( "RegSelSvc: should no longer be called for ID" << detectorID ); + ATH_MSG_ERROR( "RegSelSvc: should no longer be called for ID: " << detectorID ); break; } case MDT: { @@ -1169,7 +1169,7 @@ void RegSelSvc::DetROBIDListUint(DETID detectorID, long layer, case PIXEL: case SCT: case TRT: { // TRT - ATH_MSG_ERROR( "RegSelSvc: should no longer be called for ID" << detectorID ); + ATH_MSG_ERROR( "RegSelSvc: should no longer be called for ID: " << detectorID ); break; } case MDT: { @@ -1245,7 +1245,7 @@ void RegSelSvc::DetROBIDListUint(DETID detectorID, case PIXEL: case SCT: case TRT: { // TRT - ATH_MSG_ERROR( "RegSelSvc: should no longer be called for ID" << detectorID ); + ATH_MSG_ERROR( "RegSelSvc: should no longer be called for ID: " << detectorID ); break; } case MDT: { @@ -1314,8 +1314,7 @@ void RegSelSvc::DetROBIDListUint(DETID detectorID, long layer, case PIXEL: case SCT: case TRT: { // TRT - if ( m_newtrt ) m_newtrt->getRobList( layer, outputROBIDList ); - ATH_MSG_ERROR( "RegSelSvc: should no longer be called for ID" << detectorID ); + ATH_MSG_ERROR( "RegSelSvc: should no longer be called for ID: " << detectorID ); break; } case MDT: { diff --git a/DetectorDescription/RegionSelector/src/obsolete.h b/DetectorDescription/RegionSelector/src/obsolete.h deleted file mode 100644 index 35d3604ff24..00000000000 --- a/DetectorDescription/RegionSelector/src/obsolete.h +++ /dev/null @@ -1,178 +0,0 @@ -// emacs: this is -*- c++ -*- - -/* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration -*/ - -/////////////////////////////////////////////////////////////////////// -/// obsolete methods DO NOT USE -/////////////////////////////////////////////////////////////////////// - - -public: - - /// obsolete HashID methods - - void DetHashIDList(DETID detectorID, - double etaMin, double etaMax, - double phiMin, double phiMax, - std::vector<IdentifierHash>* IDList ); - - // inner detector - void DetHashIDList(DETID detectorID, - double zMin, double zMax, - double etaMin, double etaMax, - double phiMin, double phiMax, - std::vector<IdentifierHash>* IDList); - - - void DetHashIDList(DETID detectorID, - double zMin, double zMax, - double etaMin, double etaMax, - double phiMin, double phiMax, - double xBeam, double yBeam, - std::vector<IdentifierHash>* IDList); - - - void DetHashIDList(DETID detectorID, - const IRoiDescriptor& roi, - std::vector<IdentifierHash>* IDList); - - // inner detector layer - void DetHashIDList(DETID detectorID, long layer, - double zMin, double zMax, - double etaMin, double etaMax, - double phiMin, double phiMax, - std::vector<IdentifierHash>* IDList); - - void DetHashIDList(DETID detectorID, long layer, - const IRoiDescriptor& roi, - std::vector<IdentifierHash>* IDList); - - // inner detector full scan - void DetHashIDList(DETID detectorID, - std::vector<IdentifierHash>* IDList ); - - // calorimeter - void DetHashIDList(DETID detectorID, long sampling, - double etaMin, double etaMax, - double phiMin, double phiMax, - std::vector<IdentifierHash>* IDList); - - // muon - void DetHashIDList(DETID detectorID, TYPEID typeID, - double etaMin, double etaMax, - double phiMin, double phiMax, - std::vector<IdentifierHash>* IDList); - - - - /// obsolete rob identifier methods - - void DetROBIDListUint(DETID detectorID, - double etaMin,double etaMax, - double phiMin, double phiMax, - std::vector<uint32_t>& outputROBIDList); - - // inner detector - void DetROBIDListUint(DETID detectorID, - double zMin, double zMax, - double etaMin, double etaMax, - double phiMin, double phiMax, - std::vector<uint32_t>& outputROBIDList); - - - void DetROBIDListUint(DETID detectorID, - double zMin, double zMax, - double etaMin, double etaMax, - double phiMin, double phiMax, - double xBeam, double yBeam, - std::vector<uint32_t>& outputROBIDList); - - - // inner detector by layer - void DetROBIDListUint(DETID detectorID, long layer, - double zMin, double zMax, - double etaMin, double etaMax, - double phiMin, double phiMax, - std::vector<uint32_t>& outputROBIDList); - - - - // calorimeter - void DetROBIDListUint(DETID detectorID, long sampling, - double etaMin, double etaMax, - double phiMin, double phiMax, - std::vector<uint32_t>& outputROBIDList); - - - - - - // Combined inner detector rob id and hash id methods - - void DetROBHashIDList(DETID detectorID, - double zMin, double zMax, - double etaMin, double etaMax, - double phiMin, double phiMax, - std::vector<uint32_t>& outputROBIDList, - std::vector<IdentifierHash>* IDList ); - - void DetROBHashIDList(DETID detectorID, - const IRoiDescriptor& roi, - std::vector<uint32_t>& outputROBIDList, - std::vector<IdentifierHash>* IDList); - - - // inner detector layer - void DetROBHashIDList(DETID detectorID, long layer, - double zMin, double zMax, - double etaMin, double etaMax, - double phiMin, double phiMax, - std::vector<uint32_t>& outputROBIDList, - std::vector<IdentifierHash>* IDList); - - void DetROBHashIDList(DETID detectorID, long layer, - const IRoiDescriptor& roi, - std::vector<uint32_t>& outputROBIDList, - std::vector<IdentifierHash>* IDList); - - // inner detector full scan - void DetROBHashIDList(DETID detectorID, - std::vector<uint32_t>& outputROBIDList, - std::vector<IdentifierHash>* IDList ); - - - - - - - // Find disabled inner detector modules from a layer - void DetDisabledHashIDList(DETID detectorID, long layer, - double zMin, double zMax, - double etaMin, double etaMax, - double phiMin, double phiMax, - std::vector<IdentifierHash>* IDList); - -#if 0 - void DetDisabledHashIDList(DETID detectorID, long layer, - const IRoiDescriptor& roi, - std::vector<IdentifierHash>* IDList); -#endif - - - void getDisabledLayers(DETID detectorID, - int subdetector, - double zMin, double zMax, - double etaMin, double etaMax, - double phiMin, double phiMax, - std::vector<int>& layers); - - void getDisabledLayers(DETID detectorID, - double zMin, double zMax, - double etaMin, double etaMax, - double phiMin, double phiMax, - std::vector<int>& barrellayers, - std::vector<int>& endAlayers, - std::vector<int>& endClayers ); - diff --git a/DetectorDescription/RegionSelector/src/obsolete.icc b/DetectorDescription/RegionSelector/src/obsolete.icc deleted file mode 100644 index dea79b16ab5..00000000000 --- a/DetectorDescription/RegionSelector/src/obsolete.icc +++ /dev/null @@ -1,1594 +0,0 @@ -// emacs: this is -*- c++ -*- - -/* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration -*/ - -/////////////////////////////////////////////////////////////////////// -/// obsolete HashID methods -/////////////////////////////////////////////////////////////////////// - - -// calorimeter - -void RegSelSvc::DetROBIDListUint(DETID detectorID, - long sampling, - double etaMin, double etaMax, - double phiMin, double phiMax, - std::vector<uint32_t>& outputROBIDList) { - - static bool first = true; - if ( first ) { - first = false; - (*m_log) << MSG::WARNING << __func__ << " - This method is obsolete DO NOT USE" << endmsg; - } - - if(m_msgOutputLevel <= MSG::DEBUG && outputROBIDList.size()!=0 ){ - if(m_msgOutputLevel <= MSG::WARNING ) - (*m_log) << MSG::WARNING << " input outputROBIDList vector not empty for RegSelSvc call for detectorID " << detectorID << endmsg; - } - outputROBIDList.clear(); - - if ( !checkinput(etaMin, etaMax, phiMin, phiMax) ) { - if(m_msgOutputLevel <= MSG::WARNING ) - (*m_log) << MSG::WARNING << " bad roi parameter to regionselector" - << "\tetaMin=" << etaMin << "\tetaMax=" << etaMax - << "\tphiMin=" << phiMin << "\tphiMax=" << phiMax << endmsg; - - return; - } - - - switch(detectorID){ - case PIXEL: - case SCT: - return DetROBIDListUint(detectorID, sampling, -m_DeltaZ, m_DeltaZ, etaMin, etaMax, phiMin, phiMax, outputROBIDList); - break; - case TRT: - break; - case LAR: // Liquid Argon Calorimeter - verifyInputs(LAR, etaMin, etaMax, phiMin, phiMax); - m_larData.regionSelectorRobIdUint(sampling, etaMin, etaMax, phiMin, phiMax, outputROBIDList); - //log<< MSG::DEBUG << "LAR verifyOutput" << endmsg; larData.verifyOutput(ROBID, sampling, etaMin, etaMax, phiMin, phiMax,outputROBIDList); - break; - case TTEM: // Liquid Argon Trigger Tower EM Calorimeter - verifyInputs(TTEM, etaMin, etaMax, phiMin, phiMax); - m_ttemData.regionSelectorRobIdUint(sampling, etaMin, etaMax, phiMin, phiMax, outputROBIDList); - //log<< MSG::DEBUG << "TTEM verifyOutput" << endmsg; ttemData.verifyOutput(ROBID, sampling, etaMin, etaMax, phiMin, phiMax,outputROBIDList); - break; - case TTHEC: // Liquid Argon Trigger Tower HEC Calorimeter - verifyInputs(TTHEC, etaMin, etaMax, phiMin, phiMax); - m_tthecData.regionSelectorRobIdUint(sampling, etaMin, etaMax, phiMin, phiMax, outputROBIDList); - //log<< MSG::DEBUG << "TTHEC verifyOutput" << endmsg; tthecData.verifyOutput(ROBID, sampling, etaMin, etaMax, phiMin, phiMax,outputROBIDList); - break; - case FCALEM: // Liquid Argon Trigger Tower FCALEM Calorimeter - verifyInputs(FCALEM, etaMin, etaMax, phiMin, phiMax); - m_ttfcalemData.regionSelectorRobIdUint(sampling, etaMin, etaMax, phiMin, phiMax, outputROBIDList); - //log<< MSG::DEBUG << "FCALEM verifyOutput" << endmsg; ttfcalemData.verifyOutput(ROBID, sampling, etaMin, etaMax, phiMin, phiMax,outputROBIDList); - break; - case FCALHAD: // Liquid Argon Trigger Tower FCALHAD Calorimeter - verifyInputs(FCALHAD, etaMin, etaMax, phiMin, phiMax); - m_ttfcalhadData.regionSelectorRobIdUint(sampling, etaMin, etaMax, phiMin, phiMax, outputROBIDList); - //log<< MSG::DEBUG << "FCALHAD verifyOutput" << endmsg; ttfcalhadData.verifyOutput(ROBID, sampling, etaMin, etaMax, phiMin, phiMax,outputROBIDList); - break; - case TILE: // Tile Calorimeters - break; - case MDT: // MDT Calorimeter - break; - case RPC: // RPC Calorimeters - break; - case TGC: // TGC Calorimeters - break; - case CSC: // CSC Calorimeters - break; - default: - break; - } - - if(m_msgOutputLevel <= MSG::DEBUG){ - (*m_log) << MSG::DEBUG << "DetROBIDListUint for detector " << detectorID - << " got " << outputROBIDList.size() << " ROB IDs" << endmsg; - } - -} - - - - - - - - - - - - - - -// Combiner inner detector rob id and hash id methods - -void RegSelSvc::DetROBHashIDList(DETID detectorID, - double zMin, double zMax, - double etaMin, double etaMax, - double phiMin, double phiMax, - std::vector<uint32_t>& outputROBIDList, - std::vector<IdentifierHash> *IDList) -{ - - static bool first = true; - if ( first ) { - first = false; - (*m_log) << MSG::WARNING << __func__ << " - This method is obsolete DO NOT USE" << endmsg; - } - - // std::cout << "RegSelSvc::DetROBHashIDList() new map " << detectorID << std::endl; - - // if(m_msgOutputLevel <= MSG::WARNING ) - // (*m_log) << MSG::WARNING << " This method is obsolete - please replace" << endmsg; - - - if(m_msgOutputLevel <= MSG::DEBUG && outputROBIDList.size()!=0 ){ - if(m_msgOutputLevel <= MSG::WARNING ) - (*m_log) << MSG::WARNING << " input outputROBIDList vector not empty for RegSelSvc call for detectorID " << detectorID << endmsg; - } - outputROBIDList.clear(); - - if(m_msgOutputLevel <= MSG::DEBUG && IDList->size()!=0 ){ - if(m_msgOutputLevel <= MSG::WARNING ) - (*m_log) << MSG::WARNING << " input IDList vector not empty for RegSelSvc call for detectorID " << detectorID << endmsg; - } - IDList->clear(); - - if ( !checkinput(zMin, zMax, etaMin, etaMax, phiMin, phiMax) ) { - (*m_log) << MSG::WARNING << " bad roi parameter to regionselector" - << "zMin=" << zMin << "\tzMax=" << zMax - << "\tetaMin=" << etaMin << "\tetaMax=" << etaMax - << "\tphiMin=" << phiMin << "\tphiMax=" << phiMax << endmsg; - - return; - } - - RegSelRoI roi( zMin, zMax, phiMin, phiMax, etaMin, etaMax ); - - switch(detectorID){ - case PIXEL: { // Pixel - if ( m_newpixel ) m_newpixel->getRobHashList(roi, outputROBIDList, *IDList); - break; - } - case SCT: { // Semiconductor Tracker (and pixel) - if ( m_newsct ) m_newsct->getRobHashList(roi, outputROBIDList, *IDList); - break; - } - case TRT: { // TRT (obviously) - if ( m_newtrt ) m_newtrt->getRobHashList(roi, outputROBIDList, *IDList); - break; - } - default: - break; - } - - if(m_msgOutputLevel <= MSG::DEBUG){ - (*m_log) << MSG::DEBUG << "DetROBHashIDList for detector " << detectorID - << " got " << IDList->size() << " hash IDs" << endmsg; - } - -} - - - -#if 1 -void RegSelSvc::DetROBHashIDList(DETID detectorID, - const IRoiDescriptor& roi, - std::vector<uint32_t>& outputROBIDList, - std::vector<IdentifierHash> *IDList) -{ - // std::cout << "RegSelSvc::DetROBHashIDList() new map " << detectorID << std::endl; - - static bool first = true; - if ( first ) { - first = false; - (*m_log) << MSG::WARNING << __func__ << " - This method is obsolete DO NOT USE" << endmsg; - } - - if(m_msgOutputLevel <= MSG::DEBUG && outputROBIDList.size()!=0 ){ - if(m_msgOutputLevel <= MSG::WARNING ) - (*m_log) << MSG::WARNING << " input outputROBIDList vector not empty for RegSelSvc call for detectorID " << detectorID << endmsg; - } - outputROBIDList.clear(); - - if(m_msgOutputLevel <= MSG::DEBUG && IDList->size()!=0 ){ - if(m_msgOutputLevel <= MSG::WARNING ) - (*m_log) << MSG::WARNING << " input IDList vector not empty for RegSelSvc call for detectorID " << detectorID << endmsg; - } - IDList->clear(); - - RegSelRoI _roi( roi.zedMinus(), roi.zedPlus(), - roi.phiMinus(), roi.phiPlus(), - roi.etaMinus(), roi.etaPlus() ); - - switch(detectorID){ - case PIXEL: { // Pixel - if ( m_newpixel ) m_newpixel->getRobHashList(_roi, outputROBIDList, *IDList); - break; - } - case SCT: { // Semiconductor Tracker (and pixel) - if ( m_newsct ) m_newsct->getRobHashList(_roi, outputROBIDList, *IDList); - break; - } - case TRT: { // TRT (obviously) - if ( m_newtrt ) m_newtrt->getRobHashList(_roi, outputROBIDList, *IDList); - break; - } - default: - break; - } - - if(m_msgOutputLevel <= MSG::DEBUG){ - (*m_log) << MSG::DEBUG << "DetROBHashIDList for detector " << detectorID - << " got " << IDList->size() << " hash IDs" << endmsg; - } - -} -#endif - - - - -// inner detector by layer - -void RegSelSvc::DetROBHashIDList(DETID detectorID, long layer, - double zMin, double zMax, - double etaMin, double etaMax, - double phiMin, double phiMax, - std::vector<uint32_t>& outputROBIDList, - std::vector<IdentifierHash> *IDList) -{ - - static bool first = true; - if ( first ) { - first = false; - (*m_log) << MSG::WARNING << __func__ << " - This method is obsolete DO NOT USE" << endmsg; - } - - // std::cout << "RegSelSvc::DetROBHashIDList() new map " << detectorID << std::endl; - - if(m_msgOutputLevel <= MSG::DEBUG && outputROBIDList.size()!=0 ){ - if(m_msgOutputLevel <= MSG::WARNING ) - (*m_log) << MSG::WARNING << " input outputROBIDList vector not empty for RegSelSvc call for detectorID " << detectorID << endmsg; - } - outputROBIDList.clear(); - - if(m_msgOutputLevel <= MSG::DEBUG && IDList->size()!=0 ){ - if(m_msgOutputLevel <= MSG::WARNING ) - (*m_log) << MSG::WARNING << " input IDList vector not empty for RegSelSvc call for detectorID " << detectorID << endmsg; - } - IDList->clear(); - - if ( !checkinput(zMin, zMax, etaMin, etaMax, phiMin, phiMax) ) { - if(m_msgOutputLevel <= MSG::WARNING ) - (*m_log) << MSG::WARNING << " bad roi parameter to regionselector" - << "zMin=" << zMin << "\tzMax=" << zMax - << "\tetaMin=" << etaMin << "\tetaMax=" << etaMax - << "\tphiMin=" << phiMin << "\tphiMax=" << phiMax << endmsg; - - return; - } - - RegSelRoI roi( zMin, zMax, phiMin, phiMax, etaMin, etaMax ); - - switch(detectorID){ - case PIXEL: { // Pixel - if ( m_newpixel ) m_newpixel->getRobHashList(roi, layer, outputROBIDList, *IDList); - break; - } - case SCT: { // Semiconductor Tracker (and pixel) - if ( m_newsct ) m_newsct->getRobHashList(roi, layer, outputROBIDList, *IDList); - break; - } - case TRT: { // TRT (obviously) - if ( m_newtrt ) m_newtrt->getRobHashList(roi, layer, outputROBIDList, *IDList); - break; - } - default: - break; - } - - if(m_msgOutputLevel <= MSG::DEBUG){ - (*m_log) << MSG::DEBUG << "DetROBHashIDList for detector " << detectorID - << " got " << IDList->size() << " hash IDs" << endmsg; - } - -} - - -#if 1 -void RegSelSvc::DetROBHashIDList(DETID detectorID, long layer, - const IRoiDescriptor& roi, - std::vector<uint32_t>& outputROBIDList, - std::vector<IdentifierHash> *IDList) -{ - - static bool first = true; - if ( first ) { - first = false; - (*m_log) << MSG::WARNING << __func__ << " - This method is obsolete DO NOT USE" << endmsg; - } - - // std::cout << "RegSelSvc::DetROBHashIDList() new map " << detectorID << std::endl; - - - if(m_msgOutputLevel <= MSG::DEBUG && outputROBIDList.size()!=0 ){ - if(m_msgOutputLevel <= MSG::WARNING ) - (*m_log) << MSG::WARNING << " input outputROBIDList vector not empty for RegSelSvc call for detectorID " << detectorID << endmsg; - } - outputROBIDList.clear(); - - if(m_msgOutputLevel <= MSG::DEBUG && IDList->size()!=0 ){ - if(m_msgOutputLevel <= MSG::WARNING ) - (*m_log) << MSG::WARNING << " input IDList vector not empty for RegSelSvc call for detectorID " << detectorID << endmsg; - } - IDList->clear(); - - RegSelRoI _roi( roi.zedMinus(), roi.zedPlus(), - roi.phiMinus(), roi.phiPlus(), - roi.etaMinus(), roi.etaPlus() ); - - - switch(detectorID){ - case PIXEL: { // Pixel - if ( m_newpixel ) m_newpixel->getRobHashList(_roi, layer, outputROBIDList, *IDList); - break; - } - case SCT: { // Semiconductor Tracker (and pixel) - if ( m_newsct ) m_newsct->getRobHashList(_roi, layer, outputROBIDList, *IDList); - break; - } - case TRT: { // TRT (obviously) - if ( m_newtrt ) m_newtrt->getRobHashList(_roi, layer, outputROBIDList, *IDList); - break; - } - default: - break; - } - - if(m_msgOutputLevel <= MSG::DEBUG){ - (*m_log) << MSG::DEBUG << "DetROBHashIDList for detector " << detectorID - << " got " << IDList->size() << " hash IDs" << endmsg; - } - -} -#endif - - - -// inner detector full scan - -void RegSelSvc::DetROBHashIDList(DETID detectorID, - std::vector<uint32_t>& outputROBIDList, - std::vector<IdentifierHash>* IDList ) -{ - - static bool first = true; - if ( first ) { - first = false; - (*m_log) << MSG::WARNING << __func__ << " - This method is obsolete DO NOT USE" << endmsg; - } - - if(m_msgOutputLevel <= MSG::DEBUG && outputROBIDList.size()!=0 ){ - if(m_msgOutputLevel <= MSG::WARNING ) - (*m_log) << MSG::WARNING << " input outputROBIDList vector not empty for RegSelSvc call for detectorID " << detectorID << endmsg; - } - outputROBIDList.clear(); - - if(m_msgOutputLevel <= MSG::DEBUG && IDList->size()!=0 ){ - if(m_msgOutputLevel <= MSG::WARNING ) - (*m_log) << MSG::WARNING << " input IDList vector not empty for RegSelSvc call for detectorID " << detectorID << endmsg; - } - IDList->clear(); - - switch (detectorID) { - case PIXEL: { // Pixel - if ( m_newpixel ) m_newpixel->getRobHashList(outputROBIDList, *IDList); - break; - } - case SCT: { // SCT - if ( m_newsct ) m_newsct->getRobHashList(outputROBIDList, *IDList); - break; - } - case TRT: { // TRT - if ( m_newtrt ) m_newtrt->getRobHashList(outputROBIDList, *IDList); - break; - } - default: - break; - } -} - - - - - - - - - - - - -// methods to return the list of disabled modules from the inner -// within and roi in a given layer - -void RegSelSvc::DetDisabledHashIDList(DETID detectorID, long layer, - double zMin, double zMax, - double etaMin, double etaMax, - double phiMin, double phiMax, - std::vector<IdentifierHash>* IDList) -{ - - static bool first = true; - if ( first ) { - first = false; - (*m_log) << MSG::WARNING << __func__ << " - This method is obsolete DO NOT USE" << endmsg; - } - - // std::cout << "RegSelSvc::DetDisabledHashIDList() new map " << detectorID << std::endl; - - if(m_msgOutputLevel <= MSG::DEBUG && IDList->size()!=0 ){ - if(m_msgOutputLevel <= MSG::WARNING ) - (*m_log) << MSG::WARNING << " input IDList vector not empty for RegSelSvc call for detectorID " << detectorID << endmsg; - } - IDList->clear(); - - if ( !checkinput(zMin, zMax, etaMin, etaMax, phiMin, phiMax) ) { - if(m_msgOutputLevel <= MSG::WARNING ) - (*m_log) << MSG::WARNING << " bad roi parameter to regionselector" - << "zMin=" << zMin << "\tzMax=" << zMax - << "\tetaMin=" << etaMin << "\tetaMax=" << etaMax - << "\tphiMin=" << phiMin << "\tphiMax=" << phiMax << endmsg; - - return; - } - - RegSelRoI roi( zMin, zMax, phiMin, phiMax, etaMin, etaMax ); - - switch(detectorID){ - case PIXEL: { // Pixel - if ( m_newpixel ) m_newpixel->getDisabledHashList(roi, layer, *IDList); - break; - } - case SCT: { // Semiconductor Tracker (and pixel) - if ( m_newsct ) m_newsct->getDisabledHashList(roi, layer, *IDList); - break; - } - case TRT: { // TRT (obviously) - if ( m_newtrt ) m_newtrt->getDisabledHashList(roi, layer, *IDList); - break; - } - default: - break; - } - - if(m_msgOutputLevel <= MSG::DEBUG){ - (*m_log) << MSG::DEBUG << "DetDisabledHashIDList for detector " << detectorID - << " got " << IDList->size() << " hash IDs" << endmsg; - } - -} - - - - -void RegSelSvc::getDisabledLayers(DETID detectorID, - int subdetector, - double zMin, double zMax, - double etaMin, double etaMax, - double phiMin, double phiMax, - std::vector<int>& layers) -{ - - static bool first = true; - if ( first ) { - first = false; - (*m_log) << MSG::WARNING << __func__ << " - This method is obsolete DO NOT USE" << endmsg; - } - - if(m_msgOutputLevel <= MSG::DEBUG && layers.size()!=0 ){ - if(m_msgOutputLevel <= MSG::WARNING ) - (*m_log) << MSG::WARNING << " input layers vector not empty for RegSelSvc call for detectorID " << detectorID << endmsg; - } - layers.clear(); - - if ( !checkinput(zMin, zMax, etaMin, etaMax, phiMin, phiMax) ) { - if(m_msgOutputLevel <= MSG::WARNING ) - (*m_log) << MSG::WARNING << " bad roi parameter to regionselector" - << "zMin=" << zMin << "\tzMax=" << zMax - << "\tetaMin=" << etaMin << "\tetaMax=" << etaMax - << "\tphiMin=" << phiMin << "\tphiMax=" << phiMax << endmsg; - - return; - } - - RegSelRoI roi( zMin, zMax, phiMin, phiMax, etaMin, etaMax ); - - switch(detectorID){ - case PIXEL: { // Pixel - if ( m_newpixel ) m_newpixel->getDisabledLayers(roi, subdetector, layers); - break; - } - case SCT: { // Semiconductor Tracker (and pixel) - if ( m_newsct ) m_newsct->getDisabledLayers(roi, subdetector, layers); - break; - } - default: - break; - } - -} - - - -void RegSelSvc::getDisabledLayers(DETID detectorID, - double zMin, double zMax, - double etaMin, double etaMax, - double phiMin, double phiMax, - std::vector<int>& barrellayers, - std::vector<int>& endAlayers, - std::vector<int>& endClayers) -{ - - static bool first = true; - if ( first ) { - first = false; - (*m_log) << MSG::WARNING << __func__ << " - This method is obsolete DO NOT USE" << endmsg; - } - - if(m_msgOutputLevel <= MSG::DEBUG && barrellayers.size()!=0 ){ - if(m_msgOutputLevel <= MSG::WARNING ) - (*m_log) << MSG::WARNING << " input barrellayers vector not empty for RegSelSvc call for detectorID " << detectorID << endmsg; - } - barrellayers.clear(); - - - if(m_msgOutputLevel <= MSG::DEBUG && endAlayers.size()!=0 ){ - if(m_msgOutputLevel <= MSG::WARNING ) - (*m_log) << MSG::WARNING << " input endAlayers vector not empty for RegSelSvc call for detectorID " << detectorID << endmsg; - } - endAlayers.clear(); - - if(m_msgOutputLevel <= MSG::DEBUG && endClayers.size()!=0 ){ - if(m_msgOutputLevel <= MSG::WARNING ) - (*m_log) << MSG::WARNING << " input endClayers vector not empty for RegSelSvc call for detectorID " << detectorID << endmsg; - } - endClayers.clear(); - - if ( !checkinput(zMin, zMax, etaMin, etaMax, phiMin, phiMax) ) { - if(m_msgOutputLevel <= MSG::WARNING ) - (*m_log) << MSG::WARNING << " bad roi parameter to regionselector" - << "zMin=" << zMin << "\tzMax=" << zMax - << "\tetaMin=" << etaMin << "\tetaMax=" << etaMax - << "\tphiMin=" << phiMin << "\tphiMax=" << phiMax << endmsg; - - return; - } - - RegSelRoI roi( zMin, zMax, phiMin, phiMax, etaMin, etaMax ); - - switch(detectorID){ - case PIXEL: { // Pixel - if ( m_newpixel ) { - m_newpixel->getDisabledLayers(roi, 0, barrellayers); - m_newpixel->getDisabledLayers(roi, -2, endAlayers); - m_newpixel->getDisabledLayers(roi, 2, endClayers); - } - break; - } - case SCT: { // Semiconductor Tracker (and pixel) - if ( m_newsct ) { - m_newsct->getDisabledLayers(roi, 0, barrellayers); - m_newsct->getDisabledLayers(roi, -2, endAlayers); - m_newsct->getDisabledLayers(roi, 2, endClayers); - } - break; - } - default: - break; - } - -} - - - - - -#if 0 -void RegSelSvc::DetDisabledHashIDList(DETID detectorID, long layer, - const IRoiDescriptor& roi, - std::vector<IdentifierHash>* IDList) -{ - // std::cout << "RegSelSvc::DetDisabledHashIDList() new map " << detectorID << std::endl; - - if(m_msgOutputLevel <= MSG::DEBUG && IDList->size()!=0 ){ - if(m_msgOutputLevel <= MSG::WARNING ) - (*m_log) << MSG::WARNING << " input IDList vector not empty for RegSelSvc call for detectorID " << detectorID << endmsg; - } - IDList->clear(); - - RegSelRoI _roi( roi.zedMinus(), roi.zedPlus(), - roi.phiMinus(), roi.phiPlus(), - roi.etaMinus(), roi.etaPlus() ); - - - switch(detectorID){ - case PIXEL: { // Pixel - if ( m_newpixel ) m_newpixel->getDisabledHashList(_roi, layer, *IDList); - break; - } - case SCT: { // Semiconductor Tracker (and pixel) - if ( m_newsct ) m_newsct->getDisabledHashList(_roi, layer, *IDList); - break; - } - case TRT: { // TRT (obviously) - if ( m_newtrt ) m_newtrt->getDisabledHashList(_roi, layer, *IDList); - break; - } - default: - break; - } - - if(m_msgOutputLevel <= MSG::DEBUG){ - (*m_log) << MSG::DEBUG << "DetDisabledHashIDList for detector " << detectorID - << " got " << IDList->size() << " hash IDs" << endmsg; - } - -} -#endif - - - - - -// old Region Selector interface - -void RegSelSvc::DetHashIDList(DETID detectorID, - double etaMin,double etaMax, - double phiMin, double phiMax, - std::vector<IdentifierHash>* IDList) { - - static bool first = true; - if ( first ) { - first = false; - (*m_log) << MSG::WARNING << __func__ << " - This method is obsolete DO NOT USE" << endmsg; - } - - // if(m_msgOutputLevel <= MSG::WARNING ) - // (*m_log) << MSG::WARNING << " THIS METHOD IS OBSOLETE - PLEASE REPLACE" << endmsg; - - - if(m_msgOutputLevel <= MSG::DEBUG && IDList->size()!=0 ){ - if(m_msgOutputLevel <= MSG::WARNING ) - (*m_log) << MSG::WARNING << " input IDList vector not empty for RegSelSvc call for detectorID " << detectorID << endmsg; - } - IDList->clear(); - - if ( !checkinput(etaMin, etaMax, phiMin, phiMax) ) { - if(m_msgOutputLevel <= MSG::WARNING ) - (*m_log) << MSG::WARNING << " bad roi parameter to regionselector" - << "\tetaMin=" << etaMin << "\tetaMax=" << etaMax - << "\tphiMin=" << phiMin << "\tphiMax=" << phiMax << endmsg; - - return; - } - - switch(detectorID){ - case PIXEL: - case SCT: - case TRT: - case MDT: - case RPC: - case TGC: - case CSC: - return DetHashIDList(detectorID, -m_DeltaZ, m_DeltaZ, etaMin, etaMax, phiMin, phiMax, IDList); - break; - case LAR: // Liquid Argon Calorimeter - verifyInputs(LAR, etaMin, etaMax, phiMin, phiMax); - m_larData.regionSelector(etaMin, etaMax, phiMin, phiMax,(*IDList)); - //log<< MSG::DEBUG << "LAR hashID verifyOutput" << endmsg; larDataIdentHash.verifyOutput(etaMin, etaMax, phiMin, phiMax,IDList); - break; - case TTEM: // Liquid Argon Trigger Tower EM Calorimeter - verifyInputs(TTEM, etaMin, etaMax, phiMin, phiMax); - m_ttemData.regionSelector(etaMin, etaMax, phiMin, phiMax,(*IDList)); - //log<< MSG::DEBUG << "TTEM hashID verifyOutput" << endmsg; ttemDataIdentHash.verifyOutput(etaMin, etaMax, phiMin, phiMax,IDList); - break; - case TTHEC: // Liquid Argon Trigger Tower HEC Calorimeter - verifyInputs(TTHEC, etaMin, etaMax, phiMin, phiMax); - m_tthecData.regionSelector(etaMin, etaMax, phiMin, phiMax,(*IDList)); - //log<< MSG::DEBUG << "TTHEC hashID verifyOutput" << endmsg; tthecDataIdentHash.verifyOutput(etaMin, etaMax, phiMin, phiMax,IDList); - break; - case FCALEM: // Liquid Argon Trigger Tower HEC Calorimeter - verifyInputs(FCALEM, etaMin, etaMax, phiMin, phiMax); - m_ttfcalemData.regionSelector(etaMin, etaMax, phiMin, phiMax,(*IDList)); - //log<< MSG::DEBUG << "TTHEC hashID verifyOutput" << endmsg; ttfcalemDataIdentHash.verifyOutput(etaMin, etaMax, phiMin, phiMax,IDList); - break; - case FCALHAD: // Liquid Argon Trigger Tower HEC Calorimeter - verifyInputs(FCALHAD, etaMin, etaMax, phiMin, phiMax); - m_ttfcalhadData.regionSelector(etaMin, etaMax, phiMin, phiMax,(*IDList)); - //log<< MSG::DEBUG << "TTHEC hashID verifyOutput" << endmsg; ttfcalhadDataIdentHash.verifyOutput(etaMin, etaMax, phiMin, phiMax,IDList); - break; - case TILE: // Tile Calorimeters - verifyInputs(TILE, etaMin, etaMax, phiMin, phiMax); - m_tileData.regionSelector(TILE,etaMin, etaMax, phiMin, phiMax,(*IDList)); - break; - default: - break; - } - - if(m_msgOutputLevel <= MSG::DEBUG){ - (*m_log) << MSG::DEBUG << "DetHashIDList for detector " << detectorID - << " got " << IDList->size() << " hash IDs" << endmsg; - } - -} - - - - - -// detector with new lookup tables - -void RegSelSvc::DetHashIDList(DETID detectorID, - double zMin, double zMax, - double etaMin, double etaMax, - double phiMin, double phiMax, - std::vector<IdentifierHash> *IDList) -{ - - static bool first = true; - if ( first ) { - first = false; - (*m_log) << MSG::WARNING << __func__ << " - This method is obsolete DO NOT USE" << endmsg; - } - - // if(m_msgOutputLevel <= MSG::WARNING ) - // (*m_log) << MSG::WARNING << " THIS METHOD IS OBSOLETE - PLEASE REPLACE" << endmsg; - - // std::cout << "RegSelSvc::DetHashIDList() new map " << detectorID << std::endl; - - if(m_msgOutputLevel <= MSG::DEBUG && IDList->size()!=0 ){ - if(m_msgOutputLevel <= MSG::WARNING ) - (*m_log) << MSG::WARNING << " input IDList vector not empty for RegSelSvc call for detectorID " << detectorID << endmsg; - } - IDList->clear(); - - if ( !checkinput(zMin, zMax, etaMin, etaMax, phiMin, phiMax) ) { - if(m_msgOutputLevel <= MSG::WARNING ) - (*m_log) << MSG::WARNING << " bad roi parameter to regionselector" - << "zMin=" << zMin << "\tzMax=" << zMax - << "\tetaMin=" << etaMin << "\tetaMax=" << etaMax - << "\tphiMin=" << phiMin << "\tphiMax=" << phiMax << endmsg; - - return; - } - - RegSelRoI roi( zMin, zMax, phiMin, phiMax, etaMin, etaMax ); - - - switch(detectorID){ - case PIXEL: { // Pixel - if ( m_newpixel ) m_newpixel->getHashList(roi, *IDList); - break; - } - case SCT: { // Semiconductor Tracker (and pixel) - if ( m_newsct ) m_newsct->getHashList(roi, *IDList); - break; - } - case TRT: { // TRT (obviously) - if ( m_newtrt ) m_newtrt->getHashList(roi, *IDList); - break; - } - case RPC: { // RPC (obviously) - if ( m_newrpc ) m_newrpc->getHashList(roi, *IDList); - break; - } - case MDT: { // MDT (obviously) - if ( m_newmdt ) m_newmdt->getHashList(roi, *IDList); - break; - } - case TGC: { // TGC (obviously) - if ( m_newtgc ) m_newtgc->getHashList(roi, *IDList); - break; - } - case CSC: { // CSC (obviously) - if ( m_newcsc ) m_newcsc->getHashList(roi, *IDList); - break; - } - default: - break; - } - - if(m_msgOutputLevel <= MSG::DEBUG){ - (*m_log) << MSG::DEBUG << "DetHashIDList for detector " << detectorID - << " got " << IDList->size() << " hash IDs" << endmsg; - } - -} - - - - - - -void RegSelSvc::DetHashIDList(DETID detectorID, - double zMin, double zMax, - double etaMin, double etaMax, - double phiMin, double phiMax, - double xBeam, double yBeam, - std::vector<IdentifierHash> *IDList) -{ - - static bool first = true; - if ( first ) { - first = false; - (*m_log) << MSG::WARNING << __func__ << " - This method is obsolete DO NOT USE" << endmsg; - } - - // if(m_msgOutputLevel <= MSG::WARNING ) - // (*m_log) << MSG::WARNING << " THIS METHOD IS OBSOLETE - PLEASE REPLACE" << endmsg; - - // std::cout << "RegSelSvc::DetHashIDList() new map " << detectorID << std::endl; - - if(m_msgOutputLevel <= MSG::DEBUG && IDList->size()!=0 ){ - if(m_msgOutputLevel <= MSG::WARNING ) - (*m_log) << MSG::WARNING << " input IDList vector not empty for RegSelSvc call for detectorID " << detectorID << endmsg; - } - IDList->clear(); - - if ( !checkinput(zMin, zMax, etaMin, etaMax, phiMin, phiMax) ) { - if(m_msgOutputLevel <= MSG::WARNING ) - (*m_log) << MSG::WARNING << " bad roi parameter to regionselector" - << "zMin=" << zMin << "\tzMax=" << zMax - << "\tetaMin=" << etaMin << "\tetaMax=" << etaMax - << "\tphiMin=" << phiMin << "\tphiMax=" << phiMax << endmsg; - - return; - } - - RegSelRoI roi( zMin, zMax, phiMin, phiMax, etaMin, etaMax ); - - switch(detectorID){ - case PIXEL: { // Pixel - if ( m_newpixel ) m_newpixel->getHashList(roi, *IDList, xBeam, yBeam ); - break; - } - case SCT: { // Semiconductor Tracker (and pixel) - if ( m_newsct ) m_newsct->getHashList(roi, *IDList, xBeam, yBeam ); - break; - } - case TRT: { // TRT (obviously) - if ( m_newtrt ) m_newtrt->getHashList(roi, *IDList, xBeam, yBeam ); - break; - } - case MDT: { - if ( m_newmdt ) m_newmdt->getHashList(roi, *IDList, xBeam, yBeam ); - break; - } - case RPC: { - if ( m_newrpc ) m_newrpc->getHashList(roi, *IDList, xBeam, yBeam ); - break; - } - case TGC: { - if ( m_newtgc ) m_newtgc->getHashList(roi, *IDList, xBeam, yBeam ); - break; - } - case CSC: { - if ( m_newcsc ) m_newcsc->getHashList(roi, *IDList, xBeam, yBeam ); - break; - } - default: - break; - } - - if(m_msgOutputLevel <= MSG::DEBUG){ - (*m_log) << MSG::DEBUG << "DetHashIDList for detector " << detectorID - << " got " << IDList->size() << " hash IDs" << endmsg; - } - -} - - - -#if 1 -void RegSelSvc::DetHashIDList(DETID detectorID, - const IRoiDescriptor& roi, - std::vector<IdentifierHash> *IDList) -{ - - static bool first = true; - if ( first ) { - first = false; - (*m_log) << MSG::WARNING << __func__ << " - This method is obsolete DO NOT USE" << endmsg; - } - - if ( roi.isFullscan() ) return DetHashIDList( detectorID, IDList ); - - // std::cout << "RegSelSvc::DetHashIDList() new map " << detectorID << std::endl; - - // if(m_msgOutputLevel <= MSG::WARNING ) - // (*m_log) << MSG::WARNING << " THIS METHOD IS OBSOLETE - PLEASE REPLACE" << endmsg; - - - if(m_msgOutputLevel <= MSG::DEBUG && IDList->size()!=0 ){ - if(m_msgOutputLevel <= MSG::WARNING ) - (*m_log) << MSG::WARNING << " input IDList vector not empty for RegSelSvc call for detectorID " << detectorID << endmsg; - } - IDList->clear(); - - RegSelRoI _roi( roi.zedMinus(), roi.zedPlus(), - roi.phiMinus(), roi.phiPlus(), - roi.etaMinus(), roi.etaPlus() ); - - - switch(detectorID){ - case PIXEL: { // Pixel - if ( m_newpixel ) m_newpixel->getHashList(_roi, *IDList); - break; - } - case SCT: { // Semiconductor Tracker (and pixel) - if ( m_newsct ) m_newsct->getHashList(_roi, *IDList); - break; - } - case TRT: { // TRT (obviously) - if ( m_newtrt ) m_newtrt->getHashList(_roi, *IDList); - break; - } - case MDT: { - if ( m_newmdt ) m_newmdt->getHashList(_roi, *IDList); - break; - } - case RPC: { - if ( m_newrpc ) m_newrpc->getHashList(_roi, *IDList); - break; - } - case TGC: { - if ( m_newtgc ) m_newtgc->getHashList(_roi, *IDList); - break; - } - case CSC: { - if ( m_newcsc ) m_newcsc->getHashList(_roi, *IDList); - break; - } - default: - break; - } - - if(m_msgOutputLevel <= MSG::DEBUG){ - (*m_log) << MSG::DEBUG << "DetHashIDList for detector " << detectorID - << " got " << IDList->size() << " hash IDs" << endmsg; - } - -} - - - -// detector by layer - -void RegSelSvc::DetHashIDList(DETID detectorID, long layer, - double zMin, double zMax, - double etaMin, double etaMax, - double phiMin, double phiMax, - std::vector<IdentifierHash> *IDList) -{ - - static bool first = true; - if ( first ) { - first = false; - (*m_log) << MSG::WARNING << __func__ << " - This method is obsolete DO NOT USE" << endmsg; - } - - // std::cout << "RegSelSvc::DetHashIDList() new map " << detectorID << std::endl; - - if(m_msgOutputLevel <= MSG::DEBUG && IDList->size()!=0 ){ - if(m_msgOutputLevel <= MSG::WARNING ) - (*m_log) << MSG::WARNING << " input IDList vector not empty for RegSelSvc call for detectorID " << detectorID << endmsg; - } - IDList->clear(); - - if ( !checkinput(zMin, zMax, etaMin, etaMax, phiMin, phiMax) ) { - if(m_msgOutputLevel <= MSG::WARNING ) - (*m_log) << MSG::WARNING << " bad roi parameter to regionselector" - << "zMin=" << zMin << "\tzMax=" << zMax - << "\tetaMin=" << etaMin << "\tetaMax=" << etaMax - << "\tphiMin=" << phiMin << "\tphiMax=" << phiMax << endmsg; - - return; - } - - RegSelRoI roi( zMin, zMax, phiMin, phiMax, etaMin, etaMax ); - - switch(detectorID){ - case PIXEL: { // Pixel - if ( m_newpixel ) m_newpixel->getHashList(roi, layer, *IDList); - break; - } - case SCT: { // Semiconductor Tracker - if ( m_newsct ) m_newsct->getHashList(roi, layer, *IDList); - break; - } - case TRT: { // TRT (obviously) - if ( m_newtrt ) m_newtrt->getHashList(roi, layer, *IDList); - break; - } - case MDT: { - if ( m_newmdt ) m_newmdt->getHashList(roi, layer, *IDList); - break; - } - case RPC: { - if ( m_newrpc ) m_newrpc->getHashList(roi, layer, *IDList); - break; - } - case TGC: { - if ( m_newtgc ) m_newtgc->getHashList(roi, layer, *IDList); - break; - } - case CSC: { - if ( m_newcsc ) m_newcsc->getHashList(roi, layer, *IDList); - break; - } - default: - break; - } - - if(m_msgOutputLevel <= MSG::DEBUG){ - (*m_log) << MSG::DEBUG << "DetHashIDList for detector " << detectorID - << " got " << IDList->size() << " hash IDs" << endmsg; - } - -} - - -void RegSelSvc::DetHashIDList(DETID detectorID, long layer, - const IRoiDescriptor& roi, - std::vector<IdentifierHash> *IDList) -{ - static bool first = true; - if ( first ) { - first = false; - (*m_log) << MSG::WARNING << __func__ << " - This method is obsolete DO NOT USE" << endmsg; - } - - if ( roi.isFullscan() ) return DetHashIDList( detectorID, layer, *IDList ); - - // std::cout << "RegSelSvc::DetHashIDList() new map " << detectorID << std::endl; - - if(m_msgOutputLevel <= MSG::DEBUG && IDList->size()!=0 ){ - if(m_msgOutputLevel <= MSG::WARNING ) - (*m_log) << MSG::WARNING << " input IDList vector not empty for RegSelSvc call for detectorID " << detectorID << endmsg; - } - IDList->clear(); - - RegSelRoI _roi( roi.zedMinus(), roi.zedPlus(), - roi.phiMinus(), roi.phiPlus(), - roi.etaMinus(), roi.etaPlus() ); - - switch(detectorID){ - case PIXEL: { // Pixel - if ( m_newpixel ) m_newpixel->getHashList(_roi, layer, *IDList); - break; - } - case SCT: { // Semiconductor Tracker - if ( m_newsct ) m_newsct->getHashList(_roi, layer, *IDList); - break; - } - case TRT: { // TRT (obviously) - if ( m_newtrt ) m_newtrt->getHashList(_roi, layer, *IDList); - break; - } - case MDT: { - if ( m_newmdt ) m_newmdt->getHashList(_roi, layer, *IDList); - break; - } - case RPC: { - if ( m_newrpc ) m_newrpc->getHashList(_roi, layer, *IDList); - break; - } - case TGC: { - if ( m_newtgc ) m_newtgc->getHashList(_roi, layer, *IDList); - break; - } - case CSC: { - if ( m_newcsc ) m_newcsc->getHashList(_roi, layer, *IDList); - break; - } - default: - break; - } - - - if(m_msgOutputLevel <= MSG::DEBUG){ - (*m_log) << MSG::DEBUG << "DetHashIDList for detector " << detectorID - << " got " << IDList->size() << " hash IDs" << endmsg; - } - -} -#endif - - - - - - - - -// detector full scan - -void RegSelSvc::DetHashIDList(DETID detectorID, - std::vector<IdentifierHash>* IDList ) -{ - static bool first = true; - if ( first ) { - first = false; - (*m_log) << MSG::WARNING << __func__ << " - This method is obsolete DO NOT USE" << endmsg; - } - - // std::cout << "RegSelSvc::DetHashIDList() new map " << detectorID << std::endl; - - if(m_msgOutputLevel <= MSG::DEBUG && IDList->size()!=0 ){ - if(m_msgOutputLevel <= MSG::WARNING ) - (*m_log) << MSG::WARNING << " input IDList vector not empty for RegSelSvc call for detectorID " << detectorID << endmsg; - } - IDList->clear(); - - switch(detectorID){ - case PIXEL: { // Pixel - if ( m_newpixel ) m_newpixel->getHashList(*IDList); - break; - } - case SCT: { // Semiconductor Tracker (and pixel) - if ( m_newsct ) m_newsct->getHashList(*IDList); - break; - } - case TRT: { // TRT (obviously) - if ( m_newtrt ) m_newtrt->getHashList(*IDList); - break; - } - case MDT: { - if ( m_newmdt ) m_newmdt->getHashList(*IDList); - break; - } - case RPC: { - if ( m_newrpc ) m_newrpc->getHashList(*IDList); - break; - } - case TGC: { - if ( m_newtgc ) m_newtgc->getHashList(*IDList); - break; - } - case CSC: { - if ( m_newcsc ) m_newcsc->getHashList(*IDList); - break; - } - default: - break; - } -} - - - - - -// calorimeter - -void RegSelSvc::DetHashIDList(DETID detectorID, - long sampling, - double etaMin, double etaMax , - double phiMin, double phiMax, - std::vector<IdentifierHash> *IDList) { - - static bool first = true; - if ( first ) { - first = false; - (*m_log) << MSG::WARNING << __func__ << " - This method is obsolete DO NOT USE" << endmsg; - } - - if(m_msgOutputLevel <= MSG::DEBUG && IDList->size()!=0 ){ - if(m_msgOutputLevel <= MSG::WARNING ) - (*m_log) << MSG::WARNING << " input IDList vector not empty for RegSelSvc call for detectorID " << detectorID << endmsg; - } - IDList->clear(); - - if ( !checkinput(etaMin, etaMax, phiMin, phiMax) ) { - if(m_msgOutputLevel <= MSG::WARNING ) - (*m_log) << MSG::WARNING << " bad roi parameter to regionselector" - << "\tetaMin=" << etaMin << "\tetaMax=" << etaMax - << "\tphiMin=" << phiMin << "\tphiMax=" << phiMax << endmsg; - - return; - } - - - switch(detectorID){ - case PIXEL: - case SCT: - case TRT: - case MDT: - case RPC: - case TGC: - case CSC: - return DetHashIDList(detectorID, sampling, -m_DeltaZ, m_DeltaZ, etaMin, etaMax, phiMin, phiMax, IDList); - break; - case LAR: // Liquid Argon Calorimeter - verifyInputs(LAR, etaMin, etaMax, phiMin, phiMax); - m_larData.regionSelector(sampling, etaMin, etaMax, phiMin, phiMax,(*IDList)); - //log<< MSG::DEBUG << "LAR hashID verifyOutput sampling " << sampling << endmsg; larDataIdentHash.verifyOutput(sampling,etaMin, etaMax, phiMin, phiMax,IDList); - break; - case TTEM: // Liquid Argon Trigger Tower EM Calorimeter - verifyInputs(TTEM, etaMin, etaMax, phiMin, phiMax); - m_ttemData.regionSelector(sampling, etaMin, etaMax, phiMin, phiMax,(*IDList)); - //log<< MSG::DEBUG << "TTEM hashID verifyOutput sampling " << sampling << endmsg; ttemDataIdentHash.verifyOutput(sampling,etaMin, etaMax, phiMin, phiMax,IDList); - break; - case TTHEC: // Liquid Argon Trigger Tower HEC Calorimeter - verifyInputs(TTHEC, etaMin, etaMax, phiMin, phiMax); - m_tthecData.regionSelector(sampling, etaMin, etaMax, phiMin, phiMax,(*IDList)); - //log<< MSG::DEBUG << "TTEC hashID verifyOutput sampling " << sampling << endmsg; tthecDataIdentHash.verifyOutput(sampling,etaMin, etaMax, phiMin, phiMax,IDList); - break; - case FCALEM: // Liquid Argon Trigger Tower FCALEM Calorimeter - verifyInputs(FCALEM, etaMin, etaMax, phiMin, phiMax); - m_ttfcalemData.regionSelector(sampling, etaMin, etaMax, phiMin, phiMax,(*IDList)); - //log<< MSG::DEBUG << "FCALEM hashID verifyOutput sampling " << sampling << endmsg; ttfcalemDataIdentHash.verifyOutput(sampling,etaMin, etaMax, phiMin, phiMax,IDList); - break; - case FCALHAD: // Liquid Argon Trigger Tower FCALHAD Calorimeter - verifyInputs(FCALHAD, etaMin, etaMax, phiMin, phiMax); - m_ttfcalhadData.regionSelector(sampling, etaMin, etaMax, phiMin, phiMax,(*IDList)); - //log<< MSG::DEBUG << "FCALHAD hashID verifyOutput sampling " << sampling << endmsg; ttfcalhadDataIdentHash.verifyOutput(sampling,etaMin, etaMax, phiMin, phiMax,IDList); - break; - case TILE: // Tile Calorimeters - break; - default: - break; - } - - if(m_msgOutputLevel <= MSG::DEBUG){ - (*m_log) << MSG::DEBUG << "DetHashIDList for detector " << detectorID - << " got " << IDList->size() << " hash IDs" << endmsg; - } - -} - - -// muon - -void RegSelSvc::DetHashIDList(DETID detectorID, - TYPEID typeID, - double etaMin, double etaMax , - double phiMin, double phiMax, - std::vector<IdentifierHash> *IDList) -{ - static bool first = true; - if ( first ) { - first = false; - (*m_log) << MSG::WARNING << __func__ << " - This method is obsolete DO NOT USE" << endmsg; - } - - if(m_msgOutputLevel <= MSG::DEBUG && IDList->size()!=0 ){ - if(m_msgOutputLevel <= MSG::WARNING ) - (*m_log) << MSG::WARNING << " input IDList vector not empty for RegSelSvc call for detectorID " << detectorID << endmsg; - } - IDList->clear(); - - if ( !checkinput(etaMin, etaMax, phiMin, phiMax) ) { - if(m_msgOutputLevel <= MSG::WARNING ) - (*m_log) << MSG::WARNING << " bad roi parameter to regionselector" - << "\tetaMin=" << etaMin << "\tetaMax=" << etaMax - << "\tphiMin=" << phiMin << "\tphiMax=" << phiMax << endmsg; - - return; - } - - if ( detectorID==MDT ) { - long layer = typeID; - DetHashIDList(detectorID, layer, -m_DeltaZ, m_DeltaZ, etaMin, etaMax, phiMin, phiMax, IDList); - } - - - if(m_msgOutputLevel <= MSG::DEBUG){ - (*m_log) << MSG::DEBUG << "DetHashIDList for detector " << detectorID - << " got " << IDList->size() << " hash IDs" << endmsg; - } - -} - - - - - -// Methods to retrieve the rob is list - -// old region selector interface - -void RegSelSvc::DetROBIDListUint(DETID detectorID, - double etaMin, double etaMax , - double phiMin, double phiMax, - std::vector<uint32_t>& outputROBIDList) -{ - - static bool first = true; - if ( first ) { - first = false; - (*m_log) << MSG::WARNING << __func__ << " - This method is obsolete DO NOT USE" << endmsg; - } - - if(m_msgOutputLevel <= MSG::DEBUG && outputROBIDList.size()!=0 ){ - if(m_msgOutputLevel <= MSG::WARNING ) - (*m_log) << MSG::WARNING << " input outputROBIDList vector not empty for RegSelSvc call for detectorID " << detectorID << endmsg; - } - outputROBIDList.clear(); - - if ( !checkinput(etaMin, etaMax, phiMin, phiMax) ) { - if(m_msgOutputLevel <= MSG::WARNING ) - (*m_log) << MSG::WARNING << " bad roi parameter to regionselector" - << "\tetaMin=" << etaMin << "\tetaMax=" << etaMax - << "\tphiMin=" << phiMin << "\tphiMax=" << phiMax << endmsg; - - return; - } - - - switch(detectorID){ - case PIXEL: - case SCT: - case TRT: - return DetROBIDListUint(detectorID, -m_DeltaZ, m_DeltaZ, etaMin, etaMax, phiMin, phiMax, outputROBIDList); - break; - case LAR: // Liquid Argon Calorimeter - verifyInputs(LAR, etaMin, etaMax, phiMin, phiMax); - m_larData.regionSelectorRobIdUint(etaMin, etaMax, phiMin, phiMax, outputROBIDList); - //log<< MSG::DEBUG << "LAR verifyOutput" << endmsg; larData.verifyOutput(ROBID, etaMin, etaMax, phiMin, phiMax,outputROBIDList); - break; - case TTEM: // Liquid Argon Trigger Tower EM Calorimeter - verifyInputs(TTEM, etaMin, etaMax, phiMin, phiMax); - m_ttemData.regionSelectorRobIdUint(etaMin, etaMax, phiMin, phiMax, outputROBIDList); - //log<< MSG::DEBUG << "TTEM verifyOutput" << endmsg; ttemData.verifyOutput(ROBID, etaMin, etaMax, phiMin, phiMax,outputROBIDList); - break; - case TTHEC: // Liquid Argon Trigger Tower HEC Calorimeter - verifyInputs(TTHEC, etaMin, etaMax, phiMin, phiMax); - m_tthecData.regionSelectorRobIdUint(etaMin, etaMax, phiMin, phiMax, outputROBIDList); - //log<< MSG::DEBUG << "TTHEC verifyOutput" << endmsg; tthecData.verifyOutput(ROBID, etaMin, etaMax, phiMin, phiMax,outputROBIDList); - break; - case FCALEM: // Liquid Argon Trigger Tower FCALEM Calorimeter - verifyInputs(FCALEM, etaMin, etaMax, phiMin, phiMax); - m_ttfcalemData.regionSelectorRobIdUint(etaMin, etaMax, phiMin, phiMax, outputROBIDList); - //log<< MSG::DEBUG << "FCALEM verifyOutput" << endmsg; ttfcalemData.verifyOutput(ROBID, etaMin, etaMax, phiMin, phiMax,outputROBIDList); - break; - case FCALHAD: // Liquid Argon Trigger Tower FCALHAD Calorimeter - verifyInputs(FCALHAD, etaMin, etaMax, phiMin, phiMax); - m_ttfcalhadData.regionSelectorRobIdUint(etaMin, etaMax, phiMin, phiMax, outputROBIDList); - //log<< MSG::DEBUG << "FCALHAD verifyOutput" << endmsg; ttfcalhadData.verifyOutput(ROBID, etaMin, etaMax, phiMin, phiMax,outputROBIDList); - break; - case TILE: // Tile Calorimeters - verifyInputs(TILE, etaMin, etaMax, phiMin, phiMax); - m_tileData.regionSelectorRobIdUint(TILE,etaMin, etaMax, phiMin, phiMax, outputROBIDList); - break; - case MDT: // MDT Calorimeter - //verifyInputs(MDT, etaMin, etaMax, phiMin, phiMax); - //m_mdtData.regionSelectorRobIdUint(MDT,etaMin, etaMax, phiMin, phiMax, outputROBIDList); - break; - case RPC: // RPC Calorimeters - //verifyInputs(RPC, etaMin, etaMax, phiMin, phiMax); - //m_rpcData.regionSelectorRobIdUint(RPC,etaMin, etaMax, phiMin, phiMax, outputROBIDList); - break; - case TGC: // TGC Calorimeters - //verifyInputs(TGC, etaMin, etaMax, phiMin, phiMax); - //m_tgcData.regionSelectorRobIdUint(TGC,etaMin, etaMax, phiMin, phiMax, outputROBIDList); - break; - case CSC: // CSC Calorimeters - //verifyInputs(CSC, etaMin, etaMax, phiMin, phiMax); - //m_cscData.regionSelectorRobIdUint(CSC,etaMin, etaMax, phiMin, phiMax, outputROBIDList); - break; - default: - break; - } - - if(m_msgOutputLevel <= MSG::DEBUG){ - (*m_log) << MSG::DEBUG << "DetROBIDListUint for detector " << detectorID - << " got " << outputROBIDList.size() << " ROB IDs" << endmsg; - } - -} - - - - -// inner detector - -void RegSelSvc::DetROBIDListUint(DETID detectorID, - double zMin, double zMax, - double etaMin, double etaMax, - double phiMin, double phiMax, - std::vector<uint32_t>& outputROBIDList) -{ - - static bool first = true; - if ( first ) { - first = false; - (*m_log) << MSG::WARNING << __func__ << " - This method is obsolete DO NOT USE" << endmsg; - } - - // std::cout << "RegSelSvc::DetROBIDListUint() new map " << detectorID << std::endl; - - if(m_msgOutputLevel <= MSG::DEBUG && outputROBIDList.size()!=0 ){ - if(m_msgOutputLevel <= MSG::WARNING ) - (*m_log) << MSG::WARNING << " input outputROBIDList vector not empty for RegSelSvc call for detectorID " << detectorID << endmsg; - } - outputROBIDList.clear(); - - if ( !checkinput(zMin, zMax, etaMin, etaMax, phiMin, phiMax) ) { - if(m_msgOutputLevel <= MSG::WARNING ) - (*m_log) << MSG::WARNING << " bad roi parameter to regionselector" - << "zMin=" << zMin << "\tzMax=" << zMax - << "\tetaMin=" << etaMin << "\tetaMax=" << etaMax - << "\tphiMin=" << phiMin << "\tphiMax=" << phiMax << endmsg; - - return; - } - - - switch (detectorID) { - case PIXEL: { // Pixel - RegSelRoI roi( zMin, zMax, phiMin, phiMax, etaMin, etaMax ); - if ( m_newpixel ) m_newpixel->getRobList(roi, outputROBIDList); - break; - } - case SCT: { // SCT - RegSelRoI roi( zMin, zMax, phiMin, phiMax, etaMin, etaMax ); - if ( m_newsct ) m_newsct->getRobList(roi, outputROBIDList); - break; - } - case TRT: { // TRT - RegSelRoI roi( zMin, zMax, phiMin, phiMax, etaMin, etaMax ); - if ( m_newtrt ) m_newtrt->getRobList(roi, outputROBIDList); - break; - } - default: - break; - } - - if(m_msgOutputLevel <= MSG::DEBUG){ - (*m_log) << MSG::DEBUG << "DetROBIDListUint for detector " << detectorID - << " got " << outputROBIDList.size() << " ROB IDs" << endmsg; - } - -} - - - - - -void RegSelSvc::DetROBIDListUint(DETID detectorID, - double zMin, double zMax, - double etaMin, double etaMax, - double phiMin, double phiMax, - double xBeam, double yBeam, - std::vector<uint32_t>& outputROBIDList) -{ - - static bool first = true; - if ( first ) { - first = false; - (*m_log) << MSG::WARNING << __func__ << " - This method is obsolete DO NOT USE" << endmsg; - } - - // std::cout << "RegSelSvc::DetROBIDListUint() new map " << detectorID << std::endl; - - if(m_msgOutputLevel <= MSG::DEBUG && outputROBIDList.size()!=0 ){ - if(m_msgOutputLevel <= MSG::WARNING ) - (*m_log) << MSG::WARNING << " input outputROBIDList vector not empty for RegSelSvc call for detectorID " << detectorID << endmsg; - } - outputROBIDList.clear(); - - if ( !checkinput(zMin, zMax, etaMin, etaMax, phiMin, phiMax) ) { - if(m_msgOutputLevel <= MSG::WARNING ) - (*m_log) << MSG::WARNING << " bad roi parameter to regionselector" - << "zMin=" << zMin << "\tzMax=" << zMax - << "\tetaMin=" << etaMin << "\tetaMax=" << etaMax - << "\tphiMin=" << phiMin << "\tphiMax=" << phiMax << endmsg; - - return; - } - - - switch (detectorID) { - case PIXEL: { // Pixel - RegSelRoI roi( zMin, zMax, phiMin, phiMax, etaMin, etaMax ); - if ( m_newpixel ) m_newpixel->getRobList(roi, outputROBIDList, xBeam, yBeam ); - break; - } - case SCT: { // SCT - RegSelRoI roi( zMin, zMax, phiMin, phiMax, etaMin, etaMax ); - if ( m_newsct ) m_newsct->getRobList(roi, outputROBIDList, xBeam, yBeam ); - break; - } - case TRT: { // TRT - RegSelRoI roi( zMin, zMax, phiMin, phiMax, etaMin, etaMax ); - if ( m_newtrt ) m_newtrt->getRobList(roi, outputROBIDList, xBeam, yBeam ); - break; - } - default: - break; - } - - if(m_msgOutputLevel <= MSG::DEBUG){ - (*m_log) << MSG::DEBUG << "DetROBIDListUint for detector " << detectorID - << " got " << outputROBIDList.size() << " ROB IDs" << endmsg; - } - -} - - - -// inner detector by layer - -void RegSelSvc::DetROBIDListUint(DETID detectorID, long layer, - double zMin, double zMax, - double etaMin, double etaMax, - double phiMin, double phiMax, - std::vector<uint32_t>& outputROBIDList) -{ - - static bool first = true; - if ( first ) { - first = false; - (*m_log) << MSG::WARNING << __func__ << " - This method is obsolete DO NOT USE" << endmsg; - } - - // std::cout << "RegSelSvc::DetROBIDListUint() new map " << detectorID << std::endl; - - if(m_msgOutputLevel <= MSG::DEBUG && outputROBIDList.size()!=0 ){ - if(m_msgOutputLevel <= MSG::WARNING ) - (*m_log) << MSG::WARNING << " input outputROBIDList vector not empty for RegSelSvc call for detectorID " << detectorID << endmsg; - } - outputROBIDList.clear(); - - if ( !checkinput(zMin, zMax, etaMin, etaMax, phiMin, phiMax) ) { - if(m_msgOutputLevel <= MSG::WARNING ) - (*m_log) << MSG::WARNING << " bad roi parameter to regionselector" - << "zMin=" << zMin << "\tzMax=" << zMax - << "\tetaMin=" << etaMin << "\tetaMax=" << etaMax - << "\tphiMin=" << phiMin << "\tphiMax=" << phiMax << endmsg; - - return; - } - - RegSelRoI roi( zMin, zMax, phiMin, phiMax, etaMin, etaMax ); - - switch (detectorID) { - case PIXEL: { // Pixel - if ( m_newpixel ) m_newpixel->getRobList(roi, layer, outputROBIDList); - break; - } - case SCT: { // SCT - if ( m_newsct ) m_newsct->getRobList(roi, layer, outputROBIDList); - break; - } - case TRT: { // TRT - if ( m_newtrt ) m_newtrt->getRobList(roi, layer, outputROBIDList); - break; - } - default: - break; - } - - if(m_msgOutputLevel <= MSG::DEBUG){ - (*m_log) << MSG::DEBUG << "DetROBIDListUint for detector " << detectorID - << " got " << outputROBIDList.size() << " ROB IDs" << endmsg; - } - -} - - - - - - - - - - diff --git a/InnerDetector/InDetEventCnv/TRT_RawDataByteStreamCnv/src/TRTRawDataProvider.cxx b/InnerDetector/InDetEventCnv/TRT_RawDataByteStreamCnv/src/TRTRawDataProvider.cxx index 9c3b8cc1b79..fdd454ead89 100644 --- a/InnerDetector/InDetEventCnv/TRT_RawDataByteStreamCnv/src/TRTRawDataProvider.cxx +++ b/InnerDetector/InDetEventCnv/TRT_RawDataByteStreamCnv/src/TRTRawDataProvider.cxx @@ -14,7 +14,6 @@ using OFFLINE_FRAGMENTS_NAMESPACE::ROBFragment; TRTRawDataProvider::TRTRawDataProvider(const std::string& name, ISvcLocator* pSvcLocator) : AthAlgorithm ( name, pSvcLocator ), - m_regionSelector ("RegSelSvc", name), m_robDataProvider ( "ROBDataProviderSvc", name ), m_rawDataTool ( "TRTRawDataProviderTool",this ), m_CablingSvc ( "TRT_CablingSvc", name ), @@ -117,9 +116,7 @@ StatusCode TRTRawDataProvider::execute() for (; roi!=roiE; ++roi) { superRoI.push_back(*roi); } - m_regionSelector->DetROBIDListUint( TRT, - superRoI, - listOfRobs); + m_regionSelector->ROBIDList( superRoI, listOfRobs ); } std::vector<const ROBFragment*> listOfRobf; m_robDataProvider->getROBData( listOfRobs, listOfRobf); diff --git a/InnerDetector/InDetEventCnv/TRT_RawDataByteStreamCnv/src/TRTRawDataProvider.h b/InnerDetector/InDetEventCnv/TRT_RawDataByteStreamCnv/src/TRTRawDataProvider.h index 8a4be6d46a7..75e61d3dbc3 100755 --- a/InnerDetector/InDetEventCnv/TRT_RawDataByteStreamCnv/src/TRTRawDataProvider.h +++ b/InnerDetector/InDetEventCnv/TRT_RawDataByteStreamCnv/src/TRTRawDataProvider.h @@ -17,7 +17,7 @@ #include "InDetRawData/TRT_RDO_Container.h" #include "TRT_RawDataByteStreamCnv/ITRTRawDataProviderTool.h" #include "TRT_Cabling/ITRT_CablingSvc.h" -#include "IRegionSelector/IRegSelSvc.h" +#include "IRegionSelector/IRegSelTool.h" #include "TrigSteeringEvent/TrigRoiDescriptorCollection.h" #include "AthenaBaseComps/AthAlgorithm.h" @@ -54,7 +54,8 @@ public: private: - ServiceHandle<IRegSelSvc> m_regionSelector; + ToolHandle<IRegSelTool> m_regionSelector { this, "RegSelTool", "RegSelTool/RegSelTool_TRT" } +; ServiceHandle<IROBDataProviderSvc> m_robDataProvider; ToolHandle<ITRTRawDataProviderTool> m_rawDataTool; ServiceHandle<ITRT_CablingSvc> m_CablingSvc; diff --git a/InnerDetector/InDetExample/InDetRecExample/share/InDetReadBS_jobOptions.py b/InnerDetector/InDetExample/InDetRecExample/share/InDetReadBS_jobOptions.py index e5d39621d69..227fa738084 100755 --- a/InnerDetector/InDetExample/InDetRecExample/share/InDetReadBS_jobOptions.py +++ b/InnerDetector/InDetExample/InDetRecExample/share/InDetReadBS_jobOptions.py @@ -99,8 +99,8 @@ if DetFlags.readRDOBS.TRT_on(): RDOKey = InDetKeys.TRT_RDOs(), ProviderTool = InDetTRTRawDataProviderTool) -# from RegionSelector.RegSelToolConfig import makeRegSelTool_TRT -# InDetTRTRawDataProvider.RegSelTool = makeRegSelTool_TRT() + from RegionSelector.RegSelToolConfig import makeRegSelTool_TRT + InDetTRTRawDataProvider.RegSelTool = makeRegSelTool_TRT() topSequence += InDetTRTRawDataProvider if (InDetFlags.doPrintConfigurables()): diff --git a/Trigger/TrigAlgorithms/TrigFastTrackFinder/python/TrigFastTrackFinder_Config.py b/Trigger/TrigAlgorithms/TrigFastTrackFinder/python/TrigFastTrackFinder_Config.py index 88098c10d29..189943c2024 100755 --- a/Trigger/TrigAlgorithms/TrigFastTrackFinder/python/TrigFastTrackFinder_Config.py +++ b/Trigger/TrigAlgorithms/TrigFastTrackFinder/python/TrigFastTrackFinder_Config.py @@ -237,8 +237,8 @@ class TrigFastTrackFinderBase(TrigFastTrackFinder): from RegionSelector.RegSelToolConfig import makeRegSelTool_Pixel from RegionSelector.RegSelToolConfig import makeRegSelTool_SCT - spTool.RegSel_Pixel = makeRegSelTool_Pixel() - spTool.RegSel_SCT = makeRegSelTool_SCT() + spTool.RegSelTool_Pixel = makeRegSelTool_Pixel() + spTool.RegSelTool_SCT = makeRegSelTool_SCT() ToolSvc += spTool self.SpacePointProviderTool=spTool diff --git a/Trigger/TrigAlgorithms/TrigPartialEventBuilding/src/RoIPEBInfoWriterTool.cxx b/Trigger/TrigAlgorithms/TrigPartialEventBuilding/src/RoIPEBInfoWriterTool.cxx index 5823bcb2dd2..94caec1619e 100644 --- a/Trigger/TrigAlgorithms/TrigPartialEventBuilding/src/RoIPEBInfoWriterTool.cxx +++ b/Trigger/TrigAlgorithms/TrigPartialEventBuilding/src/RoIPEBInfoWriterTool.cxx @@ -25,10 +25,8 @@ StatusCode RoIPEBInfoWriterTool::initialize() { ATH_MSG_DEBUG("Extra PEBInfo attached to every passed event: " << m_extraPebInfo); // Ugly solution - need to translate strings into enums. Wouldn't be needed if DETID enum was accessible from python. + const std::unordered_map<std::string_view,DETID> detNameDict = { - {"PIXEL", DETID::PIXEL}, - {"SCT", DETID::SCT}, - {"TRT", DETID::TRT}, {"LAR", DETID::LAR}, {"TTEM", DETID::TTEM}, {"TTHEC", DETID::TTHEC}, @@ -43,18 +41,46 @@ StatusCode RoIPEBInfoWriterTool::initialize() { {"MM", DETID::MM}, {"STGC", DETID::STGC}, }; + +#if 1 + const std::unordered_map< std::string_view, ToolHandle<IRegSelTool> > detTools = { + { "PIXEL", m_regionSelector_pix }, + { "SCT", m_regionSelector_sct }, + { "TRT", m_regionSelector_trt } + }; +#else + + std::unordered_map< std::string_view, ToolHandle<IRegSelTool> > detTools; + + detTools.insert( std::unordered_map< std::string_view, ToolHandle<IRegSelTool> >::value_type( "PIXEL", m_regionSelector_pix ) ); + detTools.insert( std::unordered_map< std::string_view, ToolHandle<IRegSelTool> >::value_type( "SCT", m_regionSelector_sct ) ); + detTools.insert( std::unordered_map< std::string_view, ToolHandle<IRegSelTool> >::value_type( "TRT", m_regionSelector_trt ) ); + + +#endif + for (std::string_view name : m_detNames) { if (name=="All") { for (const auto& p : detNameDict) m_dets.insert(p.second); + for (const auto& p : detTools) m_tools.insert(p.second); break; } - const auto it = detNameDict.find(name); - if (it==detNameDict.cend()) { - ATH_MSG_ERROR("The detector name " << name << " cannot be translated into RegSelEnum DETID"); - return StatusCode::FAILURE; + + const auto itt = detTools.find(name); + if ( itt!=detTools.cend() ) { + ATH_MSG_DEBUG("The detector name " << name << " being inserted from the RegSelTools database"); + m_tools.insert(itt->second); + } + else { + ATH_MSG_DEBUG("The detector name " << name << " not in the RegSelTools database - trying RegSelEnum database"); + const auto it = detNameDict.find(name); + if (it==detNameDict.cend()) { + ATH_MSG_ERROR("The detector name " << name << " cannot be translated into RegSelEnum DETID"); + return StatusCode::FAILURE; + } + ATH_MSG_DEBUG("Adding " << name << "=" << it->second << " to detector list"); + m_dets.insert(it->second); } - ATH_MSG_DEBUG("Adding " << name << "=" << it->second << " to detector list"); - m_dets.insert(it->second); } return StatusCode::SUCCESS; @@ -86,6 +112,20 @@ PEBInfoWriterToolBase::PEBInfo RoIPEBInfoWriterTool::createPEBInfo(const PEBInfo TrigRoiDescriptor roiForPEB(eta, etaMin, etaMax, phi, phiMin, phiMax); +#if 0 + std::vector<IRegSelTool*> tools = { + m_regionSelectot_pix, + m_regionSelectot_sct, + m_regionSelectot_trt + }; +#endif + + for ( auto tool : m_tools ) { + std::vector<uint32_t> detROBs; + tool->ROBIDList( roiForPEB, detROBs); + pebi.robs.insert(detROBs.begin(),detROBs.end()); + } + for (const DETID detid : m_dets) { std::vector<uint32_t> detROBs; m_regionSelector->DetROBIDListUint(detid, roiForPEB, detROBs); diff --git a/Trigger/TrigAlgorithms/TrigPartialEventBuilding/src/RoIPEBInfoWriterTool.h b/Trigger/TrigAlgorithms/TrigPartialEventBuilding/src/RoIPEBInfoWriterTool.h index 253c420d906..f1f89382597 100644 --- a/Trigger/TrigAlgorithms/TrigPartialEventBuilding/src/RoIPEBInfoWriterTool.h +++ b/Trigger/TrigAlgorithms/TrigPartialEventBuilding/src/RoIPEBInfoWriterTool.h @@ -8,6 +8,7 @@ #include "TrigPartialEventBuilding/PEBInfoWriterToolBase.h" #include "IRegionSelector/RegSelEnums.h" #include "IRegionSelector/IRegSelSvc.h" +#include "IRegionSelector/IRegSelTool.h" /** @class RoIPEBInfoWriterTool * @brief Tool writing ROB list corresponding to an RoI in given detectors for use in PEBInfoWriterAlg @@ -31,6 +32,20 @@ private: this, "RegionSelector", "RegSelSvc/RegSelSvc", "Region Selector service" }; + ToolHandle<IRegSelTool> m_regionSelector_pix { + this, "RegSelTool_Pixel", "RegSelTool/RegSelTool_Pixel", "Region Selector Tool" + }; + + ToolHandle<IRegSelTool> m_regionSelector_sct { + this, "RegSelTool_SCT", "RegSelTool/RegSelTool_SCT", "Region Selector Tool" + }; + + ToolHandle<IRegSelTool> m_regionSelector_trt { + this, "RegSelTool_TRT", "RegSelTool/RegSelTool_TRT", "Region Selector Tool" + }; + + + // ------------------------- Properties -------------------------------------- Gaudi::Property<float> m_etaEdge { this, "EtaEdge", 5.0, "Upper limit of |eta| range" @@ -58,7 +73,9 @@ private: /// Static PEB Info which contains ExtraROBs and ExtraSubDets PEBInfoWriterToolBase::PEBInfo m_extraPebInfo; /// m_detNames translated into set of DETID, filled at initialisation - std::set<DETID> m_dets; + std::set<DETID> m_dets; + std::set<ToolHandle<IRegSelTool> > m_tools; + }; #endif // TrigPartialEventBuilding_RoIPEBInfoWriterTool_h diff --git a/Trigger/TrigTools/TrigInDetConfig/python/InDetPT.py b/Trigger/TrigTools/TrigInDetConfig/python/InDetPT.py index 6a2e8ff95ba..c6c2a91ffd3 100644 --- a/Trigger/TrigTools/TrigInDetConfig/python/InDetPT.py +++ b/Trigger/TrigTools/TrigInDetConfig/python/InDetPT.py @@ -122,13 +122,21 @@ def makeInDetPrecisionTracking( config = None, from TRT_RawDataByteStreamCnv.TRT_RawDataByteStreamCnvConf import TRTRawDataProviderTool InDetTRTRawDataProviderTool = TRTRawDataProviderTool( name = "%sTRTRawDataProviderTool%s"%(algNamePrefix, signature), Decoder = InDetTRTRodDecoder ) + ToolSvc += InDetTRTRawDataProviderTool + + + # load the TRTRawDataProvider from TRT_RawDataByteStreamCnv.TRT_RawDataByteStreamCnvConf import TRTRawDataProvider InDetTRTRawDataProvider = TRTRawDataProvider(name = "%sTRTRawDataProvider%s"%(algNamePrefix, signature), RDOKey = TrigTRTKeys.RDOs, ProviderTool = InDetTRTRawDataProviderTool) + + from RegionSelector.RegSelToolConfig import makeRegSelTool_TRT + InDetTRTRawDataProvider.RegSelTool = makeRegSelTool_TRT() + InDetTRTRawDataProvider.isRoI_Seeded = True InDetTRTRawDataProvider.RoIs = rois diff --git a/Trigger/TrigTools/TrigOnlineSpacePointTool/src/TrigSpacePointConversionTool.cxx b/Trigger/TrigTools/TrigOnlineSpacePointTool/src/TrigSpacePointConversionTool.cxx index 54eda180a1d..5206c65d27f 100644 --- a/Trigger/TrigTools/TrigOnlineSpacePointTool/src/TrigSpacePointConversionTool.cxx +++ b/Trigger/TrigTools/TrigOnlineSpacePointTool/src/TrigSpacePointConversionTool.cxx @@ -24,15 +24,10 @@ TrigSpacePointConversionTool::TrigSpacePointConversionTool(const std::string& t, const std::string& n, const IInterface* p ) : AthAlgTool(t,n,p), - m_layerNumberTool("TrigL2LayerNumberTool"), - m_regsel_pix( "RegSelTool/RegSelTool_Pixel", this), - m_regsel_sct( "RegSelTool/RegSel_SCT", this) + m_layerNumberTool("TrigL2LayerNumberTool") { declareInterface< ITrigSpacePointConversionTool >( this ); - declareProperty( "RegSel_Pixel", m_regsel_pix); - declareProperty( "RegSel_SCT", m_regsel_sct); - declareProperty( "DoPhiFiltering", m_filter_phi = true ); declareProperty( "UseBeamTilt", m_useBeamTilt = true ); declareProperty( "UseNewLayerScheme", m_useNewScheme = false ); diff --git a/Trigger/TrigTools/TrigOnlineSpacePointTool/src/TrigSpacePointConversionTool.h b/Trigger/TrigTools/TrigOnlineSpacePointTool/src/TrigSpacePointConversionTool.h index 284bf60acc2..3e2dfc61d0d 100644 --- a/Trigger/TrigTools/TrigOnlineSpacePointTool/src/TrigSpacePointConversionTool.h +++ b/Trigger/TrigTools/TrigOnlineSpacePointTool/src/TrigSpacePointConversionTool.h @@ -62,8 +62,8 @@ class TrigSpacePointConversionTool : virtual public ITrigSpacePointConversionToo void transformSpacePoints(std::vector<TrigSiSpacePointBase>&, const EventContext&) const; /// new region selector tools - ToolHandle<IRegSelTool> m_regsel_pix; - ToolHandle<IRegSelTool> m_regsel_sct; + ToolHandle<IRegSelTool> m_regsel_pix { this, "RegSelTool_Pixel", "RegSelTool/RegSelTool_Pixel" }; + ToolHandle<IRegSelTool> m_regsel_sct { this, "RegSelTool_SCT", "RegSelTool/RegSelTool_SCT" }; }; #endif diff --git a/Trigger/TrigValidation/TrigP1Test/share/PEBDSTest.py b/Trigger/TrigValidation/TrigP1Test/share/PEBDSTest.py index 646180b431b..8b1e2772cb8 100644 --- a/Trigger/TrigValidation/TrigP1Test/share/PEBDSTest.py +++ b/Trigger/TrigValidation/TrigP1Test/share/PEBDSTest.py @@ -87,6 +87,10 @@ def myPebInfoWriterTool(name, eventBuildType): tool.EtaWidth = 0.1 tool.PhiWidth = 0.1 tool.DetNames = ['All'] + from RegionSelector.RegSelToolConfig import makeRegSelTool_Pixel, makeRegSelTool_SCT, makeRegSelTool_TRT + tool.RegSelTool_Pixel = makeRegSelTool_Pixel() + tool.RegSelTool_SCT = makeRegSelTool_SCT() + tool.RegSelTool_TRT = makeRegSelTool_TRT() tool.ExtraROBs = [] tool.ExtraSubDets = [] tool.addHLTResultToROBList() # add the main (full) HLT result to the list @@ -110,6 +114,10 @@ def myPebInfoWriterTool(name, eventBuildType): tool.EtaWidth = 0.3 tool.PhiWidth = 0.3 tool.DetNames = ['PIXEL', 'SCT', 'TRT', 'TTEM', 'TTHEC', 'FCALEM', 'FCALHAD'] + from RegionSelector.RegSelToolConfig import makeRegSelTool_Pixel, makeRegSelTool_SCT, makeRegSelTool_TRT + tool.RegSelTool_Pixel = makeRegSelTool_Pixel() + tool.RegSelTool_SCT = makeRegSelTool_SCT() + tool.RegSelTool_TRT = makeRegSelTool_TRT() tool.ExtraROBs = [] tool.ExtraSubDets = [] diff --git a/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/CommonSequences/EventBuildingSequenceSetup.py b/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/CommonSequences/EventBuildingSequenceSetup.py index 4bf4949af66..62cecf49b00 100644 --- a/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/CommonSequences/EventBuildingSequenceSetup.py +++ b/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/CommonSequences/EventBuildingSequenceSetup.py @@ -61,6 +61,12 @@ def pebInfoWriterTool(name, eventBuildType): elif 'LArPEB' in eventBuildType: tool = RoIPEBInfoWriterToolCfg(name) tool.DetNames = ['PIXEL', 'SCT', 'TRT', 'TTEM', 'TTHEC', 'FCALEM', 'FCALHAD'] + + from RegionSelector.RegSelToolConfig import makeRegSelTool_Pixel, makeRegSelTool_SCT, makeRegSelTool_TRT + tool.RegSelTool_Pixel = makeRegSelTool_Pixel() + tool.RegSelTool_SCT = makeRegSelTool_SCT() + tool.RegSelTool_TRT = makeRegSelTool_TRT() + tool.MaxRoIs = 5 tool.addHLTResultToROBList() # add the main (full) HLT result to the list tool.addCTPResultToROBList() # add the CTP result to the list -- GitLab