ATLAS Offline Software
Loading...
Searching...
No Matches
RDOindex Class Reference

#include <RDOindex.h>

Collaboration diagram for RDOindex:

Public Member Functions

 RDOindex (unsigned int, unsigned int, const RpcIdHelper &helper)
 RDOindex (unsigned int, unsigned int, const std::string &, int, int, int, int, int, const RpcIdHelper &helper)
 RDOindex (const RDOindex &)=default
 ~RDOindex ()=default
RDOindexoperator= (const RDOindex &)=delete
 operator bool () const
bool operator! () const
void set_hash (unsigned int h)
unsigned short int ROBid (void) const
unsigned short int RODid (void) const
unsigned short int side (void) const
unsigned short int SLid (void) const
unsigned short int RXid (void) const
unsigned short int PADid (void) const
unsigned long int lvl1_code (void) const
int stationName (void) const
int stationEta (void) const
int stationPhi (void) const
int doubletR (void) const
int doubletZ (void) const
int doubletPhi (void) const
unsigned int hash (void) const
bool status (void) const
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
void pad_identifier (Identifier &id) const

Private Member Functions

void set_indexes (void)

Private Attributes

unsigned short int m_ROBid {0}
unsigned short int m_RODid {0}
unsigned short int m_side {0}
unsigned short int m_SLid {0}
unsigned short int m_RXid {0}
unsigned short int m_PADid {0}
unsigned long int m_lvl1_code {0}
int m_stationName {0}
int m_stationEta {0}
int m_stationPhi {0}
int m_doubletR {0}
int m_doubletZ {0}
int m_doubletPhi {0}
unsigned int m_hash {0}
bool m_status {false}
const RpcIdHelperm_rpcIdHelper

Friends

std::ostream & operator<< (std::ostream &stream, const RDOindex &rdo)

Detailed Description

Definition at line 85 of file RDOindex.h.

Constructor & Destructor Documentation

◆ RDOindex() [1/3]

RDOindex::RDOindex ( unsigned int PAD,
unsigned int code,
const RpcIdHelper & helper )

Definition at line 11 of file RDOindex.cxx.

13 : m_PADid{static_cast<unsigned short int>(PAD)}, m_lvl1_code{code},
14 m_rpcIdHelper (&helper)
15{
17}
unsigned long int m_lvl1_code
Definition RDOindex.h:94
unsigned short int m_PADid
Definition RDOindex.h:92
void set_indexes(void)
Definition RDOindex.cxx:34
const RpcIdHelper * m_rpcIdHelper
Definition RDOindex.h:153

◆ RDOindex() [2/3]

RDOindex::RDOindex ( unsigned int PAD,
unsigned int code,
const std::string & Name,
int sEta,
int sPhi,
int dR,
int dZ,
int dP,
const RpcIdHelper & helper )

Definition at line 19 of file RDOindex.cxx.

20 :
21 m_PADid(static_cast<unsigned short int>(PAD)),
23 m_stationName {helper.stationNameIndex(Name)},
24 m_stationEta{sEta},
25 m_stationPhi{sPhi},
26 m_doubletR{dR},
27 m_doubletZ{dZ},
28 m_doubletPhi{dP},
29 m_rpcIdHelper (&helper)
30{
32}
JetDumper::Name Name
Definition JetDumper.cxx:19
int m_stationName
Definition RDOindex.h:97
int m_stationEta
Definition RDOindex.h:98
int m_doubletPhi
Definition RDOindex.h:102
int m_doubletR
Definition RDOindex.h:100
int m_stationPhi
Definition RDOindex.h:99
int m_doubletZ
Definition RDOindex.h:101

◆ RDOindex() [3/3]

RDOindex::RDOindex ( const RDOindex & )
default

◆ ~RDOindex()

RDOindex::~RDOindex ( )
default

Member Function Documentation

◆ doubletPhi()

int RDOindex::doubletPhi ( void ) const
inline

Definition at line 140 of file RDOindex.h.

140{ return m_doubletPhi; }

◆ doubletR()

int RDOindex::doubletR ( void ) const
inline

Definition at line 138 of file RDOindex.h.

138{ return m_doubletR; }

◆ doubletZ()

int RDOindex::doubletZ ( void ) const
inline

Definition at line 139 of file RDOindex.h.

139{ return m_doubletZ; }

◆ hash()

unsigned int RDOindex::hash ( void ) const
inline

