ATLAS Offline Software
Loading...
Searching...
No Matches
MuonTGC_CablingSvc Class Reference

#include <MuonTGC_CablingSvc.h>

Inheritance diagram for MuonTGC_CablingSvc:
Collaboration diagram for MuonTGC_CablingSvc:

Public Member Functions

 MuonTGC_CablingSvc (const std::string &name, ISvcLocator *svc)
virtual ~MuonTGC_CablingSvc ()=default
virtual StatusCode initialize (void) override
const MuonTGC_Cabling::TGCCablinggetTGCCabling () const
int getMaxRodId ()
void getReadoutIDRanges (int &maxRodId, int &maxSRodId, int &maxSswId, int &maxSbloc, int &minChannelId, int &maxChannelId) const
bool getCoveragefromRodID (const int rodID, double &startPhi, double &endPhi) const
bool getCoveragefromRodID (const int rodID, int &startEndcapSector, int &coverageOfEndcapSector, int &startForwardSector, int &coverageOfForwardSector) const
bool getCoveragefromSRodID (const int srodID, double &startPhi, double &endPhi) const
bool getCoveragefromSRodID (const int srodID, int &startEndcapSector, int &coverageOfEndcapSector, int &startForwardSector, int &coverageOfForwardSector) const
bool isOredChannel (const int subDetectorID, const int rodID, const int sswID, const int sbLoc, const int channelID) const
bool hasAdjacentChannel (const Identifier &offlineID) const
bool hasAdjacentChannel (const int subsystemNumber, const int octantNumber, const int moduleNumber, const int layerNumber, const int rNumber, const int wireOrStrip, const int channelNumber) const
bool getOfflineIDfromReadoutID (Identifier &offlineID, const int subDetectorID, const int rodID, const int sswID, const int sbLoc, const int channelID, bool orChannel=false) const
bool getReadoutIDfromOfflineID (const Identifier &offlineID, int &subDetectorID, int &rodID, int &sswID, int &sbLoc, int &channelID, bool adChannel=false) const
bool getOnlineIDfromOfflineID (const Identifier &offlineID, int &subsystemNumber, int &octantNumber, int &moduleNumber, int &layerNumber, int &rNumber, int &wireOrStrip, int &channelNumber) const
bool getOfflineIDfromOnlineID (Identifier &offlineID, const int subsystemNumber, const int octantNumber, const int moduleNumber, const int layerNumber, const int rNumber, const int wireOrStrip, const int channelNumber) const
bool getOnlineIDfromReadoutID (const int subDetectorID, const int rodID, const int sswID, const int sbLoc, const int channelID, int &subsystemNumber, int &octantNumber, int &moduleNumber, int &layerNumber, int &rNumber, int &wireOrStrip, int &channelNumber, bool orChannel=false) const
bool getReadoutIDfromOnlineID (int &subDetectorID, int &rodID, int &sswID, int &sbLoc, int &channelID, const int subsystemNumber, const int octantNumber, const int moduleNumber, const int layerNumber, const int rNumber, const int wireOrStrip, const int channelNumber, bool adChannel=false) const
bool getReadoutIDfromElementID (const Identifier &elementID, int &subdetectorID, int &rodID) const
bool getElementIDfromReadoutID (Identifier &elementID, const int subDetectorID, const int rodID, const int sswID, const int sbLoc, const int channelID, bool orChannel=false) const
bool getReadoutIDfromHPTID (const int phi, const bool isAside, const bool isEndcap, const bool isStrip, const int id, int &subsectorID, int &rodID, int &sswID, int &sbLoc) const
bool getSLBIDfromReadoutID (int &phi, bool &isAside, bool &isEndcap, int &moduleType, int &id, const int subsectorID, const int rodID, const int sswID, const int sbLoc) const
bool getSLBAddressfromReadoutID (int &slbAddr, const int subsectorID, const int rodID, const int sswID, const int sbLoc) const
bool getRxIDfromReadoutID (int &rxId, const int subsectorID, const int rodID, const int sswID, const int sbLoc) const
bool getSLBIDfromRxID (int &phi, bool &isAside, bool &isEndcap, int &moduleType, int &id, const int subsectorID, const int rodID, const int sswID, const int rxId) const
bool getReadoutIDfromSLBID (const int phi, const bool isAside, const bool isEndcap, const int moduleType, const int id, int &subsectorID, int &rodID, int &sswID, int &sbLoc) const
bool getSLIDfromReadoutID (int &phi, bool &isAside, bool &isEndcap, const int subsectorID, const int rodID, const int sswID, const int sbLoc) const
bool getSLIDfromSReadoutID (int &phi, bool &isAside, const int subsectorID, const int srodID, const int sector, const bool forward) const
bool getReadoutIDfromSLID (const int phi, const bool isAside, const bool isEndcap, int &subsectorID, int &rodID, int &sswID, int &sbLoc) const
bool getSReadoutIDfromSLID (const int phi, const bool isAside, const bool isEndcap, int &subsectorID, int &srodID, int &sswID, int &sbLoc) const
bool getRDOHighPtIDfromSimHighPtID (const bool isForward, const bool isStrip, int &index, int &chip, int &hitId) const
bool getSimHighPtIDfromRDOHighPtID (const bool isForward, const bool isStrip, int &index, int &chip, int &hitId) const
bool getOfflineIDfromHighPtID (Identifier &offlineID, const int subDetectorID, const int rodID, const int sectorInReadout, const bool isStrip, const bool isForward, const int hpb, const int chip, const int hitID, const int pos) const
bool getHighPtIDfromOfflineID (const Identifier &offlineID, int &subDetectorID, int &rodID, int &sectorInReadout, bool &isStrip, bool &isForward, int &hpb, int &chip, int &hitID, int &pos) const
bool getROINumberfromHighPtID (int &roi, bool isForward, int hpb_wire, int chip_wire, int hitId_wire, int sub_wire, int chip_strip, int hitId_strip, int sub_strip) const
bool getHighPtIDfromROINumber (int roi, bool isForward, bool isStrip, int &hpb, int &chip, int &hitID, int &sub) const
bool getOfflineIDfromLowPtCoincidenceID (Identifier &offlineID, const int subDetectorID, const int rodID, const int sswID, const int sbLoc, const int block, const int pos, bool middle=false) const
bool getLowPtCoincidenceIDfromOfflineID (const Identifier &offlineID, int &subDetectorID, int &rodID, int &sswID, int &sbLoc, int &block, int &pos, bool middle=false) const
MuonTGC_Cabling::TGCChannelIdgetChannel (const MuonTGC_Cabling::TGCChannelId *channelId, MuonTGC_Cabling::TGCChannelId::ChannelIdType type, bool orChannel=false) const
MuonTGC_Cabling::TGCModuleMapgetModule (const MuonTGC_Cabling::TGCModuleId *moduleId, MuonTGC_Cabling::TGCModuleId::ModuleIdType type) const
MsgStream & msg () const
bool msgLvl (const MSG::Level lvl) const

Protected Attributes

IntegerProperty m_AsideId
IntegerProperty m_CsideId
IntegerArrayProperty m_rodId
StringProperty m_databaseASDToPP
StringProperty m_databaseInPP
StringProperty m_databasePPToSL
StringProperty m_databaseSLBToROD
StringProperty m_databaseASDToPPdiff

Private Attributes

std::unique_ptr< MuonTGC_Cabling::TGCCablingm_cabling
ServiceHandle< Muon::IMuonIdHelperSvcm_idHelperSvc {this, "MuonIdHelperSvc", "Muon::MuonIdHelperSvc/MuonIdHelperSvc"}
ToolHandle< ITGCCablingDbToolm_condDataTool {this,"TGCCablingDbTool","TGCCablingDbTool"}

Detailed Description

Definition at line 30 of file MuonTGC_CablingSvc.h.

Constructor & Destructor Documentation

◆ MuonTGC_CablingSvc()

MuonTGC_CablingSvc::MuonTGC_CablingSvc ( const std::string & name,
ISvcLocator * svc )

Definition at line 23 of file MuonTGC_CablingSvc.cxx.

24 : AthService(name, svc) {
25 declareProperty("AsideId", m_AsideId=103);
26 declareProperty("CsideId", m_CsideId=104);
27 declareProperty("rodId", m_rodId); //obsolete
28 declareProperty("databaseASDToPP", m_databaseASDToPP="MuonTGC_Cabling_ASD2PP.db");
29 declareProperty("databaseInPP", m_databaseInPP="MuonTGC_Cabling_PP.db");
30 declareProperty("databasePPToSL", m_databasePPToSL="MuonTGC_Cabling_PP2SL.db");
31 declareProperty("databaseSLBToROD", m_databaseSLBToROD="MuonTGC_Cabling_SLB2ROD.db");
32}
StringProperty m_databaseSLBToROD
IntegerArrayProperty m_rodId
StringProperty m_databaseASDToPP
StringProperty m_databaseInPP
IntegerProperty m_CsideId
StringProperty m_databasePPToSL
IntegerProperty m_AsideId

◆ ~MuonTGC_CablingSvc()

virtual MuonTGC_CablingSvc::~MuonTGC_CablingSvc ( )
virtualdefault

Member Function Documentation

◆ getChannel()

MuonTGC_Cabling::TGCChannelId * MuonTGC_CablingSvc::getChannel ( const MuonTGC_Cabling::TGCChannelId * channelId,
MuonTGC_Cabling::TGCChannelId::ChannelIdType type,
bool orChannel = false ) const

Definition at line 1463 of file MuonTGC_CablingSvc.cxx.

1466{
1467 return m_cabling->getChannel(channelId, type, orChannel);
1468}
std::unique_ptr< MuonTGC_Cabling::TGCCabling > m_cabling

◆ getCoveragefromRodID() [1/2]

bool MuonTGC_CablingSvc::getCoveragefromRodID ( const int rodID,
double & startPhi,
double & endPhi ) const

Definition at line 151 of file MuonTGC_CablingSvc.cxx.

154{
155 int sectorInReadout = rodID - 1; //rodID = 1..12
156 if(sectorInReadout>= MuonTGC_Cabling::TGCId::N_RODS) return false;
157
158 startPhi = 2.*M_PI*(sectorInReadout-0.5)/MuonTGC_Cabling::TGCId::N_RODS;
159 endPhi = startPhi + 2.*M_PI/MuonTGC_Cabling::TGCId::N_RODS;
160
161 return true;
162}
#define M_PI
static constexpr int N_RODS
Definition TGCId.h:43

