ATLAS Offline Software
Public Member Functions | Protected Attributes | Private Attributes | List of all members
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
 
 DeclareInterfaceID (MuonTGC_CablingSvc, 1, 0)
 Retrieve interface ID. More...
 
virtual StatusCode queryInterface (const InterfaceID &riid, void **ppvIF) override
 
virtual StatusCode initialize (void) override
 
virtual StatusCode finalize (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
 
MsgStream & msg (const MSG::Level lvl) 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

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  m_cabling(nullptr) {
26  declareProperty("AsideId", m_AsideId=103);
27  declareProperty("CsideId", m_CsideId=104);
28  declareProperty("rodId", m_rodId); //obsolete
29  declareProperty("databaseASDToPP", m_databaseASDToPP="MuonTGC_Cabling_ASD2PP.db");
30  declareProperty("databaseInPP", m_databaseInPP="MuonTGC_Cabling_PP.db");
31  declareProperty("databasePPToSL", m_databasePPToSL="MuonTGC_Cabling_PP2SL.db");
32  declareProperty("databaseSLBToROD", m_databaseSLBToROD="MuonTGC_Cabling_SLB2ROD.db");
33 }

◆ ~MuonTGC_CablingSvc()

virtual MuonTGC_CablingSvc::~MuonTGC_CablingSvc ( )
virtualdefault

Member Function Documentation

◆ DeclareInterfaceID()

MuonTGC_CablingSvc::DeclareInterfaceID ( MuonTGC_CablingSvc  ,
,
 
)

Retrieve interface ID.

◆ finalize()

StatusCode MuonTGC_CablingSvc::finalize ( void  )
overridevirtual

Definition at line 164 of file MuonTGC_CablingSvc.cxx.

165 {
166  delete m_cabling;
167  m_cabling = nullptr;
168  return StatusCode::SUCCESS;
169 }

◆ getChannel()

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

Definition at line 1485 of file MuonTGC_CablingSvc.cxx.

1488 {
1489  return m_cabling->getChannel(channelId, type, orChannel);
1490 }

◆ getCoveragefromRodID() [1/2]

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

Definition at line 173 of file MuonTGC_CablingSvc.cxx.

176 {
177  int sectorInReadout = rodID - 1; //rodID = 1..12
178  if(sectorInReadout>= MuonTGC_Cabling::TGCId::N_RODS) return false;
179 
180  startPhi = 2.*M_PI*(sectorInReadout-0.5)/MuonTGC_Cabling::TGCId::N_RODS;
181  endPhi = startPhi + 2.*M_PI/MuonTGC_Cabling::TGCId::N_RODS;
182 
183  return true;
184 }

◆ getCoveragefromRodID() [2/2]

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

Definition at line 187 of file MuonTGC_CablingSvc.cxx.

192 {
193  int sectorInReadout = rodID - 1; //rodID = 1..12
194  if(sectorInReadout>= MuonTGC_Cabling::TGCId::N_RODS) return false;
195 
196  coverageOfEndcapSector =
199  startEndcapSector = sectorInReadout * coverageOfEndcapSector;
200  coverageOfForwardSector =
203  startForwardSector = sectorInReadout *coverageOfForwardSector;
204 
205  return true;
206 }

◆ getCoveragefromSRodID() [1/2]

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

Definition at line 210 of file MuonTGC_CablingSvc.cxx.

213 {
214  int sectorInReadout = srodID - 17; //rodID = 17..19
215  if(sectorInReadout>= MuonTGC_Cabling::TGCModuleId::NumberOfSReadoutSector) return false;
216 
217  startPhi = 2.*M_PI*(sectorInReadout-0.5)/MuonTGC_Cabling::TGCModuleId::NumberOfSReadoutSector;
219 
220  return true;
221 }

◆ getCoveragefromSRodID() [2/2]

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

Definition at line 224 of file MuonTGC_CablingSvc.cxx.

229 {
230  int sectorInReadout = srodID - 17; //srodID = 17..19
231  if(sectorInReadout>= MuonTGC_Cabling::TGCModuleId::NumberOfSReadoutSector) return false;
232 
233  coverageOfEndcapSector =
236  startEndcapSector = sectorInReadout * coverageOfEndcapSector;
237  coverageOfForwardSector =
240  startForwardSector = sectorInReadout *coverageOfForwardSector;
241 
242  return true;
243 }

◆ 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 1020 of file MuonTGC_CablingSvc.cxx.

1027 {
1028  Identifier offlineID;
1029 
1030  // get min/max values for ReadoutID parameters
1031  int maxRodId, maxSRodId, maxSswId, maxSbloc, minChannelId ,maxChannelId;
1032  getReadoutIDRanges(maxRodId, maxSRodId, maxSswId, maxSbloc,
1033  minChannelId, maxChannelId);
1034 
1035  // check sswID and channelID in allowed range
1036  if((sswID > maxSswId) ||
1037  (channelID < minChannelId) ||
1038  (channelID > maxChannelId)) {
1039  ATH_MSG_DEBUG(" getElementIDfromReadoutID() :"
1040  << " Illeagal channel ID"
1041  << " subdetectorID=" << subDetectorID
1042  << " rodID=" << rodID
1043  << " sswID=" << sswID
1044  << " sbLoc=" << sbLoc
1045  << " channel=" << channelID
1046  << " [ Or =" << orChannel <<"] ");
1047  return false;
1048  }
1049 
1050  bool status = getOfflineIDfromReadoutID(offlineID,
1051  subDetectorID,
1052  rodID,
1053  sswID,
1054  sbLoc,
1055  channelID,
1056  orChannel);
1057  if(!status) {
1058  ATH_MSG_DEBUG(" getElementIDfromReadoutID :"
1059  << " Cannot get OfflineID ");
1060  return false;
1061  }
1062 
1063  elementID = m_idHelperSvc->tgcIdHelper().elementID(offlineID);
1064  return true;
1065 }

◆ 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 1795 of file MuonTGC_CablingSvc.cxx.

1805 {
1806  int sswID = -1;
1807  int sbLoc = -1;
1808  int channelID = -1;
1809 
1810  bool status = getReadoutIDfromOfflineID(offlineID,
1811  subDetectorID,
1812  rodID,
1813  sswID,
1814  sbLoc,
1815  channelID);
1816  if(!status) return false;
1817 
1818  // SideType
1820  if(subDetectorID==m_AsideId.value()) sideType = MuonTGC_Cabling::TGCId::Aside;
1821  if(subDetectorID==m_CsideId.value()) sideType = MuonTGC_Cabling::TGCId::Cside;
1822 
1825 
1827  rodID,
1828  sswID,
1829  sbLoc,
1830  channelID,
1831  signalType,
1832  regionType,
1833  sectorInReadout,
1834  hpb,
1835  chip,
1836  hitID,
1837  pos);
1838  if(!status) return false;
1839 
1840  isStrip = (signalType==MuonTGC_Cabling::TGCId::Strip);
1841  isForward = (regionType==MuonTGC_Cabling::TGCId::Forward);
1842 
1843  return true;
1844 }

◆ getHighPtIDfromROINumber()

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

Definition at line 1505 of file MuonTGC_CablingSvc.cxx.

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

◆ 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 1885 of file MuonTGC_CablingSvc.cxx.

1893 {
1894  int channelID = -1;
1895 
1896  bool status = getReadoutIDfromOfflineID(offlineID,
1897  subDetectorID,
1898  rodID,
1899  sswID,
1900  sbLoc,
1901  channelID);
1902  if(!status) return false;
1903 
1904  // SideType
1906  if(subDetectorID==m_AsideId.value()) sideType = MuonTGC_Cabling::TGCId::Aside;
1907  if(subDetectorID==m_CsideId.value()) sideType = MuonTGC_Cabling::TGCId::Cside;
1908 
1909  return m_cabling->getLowPtCoincidenceFromReadout(sideType,
1910  rodID,
1911  sswID,
1912  sbLoc,
1913  channelID,
1914  block,
1915  pos,
1916  middle);
1917 }