Definition at line 142 of file RDOindex.h.

142{ return m_hash; }
unsigned int m_hash
Definition RDOindex.h:104

◆ lvl1_code()

unsigned long int RDOindex::lvl1_code ( void ) const
inline

Definition at line 133 of file RDOindex.h.

133{ return m_lvl1_code; }

◆ offline_indexes()

void RDOindex::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 at line 52 of file RDOindex.cxx.

53 {
54 if (m_status) {
55 if (m_stationPhi) {
59 doublet_r = m_doubletR;
60 doublet_z = m_doubletZ;
61 doublet_phi = m_doubletPhi;
62 gas_gap = 1;
63 measures_phi = 0;
64 strip = 1;
65 }
66 }
67}
Scalar eta() const
pseudorapidity method
Scalar phi() const
phi method
bool m_status
Definition RDOindex.h:106

◆ operator bool()

RDOindex::operator bool ( ) const

Definition at line 46 of file RDOindex.cxx.

46{ return m_status; }

◆ operator!()

bool RDOindex::operator! ( ) const

Definition at line 47 of file RDOindex.cxx.

47{ return !m_status; }

◆ operator=()

RDOindex & RDOindex::operator= ( const RDOindex & )
delete

◆ pad_identifier()

void RDOindex::pad_identifier ( Identifier & id) const

Definition at line 69 of file RDOindex.cxx.

69 {
70 if (m_status) {
71 int name = 0;
72 int eta = 0;
73 int phi = 0;
74 int doublet_r = 0;
75 int doublet_z = 0;
76 int doublet_phi = 0;
77
78 if (m_stationPhi) {
82 doublet_r = m_doubletR;
83 doublet_z = m_doubletZ;
84 doublet_phi = m_doubletPhi;
85 }
86
87 id = m_rpcIdHelper->padID(name, eta, phi, doublet_r, doublet_z, doublet_phi);
88 }
89}

◆ PADid()

unsigned short int RDOindex::PADid ( void ) const
inline

Definition at line 131 of file RDOindex.h.

131{ return m_PADid; }

◆ ROBid()

unsigned short int RDOindex::ROBid ( void ) const
inline

Definition at line 125 of file RDOindex.h.

125{ return m_ROBid; }
unsigned short int m_ROBid
Definition RDOindex.h:87

◆ RODid()

unsigned short int RDOindex::RODid ( void ) const
inline

Definition at line 126 of file RDOindex.h.

126{ return m_RODid; }
unsigned short int m_RODid
Definition RDOindex.h:88

◆ RXid()

unsigned short int RDOindex::RXid ( void ) const
inline

Definition at line 130 of file RDOindex.h.

130{ return m_RXid; }
unsigned short int m_RXid
Definition RDOindex.h:91

◆ set_hash()

void RDOindex::set_hash ( unsigned int h)

Definition at line 49 of file RDOindex.cxx.

49{ m_hash = h; }

◆ set_indexes()

void RDOindex::set_indexes ( void )
private

Definition at line 34 of file RDOindex.cxx.

34 {
35 RPCdecoder decode(m_lvl1_code);
36 if (decode) {
37 unsigned int sector = decode.logic_sector();
38 m_RXid = (sector % 32) % 2;
39 m_SLid = sector % 32;
40 m_side = (sector < 32) ? 0x66 : 0x65;
41 m_RODid = (sector % 32) / 2;
42 m_ROBid = (sector % 32) / 2;
43 m_status = true;
44 }
45}
unsigned short int m_side
Definition RDOindex.h:89
unsigned short int m_SLid
Definition RDOindex.h:90
double decode(number_type binnedWeight)
Convert weight from unsigned to double.

◆ side()

unsigned short int RDOindex::side ( void ) const
inline

Definition at line 127 of file RDOindex.h.

127{ return m_side; }

◆ SLid()

unsigned short int RDOindex::SLid ( void ) const
inline

Definition at line 129 of file RDOindex.h.

129{ return m_SLid; }

◆ stationEta()

int RDOindex::stationEta ( void ) const
inline

Definition at line 136 of file RDOindex.h.

136{ return m_stationEta; }

◆ stationName()

int RDOindex::stationName ( void ) const
inline

Definition at line 135 of file RDOindex.h.

135{ return m_stationName; }

◆ stationPhi()

int RDOindex::stationPhi ( void ) const
inline