◆ getCoveragefromRodID() [2/2]

bool MuonTGC_CablingSvc::getCoveragefromRodID ( const int rodID,
int & startEndcapSector,
int & coverageOfEndcapSector,
int & startForwardSector,
int & coverageOfForwardSector ) const

Definition at line 165 of file MuonTGC_CablingSvc.cxx.

170{
171 int sectorInReadout = rodID - 1; //rodID = 1..12
172 if(sectorInReadout>= MuonTGC_Cabling::TGCId::N_RODS) return false;
173
174 coverageOfEndcapSector =
177 startEndcapSector = sectorInReadout * coverageOfEndcapSector;
178 coverageOfForwardSector =
181 startForwardSector = sectorInReadout *coverageOfForwardSector;
182
183 return true;
184}
static constexpr int NUM_ENDCAP_SECTOR
Definition TGCId.h:40
static constexpr int NUM_FORWARD_SECTOR
Definition TGCId.h:41

◆ getCoveragefromSRodID() [1/2]

bool MuonTGC_CablingSvc::getCoveragefromSRodID ( const int srodID,
double & startPhi,
double & endPhi ) const

Definition at line 188 of file MuonTGC_CablingSvc.cxx.

191{
192 int sectorInReadout = srodID - 17; //rodID = 17..19
193 if(sectorInReadout>= MuonTGC_Cabling::TGCModuleId::NumberOfSReadoutSector) return false;
194
195 startPhi = 2.*M_PI*(sectorInReadout-0.5)/MuonTGC_Cabling::TGCModuleId::NumberOfSReadoutSector;
197
198 return true;
199}

◆ getCoveragefromSRodID() [2/2]

bool MuonTGC_CablingSvc::getCoveragefromSRodID ( const int srodID,
int & startEndcapSector,
int & coverageOfEndcapSector,
int & startForwardSector,
int & coverageOfForwardSector ) const

Definition at line 202 of file MuonTGC_CablingSvc.cxx.

207{
208 int sectorInReadout = srodID - 17; //srodID = 17..19
209 if(sectorInReadout>= MuonTGC_Cabling::TGCModuleId::NumberOfSReadoutSector) return false;
210
211 coverageOfEndcapSector =
214 startEndcapSector = sectorInReadout * coverageOfEndcapSector;
215 coverageOfForwardSector =
218 startForwardSector = sectorInReadout *coverageOfForwardSector;
219
220 return true;
221}

◆ getElementIDfromReadoutID()

bool MuonTGC_CablingSvc::getElementIDfromReadoutID ( Identifier & elementID,
const int subDetectorID,
const int rodID,
const int sswID,
const int sbLoc,
const int channelID,
bool orChannel = false ) const

Definition at line 998 of file MuonTGC_CablingSvc.cxx.

1005{
1006 Identifier offlineID;
1007
1008 // get min/max values for ReadoutID parameters
1009 int maxRodId, maxSRodId, maxSswId, maxSbloc, minChannelId ,maxChannelId;
1010 getReadoutIDRanges(maxRodId, maxSRodId, maxSswId, maxSbloc,
1011 minChannelId, maxChannelId);
1012
1013 // check sswID and channelID in allowed range
1014 if((sswID > maxSswId) ||
1015 (channelID < minChannelId) ||
1016 (channelID > maxChannelId)) {
1017 ATH_MSG_DEBUG(" getElementIDfromReadoutID() :"
1018 << " Illeagal channel ID"
1019 << " subdetectorID=" << subDetectorID
1020 << " rodID=" << rodID
1021 << " sswID=" << sswID
1022 << " sbLoc=" << sbLoc
1023 << " channel=" << channelID
1024 << " [ Or =" << orChannel <<"] ");
1025 return false;
1026 }
1027
1028 bool status = getOfflineIDfromReadoutID(offlineID,
1029 subDetectorID,
1030 rodID,
1031 sswID,
1032 sbLoc,
1033 channelID,
1034 orChannel);
1035 if(!status) {
1036 ATH_MSG_DEBUG(" getElementIDfromReadoutID :"
1037 << " Cannot get OfflineID ");
1038 return false;
1039 }
1040
1041 elementID = m_idHelperSvc->tgcIdHelper().elementID(offlineID);
1042 return true;
1043}
#define ATH_MSG_DEBUG(x)
ServiceHandle< Muon::IMuonIdHelperSvc > m_idHelperSvc
bool getOfflineIDfromReadoutID(Identifier &offlineID, const int subDetectorID, const int rodID, const int sswID, const int sbLoc, const int channelID, bool orChannel=false) const
void getReadoutIDRanges(int &maxRodId, int &maxSRodId, int &maxSswId, int &maxSbloc, int &minChannelId, int &maxChannelId) const
status
Definition merge.py:16

◆ getHighPtIDfromOfflineID()

bool MuonTGC_CablingSvc::getHighPtIDfromOfflineID ( const Identifier & offlineID,
int & subDetectorID,
int & rodID,
int & sectorInReadout,
bool & isStrip,
bool & isForward,
int & hpb,
int & chip,
int & hitID,
int & pos ) const

Definition at line 1773 of file MuonTGC_CablingSvc.cxx.

1783{
1784 int sswID = -1;
1785 int sbLoc = -1;
1786 int channelID = -1;
1787
1788 bool status = getReadoutIDfromOfflineID(offlineID,
1789 subDetectorID,
1790 rodID,
1791 sswID,
1792 sbLoc,
1793 channelID);
1794 if(!status) return false;
1795
1796 // SideType
1798 if(subDetectorID==m_AsideId.value()) sideType = MuonTGC_Cabling::TGCId::Aside;
1799 if(subDetectorID==m_CsideId.value()) sideType = MuonTGC_Cabling::TGCId::Cside;
1800
1803
1804 status = m_cabling->getHighPtIDFromReadout(sideType,
1805 rodID,
1806 sswID,
1807 sbLoc,
1808 channelID,
1809 signalType,
1810 regionType,
1811 sectorInReadout,
1812 hpb,
1813 chip,
1814 hitID,
1815 pos);
1816 if(!status) return false;
1817
1818 isStrip = (signalType==MuonTGC_Cabling::TGCId::Strip);
1819 isForward = (regionType==MuonTGC_Cabling::TGCId::Forward);
1820
1821 return true;
1822}
bool getReadoutIDfromOfflineID(const Identifier &offlineID, int &subDetectorID, int &rodID, int &sswID, int &sbLoc, int &channelID, bool adChannel=false) const

◆ getHighPtIDfromROINumber()

bool MuonTGC_CablingSvc::getHighPtIDfromROINumber ( int roi,
bool isForward,
bool isStrip,
int & hpb,
int & chip,
int & hitID,
int & sub ) const

Definition at line 1483 of file MuonTGC_CablingSvc.cxx.

1490{
1491 // for Strip, there is some ambiguity in the relation between hitID and ROI
1492 bool status = true;
1493 int RoiRow = static_cast<int>(roi/4);
1494 int RoiColumn = static_cast<int>(roi%4);
1495
1496 if(!isStrip) {
1497 if(isForward) {
1498 switch(RoiRow) {
1499 case 0: chip=0; hitId=1; sub=0; break;
1500 case 1: chip=0; hitId=1; sub=1; break;
1501 case 2: chip=0; hitId=2; sub=0; break;
1502 case 3: chip=0; hitId=2; sub=1; break;
1503 case 4: chip=0; hitId=3; sub=0; break;
1504 case 5: chip=0; hitId=3; sub=1; break;
1505 case 6: chip=0; hitId=4; sub=0; break;
1506 case 7: chip=0; hitId=4; sub=1; break;
1507 case 8: chip=0; hitId=5; sub=0; break;
1508 case 9: chip=0; hitId=5; sub=1; break;
1509 case 10: chip=0; hitId=6; sub=0; break;
1510 case 11: chip=0; hitId=6; sub=1; break;
1511 case 12: chip=1; hitId=1; sub=0; break;
1512 case 13: chip=1; hitId=1; sub=1; break;
1513 case 14: chip=1; hitId=2; sub=0; break;
1514 case 15: chip=1; hitId=2; sub=1; break;
1515 default: status=false; break;
1516 }
1517 } else {
1518 switch(RoiRow) {
1519 case 0: chip=0; hitId=1; sub=1; break;
1520 case 1: chip=1; hitId=1; sub=0; break;
1521 case 2: chip=1; hitId=1; sub=1; break;
1522 case 3: chip=1; hitId=2; sub=0; break;
1523 case 4: chip=1; hitId=2; sub=1; break;
1524 case 5: chip=1; hitId=3; sub=0; break;
1525 case 6: chip=1; hitId=3; sub=1; break;
1526 case 7: chip=1; hitId=4; sub=0; break;
1527 case 8: chip=1; hitId=4; sub=1; break;
1528 case 9: chip=1; hitId=5; sub=0; break;
1529 case 10: chip=1; hitId=5; sub=1; break;
1530 case 11: chip=1; hitId=6; sub=0; break;
1531 case 12: chip=1; hitId=6; sub=1; break;
1532 case 13: chip=2; hitId=1; sub=0; break;
1533 case 14: chip=2; hitId=1; sub=1; break;
1534 case 15: chip=2; hitId=2; sub=0; break;
1535 case 16: chip=2; hitId=2; sub=1; break;
1536 case 17: chip=2; hitId=3; sub=0; break;
1537 case 18: chip=2; hitId=3; sub=1; break;
1538 case 19: chip=2; hitId=4; sub=0; break;
1539 case 20: chip=2; hitId=4; sub=1; break;
1540 case 21: chip=2; hitId=5; sub=0; break;
1541 case 22: chip=2; hitId=5; sub=1; break;
1542 case 23: chip=2; hitId=6; sub=0; break;
1543 case 24: chip=2; hitId=6; sub=1; break;
1544 case 25: chip=3; hitId=1; sub=0; break;
1545 case 26: chip=3; hitId=1; sub=1; break;
1546 case 27: chip=3; hitId=2; sub=0; break;
1547 case 28: chip=3; hitId=2; sub=1; break;
1548 case 29: chip=3; hitId=3; sub=0; break;
1549 case 30: chip=3; hitId=3; sub=1; break;
1550 case 31: chip=3; hitId=4; sub=0; break;
1551 case 32: chip=3; hitId=4; sub=1; break;
1552 case 33: chip=3; hitId=5; sub=0; break;
1553 case 34: chip=3; hitId=5; sub=1; break;
1554 case 35: chip=3; hitId=6; sub=0; break;
1555 case 36: chip=3; hitId=6; sub=1; break;
1556 default: status=false; break;
1557 }
1558 }
1559 } else if(isStrip) {
1560 if(isForward) {
1561 switch(RoiColumn) {
1562 case 0: chip=0; hitId=1; sub=0; break;
1563 case 1: chip=0; hitId=1; sub=1; break;
1564 case 2: chip=0; hitId=2; sub=0; break;
1565 case 3: chip=0; hitId=2; sub=1; break;
1566 default: status=false; break;
1567 }
1568 } else {
1569 switch(RoiColumn) {
1570 case 0:
1571 if(RoiRow < 5) { chip=0; hitId=1; sub=0; }
1572 else if(RoiRow < 8) { chip=0; hitId=3; sub=0; }
1573 else if(RoiRow < 12) { chip=0; hitId=5; sub=0; }
1574 else if(RoiRow < 25) { chip=1; hitId=1; sub=0; }
1575 else if(RoiRow < 37) { chip=1; hitId=5; sub=0; }
1576 else status=false;
1577 break;
1578 case 1:
1579 if(RoiRow < 5) { chip=0; hitId=1; sub=1; }
1580 else if(RoiRow < 8) { chip=0; hitId=3; sub=1; }
1581 else if(RoiRow < 12) { chip=0; hitId=5; sub=1; }
1582 else if(RoiRow < 25) { chip=1; hitId=1; sub=1; }
1583 else if(RoiRow < 37) { chip=1; hitId=5; sub=1; }
1584 else status=false;
1585 break;
1586 case 2:
1587 if(RoiRow < 5) { chip=0; hitId=2; sub=0; }
1588 else if(RoiRow < 8) { chip=0; hitId=4; sub=0; }
1589 else if(RoiRow < 12) { chip=0; hitId=6; sub=0; }
1590 else if(RoiRow < 25) { chip=1; hitId=2; sub=0; }
1591 else if(RoiRow < 37) { chip=1; hitId=6; sub=0; }
1592 else status=false;
1593 break;
1594 case 3:
1595 if(RoiRow < 5) { chip=0; hitId=2; sub=1; }
1596 else if(RoiRow < 8) { chip=0; hitId=4; sub=1; }
1597 else if(RoiRow < 12) { chip=0; hitId=6; sub=1; }
1598 else if(RoiRow < 25) { chip=1; hitId=2; sub=1; }
1599 else if(RoiRow < 37) { chip=1; hitId=6; sub=1; }
1600 else status=false;
1601 break;
1602 default: status=false; break;
1603 }
1604 }
1605 }
1606
1607 hpb = 0;
1608
1609 return status;
1610}

