ATLAS Offline Software
Public Member Functions | Public Attributes | List of all members
sTgcSimIdToOfflineId Struct Reference

#include <sTgcSimIdToOfflineId.h>

Collaboration diagram for sTgcSimIdToOfflineId:

Public Member Functions

 sTgcSimIdToOfflineId (const sTgcIdHelper *idHelper)
 
Identifier convert (int simId) const
 
int convert (const Identifier &id) const
 

Public Attributes

const sTgcIdHelperm_idHelper
 
const sTgcHitIdHelperm_simIdHelper
 

Detailed Description

Definition at line 12 of file sTgcSimIdToOfflineId.h.

Constructor & Destructor Documentation

◆ sTgcSimIdToOfflineId()

sTgcSimIdToOfflineId::sTgcSimIdToOfflineId ( const sTgcIdHelper idHelper)
inline

Definition at line 14 of file sTgcSimIdToOfflineId.h.

Member Function Documentation

◆ convert() [1/2]

int sTgcSimIdToOfflineId::convert ( const Identifier id) const
inline

Definition at line 36 of file sTgcSimIdToOfflineId.h.

37  {
39  int side(stationEta>0 ? 1 : -1);
40  stationEta = abs(stationEta) - 1;
41  bool isSmall(m_idHelper->isSmall(id));
42  int phi=2*m_idHelper->stationPhi(id) - static_cast<int>(!isSmall);
43  int ml=m_idHelper->multilayer(id);
44  std::string quadType = "P"; // is either "P"=Pivot or "C"=Confirm
45  if (isSmall && (ml == 1)) quadType = "C";
46  if (!isSmall && (ml == 2)) quadType = "C";
47  int ly=m_idHelper->gasGap(id);
48  std::ostringstream stationName;
49  stationName << "Q" << (isSmall ? "S" : "L") << stationEta << quadType;
50  return m_simIdHelper->BuildsTgcHitId(stationName.str(), phi, stationEta, ml, ly, side);
51  }

◆ convert() [2/2]

Identifier sTgcSimIdToOfflineId::convert ( int  simId) const
inline

Definition at line 24 of file sTgcSimIdToOfflineId.h.

24  {
25  std::string stationName = m_simIdHelper->GetStationName(simId);
26  int stationEta = m_simIdHelper->GetZSector(simId);
28  int multilayer = m_simIdHelper->GetMultiLayer(simId);
29  int layer = m_simIdHelper->GetLayer(simId);
30  int side = m_simIdHelper->GetSide(simId);
31  return m_idHelper->channelID( stationName[1] == 'L' ? "STL" : "STS",
32  side == 1 ? stationEta+1 : -stationEta-1,
33  (stationPhi-1)/2+1,multilayer,layer,sTgcIdHelper::sTgcChannelTypes::Wire,1 );
34 }

Member Data Documentation

◆ m_idHelper

const sTgcIdHelper* sTgcSimIdToOfflineId::m_idHelper

Definition at line 19 of file sTgcSimIdToOfflineId.h.

◆ m_simIdHelper

const sTgcHitIdHelper* sTgcSimIdToOfflineId::m_simIdHelper

Definition at line 20 of file sTgcSimIdToOfflineId.h.


The documentation for this struct was generated from the following file:
sTgcIdHelper::multilayer
int multilayer(const Identifier &id) const
Definition: sTgcIdHelper.cxx:1017
sTgcHitIdHelper::GetSide
int GetSide(const int &hid) const
Definition: sTgcHitIdHelper.cxx:83
Muon::nsw::STGTPSegments::moduleIDBits::stationPhi
constexpr uint8_t stationPhi
station Phi 1 to 8
Definition: NSWSTGTPDecodeBitmaps.h:161
phi
Scalar phi() const
phi method
Definition: AmgMatrixBasePlugin.h:67
dumpTgcDigiDeadChambers.stationName
dictionary stationName
Definition: dumpTgcDigiDeadChambers.py:30
sTgcIdHelper::channelID
Identifier channelID(int stationName, int stationEta, int stationPhi, int multilayer, int gasGap, int channelType, int channel) const
Definition: sTgcIdHelper.cxx:886
sTgcHitIdHelper::GetHelper
static const sTgcHitIdHelper * GetHelper()
Definition: sTgcHitIdHelper.cxx:24
sTgcSimIdToOfflineId::m_idHelper
const sTgcIdHelper * m_idHelper
Definition: sTgcSimIdToOfflineId.h:19
sTgcSimIdToOfflineId::m_simIdHelper
const sTgcHitIdHelper * m_simIdHelper
Definition: sTgcSimIdToOfflineId.h:20
MuonIdHelper::isSmall
bool isSmall(const Identifier &id) const
Definition: MuonIdHelper.cxx:831
TRT::Hit::side
@ side
Definition: HitInfo.h:83
sTgcHitIdHelper::BuildsTgcHitId
int BuildsTgcHitId(const std::string &, const int, const int, const int, const int, const int) const
Definition: sTgcHitIdHelper.cxx:89
sTgcHitIdHelper::GetMultiLayer
int GetMultiLayer(const int &hid) const
Definition: sTgcHitIdHelper.cxx:77
sTgcHitIdHelper::GetLayer
int GetLayer(const int &hid) const
Definition: sTgcHitIdHelper.cxx:80
TRT::Hit::layer
@ layer
Definition: HitInfo.h:79
sTgcIdHelper::gasGap
int gasGap(const Identifier &id) const override
get the hashes
Definition: sTgcIdHelper.cxx:1020
MuonIdHelper::stationPhi
int stationPhi(const Identifier &id) const
Definition: MuonIdHelper.cxx:810
MuonIdHelper::stationEta
int stationEta(const Identifier &id) const
Definition: MuonIdHelper.cxx:805
sTgcHitIdHelper::GetStationName
std::string GetStationName(const int &hid) const
Definition: sTgcHitIdHelper.cxx:56
sTgcHitIdHelper::GetZSector
int GetZSector(const int &hid) const
Definition: sTgcHitIdHelper.cxx:72
Muon::nsw::STGTPSegments::moduleIDBits::stationEta
constexpr uint8_t stationEta
1 to 3
Definition: NSWSTGTPDecodeBitmaps.h:159
sTgcHitIdHelper::GetPhiSector
int GetPhiSector(const int &hid) const
Definition: sTgcHitIdHelper.cxx:68