Definition at line 137 of file RDOindex.h.

137{ return m_stationPhi; }

◆ status()

bool RDOindex::status ( void ) const
inline

Definition at line 144 of file RDOindex.h.

144{ return m_status; }

◆ operator<<

std::ostream & operator<< ( std::ostream & stream,
const RDOindex & rdo )
friend

Definition at line 92 of file RDOindex.cxx.

92 {
93 std::stringstream tmp_stream;
94
95 int name;
96 int eta;
97 int phi;
98 int doublet_r;
99 int doublet_z;
100 int doublet_phi;
101 int gas_gap;
102 int measures_phi;
103 int strip;
104
105 rdo.offline_indexes(name, eta, phi, doublet_r, doublet_z, doublet_phi, gas_gap, measures_phi, strip);
106
107 tmp_stream << "RPC PAD /" << std::hex << std::showbase << rdo.side() << "/" << rdo.SLid() << "/" << rdo.PADid()
108 << " mapped on offline Id /" << std::dec << name << "/" << eta << "/" << phi << "/" << doublet_r << "/" << doublet_z << "/"
109 << doublet_phi << "/" << gas_gap << "/" << measures_phi << "/" << strip << " .... hashId = " << rdo.hash() << std::endl;
110
111 stream << tmp_stream.str();
112
113 return stream;
114}
unsigned short int SLid(void) const
Definition RDOindex.h:129
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 int hash(void) const
Definition RDOindex.h:142
unsigned short int side(void) const
Definition RDOindex.h:127
unsigned short int PADid(void) const
Definition RDOindex.h:131

Member Data Documentation

◆ m_doubletPhi

int RDOindex::m_doubletPhi {0}
private

Definition at line 102 of file RDOindex.h.

102{0}; // DoubletPhi index according to offline Ids

◆ m_doubletR

int RDOindex::m_doubletR {0}
private

Definition at line 100 of file RDOindex.h.

100{0}; // DoubletR index according to offline Ids

◆ m_doubletZ

int RDOindex::m_doubletZ {0}
private

Definition at line 101 of file RDOindex.h.

101{0}; // DoubletZ index according to offline Ids

◆ m_hash

unsigned int RDOindex::m_hash {0}
private

Definition at line 104 of file RDOindex.h.

104{0}; // hash id to be used for allocation into the container

◆ m_lvl1_code

unsigned long int RDOindex::m_lvl1_code {0}
private

Definition at line 94 of file RDOindex.h.

94{0}; // Identification of the first RPC strip

◆ m_PADid

unsigned short int RDOindex::m_PADid {0}
private

Definition at line 92 of file RDOindex.h.

92{0}; // hardware Id for the PAD

◆ m_ROBid

unsigned short int RDOindex::m_ROBid {0}
private

Definition at line 87 of file RDOindex.h.

87{0}; // hardware Id for the ROB

◆ m_RODid

unsigned short int RDOindex::m_RODid {0}
private

Definition at line 88 of file RDOindex.h.

88{0}; // hardware Id for the ROD

◆ m_rpcIdHelper

const RpcIdHelper* RDOindex::m_rpcIdHelper
private

Definition at line 153 of file RDOindex.h.

◆ m_RXid

unsigned short int RDOindex::m_RXid {0}
private

Definition at line 91 of file RDOindex.h.

91{0}; // hardware Id for the Receiver

◆ m_side

unsigned short int RDOindex::m_side {0}
private

Definition at line 89 of file RDOindex.h.

89{0}; // hardware Id for the Sector Logic Side

◆ m_SLid

unsigned short int RDOindex::m_SLid {0}
private

Definition at line 90 of file RDOindex.h.

90{0}; // hardware Id for the Sector Logic

◆ m_stationEta

int RDOindex::m_stationEta {0}
private

Definition at line 98 of file RDOindex.h.

98{0}; // StationEta index according to offline Ids

◆ m_stationName

int RDOindex::m_stationName {0}
private

Definition at line 97 of file RDOindex.h.

97{0}; // StationName index according to offline Ids

◆ m_stationPhi

int RDOindex::m_stationPhi {0}
private

Definition at line 99 of file RDOindex.h.

99{0}; // StationPhi index according to offline Ids

◆ m_status

bool RDOindex::m_status {false}
private

Definition at line 106 of file RDOindex.h.

106{false}; // boolean flag for checking the map integrity

The documentation for this class was generated from the following files: