ATLAS Offline Software
IMuonIdHelperSvc.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 #ifndef MUON_IMUONIDHELPERSVC_H
6 #define MUON_IMUONIDHELPERSVC_H
7 
8 #include <string>
9 #include <set>
10 
11 #include "GaudiKernel/IService.h"
12 #include "Identifier/Identifier.h"
20 
21 namespace Muon {
22 
27  class IMuonIdHelperSvc : virtual public IService {
28  public:
29 
31 
33  virtual ~IMuonIdHelperSvc() = default;
34 
36  virtual std::string toString(const Identifier& id) const = 0;
37 
39  virtual std::string toStringTech(const Identifier& id) const = 0;
40 
42  virtual std::string toStringStation(const Identifier& id) const = 0;
43 
45  virtual std::string toStringChamber(const Identifier& id) const = 0;
46 
48  virtual std::string toStringDetEl(const Identifier& id) const = 0;
49 
51  virtual std::string toStringGasGap(const Identifier& id) const = 0;
52 
54  virtual std::string chamberNameString(const Identifier& id) const = 0;
55 
57  virtual bool isMuon(const Identifier& id) const = 0;
58 
60  virtual bool isMdt(const Identifier& id) const = 0;
61 
63  virtual bool isMM(const Identifier& id) const = 0;
64 
66  virtual bool isCsc(const Identifier& id) const = 0;
67 
69  virtual bool isRpc(const Identifier& id) const = 0;
70 
72  virtual bool isTgc(const Identifier& id) const = 0;
73 
75  virtual bool issTgc(const Identifier& id) const = 0;
76 
78  virtual bool issMdt(const Identifier& id) const = 0;
79 
81  virtual IdentifierHash moduleHash(const Identifier& id) const = 0;
83  virtual IdentifierHash detElementHash(const Identifier& id) const = 0;
84 
85 
89  virtual bool hasHPTDC(const Identifier& id) const = 0;
90 
92  virtual bool measuresPhi(const Identifier& id) const = 0;
93 
95  virtual bool isEndcap(const Identifier& id) const = 0;
96 
98  virtual bool isTrigger(const Identifier& id) const = 0;
99 
101  virtual bool isSmallChamber(const Identifier& id) const = 0;
102 
104  virtual int gasGap(const Identifier& id) const = 0;
105 
107  virtual Identifier chamberId(const Identifier& id) const = 0;
108 
110  virtual Identifier detElId(const Identifier& id) const = 0;
111 
113  virtual Identifier gasGapId(const Identifier& id) const = 0;
114 
116  virtual Identifier layerId(const Identifier& id) const = 0;
117 
119  virtual const MdtIdHelper& mdtIdHelper() const = 0;
120 
122  virtual const RpcIdHelper& rpcIdHelper() const = 0;
123 
125  virtual const TgcIdHelper& tgcIdHelper() const = 0;
126 
128  virtual const CscIdHelper& cscIdHelper() const = 0;
129 
131  virtual const sTgcIdHelper& stgcIdHelper() const = 0;
132 
134  virtual const MmIdHelper& mmIdHelper() const = 0;
135 
137  virtual MuonStationIndex::ChIndex chamberIndex(const Identifier& id) const = 0;
138 
140  virtual MuonStationIndex::StIndex stationIndex(const Identifier& id) const = 0;
141 
143  virtual MuonStationIndex::PhiIndex phiIndex(const Identifier& id) const = 0;
144 
147 
149  virtual MuonStationIndex::LayerIndex layerIndex(const Identifier& id) const = 0;
150 
154  virtual const std::set<MuonStationIndex::TechnologyIndex>&
156 
158  virtual int stationPhi(const Identifier& id) const = 0;
159 
161  virtual int stationEta(const Identifier& id) const = 0;
162 
164  virtual int stationName(const Identifier& id) const = 0;
166  virtual std::string stationNameString(const Identifier& id) const = 0;
167 
169  virtual int stationRegion(const Identifier& id) const = 0;
170 
172  virtual int sector(const Identifier& id) const = 0;
173 
175  virtual bool hasRPC() const = 0;
177  virtual bool hasTGC() const = 0;
179  virtual bool hasMDT() const = 0;
181  virtual bool hasCSC() const = 0;
183  virtual bool hasSTGC() const = 0;
185  virtual bool hasMM() const = 0;
186  };
187 
188 } // namespace Muon
189 
190 #endif // MUON_IMUONIDHELPERSVC_H
CscIdHelper.h
Muon::IMuonIdHelperSvc::hasMDT
virtual bool hasMDT() const =0
returns whether the MDT identifiers are loaded
Muon::IMuonIdHelperSvc::isMuon
virtual bool isMuon(const Identifier &id) const =0
returns whether this is a Muon Identifier or not
Muon::IMuonIdHelperSvc::issMdt
virtual bool issMdt(const Identifier &id) const =0
returns whether this is a sMDT Identifier or not
Muon::IMuonIdHelperSvc::isTrigger
virtual bool isTrigger(const Identifier &id) const =0
returns whether trigger chamber id or not
Muon::IMuonIdHelperSvc::stgcIdHelper
virtual const sTgcIdHelper & stgcIdHelper() const =0
access to TgcIdHelper
Muon::IMuonIdHelperSvc::layerIndex
virtual MuonStationIndex::LayerIndex layerIndex(const Identifier &id) const =0
calculate layer index from Identifier
Muon::IMuonIdHelperSvc::toStringStation
virtual std::string toStringStation(const Identifier &id) const =0
print all fields up to stationName to string
sTgcIdHelper.h
Muon::IMuonIdHelperSvc::hasCSC
virtual bool hasCSC() const =0
returns whether the CSC identifiers are loaded
Muon::IMuonIdHelperSvc::toStringChamber
virtual std::string toStringChamber(const Identifier &id) const =0
print all fields up to chamber to string
TgcIdHelper
Definition: TgcIdHelper.h:50
Muon::IMuonIdHelperSvc::stationIndex
virtual MuonStationIndex::StIndex stationIndex(const Identifier &id) const =0
calculate station index from Identifier
Muon::IMuonIdHelperSvc::phiIndex
virtual MuonStationIndex::PhiIndex phiIndex(const Identifier &id) const =0
calculate phi index from Identifier (not supported for MDT hits)
Muon::IMuonIdHelperSvc::stationPhi
virtual int stationPhi(const Identifier &id) const =0
Return stationPhi for all technologies.
Muon::MuonStationIndex::LayerIndex
LayerIndex
enum to classify the different layers in the muon spectrometer
Definition: MuonStationIndex.h:38
Muon::IMuonIdHelperSvc::isCsc
virtual bool isCsc(const Identifier &id) const =0
returns whether this is a CSC Identifier or not
Muon::IMuonIdHelperSvc::isRpc
virtual bool isRpc(const Identifier &id) const =0
returns whether this is a RPC Identifier or not
Muon::IMuonIdHelperSvc::stationRegion
virtual int stationRegion(const Identifier &id) const =0
Return stationRegion for all technologies.
Muon::IMuonIdHelperSvc::toStringDetEl
virtual std::string toStringDetEl(const Identifier &id) const =0
print all fields up to detector element to string
Muon::IMuonIdHelperSvc::stationEta
virtual int stationEta(const Identifier &id) const =0
Return stationEta for all technologies.
Muon::IMuonIdHelperSvc::moduleHash
virtual IdentifierHash moduleHash(const Identifier &id) const =0
Returns the module hash associated to an Identifier.
Muon::IMuonIdHelperSvc::measuresPhi
virtual bool measuresPhi(const Identifier &id) const =0
returns whether channel measures phi or not
Muon
NRpcCablingAlg reads raw condition data and writes derived condition data to the condition store.
Definition: TrackSystemController.h:45
Muon::IMuonIdHelperSvc::mmIdHelper
virtual const MmIdHelper & mmIdHelper() const =0
access to CscIdHelper
Muon::MuonStationIndex::PhiIndex
PhiIndex
enum to classify the different phi layers in the muon spectrometer
Definition: MuonStationIndex.h:31
RpcIdHelper
Definition: RpcIdHelper.h:51
RpcIdHelper.h
Muon::IMuonIdHelperSvc::stationNameString
virtual std::string stationNameString(const Identifier &id) const =0
Return the stationName string for all technologies.
Muon::IMuonIdHelperSvc::DeclareInterfaceID
DeclareInterfaceID(IMuonIdHelperSvc, 1, 0)
Muon::IMuonIdHelperSvc::hasHPTDC
virtual bool hasHPTDC(const Identifier &id) const =0
returns whether this Identifier belongs to an MDT with HPTDC or not NOTE that in Run4,...
Muon::IMuonIdHelperSvc::layerId
virtual Identifier layerId(const Identifier &id) const =0
create a layer ID, returns tube id for the MDTs
Muon::IMuonIdHelperSvc::toStringGasGap
virtual std::string toStringGasGap(const Identifier &id) const =0
print all fields up to gas gap to string
MdtIdHelper
Definition: MdtIdHelper.h:61
MmIdHelper.h
MdtIdHelper.h
Muon::IMuonIdHelperSvc::gasGap
virtual int gasGap(const Identifier &id) const =0
returns gas gap: gasGap for RPC + TGC, wireLayer for CSC, tube for MDT
Muon::IMuonIdHelperSvc::detElId
virtual Identifier detElId(const Identifier &id) const =0
create a detector element ID
Muon::IMuonIdHelperSvc::chamberId
virtual Identifier chamberId(const Identifier &id) const =0
create a chamber ID
Muon::IMuonIdHelperSvc::chamberIndex
virtual MuonStationIndex::ChIndex chamberIndex(const Identifier &id) const =0
calculate chamber index from Identifier
Muon::MuonStationIndex::DetectorRegionIndex
DetectorRegionIndex
enum to classify the different layers in the muon spectrometer
Definition: MuonStationIndex.h:47
Muon::IMuonIdHelperSvc::isMdt
virtual bool isMdt(const Identifier &id) const =0
returns whether this is a MDT Identifier or not
Muon::IMuonIdHelperSvc::technologyIndex
virtual MuonStationIndex::TechnologyIndex technologyIndex(const Identifier &id) const =0
calculate layer index from Identifier
Muon::IMuonIdHelperSvc::stationName
virtual int stationName(const Identifier &id) const =0
Return stationName for all technologies.
Muon::IMuonIdHelperSvc::isSmallChamber
virtual bool isSmallChamber(const Identifier &id) const =0
returns whether this is a small chamber, always returns true for TGCs
Muon::IMuonIdHelperSvc::isMM
virtual bool isMM(const Identifier &id) const =0
returns whether this is a MM Identifier or not
Muon::IMuonIdHelperSvc::mdtIdHelper
virtual const MdtIdHelper & mdtIdHelper() const =0
access to MdtIdHelper
Muon::IMuonIdHelperSvc::gasGapId
virtual Identifier gasGapId(const Identifier &id) const =0
create a gasGap ID (will return layer Id for MDTs)
sTgcIdHelper
Definition: sTgcIdHelper.h:55
Muon::IMuonIdHelperSvc::hasTGC
virtual bool hasTGC() const =0
returns whether the sTGC identifiers are loaded
Muon::IMuonIdHelperSvc::isEndcap
virtual bool isEndcap(const Identifier &id) const =0
returns whether this is an endcap Identifier or not
Muon::IMuonIdHelperSvc::tgcIdHelper
virtual const TgcIdHelper & tgcIdHelper() const =0
access to TgcIdHelper
Muon::IMuonIdHelperSvc::cscIdHelper
virtual const CscIdHelper & cscIdHelper() const =0
access to CscIdHelper
Muon::IMuonIdHelperSvc::hasMM
virtual bool hasMM() const =0
returns whether the Mircomegas identifiers are loaded
MmIdHelper
Definition: MmIdHelper.h:54
Muon::IMuonIdHelperSvc::toString
virtual std::string toString(const Identifier &id) const =0
print all fields to string
CscIdHelper
Definition: CscIdHelper.h:52
Muon::IMuonIdHelperSvc
Interface for Helper service that creates muon Identifiers and can be used to print Identifiers.
Definition: IMuonIdHelperSvc.h:27
Muon::MuonStationIndex::ChIndex
ChIndex
enum to classify the different chamber layers in the muon spectrometer
Definition: MuonStationIndex.h:15
Muon::MuonStationIndex::StIndex
StIndex
enum to classify the different station layers in the muon spectrometer
Definition: MuonStationIndex.h:23
TgcIdHelper.h
Muon::IMuonIdHelperSvc::regionIndex
virtual MuonStationIndex::DetectorRegionIndex regionIndex(const Identifier &id) const =0
calculate detector region index from Identifier
MuonStationIndex.h
IdentifierHash
This is a "hash" representation of an Identifier. This encodes a 32 bit index which can be used to lo...
Definition: IdentifierHash.h:25
Muon::IMuonIdHelperSvc::sector
virtual int sector(const Identifier &id) const =0
return sector number 1-16, odd=large, even=small
Muon::MuonStationIndex::TechnologyIndex
TechnologyIndex
enum to classify the different layers in the muon spectrometer
Definition: MuonStationIndex.h:54
Muon::IMuonIdHelperSvc::technologiesInStation
virtual const std::set< MuonStationIndex::TechnologyIndex > & technologiesInStation(MuonStationIndex::StIndex stIndex) const =0
Recieve all technologies in a station.
Muon::IMuonIdHelperSvc::isTgc
virtual bool isTgc(const Identifier &id) const =0
returns whether this is a TGC Identifier or not
Muon::IMuonIdHelperSvc::~IMuonIdHelperSvc
virtual ~IMuonIdHelperSvc()=default
destructor
Muon::IMuonIdHelperSvc::chamberNameString
virtual std::string chamberNameString(const Identifier &id) const =0
print chamber name to string
Muon::IMuonIdHelperSvc::issTgc
virtual bool issTgc(const Identifier &id) const =0
returns whether this is a sTGC Identifier or not
Muon::IMuonIdHelperSvc::hasRPC
virtual bool hasRPC() const =0
returns whether the RPC identifiers are loaded
Muon::IMuonIdHelperSvc::rpcIdHelper
virtual const RpcIdHelper & rpcIdHelper() const =0
access to RpcIdHelper
Muon::IMuonIdHelperSvc::detElementHash
virtual IdentifierHash detElementHash(const Identifier &id) const =0
Returns the detector element hash associated to an Identifier.
Muon::IMuonIdHelperSvc::hasSTGC
virtual bool hasSTGC() const =0
returns whether the sTGC identifiers are loaded
Muon::IMuonIdHelperSvc::toStringTech
virtual std::string toStringTech(const Identifier &id) const =0
print all fields up to technology to string
Identifier
Definition: IdentifierFieldParser.cxx:14