ATLAS Offline Software
Loading...
Searching...
No Matches
RDOindex.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#ifndef RDOINDEX_H
6#define RDOINDEX_H
7
8// Mapping of the PAD into Receiver(RX), Sector Logic(SL), ROD and ROB.
9// The PAD is identified inside the SL by a progressive number. The mapping
10// between SL and RX is one on one, the same between RDO and ROB. Two SL go
11// into one ROD
12
13// MAP for the Sector Logic
14//
15// phi
16// ^ eta < 0, side C (0x66) eta > 0, side A (0x65)
17// | +----------------------------------+----------------------------------+
18// | | RX=1, SL=31, ROD=ROB=15 | RX=1, SL=31, ROD=ROB=15 |
19// | +----------------------------------+----------------------------------+
20// | | RX=0, SL=30, ROD=ROB=15 | RX=0, SL=30, ROD=ROB=15 |
21// | +----------------------------------+----------------------------------+
22// | | RX=1, SL=29, ROD=ROB=14 | RX=1, SL=29, ROD=ROB=14 |
23// | +----------------------------------+----------------------------------+
24// | | RX=0, SL=28, ROD=ROB=14 | RX=0, SL=28, ROD=ROB=14 |
25// | +----------------------------------+----------------------------------+
26// | | RX=1, SL=27, ROD=ROB=13 | RX=1, SL=27, ROD=ROB=13 |
27// | +----------------------------------+----------------------------------+
28// | | RX=0, SL=26, ROD=ROB=13 | RX=0, SL=26, ROD=ROB=13 |
29// | +----------------------------------+----------------------------------+
30// | | RX=1, SL=25, ROD=ROB=12 | RX=1, SL=25, ROD=ROB=12 |
31// | +----------------------------------+----------------------------------+
32// | | RX=0, SL=24, ROD=ROB=12 | RX=0, SL=24, ROD=ROB=12 |
33// | +----------------------------------+----------------------------------+
34// | | RX=1, SL=23, ROD=ROB=11 | RX=1, SL=23, ROD=ROB=11 |
35// | +----------------------------------+----------------------------------+
36// | | RX=0, SL=22, ROD=ROB=11 | RX=0, SL=22, ROD=ROB=11 |
37// | +----------------------------------+----------------------------------+
38// | | RX=1, SL=21, ROD=ROB=10 | RX=1, SL=21, ROD=ROB=10 |
39// | +----------------------------------+----------------------------------+
40// | | RX=0, SL=20, ROD=ROB=10 | RX=0, SL=20, ROD=ROB=10 |
41// | +----------------------------------+----------------------------------+
42// | | RX=1, SL=19, ROD=ROB=09 | RX=1, SL=19, ROD=ROB=09 |
43// | +----------------------------------+----------------------------------+
44// | | RX=0, SL=18, ROD=ROB=09 | RX=0, SL=18, ROD=ROB=09 |
45// | +----------------------------------+----------------------------------+
46// | | RX=1, SL=17, ROD=ROB=08 | RX=1, SL=17, ROD=ROB=08 |
47// | +----------------------------------+----------------------------------+
48// | | RX=0, SL=16, ROD=ROB=08 | RX=0, SL=16, ROD=ROB=08 |
49// | +----------------------------------+----------------------------------+
50// | | RX=1, SL=15, ROD=ROB=07 | RX=1, SL=15, ROD=ROB=07 |
51// | +----------------------------------+----------------------------------+
52// | | RX=0, SL=14, ROD=ROB=07 | RX=0, SL=14, ROD=ROB=07 |
53// | +----------------------------------+----------------------------------+
54// | | RX=1, SL=13, ROD=ROB=06 | RX=1, SL=13, ROD=ROB=06 |
55// | +----------------------------------+----------------------------------+
56// | | RX=0, SL=12, ROD=ROB=06 | RX=0, SL=12, ROD=ROB=06 |
57// | +----------------------------------+----------------------------------+
58// | | RX=1, SL=11, ROD=ROB=05 | RX=1, SL=11, ROD=ROB=05 |
59// | +----------------------------------+----------------------------------+
60// | | RX=0, SL=10, ROD=ROB=05 | RX=0, SL=10, ROD=ROB=05 |
61// | +----------------------------------+----------------------------------+
62// | | RX=1, SL=09, ROD=ROB=04 | RX=1, SL=09, ROD=ROB=04 |
63// | +----------------------------------+----------------------------------+
64// | | RX=0, SL=08, ROD=ROB=04 | RX=0, SL=08, ROD=ROB=04 |
65// | +----------------------------------+----------------------------------+
66// | | RX=1, SL=07, ROD=ROB=03 | RX=1, SL=07, ROD=ROB=03 |
67// | +----------------------------------+----------------------------------+
68// | | RX=0, SL=06, ROD=ROB=03 | RX=0, SL=06, ROD=ROB=03 |
69// | +----------------------------------+----------------------------------+
70// | | RX=1, SL=05, ROD=ROB=02 | RX=1, SL=05, ROD=ROB=02 |
71// | +----------------------------------+----------------------------------+
72// | | RX=0, SL=04, ROD=ROB=02 | RX=0, SL=04, ROD=ROB=02 |
73// | +----------------------------------+----------------------------------+
74// | | RX=1, SL=03, ROD=ROB=01 | RX=1, SL=03, ROD=ROB=01 |
75// | +----------------------------------+----------------------------------+
76// | | RX=0, SL=02, ROD=ROB=01 | RX=0, SL=02, ROD=ROB=01 |
77// | +----------------------------------+----------------------------------+
78// | | RX=1, SL=01, ROD=ROB=00 | RX=1, SL=01, ROD=ROB=00 |
79// | +----------------------------------+----------------------------------+
80// | | RX=0, SL=00, ROD=ROB=00 | RX=0, SL=00, ROD=ROB=00 |
81// + +----------------------------------+----------------------------------+
82
84
85class RDOindex {
86private:
87 unsigned short int m_ROBid{0}; // hardware Id for the ROB
88 unsigned short int m_RODid{0}; // hardware Id for the ROD
89 unsigned short int m_side{0}; // hardware Id for the Sector Logic Side
90 unsigned short int m_SLid{0}; // hardware Id for the Sector Logic
91 unsigned short int m_RXid{0}; // hardware Id for the Receiver
92 unsigned short int m_PADid{0}; // hardware Id for the PAD
93
94 unsigned long int m_lvl1_code{0}; // Identification of the first RPC strip
95 // on eta projection read by this PAD
96
97 int m_stationName{0}; // StationName index according to offline Ids
98 int m_stationEta{0}; // StationEta index according to offline Ids
99 int m_stationPhi{0}; // StationPhi index according to offline Ids
100 int m_doubletR{0}; // DoubletR index according to offline Ids
101 int m_doubletZ{0}; // DoubletZ index according to offline Ids
102 int m_doubletPhi{0}; // DoubletPhi index according to offline Ids
103
104 unsigned int m_hash{0}; // hash id to be used for allocation into the container
105
106 bool m_status{false}; // boolean flag for checking the map integrity
107
108 void set_indexes(void);
109
110public:
111 RDOindex(unsigned int, unsigned int,
112 const RpcIdHelper& helper);
113 RDOindex(unsigned int, unsigned int, const std::string&, int, int, int, int, int,
114 const RpcIdHelper& helper);
115
116 RDOindex(const RDOindex&) = default;
117 ~RDOindex() = default;
118
119 RDOindex& operator=(const RDOindex&) = delete;
120 operator bool() const;
121 bool operator!() const;
122
123 void set_hash(unsigned int h);
124
125 unsigned short int ROBid(void) const { return m_ROBid; }
126 unsigned short int RODid(void) const { return m_RODid; }
127 unsigned short int side(void) const { return m_side; }
128
129 unsigned short int SLid(void) const { return m_SLid; }
130 unsigned short int RXid(void) const { return m_RXid; }
131 unsigned short int PADid(void) const { return m_PADid; }
132
133 unsigned long int lvl1_code(void) const { return m_lvl1_code; }
134
135 int stationName(void) const { return m_stationName; }
136 int stationEta(void) const { return m_stationEta; }
137 int stationPhi(void) const { return m_stationPhi; }
138 int doubletR(void) const { return m_doubletR; }
139 int doubletZ(void) const { return m_doubletZ; }
140 int doubletPhi(void) const { return m_doubletPhi; }
141
142 unsigned int hash(void) const { return m_hash; }
143
144 bool status(void) const { return m_status; }
145
146public:
147 void offline_indexes(int& name, int& eta, int& phi, int& doublet_r, int& doublet_z, int& doublet_phi, int& gas_gap, int& measures_phi,
148 int& strip) const;
149
150 void pad_identifier(Identifier& id) const;
151
152private:
154
155 friend std::ostream& operator<<(std::ostream&, const RDOindex&);
156};
157
158#endif
Scalar eta() const
pseudorapidity method
Scalar phi() const
phi method
Header file for AthHistogramAlgorithm.
unsigned long int m_lvl1_code
Definition RDOindex.h:94
unsigned short int SLid(void) const
Definition RDOindex.h:129
int stationEta(void) const
Definition RDOindex.h:136
int m_stationName
Definition RDOindex.h:97
unsigned short int m_RODid
Definition RDOindex.h:88
void offline_indexes(int &name, int &eta, int &phi, int &doublet_r, int &doublet_z, int &doublet_phi, int &gas_gap, int &measures_phi, int &strip) const
Definition RDOindex.cxx:52
unsigned short int m_side
Definition RDOindex.h:89
int m_stationEta
Definition RDOindex.h:98
RDOindex(unsigned int, unsigned int, const RpcIdHelper &helper)
Definition RDOindex.cxx:11
unsigned int hash(void) const
Definition RDOindex.h:142
unsigned short int ROBid(void) const
Definition RDOindex.h:125
unsigned short int RODid(void) const
Definition RDOindex.h:126
unsigned short int side(void) const
Definition RDOindex.h:127
void pad_identifier(Identifier &id) const
Definition RDOindex.cxx:69
unsigned short int m_RXid
Definition RDOindex.h:91
bool m_status
Definition RDOindex.h:106
bool operator!() const
Definition RDOindex.cxx:47
unsigned short int RXid(void) const
Definition RDOindex.h:130
int doubletR(void) const
Definition RDOindex.h:138
~RDOindex()=default
unsigned long int lvl1_code(void) const
Definition RDOindex.h:133
int doubletPhi(void) const
Definition RDOindex.h:140
unsigned short int m_PADid
Definition RDOindex.h:92
void set_indexes(void)
Definition RDOindex.cxx:34
int m_doubletPhi
Definition RDOindex.h:102
unsigned short int PADid(void) const
Definition RDOindex.h:131
int m_doubletR
Definition RDOindex.h:100
int m_stationPhi
Definition RDOindex.h:99
unsigned short int m_SLid
Definition RDOindex.h:90
int m_doubletZ
Definition RDOindex.h:101
friend std::ostream & operator<<(std::ostream &, const RDOindex &)
Definition RDOindex.cxx:92
unsigned int m_hash
Definition RDOindex.h:104
void set_hash(unsigned int h)
Definition RDOindex.cxx:49
int doubletZ(void) const
Definition RDOindex.h:139
RDOindex & operator=(const RDOindex &)=delete
RDOindex(const RDOindex &)=default
int stationPhi(void) const
Definition RDOindex.h:137
int stationName(void) const
Definition RDOindex.h:135
unsigned short int m_ROBid
Definition RDOindex.h:87
bool status(void) const
Definition RDOindex.h:144
const RpcIdHelper * m_rpcIdHelper
Definition RDOindex.h:153