◆ getMaxRodId()

int MuonTGC_CablingSvc::getMaxRodId ( )
inline

Definition at line 46 of file MuonTGC_CablingSvc.h.

◆ getModule()

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

Definition at line 1496 of file MuonTGC_CablingSvc.cxx.

1498 {
1499  return m_cabling->getModule(moduleId, type);
1500 }

◆ 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 1732 of file MuonTGC_CablingSvc.cxx.

1742 {
1743  // all input is derived from TgcRawData
1744  int sswID = -1;
1745  int sbLoc = -1;
1746  int channelID = -1;
1747 
1748  // SideType
1750  if(subDetectorID==m_AsideId.value()) sideType = MuonTGC_Cabling::TGCId::Aside;
1751  if(subDetectorID==m_CsideId.value()) sideType = MuonTGC_Cabling::TGCId::Cside;
1752 
1753  // SignalType, RegionType
1756 
1757  // ModuleType
1759  if(signalType==MuonTGC_Cabling::TGCId::Wire) {
1760  moduleType=MuonTGC_Cabling::TGCId::WD;
1761  } else {
1762  moduleType=MuonTGC_Cabling::TGCId::SD;
1763  }
1764 
1765  // Get ReadoutID for pivot plane
1766  bool status = m_cabling->getReadoutFromHighPtID(sideType,
1767  rodID,
1768  sswID,
1769  sbLoc,
1770  channelID,
1771  signalType,
1772  regionType,
1773  sectorInReadout,
1774  hpb,
1775  chip,
1776  hitID,
1777  pos,
1778  moduleType,
1779  false);
1780 
1781  if(!status) return false;
1782 
1783  // get OfflineID for pivot plane
1784  return getOfflineIDfromReadoutID(offlineID,
1785  subDetectorID,
1786  rodID,
1787  sswID,
1788  sbLoc,
1789  channelID);
1790 
1791 }

◆ 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 1849 of file MuonTGC_CablingSvc.cxx.

1857 {
1858  int channelID = -1;
1859 
1860  // SideType
1862  if(subDetectorID==m_AsideId.value()) sideType = MuonTGC_Cabling::TGCId::Aside;
1863  if(subDetectorID==m_CsideId.value()) sideType = MuonTGC_Cabling::TGCId::Cside;
1864 
1866  rodID,
1867  sswID,
1868  sbLoc,
1869  channelID,
1870  block,
1871  pos,
1872  middle);
1873  if(!status) return false;
1874 
1875  return getOfflineIDfromReadoutID(offlineID,
1876  subDetectorID,
1877  rodID,
1878  sswID,
1879  sbLoc,
1880  channelID);
1881 }

◆ 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 672 of file MuonTGC_CablingSvc.cxx.

680 {
681  // SideType
683  if(subSystemNumber==1) sideType = MuonTGC_Cabling::TGCId::Aside;
684  if(subSystemNumber==-1) sideType = MuonTGC_Cabling::TGCId::Cside;
685 
686  // SignalType
688  if(wireOrStrip==0) signalType = MuonTGC_Cabling::TGCId::Wire;
689  if(wireOrStrip==1) signalType = MuonTGC_Cabling::TGCId::Strip;
690 
691  ATH_MSG_VERBOSE("getOfflineIDfromOnlineID for "
692  << " side=" << sideType << " octant=" << octantNumber
693  << " module=" << moduleNumber << " layer=" << layerNumber
694  << " chamber=" << rNumber << " w/s=" << signalType
695  << " channel=" << channelNumber);
696 
697  // ASDOut
698  MuonTGC_Cabling::TGCChannelASDOut asdout(sideType,
699  signalType,
700  octantNumber,
701  moduleNumber,
702  layerNumber,
703  rNumber,
704  channelNumber);
705  if(!asdout.isValid()) {
706  ATH_MSG_WARNING(" Illegal AsdOut for "
707  << " side=" << sideType << " octant=" << octantNumber
708  << " module=" << moduleNumber << " layer=" << layerNumber
709  << " chamber=" << rNumber << " w/s=" << signalType
710  << " channel=" << channelNumber);
711  }
712  if(!asdout.isValid()) return false;
713 
714  // online Id -> offline Id
716  m_cabling->getChannel(&asdout,
718  false);
719  if(!asdin || !asdin->isValid()) {
720  ATH_MSG_WARNING(" getOfflineIDfromOnlineID :"
721  << " Illegal AsdIn for "
722  << " side=" << sideType << " octant=" << octantNumber
723  << " module=" << moduleNumber << " layer=" << layerNumber
724  << " chamber=" << rNumber << " w/s=" << signalType
725  << " channel=" << channelNumber);
726  }
727  if(asdin==nullptr) return false;
728  if(!asdin->isValid()) {
729  delete asdin;
730  asdin = nullptr;
731  return false;
732  }
733  // build identifier
734  std::string stationNameStr;
735  switch(asdin->getStation()) {
736  case 0: // Triplet
737  stationNameStr = (asdin->isForward()) ? "T1F" : "T1E";
738  break;
739  case 1: // Middle Doublet
740  stationNameStr = (asdin->isForward()) ? "T2F" : "T2E";
741  break;
742  case 2: //Pivot Doublet
743  stationNameStr = (asdin->isForward()) ? "T3F" : "T3E";
744  break;
745  case 3: // Inner
746  stationNameStr = (asdin->isForward()) ? "T4F" : "T4E";
747  break;
748  default:
749  delete asdin; asdin = nullptr;
750  return false;
751  }
752  int stationEta = asdin->getChamber();
754  int stationPhi = asdin->getSector();
755  int gasGap = asdin->getGasGap();
756  int isStrip = (asdin->isStrip()) ? 1 : 0;
757  int channel = asdin->getChannel();
758 
759  if((asdin->getStation()==3) && (asdin->isEndcap())) {
760  // special treatment for EI
761  const int phiIE[] = { -1, 1, 2, 3, 4, 5, 6, 7, 8, -1, 9, 10,
762  11, 12, 13, 14, 15, -1, 16, 17, 18, -1, 19, 20,
763  21};
764  stationPhi = phiIE[ asdin->getSector() ];
765  if(stationPhi<0) {
766  delete asdin;
767  asdin = nullptr;
768  return false;
769  }
770  }
771 
772  // OnlineID --> OfflineID
773  // T11S : EI @ stationPhi=2,11,13,14,15,19,20,21
774  // total number of wire channel = 16
775  // (T11 24 channel)
776  const int OffsetForT11S = 8;
777  // T10S : FI @ statioPhi =2,5,8,11,14,17,20,23
778  // total number of wire channel = 30
779  // (T10 32 channel)
780  if((asdin->getStation()==3) && (!isStrip)) { // Inner Wire
781  if(asdin->isEndcap()) {
782  switch(stationPhi) {
783  case 2:
784  case 11:
785  case 13:
786  case 14:
787  case 15:
788  case 19:
789  case 20:
790  case 21:
791  // T11S
792  channel -= OffsetForT11S;
793  if(channel<=0) {
794  delete asdin;
795  return false;
796  }
797  break;
798  default:
799  break;
800  }
801  }
802  }
803 
804 
805  offlineId = m_idHelperSvc->tgcIdHelper().channelID(stationNameStr,
806  stationEta,
807  stationPhi,
808  gasGap,
809  isStrip,
810  channel);
811 
812  delete asdin;
813  asdin = nullptr;
814  return true;
815 }

◆ 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 323 of file MuonTGC_CablingSvc.cxx.