◆ getLowPtCoincidenceIDfromOfflineID()

bool MuonTGC_CablingSvc::getLowPtCoincidenceIDfromOfflineID ( const Identifier & offlineID,
int & subDetectorID,
int & rodID,
int & sswID,
int & sbLoc,
int & block,
int & pos,
bool middle = false ) const

Definition at line 1863 of file MuonTGC_CablingSvc.cxx.

1871{
1872 int channelID = -1;
1873
1874 bool status = getReadoutIDfromOfflineID(offlineID,
1875 subDetectorID,
1876 rodID,
1877 sswID,
1878 sbLoc,
1879 channelID);
1880 if(!status) return false;
1881
1882 // SideType
1884 if(subDetectorID==m_AsideId.value()) sideType = MuonTGC_Cabling::TGCId::Aside;
1885 if(subDetectorID==m_CsideId.value()) sideType = MuonTGC_Cabling::TGCId::Cside;
1886
1887 return m_cabling->getLowPtCoincidenceFromReadout(sideType,
1888 rodID,
1889 sswID,
1890 sbLoc,
1891 channelID,
1892 block,
1893 pos,
1894 middle);
1895}

◆ getMaxRodId()

int MuonTGC_CablingSvc::getMaxRodId ( )
inline

◆ getModule()

MuonTGC_Cabling::TGCModuleMap * MuonTGC_CablingSvc::getModule ( const MuonTGC_Cabling::TGCModuleId * moduleId,
MuonTGC_Cabling::TGCModuleId::ModuleIdType type ) const

Definition at line 1474 of file MuonTGC_CablingSvc.cxx.

1476{
1477 return m_cabling->getModule(moduleId, type);
1478}

◆ getOfflineIDfromHighPtID()

bool MuonTGC_CablingSvc::getOfflineIDfromHighPtID ( Identifier & offlineID,
const int subDetectorID,
const int rodID,
const int sectorInReadout,
const bool isStrip,
const bool isForward,
const int hpb,
const int chip,
const int hitID,
const int pos ) const

Definition at line 1710 of file MuonTGC_CablingSvc.cxx.

1720{
1721 // all input is derived from TgcRawData
1722 int sswID = -1;
1723 int sbLoc = -1;
1724 int channelID = -1;
1725
1726 // SideType
1728 if(subDetectorID==m_AsideId.value()) sideType = MuonTGC_Cabling::TGCId::Aside;
1729 if(subDetectorID==m_CsideId.value()) sideType = MuonTGC_Cabling::TGCId::Cside;
1730
1731 // SignalType, RegionType
1732 MuonTGC_Cabling::TGCId::SignalType signalType = (isStrip) ? MuonTGC_Cabling::TGCId::Strip : MuonTGC_Cabling::TGCId::Wire;
1733 MuonTGC_Cabling::TGCId::RegionType regionType = (isForward) ? MuonTGC_Cabling::TGCId::Forward : MuonTGC_Cabling::TGCId::Endcap;
1734
1735 // ModuleType
1737 if(signalType==MuonTGC_Cabling::TGCId::Wire) {
1738 moduleType=MuonTGC_Cabling::TGCId::WD;
1739 } else {
1740 moduleType=MuonTGC_Cabling::TGCId::SD;
1741 }
1742
1743 // Get ReadoutID for pivot plane
1744 bool status = m_cabling->getReadoutFromHighPtID(sideType,
1745 rodID,
1746 sswID,
1747 sbLoc,
1748 channelID,
1749 signalType,
1750 regionType,
1751 sectorInReadout,
1752 hpb,
1753 chip,
1754 hitID,
1755 pos,
1756 moduleType,
1757 false);
1758
1759 if(!status) return false;
1760
1761 // get OfflineID for pivot plane
1762 return getOfflineIDfromReadoutID(offlineID,
1763 subDetectorID,
1764 rodID,
1765 sswID,
1766 sbLoc,
1767 channelID);
1768
1769}
@ Endcap
Definition DetType.h:14

◆ getOfflineIDfromLowPtCoincidenceID()

bool MuonTGC_CablingSvc::getOfflineIDfromLowPtCoincidenceID ( Identifier & offlineID,
const int subDetectorID,
const int rodID,
const int sswID,
const int sbLoc,
const int block,
const int pos,
bool middle = false ) const

Definition at line 1827 of file MuonTGC_CablingSvc.cxx.

1835{
1836 int channelID = -1;
1837
1838 // SideType
1840 if(subDetectorID==m_AsideId.value()) sideType = MuonTGC_Cabling::TGCId::Aside;
1841 if(subDetectorID==m_CsideId.value()) sideType = MuonTGC_Cabling::TGCId::Cside;
1842
1843 bool status = m_cabling->getReadoutFromLowPtCoincidence(sideType,
1844 rodID,
1845 sswID,
1846 sbLoc,
1847 channelID,
1848 block,
1849 pos,
1850 middle);
1851 if(!status) return false;
1852
1853 return getOfflineIDfromReadoutID(offlineID,
1854 subDetectorID,
1855 rodID,
1856 sswID,
1857 sbLoc,
1858 channelID);
1859}

◆ getOfflineIDfromOnlineID()

bool MuonTGC_CablingSvc::getOfflineIDfromOnlineID ( Identifier & offlineID,
const int subsystemNumber,
const int octantNumber,
const int moduleNumber,
const int layerNumber,
const int rNumber,
const int wireOrStrip,
const int channelNumber ) const

Definition at line 650 of file MuonTGC_CablingSvc.cxx.

