diff --git a/MuonSpectrometer/MuonCablings/MuonRPC_Cabling/MuonRPC_Cabling/CablingRPC.h b/MuonSpectrometer/MuonCablings/MuonRPC_Cabling/MuonRPC_Cabling/CablingRPC.h index 177cdcc3403881b293c536fb9683faee82c97a55..81a2dd5c5794c632405015c65d333aced6a48e10 100755 --- a/MuonSpectrometer/MuonCablings/MuonRPC_Cabling/MuonRPC_Cabling/CablingRPC.h +++ b/MuonSpectrometer/MuonCablings/MuonRPC_Cabling/MuonRPC_Cabling/CablingRPC.h @@ -1,7 +1,5 @@ -/* // -*- C++ -*- */ - /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration */ #ifndef CablingRPC_H @@ -92,7 +90,7 @@ class CablingRPC : public CablingRPCBase const static std::map<std::string, std::string>* s_trigroads; static bool s_RPCMapfromCool; - unsigned int m_absZindexInThelayerOfThisChamber[9][2][9][8][2][4]; + unsigned int m_absZindexInThelayerOfThisChamber[12][2][9][8][2][4]; static void delete_instance(void); diff --git a/MuonSpectrometer/MuonCablings/MuonRPC_Cabling/src/CablingRPC.cxx b/MuonSpectrometer/MuonCablings/MuonRPC_Cabling/src/CablingRPC.cxx index 26a7e9dcdda9f04fb70b7aa30546343875ebf141..ca4ef2cc9b0c026d23626544d82dd0e8872986b1 100755 --- a/MuonSpectrometer/MuonCablings/MuonRPC_Cabling/src/CablingRPC.cxx +++ b/MuonSpectrometer/MuonCablings/MuonRPC_Cabling/src/CablingRPC.cxx @@ -1,9 +1,28 @@ /* - Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration */ #include "MuonRPC_Cabling/CablingRPC.h" -#include <math.h> +#include <cmath> +#include <TString.h> // for Form + +namespace { + // const map between RPC stationName and integer for cabling code + const static std::map<std::string, int> rpcStats = { + std::make_pair<std::string, int>("BML", 0), + std::make_pair<std::string, int>("BMS", 1), + std::make_pair<std::string, int>("BOL", 2), + std::make_pair<std::string, int>("BOS", 3), + std::make_pair<std::string, int>("BMF", 4), + std::make_pair<std::string, int>("BOF", 5), + std::make_pair<std::string, int>("BOG", 6), + std::make_pair<std::string, int>("BME", 7), + std::make_pair<std::string, int>("BIS", 8), + std::make_pair<std::string, int>("BIL", 9), + std::make_pair<std::string, int>("BIM", 10), + std::make_pair<std::string, int>("BIR", 11) + }; +} /////////////////////////////////////////////////////////////////////////////// //////////////////////////////// CABLING SETUP //////////////////////////////// @@ -41,7 +60,7 @@ CablingRPC::CablingRPC() : CablingRPCBase(), m_Version(""),m_MaxType(0) initMapsFromASCII(); } - for (int i1=0; i1<8; ++i1) + for (int i1=0; i1<(int)rpcStats.size(); ++i1) for (int i2=0; i2<2; ++i2) for (int i3=0; i3<9; ++i3) for (int i4=0; i4<8; ++i4) @@ -1813,28 +1832,14 @@ unsigned int CablingRPC::computeZIndexInCablingStation(std::string stationName, int iStat=0; int astEta = std::abs(stationEta); - // bool nBOE = true; - // if (stationName=="BOL" && astEta==8 ) nBOE=false; - - if (stationName=="BML") iStat=0; // BML - else if (stationName=="BMS") iStat=1; // BMS - else if (stationName=="BOL") iStat=2; // BOL - else if (stationName=="BOS") iStat=3; // BOS - else if (stationName=="BMF") iStat=4; // BMF - else if (stationName=="BOF") iStat=5; // BOF - else if (stationName=="BOG") iStat=6; // BOG - else if (stationName=="BME") iStat=7; // BME - else if (stationName=="BIS") iStat=8; // BIS - else - { - std::cout<<"ERROR - no iStat set; StationName ="<<stationName<<std::endl; - return 9999; - } + std::map<std::string,int>::const_iterator stItr = rpcStats.find(stationName); + if (stItr != rpcStats.end()) iStat = stItr->second; + else throw std::runtime_error(Form("File: %s, Line: %d\nCablingRPC::computeZIndexInCablingStation() - StationName %s not found", __FILE__, __LINE__, stationName.c_str())); + int side = 0; if (stationEta>0) side=1; - // already computed if (m_absZindexInThelayerOfThisChamber[iStat][side][astEta][stationPhi-1][doubletR-1][doubletZ-1] < 999) { diff --git a/MuonSpectrometer/MuonConditions/MuonCondCabling/RPC_CondCabling/RPC_CondCabling/RPCTriggerDbTool.h b/MuonSpectrometer/MuonConditions/MuonCondCabling/RPC_CondCabling/RPC_CondCabling/RPCTriggerDbTool.h index 871a3af45c46c966ea3d15f94fd0f866011a6927..8047bc21c2366c6df5f839ded91bab352e110ae3 100644 --- a/MuonSpectrometer/MuonConditions/MuonCondCabling/RPC_CondCabling/RPC_CondCabling/RPCTriggerDbTool.h +++ b/MuonSpectrometer/MuonConditions/MuonCondCabling/RPC_CondCabling/RPC_CondCabling/RPCTriggerDbTool.h @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration */ #ifndef MUONCONDTOOL_RPCTRIGGERDBTOOL_H @@ -12,12 +12,10 @@ #include "AthenaBaseComps/AthAlgTool.h" class Identifier; - class RpcIdHelper; class IIOVSvc; class StatusCode; - class RPCTriggerDbTool: public AthAlgTool, public IRPCTriggerDbTool { diff --git a/MuonSpectrometer/MuonDigitization/RPC_Digitization/src/RpcDigitizationTool.cxx b/MuonSpectrometer/MuonDigitization/RPC_Digitization/src/RpcDigitizationTool.cxx index 07f5ee8a1ef869a0b3b172d10e8ad40fdaf4b58d..ef6a35a3cb29d32d53e8fa40eb8f9068e0b405d0 100644 --- a/MuonSpectrometer/MuonDigitization/RPC_Digitization/src/RpcDigitizationTool.cxx +++ b/MuonSpectrometer/MuonDigitization/RPC_Digitization/src/RpcDigitizationTool.cxx @@ -733,13 +733,16 @@ StatusCode RpcDigitizationTool::doDigitization(const EventContext& ctx, RpcDigit } } - - - if(!m_idHelper->valid(newId)){ - ATH_MSG_ERROR ( "Created an invalid id, aborting!" ); - m_idHelper->print(newId); - return StatusCode::FAILURE; - } + if(!m_idHelper->valid(newId)){ + if (stationName.find("BI")!=std::string::npos) { + ATH_MSG_WARNING("Temporary skipping creation of RPC digit for stationName="<<stationName<<", eta="<<stationEta<<", phi="<<stationPhi<<", doubletR="<<doubletR<<", doubletZ="<<doubletZ<<", doubletPhi="<<doubletPhi<<", gasGap="<<gasGap<<", measuresPhi="<<imeasphi<<", strip="<<clus<<", cf. ATLASRECTS-6124"); + return StatusCode::SUCCESS; + } else { + ATH_MSG_ERROR( "Created an invalid id, aborting!"); + m_idHelper->print(newId); + return StatusCode::FAILURE; + } + } /////////////////////////////////////////////////////////////////// /////////////// TEMP, waiting for Reco to learn using clusters...