330 {
331  int subsystemNumber;
332  int octantNumber;
333  int moduleNumber;
334  int layerNumber;
335  int rNumber;
336  int wireOrStrip;
337  int channelNumber;
338 
339  // ReadoutID -> OnlineID
340  bool status = getOnlineIDfromReadoutID(subDetectorID,
341  rodID,
342  sswID,
343  sbLoc,
344  channelID,
345  subsystemNumber,
346  octantNumber,
347  moduleNumber,
348  layerNumber,
349  rNumber,
350  wireOrStrip,
351  channelNumber,
352  orChannel);
353  if((!status) && (!orChannel)) {
355  " getOfflineIDfromReadoutID :"
356  << " Cannot get OnineID for "
357  << " subdetectorID=" << subDetectorID
358  << " rodID=" << rodID
359  << " sswID=" << sswID
360  << " sbLoc=" << sbLoc
361  << " channel=" << channelID
362  << " [ Or =" << orChannel <<"] ");
363  }
364  if(!status) {
365  return status;
366  }
367 
368  // OnlineID -> OfflineID
369  status = getOfflineIDfromOnlineID(offlineID,
370  subsystemNumber,
371  octantNumber,
372  moduleNumber,
373  layerNumber,
374  rNumber,
375  wireOrStrip,
376  channelNumber);
377 
378  if(!status) {
379  ATH_MSG_VERBOSE(" getOfflineIDfromReadoutID :"
380  << " Cannot get OfflineID for "
381  << " side=" << subsystemNumber << " octant=" << octantNumber
382  << " module=" << moduleNumber << " layer=" << layerNumber
383  << " chamber=" << rNumber << " w/s=" << wireOrStrip
384  << " channel=" << channelNumber);
385  }
386 
387  return status;
388 }

◆ 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 482 of file MuonTGC_CablingSvc.cxx.

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

◆ 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 819 of file MuonTGC_CablingSvc.cxx.

832 {
833  // SideType
835  if(subDetectorID==m_AsideId.value()) sideType = MuonTGC_Cabling::TGCId::Aside;
836  if(subDetectorID==m_CsideId.value()) sideType = MuonTGC_Cabling::TGCId::Cside;
837 
838  // readout channel -> chamber channel
841  rodID,
842  sswID,
843  sbLoc,
844  channelID,
845  orChannel);
846  if(asdout==nullptr) {
847  if(!orChannel) {
848  ATH_MSG_VERBOSE(" getOnlineIDfromReadoutID :"
849  << " Cannot get OnlineID of "
850  << " side=" << sideType
851  << " rodID=" << rodID
852  << " sswID=" << sswID
853  << " sbLoc=" << sbLoc
854  << " channel=" << channelID
855  << " [ Or =" << orChannel <<"] ");
856  }
857  return false;
858  }
859  if(!asdout->isValid()) {
860  ATH_MSG_WARNING(" getOnlineIDfromReadoutID :"
861  << " Illegal ASDout for "
862  << " side=" << sideType
863  << " rodID=" << rodID
864  << " sswID=" << sswID
865  << " sbLoc=" << sbLoc
866  << " channel=" << channelID
867  << " [ Or =" << orChannel <<"] ");
868 
869  delete asdout;
870  asdout = nullptr;
871  return false;
872  }
873  // SubsystemNumber
874  subsystemNumber = (asdout->isAside()) ? 1 : -1;
875 
876  // OctantNumber
877  octantNumber = asdout->getOctant();
878 
879  // RNumber
880  rNumber = asdout->getChamber();
881 
882  // ModuleNumber
883  moduleNumber = asdout->getSectorModule();
884 
885  layerNumber = asdout->getLayer();
886 
887  // WireOrStrip
888  wireOrStrip = (asdout->isStrip()) ? 1 : 0;
889 
890  // ChannelNumber
891  channelNumber = asdout->getChannel();
892 
893  delete asdout;
894  asdout = nullptr;
895  return true;
896 }

◆ getRDOHighPtIDfromSimHighPtID()

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

Definition at line 1673 of file MuonTGC_CablingSvc.cxx.

1678 {
1679  if(isForward) {
1680  if(isStrip) {//FS
1681  index=0; hitId--;
1682  } else if(!isStrip) {//FW
1683  index=0; hitId++;
1684  }
1685  } else {
1686  if(isStrip) {//ES
1687  index=0; hitId++;
1688  } else if(!isStrip) {//EW
1689  if(index==0 && chip==0) hitId=1;
1690  else if(index==0 && chip==1) hitId++;
1691  else if(index==1 && chip==0) {chip=2; hitId++;}
1692  else if(index==1 && chip==1) {chip=3; hitId++;}
1693  }
1694  }
1695 
1696  return true;
1697 }

◆ getReadoutIDfromElementID()

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

Definition at line 980 of file MuonTGC_CablingSvc.cxx.

983 {
984  // get station name in string format : T1F,T1E,T2F...
985  const int iStation = m_idHelperSvc->tgcIdHelper().stationName(elementID);
986  const int stationType = (iStation - 39)/2;
987 
988  int iEta = m_idHelperSvc->tgcIdHelper().stationEta(elementID);
989  int iPhi = m_idHelperSvc->tgcIdHelper().stationPhi(elementID);
990 
991  // forward/endcap
992  enum {FORWARD, ENDCAP};
993  const int regionType = m_idHelperSvc->tgcIdHelper().isForward(elementID) ? FORWARD : ENDCAP;
994 
995  // SideType
996  subdetectorID = (iEta > 0) ? m_AsideId.value() : m_CsideId.value();
997 
998  // sector index and module index
999  const int max_phi = (regionType==FORWARD||stationType==4) ?
1002  const int max_module = max_phi / MuonTGC_Cabling::TGCId::N_RODS;
1003  const int sector = ((iPhi-1)+ max_phi/24 + max_phi)%max_phi;
1004  int readoutSector = static_cast<int>(sector/max_module);
1005  // Inner case
1006  if(stationType==4) {
1007  readoutSector = (readoutSector /3);
1008  readoutSector = 3*readoutSector + 1;
1009  }
1010 
1011 
1012  rodID = readoutSector +1;
1013 
1014 
1015  return true;
1016 }

◆ 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 1463 of file MuonTGC_CablingSvc.cxx.

1472 {
1473  return getReadoutIDfromSLID(phi, isAside, isEndcap,
1474  subsectorID,
1475  rodID,
1476  sswID,
1477  sbLoc);
1478 }

◆ 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 393 of file MuonTGC_CablingSvc.cxx.

400 {
401  int subsystemNumber;
402  int octantNumber;
403  int moduleNumber;
404  int layerNumber;
405  int rNumber;
406  int wireOrStrip;
407  int channelNumber;
408 
409  // OfflineID -> OnlineID
410  bool status = getOnlineIDfromOfflineID(offlineID,
411  subsystemNumber,
412  octantNumber,
413  moduleNumber,
414  layerNumber,
415  rNumber,
416  wireOrStrip,
417  channelNumber);
418 
419 
420  if(!status) {
421  ATH_MSG_WARNING(" Fail to getOnlineIDfromOfflineID " << " for OfflineID=" << offlineID);
422  }
423  if(!status) return status;
424 
425  ATH_MSG_DEBUG("getOnlineIDfromOfflineID() "
426  << " offlineID=" << offlineID
427  << " onlineID: "
428  << " side=" << subsystemNumber << " octant=" << octantNumber
429  << " module=" << moduleNumber << " layer=" << layerNumber
430  << " chamber=" << rNumber << " w/s=" << wireOrStrip
431  << " channel=" << channelNumber);
432 
433  // OnlineID -> ReadoutID
434  status = getReadoutIDfromOnlineID(subDetectorID,
435  rodID,
436  sswID,
437  sbLoc,
438  channelID,
439  subsystemNumber,
440  octantNumber,
441  moduleNumber,
442  layerNumber,
443  rNumber,
444  wireOrStrip,
445  channelNumber,
446  adChannel);
447 
448  if(!status) {
449  if(adChannel) {
450  ATH_MSG_DEBUG(" Fail to getReadoutIDfromOnlineID");
451  ATH_MSG_DEBUG(" side=" << subsystemNumber << " octant=" << octantNumber
452  << " module=" << moduleNumber << " layer=" << layerNumber
453  << " chamber=" << rNumber << " w/s=" << wireOrStrip
454  << " channel=" << channelNumber);
455  } else {
456  ATH_MSG_WARNING(" getReadoutIDfromOnlineID: "
457  << " Cannot get ReadoutID for "
458  << " side=" << subsystemNumber << " octant=" << octantNumber
459  << " module=" << moduleNumber << " layer=" << layerNumber
460  << " chamber=" << rNumber << " w/s=" << wireOrStrip
461  << " channel=" << channelNumber);
462  }
463  } else {
464  ATH_MSG_DEBUG(" SUCCESS getReadoutIDfromOnlineID");
465  ATH_MSG_DEBUG(" side=" << subsystemNumber << " octant=" << octantNumber
466  << " module=" << moduleNumber << " layer=" << layerNumber
467  << " chamber=" << rNumber << " w/s=" << wireOrStrip
468  << " channel=" << channelNumber
469  << "adjacent=" << adChannel);
470  ATH_MSG_DEBUG(" subDetectorID" << subDetectorID
471  << " rodID=" << rodID
472  << " sswID=" << sswID
473  << " channelID=" << channelID);
474  }
475 
476  return status;
477 }

◆ 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 900 of file MuonTGC_CablingSvc.cxx.

913 {
914  // SideType
916  if(subsystemNumber==1) sideType = MuonTGC_Cabling::TGCId::Aside;
917  if(subsystemNumber==-1) sideType = MuonTGC_Cabling::TGCId::Cside;
918 
919  // SignalType
921  if(wireOrStrip==0) signalType = MuonTGC_Cabling::TGCId::Wire;
922  if(wireOrStrip==1) signalType = MuonTGC_Cabling::TGCId::Strip;
923 
924  // ASDOut
925  MuonTGC_Cabling::TGCChannelASDOut asdout(sideType,
926  signalType,
927  octantNumber,
928  moduleNumber,
929  layerNumber,
930  rNumber,
931  channelNumber);
932  if(!asdout.isValid()) {
933  ATH_MSG_WARNING(" getReadoutIDfromOnlineID() :"
934  << " Cannot get ASDout for "
935  << " side=" << sideType
936  << " signal=" << signalType
937  << " octant=" << octantNumber
938  << " module=" << moduleNumber
939  << " layer=" << layerNumber
940  << " chamber=" << rNumber
941  << " channel=" << channelNumber);
942  }
943 
944  if(!asdout.isValid()) return false;
945 
946  // chamber channel -> readout channel
947  bool status = m_cabling->getReadoutFromASDOut(&asdout,
948  sideType,
949  rodID,
950  sswID,
951  sbLoc,
952  channelID,
953  adChannel);
954  if(!status) {
955  if(adChannel) {
956  ATH_MSG_DEBUG("getReadoutIDfromASDOut fails for adjacent");
957  }
958  else {
959  ATH_MSG_WARNING(" getReadoutIDfromASDOut :"
960  << " Cannot get ReadoutID for "
961  << " side=" << sideType
962  << " signal=" << signalType
963  << " octant=" << octantNumber
964  << " module=" << moduleNumber
965  << " layer=" << layerNumber
966  << " chamber=" << rNumber
967  << " channel=" << channelNumber);
968  }
969  }
970  if(!status) return false;
971 
972  // SubDetectorID
973  if(sideType==MuonTGC_Cabling::TGCId::Aside) subDetectorID = m_AsideId.value();
974  if(sideType==MuonTGC_Cabling::TGCId::Cside) subDetectorID = m_CsideId.value();
975 
976  return status;
977 }

◆ 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 1224 of file MuonTGC_CablingSvc.cxx.

1233 {
1237  int sector = -1;// sector=0-47(EC), 0-23(FWD), 0-23(INNER)
1238  if(isInner) {
1240  } else if(isEndcap) {
1242  } else {
1244  }
1246 
1247  MuonTGC_Cabling::TGCModuleSLB slb(side, module, region, sector, id);
1248 
1249  if(!slb.isValid()) {
1250  ATH_MSG_WARNING("getReadoutIDfromSLBID "
1251  << " phi=" << phi
1252  << " side=" << ((isAside) ? "A" : "C")
1253  << " region=" << ((isEndcap) ? "Endcap" : "Forward")
1254  << " type=" << moduleType
1255  << " id=" << id
1256  << " Invalid SLB");
1257  }
1258  if(!slb.isValid()) return false;
1259 
1260  subsectorID = (isAside ? m_AsideId : m_CsideId);
1261 
1262  bool status = m_cabling->getReadoutFromSLB(&slb, side, rodID, sswID, sbLoc);
1263 
1264  if(!status) {
1265  ATH_MSG_DEBUG(" FAIL getReadoutIDfromSLBID");
1266  } else {
1267  ATH_MSG_DEBUG(" SUCCESS getReadoutIDfromSLBID");
1268  ATH_MSG_DEBUG(" phi=" << phi
1269  << " side=" << ((isAside) ? "A" : "C")
1270  << " region=" << ((isEndcap) ? "Endcap" : "Forward")
1271  << " type=" << moduleType
1272  << " id=" << id
1273  << " side" << side
1274  << " rodID=" << rodID
1275  << " sswID=" << sswID
1276  << " sbLoc=" << sbLoc);
1277  }
1278  if(!status) return false;
1279  return true;
1280 }

◆ 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 1375 of file MuonTGC_CablingSvc.cxx.

1382 {
1383  if(isAside)subsectorID=m_AsideId;
1384  else subsectorID=m_CsideId;
1385 
1386  if(isEndcap) {
1387  if(phi<1 || phi>MuonTGC_Cabling::TGCId::NUM_ENDCAP_SECTOR) return false;
1388  } else {
1389  if(phi<1 || phi>MuonTGC_Cabling::TGCId::NUM_FORWARD_SECTOR) return false;
1390  }
1391 
1392  int sector;
1393  int sectorInReadout;
1394  if(isEndcap) {
1396  sectorInReadout = sector %
1398  sbLoc = sectorInReadout;
1399  rodID = (sector-sectorInReadout)/
1401  + 1;
1402  } else {
1404  sectorInReadout = sector %
1406  sbLoc = sectorInReadout +4;
1407  rodID = (sector-sectorInReadout)/
1409  + 1;
1410  }
1411  // Fixed SSWID for SL
1412  sswID = 9;
1413 
1414  return true;
1415 }

◆ 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 1635 of file MuonTGC_CablingSvc.cxx.

1644 {
1645  // for Strip, there is some ambiguity in the relation between hitID and ROI
1646  // CAUTION!!: return RDO value (not the value for simulation)
1647  bool status = true;
1648  int RoiRow = 0;
1649  int RoiColumn = 0;
1650 
1651  if(isForward) {
1652  RoiRow = 12*chip_wire + 2*(hitId_wire - 1) + sub_wire;
1653  RoiColumn = 2*((hitId_strip - 1)%2) + sub_strip;
1654  } else if(!isForward) {
1655  RoiColumn = 2*((hitId_strip - 1)%2) + sub_strip;
1656  switch(chip_wire) {
1657  case 0: RoiRow=0; break;
1658  case 1:
1659  case 2:
1660  case 3: RoiRow=12*(chip_wire-1) + 2*(hitId_wire - 1) + sub_wire + 1; break;
1661  default: break;
1662  }
1663  }
1664 
1665  roi = 4*RoiRow + RoiColumn;
1666 
1667  return status;
1668 }

◆ getRxIDfromReadoutID()

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

Definition at line 1152 of file MuonTGC_CablingSvc.cxx.

1157 {
1158  rxId = -1;
1159 
1160  bool isAside = (subsectorID==m_AsideId);
1162 
1163  rxId = m_cabling->getRxIdFromReadout(side, rodID, sswID, sbLoc);
1164  if(rxId<0) {
1165  ATH_MSG_WARNING(" getRxIDfromReadoutID :"
1166  << " Cannot get rxId of "
1167  << " side" << side
1168  << " rodID=" << rodID
1169  << " sswID=" << sswID
1170  << " sbLoc=" << sbLoc);
1171  return false;
1172  }
1173  return true;
1174 }

◆ getSimHighPtIDfromRDOHighPtID()

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

Definition at line 1701 of file MuonTGC_CablingSvc.cxx.

1706 {
1707  if(isForward) {
1708  if(isStrip) {//FS
1709  index=0; hitId++;
1710  } else if(!isStrip) {//FW
1711  index=0; hitId--;
1712  }
1713  } else {
1714  if(isStrip) {//ES
1715  index=0; hitId--;
1716  } else if(!isStrip) {//EW
1717  switch(chip) {
1718  case 0: index=0; hitId=5; break;
1719  case 1: index=0; hitId--; break;
1720  case 2: index=1; chip=0; hitId--; break;
1721  case 3: index=1; chip=1; hitId--; break;
1722  default: break;
1723  }
1724  }
1725  }
1726 
1727  return true;
1728 }

◆ getSLBAddressfromReadoutID()

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

Definition at line 1116 of file MuonTGC_CablingSvc.cxx.

1121 {
1122  slbAddr = -1;
1123 
1124  bool isAside = (subsectorID==m_AsideId);
1125 
1127 
1128  const MuonTGC_Cabling::TGCModuleId * slb = m_cabling->getSLBFromReadout(side, rodID, sswID, sbLoc);
1129  if(!slb) {
1130  ATH_MSG_WARNING(" getSLBAddressfromReadoutID :"
1131  << " Cannot get SLB of "
1132  << " side" << side
1133  << " rodID=" << rodID
1134  << " sswID=" << sswID
1135  << " sbLoc=" << sbLoc);
1136  return false;
1137  }
1138 
1139  const MuonTGC_Cabling::TGCModuleSLB* modSlb = dynamic_cast<const MuonTGC_Cabling::TGCModuleSLB*>(slb);
1140  if(!modSlb) {
1141  ATH_MSG_WARNING("MuonTGC_CablingSvc::getSLBAddressfromReadoutID "
1142  << "dynamic_cast<const MuonTGC_Cabling::TGCModuleSLB*>(slb) failed.");
1143  return false;
1144  }
1145 
1146  slbAddr = modSlb->getSlbAddr();
1147  return true;
1148 }

◆ 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 1069 of file MuonTGC_CablingSvc.cxx.

1078 {
1079  isAside = (subsectorID==m_AsideId);
1080 
1082 
1083  const MuonTGC_Cabling::TGCModuleId * slb = m_cabling->getSLBFromReadout(side, rodID, sswID, sbLoc);
1084  if(!slb) {
1085  ATH_MSG_VERBOSE(" getSLBIDfromReadoutID :"
1086  << " Cannot get SLB of "
1087  << " side" << side
1088  << " rodID=" << rodID
1089  << " sswID=" << sswID
1090  << " sbLoc=" << sbLoc);
1091  return false;
1092  }
1093 
1094  isEndcap = (slb->getRegionType()==MuonTGC_Cabling::TGCId::Endcap);
1095  moduleType = (int)slb->getModuleType();
1096  bool isInner = (moduleType==MuonTGC_Cabling::TGCId::WI || moduleType==MuonTGC_Cabling::TGCId::SI);
1097  int offset, numOfSector;
1098  if(isInner) {
1100  } else {
1101  if(isEndcap) {
1103  }else{
1105  }
1106  }
1107  offset = numOfSector - numOfSector/24;
1108  phi = (slb->getSector()+offset)%numOfSector +1;
1109  id = slb->getId();
1110 
1111  return true;
1112 }

◆ 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 1178 of file MuonTGC_CablingSvc.cxx.

1187 {
1188  isAside = (subsectorID==m_AsideId);
1190 
1191  MuonTGC_Cabling::TGCModuleId * slb = m_cabling->getSLBFromRxId(side, rodID, sswID, rxId);
1192  if(!slb) {
1193  ATH_MSG_WARNING("geSLBIDfromRxID :"
1194  << " Cannot get SLB of "
1195  << " side" << side
1196  << " rodID=" << rodID
1197  << " sswID=" << sswID
1198  << " rxId=" << rxId);
1199  return false;
1200  }
1201 
1202  isEndcap = (slb->getRegionType()==MuonTGC_Cabling::TGCId::Endcap);
1203  moduleType = (int)slb->getModuleType();
1204  bool isInner = (moduleType==MuonTGC_Cabling::TGCId::WI || moduleType==MuonTGC_Cabling::TGCId::SI);
1205  int offset, numOfSector;
1206  if(isInner) {
1208  } else {
1209  if(isEndcap) {
1211  } else {
1213  }
1214  }
1215  offset = numOfSector - numOfSector/24;
1216  phi = (slb->getSector()+offset)%numOfSector +1;
1217  id = slb->getId();
1218  delete slb; slb = nullptr;
1219  return true;
1220 }

◆ 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 1285 of file MuonTGC_CablingSvc.cxx.

1292 {
1293  isAside = (subsectorID==m_AsideId);
1294  if(!isAside && (subsectorID!=m_CsideId)) {
1295  ATH_MSG_WARNING(" getSLIDfromReadoutID : "
1296  << " ERROR illegal subsectorID [="
1297  << subsectorID <<"] ");
1298  return false;
1299  }
1300  int sectorInReadout = (rodID -1); // rodID = 1..12 for both sides
1301  if(sectorInReadout>= MuonTGC_Cabling::TGCId::N_RODS) return false;
1302 
1303  // sswID check removed
1304  if(sswID!= 9) {
1305  ATH_MSG_WARNING(" getSLIDfromReadoutID : "
1306  << " ERROR sswID for SL should be 9 [now ="
1307  << sswID <<"] ");
1308  return false;
1309  }
1310 
1311  int offset, numOfSector, sector;
1312  if(0<=sbLoc && sbLoc <= 3) {
1313  isEndcap=true;
1314  numOfSector = MuonTGC_Cabling::TGCId::NUM_ENDCAP_SECTOR; // 48
1315  offset = numOfSector - numOfSector/24; // 48 - 2 = 46
1316  sector = numOfSector * sectorInReadout / MuonTGC_Cabling::TGCId::N_RODS;
1317  phi = (sector + sbLoc + offset)%numOfSector+1;
1318  } else if(sbLoc==4 || sbLoc==5) {
1319  isEndcap=false;
1321  offset = numOfSector - numOfSector/24;
1322  sector = numOfSector * sectorInReadout / MuonTGC_Cabling::TGCId::N_RODS;
1323  phi = (sector + (sbLoc-4) + offset)% numOfSector+1;
1324  } else {
1325  ATH_MSG_WARNING(" getSLIDfromReadoutID : "
1326  << " ERROR illegal sbLoc for SL [="
1327  << sbLoc <<"] ");
1328  return false;
1329  }
1330  return true;
1331 }

◆ 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 1335 of file MuonTGC_CablingSvc.cxx.

1341 {
1342  isAside = (subsectorID==m_AsideId);
1343  if(!isAside && (subsectorID!=m_CsideId)) {
1344  ATH_MSG_WARNING(" getSLIDfromReadoutID : "
1345  << " ERROR illegal subsectorID [="
1346  << subsectorID <<"] ");
1347  return false;
1348  }
1349 
1350  int sectorInReadout = (srodID - 17); // 0-2, srodID : 0x11-0x13 (17-19)
1351  if((sectorInReadout >= MuonTGC_Cabling::TGCModuleId::NumberOfSReadoutSector) ||
1352  (sectorInReadout < 0)){
1353  ATH_MSG_WARNING(" Invalid SROD ID : " << srodID );
1354  return false;
1355  }
1356 
1357  int offset, tmpsector, numOfSector;
1358  // sswID check removed
1359  if(forward) {
1361  offset = numOfSector - numOfSector/24; // 24 - 1
1362  tmpsector = numOfSector * sectorInReadout / MuonTGC_Cabling::TGCModuleId::NumberOfSReadoutSector; // 8*[0-2]
1363  phi = (sector + tmpsector + offset)%numOfSector + 1;
1364  }else{
1366  offset = numOfSector - numOfSector/24; // 48 - 2
1367  tmpsector = numOfSector * sectorInReadout / MuonTGC_Cabling::TGCModuleId::NumberOfSReadoutSector; // 16*[0-2]
1368  phi = (sector + tmpsector + offset)%numOfSector + 1;
1369  }
1370  return true;
1371 }

◆ 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 1419 of file MuonTGC_CablingSvc.cxx.

1426 {
1427  if(isAside)subsectorID=m_AsideId;
1428  else subsectorID=m_CsideId;
1429 
1430  if(isEndcap) {
1431  if(phi<1 || phi>MuonTGC_Cabling::TGCId::NUM_ENDCAP_SECTOR) return false;
1432  } else {
1433  if(phi<1 || phi>MuonTGC_Cabling::TGCId::NUM_FORWARD_SECTOR) return false;
1434  }
1435 
1436  int sector;
1437  int sectorInReadout;
1438  if(isEndcap) {
1440  sectorInReadout = sector %
1442  sbLoc = sectorInReadout;
1443  srodID = (sector-sectorInReadout)/
1445  + 0x11 ;
1446  } else {
1448  sectorInReadout = sector %
1450  sbLoc = sectorInReadout;
1451  srodID = (sector-sectorInReadout)/
1453  + 0x11;
1454  }
1455  // Fixed SSWID for SL
1456  sswID = 9;
1457 
1458  return true;
1459 }

◆ getTGCCabling()

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

Definition at line 389 of file MuonTGC_CablingSvc.h.

390 {
391  return m_cabling;
392 }

◆ hasAdjacentChannel() [1/2]

bool MuonTGC_CablingSvc::hasAdjacentChannel ( const Identifier offlineID) const

Definition at line 267 of file MuonTGC_CablingSvc.cxx.

268 {
269  int subDetectorID;
270  int rodID;
271  int sswID;
272  int sbLoc;
273  int channelID;
274  return getReadoutIDfromOfflineID(offlineID,
275  subDetectorID,
276  rodID,
277  sswID,
278  sbLoc,
279  channelID,
280  true);
281 }

◆ 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 286 of file MuonTGC_CablingSvc.cxx.

293 {
294  int subDetectorID;
295  int rodID;
296  int sswID;
297  int sbLoc;
298  int channelID;
299  ATH_MSG_DEBUG("hasAdjacentChannel() "
300  << " side=" << subsystemNumber << " octant=" << octantNumber
301  << " module=" << moduleNumber << " layer=" << layerNumber
302  << " chamber=" << rNumber << " w/s=" << wireOrStrip
303  << " channel=" << channelNumber);
304 
305  return getReadoutIDfromOnlineID(subDetectorID,
306  rodID,
307  sswID,
308  sbLoc,
309  channelID,
310  subsystemNumber,
311  octantNumber,
312  moduleNumber,
313  layerNumber,
314  rNumber,
315  wireOrStrip,
316  channelNumber,
317  true);
318 }

◆ initialize()

StatusCode MuonTGC_CablingSvc::initialize ( void  )
overridevirtual

Definition at line 65 of file MuonTGC_CablingSvc.cxx.

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

◆ isOredChannel()

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

Definition at line 248 of file MuonTGC_CablingSvc.cxx.

253 {
254  Identifier id;
255  return getOfflineIDfromReadoutID(id,
256  subDetectorID,
257  rodID,
258  sswID,
259  sbLoc,
260  channelID,
261  true);
262 }

◆ msg() [1/2]

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

Definition at line 24 of file AthCommonMsg.h.

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

◆ msg() [2/2]

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

Definition at line 27 of file AthCommonMsg.h.

27  {
28  return this->msgStream(lvl);
29  }

◆ 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  }

◆ queryInterface()

StatusCode MuonTGC_CablingSvc::queryInterface ( const InterfaceID &  riid,
void **  ppvIF 
)
overridevirtual

Definition at line 36 of file MuonTGC_CablingSvc.cxx.

37 {
38  if(MuonTGC_CablingSvc::interfaceID().versionMatch(riid)) {
39  *ppvIF = dynamic_cast<MuonTGC_CablingSvc*>(this);
40  } else {
41  return Service::queryInterface(riid, ppvIF);
42  }
43 
44  addRef();
45  return StatusCode::SUCCESS;
46 }

Member Data Documentation

◆ m_AsideId

IntegerProperty MuonTGC_CablingSvc::m_AsideId
protected

Definition at line 376 of file MuonTGC_CablingSvc.h.

◆ m_cabling

MuonTGC_Cabling::TGCCabling* MuonTGC_CablingSvc::m_cabling
private

Definition at line 371 of file MuonTGC_CablingSvc.h.

◆ m_condDataTool

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

Definition at line 373 of file MuonTGC_CablingSvc.h.

◆ m_CsideId

IntegerProperty MuonTGC_CablingSvc::m_CsideId
protected

Definition at line 377 of file MuonTGC_CablingSvc.h.

◆ m_databaseASDToPP

StringProperty MuonTGC_CablingSvc::m_databaseASDToPP
protected

Definition at line 380 of file MuonTGC_CablingSvc.h.

◆ m_databaseASDToPPdiff

StringProperty MuonTGC_CablingSvc::m_databaseASDToPPdiff
protected

Definition at line 385 of file MuonTGC_CablingSvc.h.

◆ m_databaseInPP

StringProperty MuonTGC_CablingSvc::m_databaseInPP
protected

Definition at line 381 of file MuonTGC_CablingSvc.h.

◆ m_databasePPToSL

StringProperty MuonTGC_CablingSvc::m_databasePPToSL
protected

Definition at line 382 of file MuonTGC_CablingSvc.h.

◆ m_databaseSLBToROD

StringProperty MuonTGC_CablingSvc::m_databaseSLBToROD
protected

Definition at line 383 of file MuonTGC_CablingSvc.h.

◆ m_idHelperSvc

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

Definition at line 372 of file MuonTGC_CablingSvc.h.

◆ m_rodId

IntegerArrayProperty MuonTGC_CablingSvc::m_rodId
protected

Definition at line 378 of file MuonTGC_CablingSvc.h.


The documentation for this class was generated from the following files:
AthService::AthService
AthService()
MuonTGC_Cabling::TGCId::getChamber
int getChamber() const
Definition: TGCId.h:131
MuonTGC_Cabling::TGCId::isEndcap
bool isEndcap() const
Definition: TGCId.h:142
MuonTGC_Cabling::TGCCabling::getReadoutFromHighPtID
bool getReadoutFromHighPtID(TGCId::SideType side, int rodId, int &sswId, int &sbLoc, int &channel, TGCId::SignalType signal, TGCId::RegionType region, int sectorInReadout, int hpbId, int block, int hitId, int pos, TGCId::ModuleType moduleType, bool orChannel) const
Definition: TGCCabling.cxx:349
MuonTGC_Cabling::TGCId::getStation
int getStation() const
Definition: TGCId.h:128
Muon::nsw::STGTPSegments::moduleIDBits::stationPhi
constexpr uint8_t stationPhi
station Phi 1 to 8
Definition: NSWSTGTPDecodeBitmaps.h:161
MuonTGC_CablingSvc::getOnlineIDfromOfflineID
bool getOnlineIDfromOfflineID(const Identifier &offlineID, int &subsystemNumber, int &octantNumber, int &moduleNumber, int &layerNumber, int &rNumber, int &wireOrStrip, int &channelNumber) const
Definition: MuonTGC_CablingSvc.cxx:482
dumpTgcDigiDeadChambers.gasGap
list gasGap
Definition: dumpTgcDigiDeadChambers.py:33
MuonTGC_Cabling::TGCChannelId::isValid
virtual bool isValid() const
Definition: TGCChannelId.h:34
ATH_MSG_FATAL
#define ATH_MSG_FATAL(x)
Definition: AthMsgStreamMacros.h:34
MuonTGC_Cabling::TGCId::SI
@ SI
Definition: TGCId.h:47
MuonTGC_Cabling::TGCCabling::getChannel
TGCChannelId * getChannel(const TGCChannelId *channelId, TGCChannelId::ChannelIdType type, bool orChannel=false) const
Definition: TGCCabling.cxx:616
MuonTGC_CablingSvc::getReadoutIDfromOfflineID
bool getReadoutIDfromOfflineID(const Identifier &offlineID, int &subDetectorID, int &rodID, int &sswID, int &sbLoc, int &channelID, bool adChannel=false) const
Definition: MuonTGC_CablingSvc.cxx:393
plotting.yearwise_efficiency.channel
channel
Definition: yearwise_efficiency.py:24
phi
Scalar phi() const
phi method
Definition: AmgMatrixBasePlugin.h:67
MuonTGC_Cabling::TGCId::getSideType
SideType getSideType(void) const
Definition: TGCId.h:122
ATH_MSG_INFO
#define ATH_MSG_INFO(x)
Definition: AthMsgStreamMacros.h:31
MuonTGC_CablingSvc::m_AsideId
IntegerProperty m_AsideId
Definition: MuonTGC_CablingSvc.h:376
PathResolver::find_file
static std::string find_file(const std::string &logical_file_name, const std::string &search_path, SearchType search_type=LocalSearch)
Definition: PathResolver.cxx:251
CaloCellPos2Ntuple.int
int
Definition: CaloCellPos2Ntuple.py:24
MuonTGC_Cabling::TGCCabling::MAXSBLOC
@ MAXSBLOC
Definition: TGCCabling.h:58
MuonTGC_CablingSvc::getReadoutIDRanges
void getReadoutIDRanges(int &maxRodId, int &maxSRodId, int &maxSswId, int &maxSbloc, int &minChannelId, int &maxChannelId) const
Definition: MuonTGC_CablingSvc.cxx:49
MuonTGC_Cabling::TGCChannelASDIn
Definition: TGCChannelASDIn.h:14
index
Definition: index.py:1
MuonTGC_Cabling::TGCChannelId::getGasGap
virtual int getGasGap() const
Definition: TGCChannelId.cxx:31
MuonTGC_CablingSvc::m_databaseSLBToROD
StringProperty m_databaseSLBToROD
Definition: MuonTGC_CablingSvc.h:383
MuonTGC_Cabling::TGCId::getRegionType
RegionType getRegionType(void) const
Definition: TGCId.h:126
MuonTGC_Cabling::TGCCabling::getRxIdFromReadout
int getRxIdFromReadout(TGCId::SideType side, int rodId, int sswId, int sbLoc) const
Definition: TGCCabling.cxx:159
MuonTGC_Cabling::TGCId::N_RODS
static constexpr int N_RODS
Definition: TGCId.h:43
MuonTGC_Cabling::TGCChannelId::ChannelIdType::ASDOut
@ ASDOut
MuonTGC_Cabling::TGCId::isAside
bool isAside() const
Definition: TGCId.h:134
MuonTGC_Cabling::TGCCabling::MAXSSWID
@ MAXSSWID
Definition: TGCCabling.h:56
MuonTGC_Cabling::TGCModuleSLB
Definition: TGCModuleSLB.h:14
MuonTGC_CablingSvc::m_cabling
MuonTGC_Cabling::TGCCabling * m_cabling
Definition: MuonTGC_CablingSvc.h:371
M_PI
#define M_PI
Definition: ActiveFraction.h:11
MuonTGC_Cabling::TGCId::SignalType
SignalType
Definition: TGCId.h:49
MuonTGC_Cabling::TGCId::ModuleType
ModuleType
Definition: TGCId.h:47
MuonTGC_Cabling::TGCCabling::MAXRODID
@ MAXRODID
Definition: TGCCabling.h:52
MuonTGC_Cabling::TGCId::getModuleType
ModuleType getModuleType(void) const
Definition: TGCId.h:123
MuonTGC_Cabling::TGCCabling::MAXCHANNELID
@ MAXCHANNELID
Definition: TGCCabling.h:61
MuonTGC_Cabling::TGCChannelId::ChannelIdType::ASDIn
@ ASDIn
MuonTGC_Cabling::TGCId::NUM_INNER_SECTOR
static constexpr int NUM_INNER_SECTOR
Definition: TGCId.h:42
ATH_MSG_VERBOSE
#define ATH_MSG_VERBOSE(x)
Definition: AthMsgStreamMacros.h:28
MuonTGC_Cabling::TGCId::isStrip
bool isStrip() const
Definition: TGCId.h:136
MuonTGC_Cabling::TGCId::isForward
bool isForward() const
Definition: TGCId.h:141
MuonTGC_Cabling::TGCCabling::getSLBFromReadout
const TGCModuleId * getSLBFromReadout(TGCId::SideType side, int rodId, int sswId, int sbLoc) const
Definition: TGCCabling.cxx:83
MuonTGC_Cabling::TGCId::SD
@ SD
Definition: TGCId.h:47
TRT::Hit::side
@ side
Definition: HitInfo.h:83
MuonTGC_Cabling::TGCId::NUM_FORWARD_SECTOR
static constexpr int NUM_FORWARD_SECTOR
Definition: TGCId.h:41
python.PyAthena.module
module
Definition: PyAthena.py:131
MuonTGC_Cabling::TGCId::NUM_OCTANT
static constexpr int NUM_OCTANT
Definition: TGCId.h:39
ENDCAP
@ ENDCAP
Definition: TRTRadiatorParameters.h:10
MuonTGC_CablingSvc::m_rodId
IntegerArrayProperty m_rodId
Definition: MuonTGC_CablingSvc.h:378
MuonTGC_CablingSvc::getReadoutIDfromOnlineID
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
Definition: MuonTGC_CablingSvc.cxx:900
MuonTGC_Cabling::TGCCabling::getASDOutFromReadout
TGCChannelId * getASDOutFromReadout(TGCId::SideType side, int rodId, int sswId, int sbLoc, int channel, bool orChannel=false) const
Definition: TGCCabling.cxx:555
MuonTGC_Cabling::TGCModuleId::NumberOfSReadoutSector
@ NumberOfSReadoutSector
Definition: TGCModuleId.h:27
MuonTGC_Cabling::TGCId::getOctant
int getOctant() const
Definition: TGCId.h:129
ATH_MSG_DEBUG
#define ATH_MSG_DEBUG(x)
Definition: AthMsgStreamMacros.h:29
FORWARD
#define FORWARD
Definition: ALFA_SvdCalc.h:34
MuonTGC_Cabling::TGCCabling::MINCHANNELID
@ MINCHANNELID
Definition: TGCCabling.h:60
MuonTGC_Cabling::TGCId::getId
int getId() const
Definition: TGCId.h:132
MuonTGC_Cabling::TGCId::Strip
@ Strip
Definition: TGCId.h:49
MuonTGC_CablingSvc::m_databaseInPP
StringProperty m_databaseInPP
Definition: MuonTGC_CablingSvc.h:381
MuonTGC_CablingSvc::getOfflineIDfromOnlineID
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
Definition: MuonTGC_CablingSvc.cxx:672
ATH_CHECK
#define ATH_CHECK
Definition: AthCheckMacros.h:40
Handler::svc
AthROOTErrorHandlerSvc * svc
Definition: AthROOTErrorHandlerSvc.cxx:10
MuonTGC_Cabling::TGCId::WD
@ WD
Definition: TGCId.h:47
MuonTGC_Cabling::TGCCabling::getModule
TGCModuleMap * getModule(const TGCModuleId *moduleId, TGCModuleId::ModuleIdType type) const
Definition: TGCCabling.cxx:773
CaloCondBlobAlgs_fillNoiseFromASCII.channelId
channelId
Definition: CaloCondBlobAlgs_fillNoiseFromASCII.py:122
MuonTGC_Cabling::TGCId::Endcap
@ Endcap
Definition: TGCId.h:53
MuonTGC_Cabling::TGCId::WI
@ WI
Definition: TGCId.h:47
MuonTGC_CablingSvc::m_condDataTool
ToolHandle< ITGCCablingDbTool > m_condDataTool
Definition: MuonTGC_CablingSvc.h:373
python.PyKernel.detStore
detStore
Definition: PyKernel.py:41
dumpTgcDigiThreshold.isStrip
list isStrip
Definition: dumpTgcDigiThreshold.py:33
CaloCellTimeCorrFiller.folderName
string folderName
Definition: CaloCellTimeCorrFiller.py:20
id
SG::auxid_t id
Definition: Control/AthContainers/Root/debug.cxx:227
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:228
MuonTGC_CablingSvc::m_idHelperSvc
ServiceHandle< Muon::IMuonIdHelperSvc > m_idHelperSvc
Definition: MuonTGC_CablingSvc.h:372
MuonTGC_Cabling::TGCId::NoRegionType
@ NoRegionType
Definition: TGCId.h:53
MuonTGC_Cabling::TGCModuleSLB::getSlbAddr
int getSlbAddr(void) const
Definition: TGCModuleSLB.h:31
MuonTGC_Cabling::TGCId::NoModuleType
@ NoModuleType
Definition: TGCId.h:47
MuonTGC_Cabling::TGCCabling::getReadoutFromLowPtCoincidence
bool getReadoutFromLowPtCoincidence(TGCId::SideType side, int rodId, int sswId, int sbLoc, int &channel, int block, int pos, bool middle=false) const
Definition: TGCCabling.cxx:482
python.LumiBlobConversion.pos
pos
Definition: LumiBlobConversion.py:18
Trk::iPhi
@ iPhi
Definition: ParamDefs.h:47
MuonTGC_Cabling::TGCCabling::getLowPtCoincidenceFromReadout
bool getLowPtCoincidenceFromReadout(TGCId::SideType side, int rodId, int sswId, int sbLoc, int channel, int &block, int &pos, bool middle=false) const
Definition: TGCCabling.cxx:520
MuonTGC_Cabling::TGCId::getSector
virtual int getSector() const
Definition: TGCId.h:130
MuonTGC_Cabling::TGCId::Cside
@ Cside
Definition: TGCId.h:45
MuonTGC_Cabling::TGCId::NoSideType
@ NoSideType
Definition: TGCId.h:45
ATH_MSG_WARNING
#define ATH_MSG_WARNING(x)
Definition: AthMsgStreamMacros.h:32
python.CaloScaleNoiseConfig.type
type
Definition: CaloScaleNoiseConfig.py:78
MuonTGC_Cabling::TGCChannelId
Definition: TGCChannelId.h:15
MuonTGC_Cabling::TGCId::NUM_ENDCAP_SECTOR
static constexpr int NUM_ENDCAP_SECTOR
Definition: TGCId.h:40
MuonTGC_Cabling::TGCCabling::getHighPtIDFromReadout
bool getHighPtIDFromReadout(TGCId::SideType side, int rodId, int sswId, int sbLoc, int channel, TGCId::SignalType &signal, TGCId::RegionType &region, int &sectorInReadout, int &hpbId, int &block, int &hitId, int &pos) const
Definition: TGCCabling.cxx:428
MuonTGC_CablingSvc::m_databasePPToSL
StringProperty m_databasePPToSL
Definition: MuonTGC_CablingSvc.h:382
MuonTGC_CablingSvc::getOnlineIDfromReadoutID
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
Definition: MuonTGC_CablingSvc.cxx:819
convertTimingResiduals.offset
offset
Definition: convertTimingResiduals.py:71
MuonTGC_Cabling::TGCId::Wire
@ Wire
Definition: TGCId.h:49
MuonTGC_Cabling::TGCChannelId::getLayer
int getLayer() const
Definition: TGCChannelId.cxx:27
MuonTGC_CablingSvc::getReadoutIDfromSLID
bool getReadoutIDfromSLID(const int phi, const bool isAside, const bool isEndcap, int &subsectorID, int &rodID, int &sswID, int &sbLoc) const
Definition: MuonTGC_CablingSvc.cxx:1375
merge.status
status
Definition: merge.py:17
MuonTGC_CablingSvc::getOfflineIDfromReadoutID
bool getOfflineIDfromReadoutID(Identifier &offlineID, const int subDetectorID, const int rodID, const int sswID, const int sbLoc, const int channelID, bool orChannel=false) const
Definition: MuonTGC_CablingSvc.cxx:323
MuonTGC_Cabling::TGCChannelASDOut
Definition: TGCChannelASDOut.h:12
MuonTGC_Cabling::TGCId::RegionType
RegionType
Definition: TGCId.h:53
MuonTGC_Cabling::TGCModuleId
Definition: TGCModuleId.h:13
MuonTGC_Cabling::TGCId::NoSignalType
@ NoSignalType
Definition: TGCId.h:49
Muon::nsw::STGTPSegments::moduleIDBits::stationEta
constexpr uint8_t stationEta
1 to 3
Definition: NSWSTGTPDecodeBitmaps.h:159
MuonTGC_CablingSvc
Definition: MuonTGC_CablingSvc.h:31
MuonTGC_Cabling::TGCId::SideType
SideType
Definition: TGCId.h:45
MuonTGC_Cabling::TGCId::Aside
@ Aside
Definition: TGCId.h:45
MuonTGC_CablingSvc::m_CsideId
IntegerProperty m_CsideId
Definition: MuonTGC_CablingSvc.h:377
xAOD::iEta
setScale setgFexType iEta
Definition: gFexJetRoI_v1.cxx:77
MuonTGC_Cabling::TGCId::Forward
@ Forward
Definition: TGCId.h:53
MuonTGC_Cabling::TGCCabling::updateCableASDToPP
StatusCode updateCableASDToPP()
Definition: TGCCabling.cxx:62
MuonTGC_Cabling::TGCChannelId::getChannel
int getChannel() const
Definition: TGCChannelId.cxx:29
MuonTGC_Cabling::TGCCabling
Definition: TGCCabling.h:35
MuonTGC_Cabling::TGCId::getSectorModule
virtual int getSectorModule() const
Definition: TGCId.cxx:139
Muon::nsw::STGTPSegments::MergedSegmentProperty::rIndex
@ rIndex
MuonTGC_CablingSvc::m_databaseASDToPP
StringProperty m_databaseASDToPP
Definition: MuonTGC_CablingSvc.h:380
MuonTGC_Cabling::TGCCabling::MAXSRODID
@ MAXSRODID
Definition: TGCCabling.h:54
MuonTGC_Cabling::TGCCabling::getReadoutFromASDOut
bool getReadoutFromASDOut(const TGCChannelASDOut *asdout, TGCId::SideType &side, int &rodId, int &sswId, int &sbLoc, int &channel, bool orChannel=false) const
Definition: TGCCabling.cxx:580
MuonTGC_Cabling::TGCCabling::getSLBFromRxId
TGCModuleId * getSLBFromRxId(TGCId::SideType side, int rodId, int sswId, int rxId) const
Definition: TGCCabling.cxx:209
MuonTGC_Cabling::TGCCabling::getReadoutFromSLB
bool getReadoutFromSLB(const TGCModuleSLB *slb, TGCId::SideType &side, int &rodId, int &sswId, int &sbLoc) const
Definition: TGCCabling.cxx:259
Identifier
Definition: IdentifierFieldParser.cxx:14