658{
659 // SideType
661 if(subSystemNumber==1) sideType = MuonTGC_Cabling::TGCId::Aside;
662 if(subSystemNumber==-1) sideType = MuonTGC_Cabling::TGCId::Cside;
663
664 // SignalType
666 if(wireOrStrip==0) signalType = MuonTGC_Cabling::TGCId::Wire;
667 if(wireOrStrip==1) signalType = MuonTGC_Cabling::TGCId::Strip;
668
669 ATH_MSG_VERBOSE("getOfflineIDfromOnlineID for "
670 << " side=" << sideType << " octant=" << octantNumber
671 << " module=" << moduleNumber << " layer=" << layerNumber
672 << " chamber=" << rNumber << " w/s=" << signalType
673 << " channel=" << channelNumber);
674
675 // ASDOut
676 MuonTGC_Cabling::TGCChannelASDOut asdout(sideType,
677 signalType,
678 octantNumber,
679 moduleNumber,
680 layerNumber,
681 rNumber,
682 channelNumber);
683 if(!asdout.isValid()) {
684 ATH_MSG_WARNING(" Illegal AsdOut for "
685 << " side=" << sideType << " octant=" << octantNumber
686 << " module=" << moduleNumber << " layer=" << layerNumber
687 << " chamber=" << rNumber << " w/s=" << signalType
688 << " channel=" << channelNumber);
689 }
690 if(!asdout.isValid()) return false;
691
692 // online Id -> offline Id
693 MuonTGC_Cabling::TGCChannelId* asdin =
694 m_cabling->getChannel(&asdout,
696 false);
697 if(!asdin || !asdin->isValid()) {
698 ATH_MSG_WARNING(" getOfflineIDfromOnlineID :"
699 << " Illegal AsdIn for "
700 << " side=" << sideType << " octant=" << octantNumber
701 << " module=" << moduleNumber << " layer=" << layerNumber
702 << " chamber=" << rNumber << " w/s=" << signalType
703 << " channel=" << channelNumber);
704 }
705 if(asdin==nullptr) return false;
706 if(!asdin->isValid()) {
707 delete asdin;
708 asdin = nullptr;
709 return false;
710 }
711 // build identifier
712 std::string stationNameStr;
713 switch(asdin->getStation()) {
714 case 0: // Triplet
715 stationNameStr = (asdin->isForward()) ? "T1F" : "T1E";
716 break;
717 case 1: // Middle Doublet
718 stationNameStr = (asdin->isForward()) ? "T2F" : "T2E";
719 break;
720 case 2: //Pivot Doublet
721 stationNameStr = (asdin->isForward()) ? "T3F" : "T3E";
722 break;
723 case 3: // Inner
724 stationNameStr = (asdin->isForward()) ? "T4F" : "T4E";
725 break;
726 default:
727 delete asdin; asdin = nullptr;
728 return false;
729 }
730 int stationEta = asdin->getChamber();
732 int stationPhi = asdin->getSector();
733 int gasGap = asdin->getGasGap();
734 int isStrip = (asdin->isStrip()) ? 1 : 0;
735 int channel = asdin->getChannel();
736
737 if((asdin->getStation()==3) && (asdin->isEndcap())) {
738 // special treatment for EI
739 const int phiIE[] = { -1, 1, 2, 3, 4, 5, 6, 7, 8, -1, 9, 10,
740 11, 12, 13, 14, 15, -1, 16, 17, 18, -1, 19, 20,
741 21};
742 stationPhi = phiIE[ asdin->getSector() ];
743 if(stationPhi<0) {
744 delete asdin;
745 asdin = nullptr;
746 return false;
747 }
748 }
749
750 // OnlineID --> OfflineID
751 // T11S : EI @ stationPhi=2,11,13,14,15,19,20,21
752 // total number of wire channel = 16
753 // (T11 24 channel)
754 const int OffsetForT11S = 8;
755 // T10S : FI @ statioPhi =2,5,8,11,14,17,20,23
756 // total number of wire channel = 30
757 // (T10 32 channel)
758 if((asdin->getStation()==3) && (!isStrip)) { // Inner Wire
759 if(asdin->isEndcap()) {
760 switch(stationPhi) {
761 case 2:
762 case 11:
763 case 13:
764 case 14:
765 case 15:
766 case 19:
767 case 20:
768 case 21:
769 // T11S
770 channel -= OffsetForT11S;
771 if(channel<=0) {
772 delete asdin;
773 return false;
774 }
775 break;
776 default:
777 break;
778 }
779 }
780 }
781
782
783 offlineId = m_idHelperSvc->tgcIdHelper().channelID(stationNameStr,
784 stationEta,
785 stationPhi,
786 gasGap,
787 isStrip,
788 channel);
789
790 delete asdin;
791 asdin = nullptr;
792 return true;
793}
#define ATH_MSG_VERBOSE(x)
#define ATH_MSG_WARNING(x)
virtual bool isValid() const
virtual int getGasGap() const
bool isEndcap() const
Definition TGCId.h:141
bool isForward() const
Definition TGCId.h:140
int getChamber() const
Definition TGCId.h:130
bool isStrip() const
Definition TGCId.h:135
int getStation() const
Definition TGCId.h:127
virtual int getSector() const
Definition TGCId.h:129
SideType getSideType(void) const
Definition TGCId.h:121
constexpr uint8_t stationPhi
station Phi 1 to 8

◆ getOfflineIDfromReadoutID()

bool MuonTGC_CablingSvc::getOfflineIDfromReadoutID ( Identifier & offlineID,
const int subDetectorID,
const int rodID,
const int sswID,
const int sbLoc,
const int channelID,
bool orChannel = false ) const

Definition at line 301 of file MuonTGC_CablingSvc.cxx.

308{
309 int subsystemNumber;
310 int octantNumber;
311 int moduleNumber;
312 int layerNumber;
313 int rNumber;
314 int wireOrStrip;
315 int channelNumber;
316
317 // ReadoutID -> OnlineID
318 bool status = getOnlineIDfromReadoutID(subDetectorID,
319 rodID,
320 sswID,
321 sbLoc,
322 channelID,
323 subsystemNumber,
324 octantNumber,
325 moduleNumber,
326 layerNumber,
327 rNumber,
328 wireOrStrip,
329 channelNumber,
330 orChannel);
331 if((!status) && (!orChannel)) {
333 " getOfflineIDfromReadoutID :"
334 << " Cannot get OnineID for "
335 << " subdetectorID=" << subDetectorID
336 << " rodID=" << rodID
337 << " sswID=" << sswID
338 << " sbLoc=" << sbLoc
339 << " channel=" << channelID
340 << " [ Or =" << orChannel <<"] ");
341 }
342 if(!status) {
343 return status;
344 }
345
346 // OnlineID -> OfflineID
348 subsystemNumber,
349 octantNumber,
350 moduleNumber,
351 layerNumber,
352 rNumber,
353 wireOrStrip,
354 channelNumber);
355
356 if(!status) {
357 ATH_MSG_VERBOSE(" getOfflineIDfromReadoutID :"
358 << " Cannot get OfflineID for "
359 << " side=" << subsystemNumber << " octant=" << octantNumber
360 << " module=" << moduleNumber << " layer=" << layerNumber
361 << " chamber=" << rNumber << " w/s=" << wireOrStrip
362 << " channel=" << channelNumber);
363 }
364
365 return status;
366}
bool getOfflineIDfromOnlineID(Identifier &offlineID, const int subsystemNumber, const int octantNumber, const int moduleNumber, const int layerNumber, const int rNumber, const int wireOrStrip, const int channelNumber) const
bool getOnlineIDfromReadoutID(const int subDetectorID, const int rodID, const int sswID, const int sbLoc, const int channelID, int &subsystemNumber, int &octantNumber, int &moduleNumber, int &layerNumber, int &rNumber, int &wireOrStrip, int &channelNumber, bool orChannel=false) const

◆ getOnlineIDfromOfflineID()

bool MuonTGC_CablingSvc::getOnlineIDfromOfflineID ( const Identifier & offlineID,
int & subsystemNumber,
int & octantNumber,
int & moduleNumber,
int & layerNumber,
int & rNumber,
int & wireOrStrip,
int & channelNumber ) const

Definition at line 460 of file MuonTGC_CablingSvc.cxx.

468{
469 // get station name in string format : T1F,T1E,T2F...
470 const int iStation = m_idHelperSvc->tgcIdHelper().stationName(offlineId);
471 const int stationType = (iStation - 39)/2;
472
473 if((stationType <1) || (stationType >4)) return false;
474
475 // eta and phi
476 int iEta = m_idHelperSvc->tgcIdHelper().stationEta(offlineId);
477 int iPhi = m_idHelperSvc->tgcIdHelper().stationPhi(offlineId);
478
479 // forward/endcap
480 enum {FORWARD, ENDCAP};
481 const int regionType = m_idHelperSvc->tgcIdHelper().isForward(offlineId) ? FORWARD : ENDCAP;
482
483 // octant index and module index
484 const int sectorEI[] = {-1, 1, 2, 3, 4, 5, 6, 7, 8, 10, 11,
485 12, 13, 14, 15, 16, 18, 19, 20, 22, 23,
486 0};
487 int sector = -1;
488 if(regionType==ENDCAP) {
489 if(stationType!=4) {
490 // Endcap
492 } else {
493 // EI
494 sector = sectorEI[ iPhi ];
495 // iPhi is redefined for internal use
496 if(sector == 0) {
498 } else {
499 iPhi = sector;
500 }
501 }
502 } else {
503 if(stationType!=4) {
504 // Forward
506 } else {
507 // FI
509 }
510 }
511 int max_module = (regionType==FORWARD||stationType==4) ?
513 : MuonTGC_Cabling::TGCId::NUM_ENDCAP_SECTOR;
515 const int iOctant = static_cast<int>(sector/max_module);
516 const int iModule = sector % max_module;
517
518 // R index
519 const int rIndex = std::abs(iEta);
520
521 // Gas gap
522 const int iGasGap = m_idHelperSvc->tgcIdHelper().gasGap(offlineId);
523
524 // convert to ASD-Out index
525
526 subSystemNumber = (iEta > 0) ? 1 : -1;
527
528 octantNumber = iOctant;
529
530 // module# convention
531 // <---- phi ----
532 //
533 // 7 6 4 3 1 0 11 10 9
534 // 8 5 2 14 13 12
535 //
536 // [M1,M2, M3] [EI/FI]
537
538 // module mapping N/A A B C D E F
539 const int modmapE[7] = { -1, 0, 1, 3, 4, 6, 7 };
540 const int modmapF[4] = { -1, 2, 5, 8 };
541 const int modmapEI[4] = { -1, 9, 10, 11 };
542 const int modmapFI[4] = { -1, 12, 13, 14 };
543
544 if(stationType != 4) { // T1, T2, T3
545 if(regionType==ENDCAP) {
546 moduleNumber = modmapE[iModule+1];
547 rNumber = 5-rIndex;
548 } else {
549 moduleNumber = modmapF[iModule+1];
550 rNumber = rIndex-1;
551 }
552 } else {// TI
553 if(regionType==ENDCAP) {
554 moduleNumber = modmapEI[iModule+1];
555 rNumber = rIndex-1; // 0-offset
556 } else {
557 moduleNumber = modmapFI[iModule+1];
558 rNumber = rIndex-1;
559 }
560 }
561
562 // layer#
563 // 0, (1), 2, ... 5, 6 (pivot) / 7, 8 (EI/FI)
564 // N/A T1 T2 T3 TI
565 const int lyr_offset[5]= { 0, -1, 2, 4, 6 };
566 layerNumber = iGasGap + lyr_offset[stationType];
567
568 // wire (0) or strip (1)
569 wireOrStrip = m_idHelperSvc->tgcIdHelper().isStrip(offlineId);
570
571
572 // Offline ID channel
573 int channel = m_idHelperSvc->tgcIdHelper().channel(offlineId);
574
575 // Offline ID cahnnel -> Online ID channel
576 // T11S : EI @ phi=2,11,13,14,15,19,20,21
577 // total number of wire channel = 16
578 // (T11 : 24 channel)
579 const int OffsetForT11S = 8;
580 // T10S : FI @ phi =2,5,8,11,14,17,20,23
581 // total number of wire channel = 30
582 // (T10 32 channel)
583
584 if((wireOrStrip ==0) && (stationType == 4)) { // TI wire
585 if(regionType==ENDCAP) { // EI
586 // iPhi here is onlineID from 1 to 24.
587 switch(iPhi) {
588 case 2:
589 case 12:
590 case 14:
591 case 15:
592 case 16:
593 case 22:
594 case 23:
595 case 24:
596 // T11S
597 channel += OffsetForT11S;
598 break;
599 default:
600 break;
601 }
602 }
603 }
604 // SideType
606 if(subSystemNumber==1) sideType = MuonTGC_Cabling::TGCId::Aside;
607 if(subSystemNumber==-1) sideType = MuonTGC_Cabling::TGCId::Cside;
608
609 // SignalType
611 if(wireOrStrip==0) signalType = MuonTGC_Cabling::TGCId::Wire;
612 if(wireOrStrip==1) signalType = MuonTGC_Cabling::TGCId::Strip;
613
614 // RegionType
616 if(regionType==FORWARD) region = MuonTGC_Cabling::TGCId::Forward;
617 if(regionType==ENDCAP) region = MuonTGC_Cabling::TGCId::Endcap;
618
619
620 // ASDIn
621 MuonTGC_Cabling::TGCChannelASDIn asdin(sideType,
622 signalType,
623 region,
624 iPhi,
625 layerNumber,
626 rIndex,
627 channel);
628 if(!asdin.isValid()) return false;
629
630 // offline Id -> online Id
631 MuonTGC_Cabling::TGCChannelId* asdout =
632 m_cabling->getChannel(&asdin,
634 false);
635 if(asdout==nullptr) return false;
636 if(!asdout->isValid()) {
637 delete asdout;
638 asdout=nullptr;
639 return false;
640 }
641 channelNumber = asdout->getChannel();
642 delete asdout;
643 asdout=nullptr;
644
645 return true;
646}
#define FORWARD
static constexpr int NUM_INNER_SECTOR
Definition TGCId.h:42
static constexpr int NUM_OCTANT
Definition TGCId.h:39
@ iPhi
Definition ParamDefs.h:47
setScale setgFexType iEta

◆ getOnlineIDfromReadoutID()

bool MuonTGC_CablingSvc::getOnlineIDfromReadoutID ( const int subDetectorID,
const int rodID,
const int sswID,
const int sbLoc,
const int channelID,
int & subsystemNumber,
int & octantNumber,
int & moduleNumber,
int & layerNumber,
int & rNumber,
int & wireOrStrip,
int & channelNumber,
bool orChannel = false ) const

Definition at line 797 of file MuonTGC_CablingSvc.cxx.

810{
811 // SideType
813 if(subDetectorID==m_AsideId.value()) sideType = MuonTGC_Cabling::TGCId::Aside;
814 if(subDetectorID==m_CsideId.value()) sideType = MuonTGC_Cabling::TGCId::Cside;
815
816 // readout channel -> chamber channel
817 MuonTGC_Cabling::TGCChannelId* asdout =
818 m_cabling->getASDOutFromReadout(sideType,
819 rodID,
820 sswID,
821 sbLoc,
822 channelID,
823 orChannel);
824 if(asdout==nullptr) {
825 if(!orChannel) {
826 ATH_MSG_VERBOSE(" getOnlineIDfromReadoutID :"
827 << " Cannot get OnlineID of "
828 << " side=" << sideType
829 << " rodID=" << rodID
830 << " sswID=" << sswID
831 << " sbLoc=" << sbLoc
832 << " channel=" << channelID
833 << " [ Or =" << orChannel <<"] ");
834 }
835 return false;
836 }
837 if(!asdout->isValid()) {
838 ATH_MSG_WARNING(" getOnlineIDfromReadoutID :"
839 << " Illegal ASDout for "
840 << " side=" << sideType
841 << " rodID=" << rodID
842 << " sswID=" << sswID
843 << " sbLoc=" << sbLoc
844 << " channel=" << channelID
845 << " [ Or =" << orChannel <<"] ");
846
847 delete asdout;
848 asdout = nullptr;
849 return false;
850 }
851 // SubsystemNumber
852 subsystemNumber = (asdout->isAside()) ? 1 : -1;
853
854 // OctantNumber
855 octantNumber = asdout->getOctant();
856
857 // RNumber
858 rNumber = asdout->getChamber();
859
860 // ModuleNumber
861 moduleNumber = asdout->getSectorModule();
862
863 layerNumber = asdout->getLayer();
864
865 // WireOrStrip
866 wireOrStrip = (asdout->isStrip()) ? 1 : 0;
867
868 // ChannelNumber
869 channelNumber = asdout->getChannel();
870
871 delete asdout;
872 asdout = nullptr;
873 return true;
874}
int getOctant() const
Definition TGCId.h:128
bool isAside() const
Definition TGCId.h:133
virtual int getSectorModule() const
Definition TGCId.cxx:112

◆ getRDOHighPtIDfromSimHighPtID()

bool MuonTGC_CablingSvc::getRDOHighPtIDfromSimHighPtID ( const bool isForward,
const bool isStrip,
int & index,
int & chip,
int & hitId ) const

Definition at line 1651 of file MuonTGC_CablingSvc.cxx.

1656{
1657 if(isForward) {
1658 if(isStrip) {//FS
1659 index=0; hitId--;
1660 } else if(!isStrip) {//FW
1661 index=0; hitId++;
1662 }
1663 } else {
1664 if(isStrip) {//ES
1665 index=0; hitId++;
1666 } else if(!isStrip) {//EW
1667 if(index==0 && chip==0) hitId=1;
1668 else if(index==0 && chip==1) hitId++;
1669 else if(index==1 && chip==0) {chip=2; hitId++;}
1670 else if(index==1 && chip==1) {chip=3; hitId++;}
1671 }
1672 }
1673
1674 return true;
1675}
str index
Definition DeMoScan.py:362

◆ getReadoutIDfromElementID()

bool MuonTGC_CablingSvc::getReadoutIDfromElementID ( const Identifier & elementID,
int & subdetectorID,
int & rodID ) const

Definition at line 958 of file MuonTGC_CablingSvc.cxx.

961{
962 // get station name in string format : T1F,T1E,T2F...
963 const int iStation = m_idHelperSvc->tgcIdHelper().stationName(elementID);
964 const int stationType = (iStation - 39)/2;
965
966 int iEta = m_idHelperSvc->tgcIdHelper().stationEta(elementID);
967 int iPhi = m_idHelperSvc->tgcIdHelper().stationPhi(elementID);
968
969 // forward/endcap
970 enum {FORWARD, ENDCAP};
971 const int regionType = m_idHelperSvc->tgcIdHelper().isForward(elementID) ? FORWARD : ENDCAP;
972
973 // SideType
974 subdetectorID = (iEta > 0) ? m_AsideId.value() : m_CsideId.value();
975
976 // sector index and module index
977 const int max_phi = (regionType==FORWARD||stationType==4) ?
979 MuonTGC_Cabling::TGCId::NUM_ENDCAP_SECTOR;
980 const int max_module = max_phi / MuonTGC_Cabling::TGCId::N_RODS;
981 const int sector = ((iPhi-1)+ max_phi/24 + max_phi)%max_phi;
982 int readoutSector = static_cast<int>(sector/max_module);
983 // Inner case
984 if(stationType==4) {
985 readoutSector = (readoutSector /3);
986 readoutSector = 3*readoutSector + 1;
987 }
988
989
990 rodID = readoutSector +1;
991
992
993 return true;
994}

◆ getReadoutIDfromHPTID()

bool MuonTGC_CablingSvc::getReadoutIDfromHPTID ( const int phi,
const bool isAside,
const bool isEndcap,
const bool isStrip,
const int id,
int & subsectorID,
int & rodID,
int & sswID,
int & sbLoc ) const

Definition at line 1441 of file MuonTGC_CablingSvc.cxx.

1450{
1451 return getReadoutIDfromSLID(phi, isAside, isEndcap,
1452 subsectorID,
1453 rodID,
1454 sswID,
1455 sbLoc);
1456}
Scalar phi() const
phi method
bool getReadoutIDfromSLID(const int phi, const bool isAside, const bool isEndcap, int &subsectorID, int &rodID, int &sswID, int &sbLoc) const

◆ getReadoutIDfromOfflineID()

bool MuonTGC_CablingSvc::getReadoutIDfromOfflineID ( const Identifier & offlineID,
int & subDetectorID,
int & rodID,
int & sswID,
int & sbLoc,
int & channelID,
bool adChannel = false ) const

Definition at line 371 of file MuonTGC_CablingSvc.cxx.

378{
379 int subsystemNumber;
380 int octantNumber;
381 int moduleNumber;
382 int layerNumber;
383 int rNumber;
384 int wireOrStrip;
385 int channelNumber;
386
387 // OfflineID -> OnlineID
388 bool status = getOnlineIDfromOfflineID(offlineID,
389 subsystemNumber,
390 octantNumber,
391 moduleNumber,
392 layerNumber,
393 rNumber,
394 wireOrStrip,
395 channelNumber);
396
397
398 if(!status) {
399 ATH_MSG_WARNING(" Fail to getOnlineIDfromOfflineID " << " for OfflineID=" << m_idHelperSvc->toString(offlineID));
400 }
401 if(!status) return status;
402
403 ATH_MSG_DEBUG("getOnlineIDfromOfflineID() "
404 << " offlineID=" << offlineID
405 << " onlineID: "
406 << " side=" << subsystemNumber << " octant=" << octantNumber
407 << " module=" << moduleNumber << " layer=" << layerNumber
408 << " chamber=" << rNumber << " w/s=" << wireOrStrip
409 << " channel=" << channelNumber);
410
411 // OnlineID -> ReadoutID
412 status = getReadoutIDfromOnlineID(subDetectorID,
413 rodID,
414 sswID,
415 sbLoc,
416 channelID,
417 subsystemNumber,
418 octantNumber,
419 moduleNumber,
420 layerNumber,
421 rNumber,
422 wireOrStrip,
423 channelNumber,
424 adChannel);
425
426 if(!status) {
427 if(adChannel) {
428 ATH_MSG_DEBUG(" Fail to getReadoutIDfromOnlineID");
429 ATH_MSG_DEBUG(" side=" << subsystemNumber << " octant=" << octantNumber
430 << " module=" << moduleNumber << " layer=" << layerNumber
431 << " chamber=" << rNumber << " w/s=" << wireOrStrip
432 << " channel=" << channelNumber);
433 } else {
434 ATH_MSG_WARNING(" getReadoutIDfromOnlineID: "
435 << " Cannot get ReadoutID for "
436 << " side=" << subsystemNumber << " octant=" << octantNumber
437 << " module=" << moduleNumber << " layer=" << layerNumber
438 << " chamber=" << rNumber << " w/s=" << wireOrStrip
439 << " channel=" << channelNumber);
440 }
441 } else {
442 ATH_MSG_DEBUG(" SUCCESS getReadoutIDfromOnlineID");
443 ATH_MSG_DEBUG(" side=" << subsystemNumber << " octant=" << octantNumber
444 << " module=" << moduleNumber << " layer=" << layerNumber
445 << " chamber=" << rNumber << " w/s=" << wireOrStrip
446 << " channel=" << channelNumber
447 << "adjacent=" << adChannel);
448 ATH_MSG_DEBUG(" subDetectorID" << subDetectorID
449 << " rodID=" << rodID
450 << " sswID=" << sswID
451 << " channelID=" << channelID);
452 }
453
454 return status;
455}
bool getOnlineIDfromOfflineID(const Identifier &offlineID, int &subsystemNumber, int &octantNumber, int &moduleNumber, int &layerNumber, int &rNumber, int &wireOrStrip, int &channelNumber) const
bool getReadoutIDfromOnlineID(int &subDetectorID, int &rodID, int &sswID, int &sbLoc, int &channelID, const int subsystemNumber, const int octantNumber, const int moduleNumber, const int layerNumber, const int rNumber, const int wireOrStrip, const int channelNumber, bool adChannel=false) const

◆ getReadoutIDfromOnlineID()

bool MuonTGC_CablingSvc::getReadoutIDfromOnlineID ( int & subDetectorID,
int & rodID,
int & sswID,
int & sbLoc,
int & channelID,
const int subsystemNumber,
const int octantNumber,
const int moduleNumber,
const int layerNumber,
const int rNumber,
const int wireOrStrip,
const int channelNumber,
bool adChannel = false ) const

Definition at line 878 of file MuonTGC_CablingSvc.cxx.

891{
892 // SideType
894 if(subsystemNumber==1) sideType = MuonTGC_Cabling::TGCId::Aside;
895 if(subsystemNumber==-1) sideType = MuonTGC_Cabling::TGCId::Cside;
896
897 // SignalType
899 if(wireOrStrip==0) signalType = MuonTGC_Cabling::TGCId::Wire;
900 if(wireOrStrip==1) signalType = MuonTGC_Cabling::TGCId::Strip;
901
902 // ASDOut
903 MuonTGC_Cabling::TGCChannelASDOut asdout(sideType,
904 signalType,
905 octantNumber,
906 moduleNumber,
907 layerNumber,
908 rNumber,
909 channelNumber);
910 if(!asdout.isValid()) {
911 ATH_MSG_WARNING(" getReadoutIDfromOnlineID() :"
912 << " Cannot get ASDout for "
913 << " side=" << sideType
914 << " signal=" << signalType
915 << " octant=" << octantNumber
916 << " module=" << moduleNumber
917 << " layer=" << layerNumber
918 << " chamber=" << rNumber
919 << " channel=" << channelNumber);
920 }
921
922 if(!asdout.isValid()) return false;
923
924 // chamber channel -> readout channel
925 bool status = m_cabling->getReadoutFromASDOut(&asdout,
926 sideType,
927 rodID,
928 sswID,
929 sbLoc,
930 channelID,
931 adChannel);
932 if(!status) {
933 if(adChannel) {
934 ATH_MSG_DEBUG("getReadoutIDfromASDOut fails for adjacent");
935 }
936 else {
937 ATH_MSG_WARNING(" getReadoutIDfromASDOut :"
938 << " Cannot get ReadoutID for "
939 << " side=" << sideType
940 << " signal=" << signalType
941 << " octant=" << octantNumber
942 << " module=" << moduleNumber
943 << " layer=" << layerNumber
944 << " chamber=" << rNumber
945 << " channel=" << channelNumber);
946 }
947 }
948 if(!status) return false;
949
950 // SubDetectorID
951 if(sideType==MuonTGC_Cabling::TGCId::Aside) subDetectorID = m_AsideId.value();
952 if(sideType==MuonTGC_Cabling::TGCId::Cside) subDetectorID = m_CsideId.value();
953
954 return status;
955}

◆ getReadoutIDfromSLBID()

bool MuonTGC_CablingSvc::getReadoutIDfromSLBID ( const int phi,
const bool isAside,
const bool isEndcap,
const int moduleType,
const int id,
int & subsectorID,
int & rodID,
int & sswID,
int & sbLoc ) const

Definition at line 1202 of file MuonTGC_CablingSvc.cxx.

1211{
1214 bool isInner = (module==MuonTGC_Cabling::TGCId::WI || module==MuonTGC_Cabling::TGCId::SI);
1215 int sector = -1;// sector=0-47(EC), 0-23(FWD), 0-23(INNER)
1216 if(isInner) {
1218 } else if(isEndcap) {
1220 } else {
1222 }
1224
1225 MuonTGC_Cabling::TGCModuleSLB slb(side, module, region, sector, id);
1226
1227 if(!slb.isValid()) {
1228 ATH_MSG_WARNING("getReadoutIDfromSLBID "
1229 << " phi=" << phi
1230 << " side=" << ((isAside) ? "A" : "C")
1231 << " region=" << ((isEndcap) ? "Endcap" : "Forward")
1232 << " type=" << moduleType
1233 << " id=" << id
1234 << " Invalid SLB");
1235 }
1236 if(!slb.isValid()) return false;
1237
1238 subsectorID = (isAside ? m_AsideId : m_CsideId);
1239
1240 bool status = m_cabling->getReadoutFromSLB(&slb, side, rodID, sswID, sbLoc);
1241
1242 if(!status) {
1243 ATH_MSG_DEBUG(" FAIL getReadoutIDfromSLBID");
1244 } else {
1245 ATH_MSG_DEBUG(" SUCCESS getReadoutIDfromSLBID");
1246 ATH_MSG_DEBUG(" phi=" << phi
1247 << " side=" << ((isAside) ? "A" : "C")
1248 << " region=" << ((isEndcap) ? "Endcap" : "Forward")
1249 << " type=" << moduleType
1250 << " id=" << id
1251 << " side" << side
1252 << " rodID=" << rodID
1253 << " sswID=" << sswID
1254 << " sbLoc=" << sbLoc);
1255 }
1256 if(!status) return false;
1257 return true;
1258}

◆ getReadoutIDfromSLID()

bool MuonTGC_CablingSvc::getReadoutIDfromSLID ( const int phi,
const bool isAside,
const bool isEndcap,
int & subsectorID,
int & rodID,
int & sswID,
int & sbLoc ) const

Definition at line 1353 of file MuonTGC_CablingSvc.cxx.

1360{
1361 if(isAside)subsectorID=m_AsideId;
1362 else subsectorID=m_CsideId;
1363
1364 if(isEndcap) {
1366 } else {
1368 }
1369
1370 int sector;
1371 int sectorInReadout;
1372 if(isEndcap) {
1374 sectorInReadout = sector %
1376 sbLoc = sectorInReadout;
1377 rodID = (sector-sectorInReadout)/
1379 + 1;
1380 } else {
1382 sectorInReadout = sector %
1384 sbLoc = sectorInReadout +4;
1385 rodID = (sector-sectorInReadout)/
1387 + 1;
1388 }
1389 // Fixed SSWID for SL
1390 sswID = 9;
1391
1392 return true;
1393}

◆ getReadoutIDRanges()

void MuonTGC_CablingSvc::getReadoutIDRanges ( int & maxRodId,
int & maxSRodId,
int & maxSswId,
int & maxSbloc,
int & minChannelId,
int & maxChannelId ) const

◆ getROINumberfromHighPtID()

bool MuonTGC_CablingSvc::getROINumberfromHighPtID ( int & roi,
bool isForward,
int hpb_wire,
int chip_wire,
int hitId_wire,
int sub_wire,
int chip_strip,
int hitId_strip,
int sub_strip ) const

Definition at line 1613 of file MuonTGC_CablingSvc.cxx.

1622{
1623 // for Strip, there is some ambiguity in the relation between hitID and ROI
1624 // CAUTION!!: return RDO value (not the value for simulation)
1625 bool status = true;
1626 int RoiRow = 0;
1627 int RoiColumn = 0;
1628
1629 if(isForward) {
1630 RoiRow = 12*chip_wire + 2*(hitId_wire - 1) + sub_wire;
1631 RoiColumn = 2*((hitId_strip - 1)%2) + sub_strip;
1632 } else if(!isForward) {
1633 RoiColumn = 2*((hitId_strip - 1)%2) + sub_strip;
1634 switch(chip_wire) {
1635 case 0: RoiRow=0; break;
1636 case 1:
1637 case 2:
1638 case 3: RoiRow=12*(chip_wire-1) + 2*(hitId_wire - 1) + sub_wire + 1; break;
1639 default: break;
1640 }
1641 }
1642
1643 roi = 4*RoiRow + RoiColumn;
1644
1645 return status;
1646}

◆ getRxIDfromReadoutID()

bool MuonTGC_CablingSvc::getRxIDfromReadoutID ( int & rxId,
const int subsectorID,
const int rodID,
const int sswID,
const int sbLoc ) const

Definition at line 1130 of file MuonTGC_CablingSvc.cxx.

1135{
1136 rxId = -1;
1137
1138 bool isAside = (subsectorID==m_AsideId);
1140
1141 rxId = m_cabling->getRxIdFromReadout(side, rodID, sswID, sbLoc);
1142 if(rxId<0) {
1143 ATH_MSG_WARNING(" getRxIDfromReadoutID :"
1144 << " Cannot get rxId of "
1145 << " side" << side
1146 << " rodID=" << rodID
1147 << " sswID=" << sswID
1148 << " sbLoc=" << sbLoc);
1149 return false;
1150 }
1151 return true;
1152}

