ATLAS Offline Software
IMuonIdHelperSvc.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2023 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 
10 #include "GaudiKernel/IService.h"
11 #include "Identifier/Identifier.h"
19 
20 namespace Muon {
21 
26  class IMuonIdHelperSvc : virtual public IService {
27  public:
29 
31  virtual ~IMuonIdHelperSvc() = default;
32 
34  virtual std::string toString(const Identifier& id) const = 0;
35 
37  virtual std::string toStringTech(const Identifier& id) const = 0;
38 
40  virtual std::string toStringStation(const Identifier& id) const = 0;
41 
43  virtual std::string toStringChamber(const Identifier& id) const = 0;
44 
46  virtual std::string toStringDetEl(const Identifier& id) const = 0;
47 
49  virtual std::string toStringGasGap(const Identifier& id) const = 0;
50 
52  virtual std::string chamberNameString(const Identifier& id) const = 0;
53 
55  virtual bool isMuon(const Identifier& id) const = 0;
56 
58  virtual bool isMdt(const Identifier& id) const = 0;
59 
61  virtual bool isMM(const Identifier& id) const = 0;
62 
64  virtual bool isCsc(const Identifier& id) const = 0;
65 
67  virtual bool isRpc(const Identifier& id) const = 0;
68 
70  virtual bool isTgc(const Identifier& id) const = 0;
71 
73  virtual bool issTgc(const Identifier& id) const = 0;
74 
76  virtual bool issMdt(const Identifier& id) const = 0;
77 
79  virtual IdentifierHash moduleHash(const Identifier& id) const = 0;
81  virtual IdentifierHash detElementHash(const Identifier& id) const = 0;
82 
83 
87  virtual bool hasHPTDC(const Identifier& id) const = 0;
88 
90  virtual bool measuresPhi(const Identifier& id) const = 0;
91 
93  virtual bool isEndcap(const Identifier& id) const = 0;
94 
96  virtual bool isTrigger(const Identifier& id) const = 0;
97 
99  virtual bool isSmallChamber(const Identifier& id) const = 0;
100 
102  virtual int gasGap(const Identifier& id) const = 0;
103 
105  virtual Identifier chamberId(const Identifier& id) const = 0;
106 
108  virtual Identifier detElId(const Identifier& id) const = 0;
109 
111  virtual Identifier gasGapId(const Identifier& id) const = 0;
112 
114  virtual Identifier layerId(const Identifier& id) const = 0;
115 
117  virtual const MdtIdHelper& mdtIdHelper() const = 0;
118 
120  virtual const RpcIdHelper& rpcIdHelper() const = 0;
121 
123  virtual const TgcIdHelper& tgcIdHelper() const = 0;
124 
126  virtual const CscIdHelper& cscIdHelper() const = 0;
127 
129  virtual const sTgcIdHelper& stgcIdHelper() const = 0;
130 
132  virtual const MmIdHelper& mmIdHelper() const = 0;
133 
135  virtual MuonStationIndex::ChIndex chamberIndex(const Identifier& id) const = 0;
136 
138  virtual MuonStationIndex::StIndex stationIndex(const Identifier& id) const = 0;
139 
141  virtual MuonStationIndex::PhiIndex phiIndex(const Identifier& id) const = 0;
142 
145 
147  virtual MuonStationIndex::LayerIndex layerIndex(const Identifier& id) const = 0;
148 
151 
153  virtual int stationPhi(const Identifier& id) const = 0;
154 
156  virtual int stationEta(const Identifier& id) const = 0;
157 
159  virtual int stationName(const Identifier& id) const = 0;
161  virtual std::string stationNameString(const Identifier& id) const = 0;
162 
164  virtual int stationRegion(const Identifier& id) const = 0;
165 
167  virtual int sector(const Identifier& id) const = 0;
168 
170  virtual bool hasRPC() const = 0;
172  virtual bool hasTGC() const = 0;
174  virtual bool hasMDT() const = 0;
176  virtual bool hasCSC() const = 0;
178  virtual bool hasSTGC() const = 0;
180  virtual bool hasMM() const = 0;
181  };
182 
183 } // namespace Muon
184 
185 #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
This class provides conversion from CSC RDO data to CSC Digits.
Definition: TrackSystemController.h:49
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,...
Identifier
Definition: DetectorDescription/Identifier/Identifier/Identifier.h:32
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:26
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
Definition: IdentifierHash.h:38
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::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