ATLAS Offline Software
ITGCcablingSvc.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 /***************************************************************************
6  ITGCcablingSvc.h
7 
8  Author : T.Sumida <Toshi.Sumida@cern.ch>, H.Kurashige
9  Description : Interface for TGCcavlingSv
10  pure abstract class
11 ***************************************************************************/
12 
13 #ifndef TGCCABLING_ITGCCABLINGSVC_H
14 #define TGCCABLING_ITGCCABLINGSVC_H
15 
16 #include "GaudiKernel/IInterface.h"
18 #include <string>
19 #include <vector>
20 #include <algorithm>
21 
22 
23 // forward declaration
24 class Identifier;
25 class TGCCablingBase;
26 
27 // Declaration of the interface ID ( interface id, major version, minor version)
28 static const InterfaceID IID_TGCcablingSvc("TGCcablingSvc", 1 , 0);
29 
30 class ITGCcablingSvc : public AthService, virtual public IInterface
31 {
32  public:
33  ITGCcablingSvc(const std::string& name, ISvcLocator* svc)
34  : AthService( name, svc ) {}
35 
36  // / Retrieve interface ID
37  static const InterfaceID& interfaceID() { return IID_TGCcablingSvc; }
38 
39 
40 
41  // //Query interfaces of Interface
42  // @param riid ID of Interface to be retrieved
43  // @param ppvUnknown Pointer to Location for interface pointer
44  //
45  virtual StatusCode queryInterface(const InterfaceID& riid,
46  void** ppvInterface) =0;
47 
48  public:
49  virtual const TGCCablingBase* getTGCCabling() const=0;
50 
51  public:
52  // TGCcablingSvc Interface
53  // give max value of ReadoutID parameters
54  virtual
55  void getReadoutIDRanges( int& maxRodId,
56  int& maxSRodId,
57  int& maxSswId,
58  int& maxSbloc,
59  int& minChannelId,
60  int& maxChannelId) const =0;
61 
62  // give phi-range which a ROD covers
63  virtual
64  bool getCoveragefromRodID(const int rodID,
65  double & startPhi,
66  double & endPhi
67  ) const =0;
68 
69  virtual
70  bool getCoveragefromRodID(const int rodID,
71  int & startEndcapSector,
72  int & coverageOfEndcapSector,
73  int & startForwardSector,
74  int & coverageOfForwardSector
75  ) const =0;
76 
77  // give phi-range which a SROD covers
78  virtual
79  bool getCoveragefromSRodID(const int srodID,
80  double & startPhi,
81  double & endPhi
82  ) const =0;
83 
84  virtual
85  bool getCoveragefromSRodID(const int srodID,
86  int & startEndcapSector,
87  int & coverageOfEndcapSector,
88  int & startForwardSector,
89  int & coverageOfForwardSector
90  ) const =0;
91 
92  // Readout ID is ored
93  virtual
94  bool isOredChannel(const int subDetectorID,
95  const int rodID,
96  const int sswID,
97  const int sbLoc,
98  const int channelID) const =0;
99 
100 
101  // Offline ID has adjacent Readout ID
102  virtual
103  bool hasAdjacentChannel(const Identifier & offlineID) const =0;
104 
105 
106  // Online ID has adjacent Readout ID
107  virtual
108  bool hasAdjacentChannel(const int subsystemNumber,
109  const int octantNumber,
110  const int moduleNumber,
111  const int layerNumber,
112  const int rNumber,
113  const int wireOrStrip,
114  const int channelNumber) const =0 ;
115 
116 
117  // readout IDs -> offline IDs
118  virtual
120  const int subDetectorID,
121  const int rodID,
122  const int sswID,
123  const int sbLoc,
124  const int channelID,
125  bool orChannel=false) const =0;
126 
127 
128  // offline IDs -> readout IDs
129  virtual
130  bool getReadoutIDfromOfflineID(const Identifier & offlineID,
131  int & subDetectorID,
132  int & rodID,
133  int & sswID,
134  int & sbLoc,
135  int & channelID,
136  bool adChannel=false) const =0;
137 
138  // offline ID -> online IDs
139  virtual
140  bool getOnlineIDfromOfflineID(const Identifier & offlineID,
141  int & subsystemNumber,
142  int & octantNumber,
143  int & moduleNumber,
144  int & layerNumber,
145  int & rNumber,
146  int & wireOrStrip,
147  int & channelNumber) const =0;
148 
149  // online IDs -> offline ID
150  virtual
152  const int subsystemNumber,
153  const int octantNumber,
154  const int moduleNumber,
155  const int layerNumber,
156  const int rNumber,
157  const int wireOrStrip,
158  const int channelNumber) const=0;
159 
160  // readout IDs -> online IDs
161  virtual
162  bool getOnlineIDfromReadoutID(const int subDetectorID,
163  const int rodID,
164  const int sswID,
165  const int sbLoc,
166  const int channelID,
167  int & subsystemNumber,
168  int & octantNumber,
169  int & moduleNumber,
170  int & layerNumber,
171  int & rNumber,
172  int & wireOrStrip,
173  int & channelNumber,
174  bool orChannel=false) const =0;
175 
176  // online IDs -> readout IDs
177  virtual
178  bool getReadoutIDfromOnlineID(int & subDetectorID,
179  int & rodID,
180  int & sswID,
181  int & sbLoc,
182  int & channelID,
183  const int subsystemNumber,
184  const int octantNumber,
185  const int moduleNumber,
186  const int layerNumber,
187  const int rNumber,
188  const int wireOrStrip,
189  const int channelNumber,
190  bool adChannel=false) const =0;
191 
192  // element ID -> readout IDs
193  virtual
194  bool getReadoutIDfromElementID(const Identifier & elementID,
195  int & subdetectorID,
196  int & rodID) const =0;
197 
198  // readout IDs -> element ID
199  virtual
201  const int subDetectorID,
202  const int rodID,
203  const int sswID,
204  const int sbLoc,
205  const int channelID,
206  bool orChannel=false) const =0;
207 
208 
209  // HPT ID -> readout ID
210  virtual
211  bool getReadoutIDfromHPTID(const int phi,
212  const bool isAside,
213  const bool isEndcap,
214  const bool isStrip,
215  const int id,
216  int & subsectorID,
217  int & rodID,
218  int & sswID,
219  int & sbLoc) const =0;
220 
221  // readout ID -> SLB ID
222  virtual
224  bool & isAside,
225  bool & isEndcap,
226  int & moduleType,
227  int & id,
228  const int subsectorID,
229  const int rodID,
230  const int sswID,
231  const int sbLoc) const =0;
232 
233  // readout ID -> slbAddr
234  virtual
235  bool getSLBAddressfromReadoutID(int & slbAddr,
236  const int subsectorID,
237  const int rodID,
238  const int sswID,
239  const int sbLoc) const =0;
240 
241  // readout ID -> RxID
242  virtual
243  bool getRxIDfromReadoutID(int & rxId,
244  const int subsectorID,
245  const int rodID,
246  const int sswID,
247  const int sbLoc) const =0;
248 
249  // ROD_ID / SSW_ID / RX_ID -> SLB ID
250  virtual
252  bool & isAside,
253  bool & isEndcap,
254  int & moduleType,
255  int & id,
256  const int subsectorID,
257  const int rodID,
258  const int sswID,
259  const int rxId) const = 0;
260 
261 
262  // SLB ID -> readout ID
263  virtual
264  bool getReadoutIDfromSLBID(const int phi,
265  const bool isAside,
266  const bool isEndcap,
267  const int moduleType,
268  const int id,
269  int & subsectorID,
270  int & rodID,
271  int & sswID,
272  int & sbLoc) const = 0;
273 
274  // readout ID -> SL ID
275  virtual
277  bool & isAside,
278  bool & isEndcap,
279  const int subsectorID,
280  const int rodID,
281  const int sswID,
282  const int sbLoc) const = 0;
283 
284  // SROD ID -> SL ID
285  virtual
287  bool & isAside,
288  const int subsectorID,
289  const int srodID,
290  const int sector,
291  const bool forward) const = 0;
292 
293  // SL ID -> readout ID
294  virtual
295  bool getReadoutIDfromSLID(const int phi,
296  const bool isAside,
297  const bool isEndcap,
298  int & subsectorID,
299  int & rodID,
300  int & sswID,
301  int & sbLoc) const =0;
302 
303  // SL ID -> SROD ID
304  virtual
305  bool getSReadoutIDfromSLID(const int phi,
306  const bool isAside,
307  const bool isEndcap,
308  int & subsectorID,
309  int & srodID,
310  int & sswID,
311  int & sbLoc) const =0;
312 
313  // HighPtID used in Simulation -> HighPtID in RDO
314  virtual
315  bool getRDOHighPtIDfromSimHighPtID(const bool isForward,
316  const bool isStrip,
317  int & index,
318  int & chip,
319  int & hitId) const =0;
320 
321  // HighPtID in RDO -> HighPtID used in Simulation
322  virtual
323  bool getSimHighPtIDfromRDOHighPtID(const bool isForward,
324  const bool isStrip,
325  int & index,
326  int & chip,
327  int & hitId) const =0;
328 
329  // high pt coincidence IDs -> offline IDs
330  virtual
332  const int subDetectorId,
333  const int rodId,
334  const int sectorInReadout,
335  const bool isStrip,
336  const bool isForward,
337  const int index,
338  const int chip,
339  const int hitId,
340  const int hsub ) const =0;
341 
342  // offline IDs -> high pt coincidence IDs
343  virtual
344  bool getHighPtIDfromOfflineID(const Identifier & offlineID,
345  int & subDetectorId,
346  int & rodId,
347  int & sectorInReadout,
348  bool & isStrip,
349  bool & isForward,
350  int & index,
351  int & chip,
352  int & hitId,
353  int & hsub) const = 0;
354 
355  // HPT HitID -> ROI Number
356  virtual
358  bool isForward,
359  int index_wire,
360  int chip_wire,
361  int hitId_wire,
362  int hsub_wire,
363  int chip_strip,
364  int hitId_strip,
365  int hsub_strip) const = 0;
366 
367  // HPT HitID -> ROI Number
368  virtual
370  bool isForward,
371  bool isStrip,
372  int & index,
373  int & chip,
374  int & hitId,
375  int & hsub) const = 0;
376 
377 
378  // low pt coincidence IDs -> offline IDs
379  virtual
381  const int subDetectorID,
382  const int rodID,
383  const int sswID,
384  const int sbLoc,
385  const int block,
386  const int pos,
387  bool middle=false) const =0;
388 
389  // offline IDs -> low pt coincidence IDs
390  virtual
392  int & subDetectorID,
393  int & rodID,
394  int & sswID,
395  int & sbLoc,
396  int & block,
397  int & pos,
398  bool middle=false) const =0;
399 
400  protected:
401  IntegerProperty m_AsideId;
402  IntegerProperty m_CsideId;
403  IntegerArrayProperty m_rodId;
404 
405  StringProperty m_databaseASDToPP;
406  StringProperty m_databaseInPP;
407  StringProperty m_databasePPToSL;
408  StringProperty m_databaseSLBToROD;
409 
410  StringProperty m_databaseASDToPPdiff;
411 
412 };
413 
414 #endif
ITGCcablingSvc::getReadoutIDfromElementID
virtual bool getReadoutIDfromElementID(const Identifier &elementID, int &subdetectorID, int &rodID) const =0
ITGCcablingSvc::getSLIDfromReadoutID
virtual bool getSLIDfromReadoutID(int &phi, bool &isAside, bool &isEndcap, const int subsectorID, const int rodID, const int sswID, const int sbLoc) const =0
ITGCcablingSvc::getReadoutIDRanges
virtual void getReadoutIDRanges(int &maxRodId, int &maxSRodId, int &maxSswId, int &maxSbloc, int &minChannelId, int &maxChannelId) const =0
phi
Scalar phi() const
phi method
Definition: AmgMatrixBasePlugin.h:64
ITGCcablingSvc::getCoveragefromSRodID
virtual bool getCoveragefromSRodID(const int srodID, int &startEndcapSector, int &coverageOfEndcapSector, int &startForwardSector, int &coverageOfForwardSector) const =0
ITGCcablingSvc
Definition: ITGCcablingSvc.h:31
ITGCcablingSvc::getOfflineIDfromOnlineID
virtual 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 =0
ITGCcablingSvc::m_rodId
IntegerArrayProperty m_rodId
Definition: ITGCcablingSvc.h:403
index
Definition: index.py:1
ITGCcablingSvc::getOnlineIDfromReadoutID
virtual 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 =0
ITGCcablingSvc::m_databasePPToSL
StringProperty m_databasePPToSL
Definition: ITGCcablingSvc.h:407
ITGCcablingSvc::getCoveragefromRodID
virtual bool getCoveragefromRodID(const int rodID, int &startEndcapSector, int &coverageOfEndcapSector, int &startForwardSector, int &coverageOfForwardSector) const =0
ITGCcablingSvc::isOredChannel
virtual bool isOredChannel(const int subDetectorID, const int rodID, const int sswID, const int sbLoc, const int channelID) const =0
ITGCcablingSvc::m_AsideId
IntegerProperty m_AsideId
Definition: ITGCcablingSvc.h:401
ITGCcablingSvc::getHighPtIDfromROINumber
virtual bool getHighPtIDfromROINumber(int roi, bool isForward, bool isStrip, int &index, int &chip, int &hitId, int &hsub) const =0
ITGCcablingSvc::getOfflineIDfromHighPtID
virtual bool getOfflineIDfromHighPtID(Identifier &offlineID, const int subDetectorId, const int rodId, const int sectorInReadout, const bool isStrip, const bool isForward, const int index, const int chip, const int hitId, const int hsub) const =0
ITGCcablingSvc::m_databaseASDToPP
StringProperty m_databaseASDToPP
Definition: ITGCcablingSvc.h:405
ITGCcablingSvc::m_databaseSLBToROD
StringProperty m_databaseSLBToROD
Definition: ITGCcablingSvc.h:408
ITGCcablingSvc::getRxIDfromReadoutID
virtual bool getRxIDfromReadoutID(int &rxId, const int subsectorID, const int rodID, const int sswID, const int sbLoc) const =0
ITGCcablingSvc::hasAdjacentChannel
virtual bool hasAdjacentChannel(const Identifier &offlineID) const =0
ITGCcablingSvc::getSLBIDfromRxID
virtual 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 =0
ITGCcablingSvc::getReadoutIDfromSLID
virtual bool getReadoutIDfromSLID(const int phi, const bool isAside, const bool isEndcap, int &subsectorID, int &rodID, int &sswID, int &sbLoc) const =0
ITGCcablingSvc::getOfflineIDfromReadoutID
virtual bool getOfflineIDfromReadoutID(Identifier &offlineID, const int subDetectorID, const int rodID, const int sswID, const int sbLoc, const int channelID, bool orChannel=false) const =0
ITGCcablingSvc::m_databaseASDToPPdiff
StringProperty m_databaseASDToPPdiff
Definition: ITGCcablingSvc.h:410
ITGCcablingSvc::ITGCcablingSvc
ITGCcablingSvc(const std::string &name, ISvcLocator *svc)
Definition: ITGCcablingSvc.h:33
Identifier
Definition: DetectorDescription/Identifier/Identifier/Identifier.h:32
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
AthService
Definition: AthService.h:32
ITGCcablingSvc::getRDOHighPtIDfromSimHighPtID
virtual bool getRDOHighPtIDfromSimHighPtID(const bool isForward, const bool isStrip, int &index, int &chip, int &hitId) const =0
ITGCcablingSvc::getElementIDfromReadoutID
virtual bool getElementIDfromReadoutID(Identifier &elementID, const int subDetectorID, const int rodID, const int sswID, const int sbLoc, const int channelID, bool orChannel=false) const =0
ITGCcablingSvc::m_databaseInPP
StringProperty m_databaseInPP
Definition: ITGCcablingSvc.h:406
ITGCcablingSvc::getTGCCabling
virtual const TGCCablingBase * getTGCCabling() const =0
Handler::svc
AthROOTErrorHandlerSvc * svc
Definition: AthROOTErrorHandlerSvc.cxx:10
ITGCcablingSvc::getSimHighPtIDfromRDOHighPtID
virtual bool getSimHighPtIDfromRDOHighPtID(const bool isForward, const bool isStrip, int &index, int &chip, int &hitId) const =0
TGCCablingBase
Definition: TGCCablingBase.h:23
ITGCcablingSvc::interfaceID
static const InterfaceID & interfaceID()
Definition: ITGCcablingSvc.h:37
ITGCcablingSvc::queryInterface
virtual StatusCode queryInterface(const InterfaceID &riid, void **ppvInterface)=0
ITGCcablingSvc::getSLBAddressfromReadoutID
virtual bool getSLBAddressfromReadoutID(int &slbAddr, const int subsectorID, const int rodID, const int sswID, const int sbLoc) const =0
ITGCcablingSvc::m_CsideId
IntegerProperty m_CsideId
Definition: ITGCcablingSvc.h:402
ITGCcablingSvc::getSLBIDfromReadoutID
virtual 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 =0
dumpTgcDigiThreshold.isStrip
list isStrip
Definition: dumpTgcDigiThreshold.py:33
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:195
ITGCcablingSvc::getSLIDfromSReadoutID
virtual bool getSLIDfromSReadoutID(int &phi, bool &isAside, const int subsectorID, const int srodID, const int sector, const bool forward) const =0
ITGCcablingSvc::getCoveragefromRodID
virtual bool getCoveragefromRodID(const int rodID, double &startPhi, double &endPhi) const =0
python.LumiBlobConversion.pos
pos
Definition: LumiBlobConversion.py:18
ITGCcablingSvc::getReadoutIDfromOfflineID
virtual bool getReadoutIDfromOfflineID(const Identifier &offlineID, int &subDetectorID, int &rodID, int &sswID, int &sbLoc, int &channelID, bool adChannel=false) const =0
ITGCcablingSvc::getSReadoutIDfromSLID
virtual bool getSReadoutIDfromSLID(const int phi, const bool isAside, const bool isEndcap, int &subsectorID, int &srodID, int &sswID, int &sbLoc) const =0
ITGCcablingSvc::hasAdjacentChannel
virtual bool hasAdjacentChannel(const int subsystemNumber, const int octantNumber, const int moduleNumber, const int layerNumber, const int rNumber, const int wireOrStrip, const int channelNumber) const =0
ITGCcablingSvc::getReadoutIDfromOnlineID
virtual 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 =0
ITGCcablingSvc::getOnlineIDfromOfflineID
virtual bool getOnlineIDfromOfflineID(const Identifier &offlineID, int &subsystemNumber, int &octantNumber, int &moduleNumber, int &layerNumber, int &rNumber, int &wireOrStrip, int &channelNumber) const =0
AthService.h
ITGCcablingSvc::getLowPtCoincidenceIDfromOfflineID
virtual bool getLowPtCoincidenceIDfromOfflineID(const Identifier &offlineID, int &subDetectorID, int &rodID, int &sswID, int &sbLoc, int &block, int &pos, bool middle=false) const =0
ITGCcablingSvc::getOfflineIDfromLowPtCoincidenceID
virtual 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 =0
ITGCcablingSvc::getReadoutIDfromHPTID
virtual 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 =0
ITGCcablingSvc::getReadoutIDfromSLBID
virtual 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 =0
ITGCcablingSvc::getHighPtIDfromOfflineID
virtual bool getHighPtIDfromOfflineID(const Identifier &offlineID, int &subDetectorId, int &rodId, int &sectorInReadout, bool &isStrip, bool &isForward, int &index, int &chip, int &hitId, int &hsub) const =0
ITGCcablingSvc::getCoveragefromSRodID
virtual bool getCoveragefromSRodID(const int srodID, double &startPhi, double &endPhi) const =0
ITGCcablingSvc::getROINumberfromHighPtID
virtual bool getROINumberfromHighPtID(int &roi, bool isForward, int index_wire, int chip_wire, int hitId_wire, int hsub_wire, int chip_strip, int hitId_strip, int hsub_strip) const =0