◆ getSimHighPtIDfromRDOHighPtID()

bool MuonTGC_CablingSvc::getSimHighPtIDfromRDOHighPtID ( const bool isForward,
const bool isStrip,
int & index,
int & chip,
int & hitId ) const

Definition at line 1679 of file MuonTGC_CablingSvc.cxx.

1684{
1685 if(isForward) {
1686 if(isStrip) {//FS
1687 index=0; hitId++;
1688 } else if(!isStrip) {//FW
1689 index=0; hitId--;
1690 }
1691 } else {
1692 if(isStrip) {//ES
1693 index=0; hitId--;
1694 } else if(!isStrip) {//EW
1695 switch(chip) {
1696 case 0: index=0; hitId=5; break;
1697 case 1: index=0; hitId--; break;
1698 case 2: index=1; chip=0; hitId--; break;
1699 case 3: index=1; chip=1; hitId--; break;
1700 default: break;
1701 }
1702 }
1703 }
1704
1705 return true;
1706}

◆ getSLBAddressfromReadoutID()

bool MuonTGC_CablingSvc::getSLBAddressfromReadoutID ( int & slbAddr,
const int subsectorID,
const int rodID,
const int sswID,
const int sbLoc ) const

Definition at line 1094 of file MuonTGC_CablingSvc.cxx.

1099{
1100 slbAddr = -1;
1101
1102 bool isAside = (subsectorID==m_AsideId);
1103
1105
1106 const MuonTGC_Cabling::TGCModuleId * slb = m_cabling->getSLBFromReadout(side, rodID, sswID, sbLoc);
1107 if(!slb) {
1108 ATH_MSG_WARNING(" getSLBAddressfromReadoutID :"
1109 << " Cannot get SLB of "
1110 << " side" << side
1111 << " rodID=" << rodID
1112 << " sswID=" << sswID
1113 << " sbLoc=" << sbLoc);
1114 return false;
1115 }
1116
1117 const MuonTGC_Cabling::TGCModuleSLB* modSlb = dynamic_cast<const MuonTGC_Cabling::TGCModuleSLB*>(slb);
1118 if(!modSlb) {
1119 ATH_MSG_WARNING("MuonTGC_CablingSvc::getSLBAddressfromReadoutID "
1120 << "dynamic_cast<const MuonTGC_Cabling::TGCModuleSLB*>(slb) failed.");
1121 return false;
1122 }
1123
1124 slbAddr = modSlb->getSlbAddr();
1125 return true;
1126}

◆ getSLBIDfromReadoutID()

bool MuonTGC_CablingSvc::getSLBIDfromReadoutID ( int & phi,
bool & isAside,
bool & isEndcap,
int & moduleType,
int & id,
const int subsectorID,
const int rodID,
const int sswID,
const int sbLoc ) const

Definition at line 1047 of file MuonTGC_CablingSvc.cxx.

1056{
1057 isAside = (subsectorID==m_AsideId);
1058
1060
1061 const MuonTGC_Cabling::TGCModuleId * slb = m_cabling->getSLBFromReadout(side, rodID, sswID, sbLoc);
1062 if(!slb) {
1063 ATH_MSG_VERBOSE(" getSLBIDfromReadoutID :"
1064 << " Cannot get SLB of "
1065 << " side" << side
1066 << " rodID=" << rodID
1067 << " sswID=" << sswID
1068 << " sbLoc=" << sbLoc);
1069 return false;
1070 }
1071
1072 isEndcap = (slb->getRegionType()==MuonTGC_Cabling::TGCId::Endcap);
1073 moduleType = (int)slb->getModuleType();
1074 bool isInner = (moduleType==MuonTGC_Cabling::TGCId::WI || moduleType==MuonTGC_Cabling::TGCId::SI);
1075 int offset, numOfSector;
1076 if(isInner) {
1078 } else {
1079 if(isEndcap) {
1081 }else{
1083 }
1084 }
1085 offset = numOfSector - numOfSector/24;
1086 phi = (slb->getSector()+offset)%numOfSector +1;
1087 id = slb->getId();
1088
1089 return true;
1090}
ModuleType getModuleType(void) const
Definition TGCId.h:122
RegionType getRegionType(void) const
Definition TGCId.h:125
int getId() const
Definition TGCId.h:131

◆ getSLBIDfromRxID()

bool MuonTGC_CablingSvc::getSLBIDfromRxID ( int & phi,
bool & isAside,
bool & isEndcap,
int & moduleType,
int & id,
const int subsectorID,
const int rodID,
const int sswID,
const int rxId ) const

Definition at line 1156 of file MuonTGC_CablingSvc.cxx.

1165{
1166 isAside = (subsectorID==m_AsideId);
1168
1169 MuonTGC_Cabling::TGCModuleId * slb = m_cabling->getSLBFromRxId(side, rodID, sswID, rxId);
1170 if(!slb) {
1171 ATH_MSG_WARNING("geSLBIDfromRxID :"
1172 << " Cannot get SLB of "
1173 << " side" << side
1174 << " rodID=" << rodID
1175 << " sswID=" << sswID
1176 << " rxId=" << rxId);
1177 return false;
1178 }
1179
1180 isEndcap = (slb->getRegionType()==MuonTGC_Cabling::TGCId::Endcap);
1181 moduleType = (int)slb->getModuleType();
1182 bool isInner = (moduleType==MuonTGC_Cabling::TGCId::WI || moduleType==MuonTGC_Cabling::TGCId::SI);
1183 int offset, numOfSector;
1184 if(isInner) {
1186 } else {
1187 if(isEndcap) {
1189 } else {
1191 }
1192 }
1193 offset = numOfSector - numOfSector/24;
1194 phi = (slb->getSector()+offset)%numOfSector +1;
1195 id = slb->getId();
1196 delete slb; slb = nullptr;
1197 return true;
1198}

◆ getSLIDfromReadoutID()

bool MuonTGC_CablingSvc::getSLIDfromReadoutID ( int & phi,
bool & isAside,
bool & isEndcap,
const int subsectorID,
const int rodID,
const int sswID,
const int sbLoc ) const

Definition at line 1263 of file MuonTGC_CablingSvc.cxx.

1270{
1271 isAside = (subsectorID==m_AsideId);
1272 if(!isAside && (subsectorID!=m_CsideId)) {
1273 ATH_MSG_WARNING(" getSLIDfromReadoutID : "
1274 << " ERROR illegal subsectorID [="
1275 << subsectorID <<"] ");
1276 return false;
1277 }
1278 int sectorInReadout = (rodID -1); // rodID = 1..12 for both sides
1279 if(sectorInReadout>= MuonTGC_Cabling::TGCId::N_RODS) return false;
1280
1281 // sswID check removed
1282 if(sswID!= 9) {
1283 ATH_MSG_WARNING(" getSLIDfromReadoutID : "
1284 << " ERROR sswID for SL should be 9 [now ="
1285 << sswID <<"] ");
1286 return false;
1287 }
1288
1289 int offset, numOfSector, sector;
1290 if(0<=sbLoc && sbLoc <= 3) {
1291 isEndcap=true;
1293 offset = numOfSector - numOfSector/24; // 48 - 2 = 46
1294 sector = numOfSector * sectorInReadout / MuonTGC_Cabling::TGCId::N_RODS;
1295 phi = (sector + sbLoc + offset)%numOfSector+1;
1296 } else if(sbLoc==4 || sbLoc==5) {
1297 isEndcap=false;
1299 offset = numOfSector - numOfSector/24;
1300 sector = numOfSector * sectorInReadout / MuonTGC_Cabling::TGCId::N_RODS;
1301 phi = (sector + (sbLoc-4) + offset)% numOfSector+1;
1302 } else {
1303 ATH_MSG_WARNING(" getSLIDfromReadoutID : "
1304 << " ERROR illegal sbLoc for SL [="
1305 << sbLoc <<"] ");
1306 return false;
1307 }
1308 return true;
1309}

◆ getSLIDfromSReadoutID()

bool MuonTGC_CablingSvc::getSLIDfromSReadoutID ( int & phi,
bool & isAside,
const int subsectorID,
const int srodID,
const int sector,
const bool forward ) const

Definition at line 1313 of file MuonTGC_CablingSvc.cxx.

1319{
1320 isAside = (subsectorID==m_AsideId);
1321 if(!isAside && (subsectorID!=m_CsideId)) {
1322 ATH_MSG_WARNING(" getSLIDfromReadoutID : "
1323 << " ERROR illegal subsectorID [="
1324 << subsectorID <<"] ");
1325 return false;
1326 }
1327
1328 int sectorInReadout = (srodID - 17); // 0-2, srodID : 0x11-0x13 (17-19)
1330 (sectorInReadout < 0)){
1331 ATH_MSG_WARNING(" Invalid SROD ID : " << srodID );
1332 return false;
1333 }
1334
1335 int offset, tmpsector, numOfSector;
1336 // sswID check removed
1337 if(forward) {
1339 offset = numOfSector - numOfSector/24; // 24 - 1
1340 tmpsector = numOfSector * sectorInReadout / MuonTGC_Cabling::TGCModuleId::NumberOfSReadoutSector; // 8*[0-2]
1341 phi = (sector + tmpsector + offset)%numOfSector + 1;
1342 }else{
1344 offset = numOfSector - numOfSector/24; // 48 - 2
1345 tmpsector = numOfSector * sectorInReadout / MuonTGC_Cabling::TGCModuleId::NumberOfSReadoutSector; // 16*[0-2]
1346 phi = (sector + tmpsector + offset)%numOfSector + 1;
1347 }
1348 return true;
1349}

◆ getSReadoutIDfromSLID()

bool MuonTGC_CablingSvc::getSReadoutIDfromSLID ( const int phi,
const bool isAside,
const bool isEndcap,
int & subsectorID,
int & srodID,
int & sswID,
int & sbLoc ) const

Definition at line 1397 of file MuonTGC_CablingSvc.cxx.

1404{
1405 if(isAside)subsectorID=m_AsideId;
1406 else subsectorID=m_CsideId;
1407
1408 if(isEndcap) {
1410 } else {
1412 }
1413
1414 int sector;
1415 int sectorInReadout;
1416 if(isEndcap) {
1418 sectorInReadout = sector %
1420 sbLoc = sectorInReadout;
1421 srodID = (sector-sectorInReadout)/
1423 + 0x11 ;
1424 } else {
1426 sectorInReadout = sector %
1428 sbLoc = sectorInReadout;
1429 srodID = (sector-sectorInReadout)/
1431 + 0x11;
1432 }
1433 // Fixed SSWID for SL
1434 sswID = 9;
1435
1436 return true;
1437}

◆ getTGCCabling()

const MuonTGC_Cabling::TGCCabling * MuonTGC_CablingSvc::getTGCCabling ( ) const
inline

Definition at line 384 of file MuonTGC_CablingSvc.h.

385{
386 return m_cabling.get();
387}

◆ hasAdjacentChannel() [1/2]

bool MuonTGC_CablingSvc::hasAdjacentChannel ( const Identifier & offlineID) const

Definition at line 245 of file MuonTGC_CablingSvc.cxx.

246{
247 int subDetectorID;
248 int rodID;
249 int sswID;
250 int sbLoc;
251 int channelID;
252 return getReadoutIDfromOfflineID(offlineID,
253 subDetectorID,
254 rodID,
255 sswID,
256 sbLoc,
257 channelID,
258 true);
259}

◆ hasAdjacentChannel() [2/2]

bool MuonTGC_CablingSvc::hasAdjacentChannel ( const int subsystemNumber,
const int octantNumber,
const int moduleNumber,
const int layerNumber,
const int rNumber,
const int wireOrStrip,
const int channelNumber ) const

Definition at line 264 of file MuonTGC_CablingSvc.cxx.

271{
272 int subDetectorID;
273 int rodID;
274 int sswID;
275 int sbLoc;
276 int channelID;
277 ATH_MSG_DEBUG("hasAdjacentChannel() "
278 << " side=" << subsystemNumber << " octant=" << octantNumber
279 << " module=" << moduleNumber << " layer=" << layerNumber
280 << " chamber=" << rNumber << " w/s=" << wireOrStrip
281 << " channel=" << channelNumber);
282
283 return getReadoutIDfromOnlineID(subDetectorID,
284 rodID,
285 sswID,
286 sbLoc,
287 channelID,
288 subsystemNumber,
289 octantNumber,
290 moduleNumber,
291 layerNumber,
292 rNumber,
293 wireOrStrip,
294 channelNumber,
295 true);
296}

◆ initialize()

StatusCode MuonTGC_CablingSvc::initialize ( void )
overridevirtual

Definition at line 51 of file MuonTGC_CablingSvc.cxx.

52{
53 ATH_MSG_INFO("for 1/12 sector initialize");
54
55 SmartIF<StoreGateSvc> detStore{serviceLocator()->service("DetectorStore")};
56 ATH_CHECK(detStore.isValid());
57 ATH_CHECK(m_idHelperSvc.retrieve());
58
59 // private databases
60 std::string dbASDToPP = PathResolver::find_file(m_databaseASDToPP, "DATAPATH");
61 ATH_MSG_DEBUG("found " << dbASDToPP);
62 std::ifstream inASDToPP;
63 if(dbASDToPP!= "") {
64 inASDToPP.open(dbASDToPP.c_str());
65 } else {
66 ATH_MSG_FATAL("Could not find input file " << m_databaseASDToPP);
67 return StatusCode::FAILURE;
68 }
69 if(inASDToPP.bad()) {
70 ATH_MSG_FATAL("Could not open file " << dbASDToPP);
71 return StatusCode::FAILURE;
72 }
73 inASDToPP.close();
74
75
76 std::string dbInPP = PathResolver::find_file(m_databaseInPP, "DATAPATH");
77 ATH_MSG_DEBUG("found " << dbInPP);
78 std::ifstream inInPP;
79 if(dbInPP!="") {
80 inInPP.open(dbInPP.c_str());
81 } else {
82 ATH_MSG_FATAL("Could not find input file " << m_databaseInPP);
83 return StatusCode::FAILURE;
84 }
85 if(inInPP.bad()) {
86 ATH_MSG_FATAL("Could not open file " << dbInPP);
87 return StatusCode::FAILURE;
88 }
89 inInPP.close();
90
91
92 std::string dbPPToSL = PathResolver::find_file(m_databasePPToSL, "DATAPATH");
93 ATH_MSG_DEBUG("found " << dbPPToSL);
94 std::ifstream inPPToSL;
95 if(dbPPToSL!="") {
96 inPPToSL.open(dbPPToSL.c_str());
97 } else {
98 ATH_MSG_FATAL("Could not find input file " << m_databasePPToSL);
99 return StatusCode::FAILURE;
100 }
101 if(inPPToSL.bad()) {
102 ATH_MSG_FATAL("Could not open file " << dbPPToSL);
103 return StatusCode::FAILURE;
104 }
105 inPPToSL.close();
106
107
108
109 std::string dbSLBToROD = PathResolver::find_file(m_databaseSLBToROD, "DATAPATH");
110 ATH_MSG_DEBUG("found " << dbSLBToROD);
111 std::ifstream inSLBToROD;
112 if(dbSLBToROD!="") {
113 inSLBToROD.open(dbSLBToROD.c_str());
114 } else {
115 ATH_MSG_FATAL("Could not find input file " << m_databaseSLBToROD);
116 return StatusCode::FAILURE;
117 }
118 if(inSLBToROD.bad()) {
119 ATH_MSG_FATAL("Could not open file " << dbSLBToROD);
120 return StatusCode::FAILURE;
121 }
122 inSLBToROD.close();
123
124
125 // instantiate TGC cabling manager
126 m_cabling = std::make_unique<MuonTGC_Cabling::TGCCabling>(dbASDToPP,
127 dbInPP,
128 dbPPToSL,
129 dbSLBToROD);
130
131 ATH_CHECK(m_condDataTool.retrieve());
132 std::string folderName = m_condDataTool->getFolderName();
133
134 // temorarily commenting out this check to fix ATLASRECTS-7396. Will check again in the future if this whole tool can go
135// bool isContained = detStore->contains<CondAttrListCollection>(folderName);
136// if(!isContained) {
137// ATH_MSG_FATAL("Could not found " << folderName << " in DetectorStore.");
138// return StatusCode::FAILURE;
139// }
140
141 if(!m_cabling->updateCableASDToPP().isSuccess()) {
142 ATH_MSG_WARNING("updateCableASDToPP failed");
143 return StatusCode::SUCCESS;
144 }
145
146 return StatusCode::SUCCESS;
147}
#define ATH_CHECK
Evaluate an expression and check for errors.
#define ATH_MSG_FATAL(x)
#define ATH_MSG_INFO(x)
ToolHandle< ITGCCablingDbTool > m_condDataTool
static std::string find_file(const std::string &logical_file_name, const std::string &search_path)

◆ isOredChannel()

bool MuonTGC_CablingSvc::isOredChannel ( const int subDetectorID,
const int rodID,
const int sswID,
const int sbLoc,
const int channelID ) const

Definition at line 226 of file MuonTGC_CablingSvc.cxx.

231{
232 Identifier id;
234 subDetectorID,
235 rodID,
236 sswID,
237 sbLoc,
238 channelID,
239 true);
240}

◆ msg()

MsgStream & AthCommonMsg< Service >::msg ( ) const
inlineinherited

Definition at line 24 of file AthCommonMsg.h.

24 {
25 return this->msgStream();
26 }

◆ msgLvl()

bool AthCommonMsg< Service >::msgLvl ( const MSG::Level lvl) const
inlineinherited

Definition at line 30 of file AthCommonMsg.h.

30 {
31 return this->msgLevel(lvl);
32 }

Member Data Documentation

◆ m_AsideId

IntegerProperty MuonTGC_CablingSvc::m_AsideId
protected

Definition at line 371 of file MuonTGC_CablingSvc.h.

◆ m_cabling

std::unique_ptr<MuonTGC_Cabling::TGCCabling> MuonTGC_CablingSvc::m_cabling
private

Definition at line 366 of file MuonTGC_CablingSvc.h.

◆ m_condDataTool

ToolHandle<ITGCCablingDbTool> MuonTGC_CablingSvc::m_condDataTool {this,"TGCCablingDbTool","TGCCablingDbTool"}
private

Definition at line 368 of file MuonTGC_CablingSvc.h.

368{this,"TGCCablingDbTool","TGCCablingDbTool"};

◆ m_CsideId

IntegerProperty MuonTGC_CablingSvc::m_CsideId
protected

Definition at line 372 of file MuonTGC_CablingSvc.h.

◆ m_databaseASDToPP

StringProperty MuonTGC_CablingSvc::m_databaseASDToPP
protected

Definition at line 375 of file MuonTGC_CablingSvc.h.

◆ m_databaseASDToPPdiff

StringProperty MuonTGC_CablingSvc::m_databaseASDToPPdiff
protected

Definition at line 380 of file MuonTGC_CablingSvc.h.

◆ m_databaseInPP

StringProperty MuonTGC_CablingSvc::m_databaseInPP
protected

Definition at line 376 of file MuonTGC_CablingSvc.h.

◆ m_databasePPToSL

StringProperty MuonTGC_CablingSvc::m_databasePPToSL
protected

Definition at line 377 of file MuonTGC_CablingSvc.h.

◆ m_databaseSLBToROD

StringProperty MuonTGC_CablingSvc::m_databaseSLBToROD
protected

Definition at line 378 of file MuonTGC_CablingSvc.h.

◆ m_idHelperSvc

ServiceHandle<Muon::IMuonIdHelperSvc> MuonTGC_CablingSvc::m_idHelperSvc {this, "MuonIdHelperSvc", "Muon::MuonIdHelperSvc/MuonIdHelperSvc"}
private

Definition at line 367 of file MuonTGC_CablingSvc.h.

367{this, "MuonIdHelperSvc", "Muon::MuonIdHelperSvc/MuonIdHelperSvc"};

◆ m_rodId

IntegerArrayProperty MuonTGC_CablingSvc::m_rodId
protected

Definition at line 373 of file MuonTGC_CablingSvc.h.


The documentation for this class was generated from the following files: