ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
LArCalorimeter
LArIdentifier
LArIdentifier
LArOnlineID.h
Go to the documentation of this file.
1
/*
2
Copyright (C) 2002-2025 CERN for the benefit of the ATLAS collaboration
3
*/
4
5
#ifndef LARONLINEID_H
6
#define LARONLINEID_H
7
8
#include "
LArIdentifier/LArOnlineID_Base.h
"
9
#include "
AthenaKernel/BaseInfo.h
"
10
#include "string.h"
11
#include <vector>
12
#include <algorithm>
13
14
#include <iostream>
15
16
17
class
IdentifierHash
;
18
class
Range
;
19
20
class
LArOnlineID
:
public
LArOnlineID_Base
21
{
22
public
:
23
24
typedef
Identifier::size_type
size_type
;
25
29
LArOnlineID
();
33
~LArOnlineID
();
34
35
int
initialize_from_dictionary
(
const
IdDictMgr
&)
override
final
;
36
37
bool
isHECchannel
(
const
HWIdentifier
id
)
const
override
final
;
// differs for Main and DT
38
bool
isEMECIW
(
const
HWIdentifier
id
)
const
override
final
;
// differs for Main and DT
39
bool
isEMECOW
(
const
HWIdentifier
id
)
const
override
final
;
// differs for Main and DT
40
bool
isEMECchannel
(
const
HWIdentifier
id
)
const
override
final
;
// differs for Main and DT
41
42
/* Test beam disctionaries */
43
bool
is_H8
(
const
HWIdentifier
channelId)
const
;
44
bool
is_H8crack
(
const
HWIdentifier
channelId)
const
;
45
bool
is_H8low
(
const
HWIdentifier
channelId)
const
;
46
bool
is_H8high
(
const
HWIdentifier
channelId)
const
;
47
bool
is_H6
(
const
HWIdentifier
channelId)
const
;
48
bool
is_H6FT
(
const
HWIdentifier
feedthroughId)
const
;
49
bool
is_H6fcal
(
const
HWIdentifier
id
)
const
;
50
bool
is_H6hec
(
const
HWIdentifier
id
)
const
;
51
bool
is_H6emec
(
const
HWIdentifier
id
)
const
;
52
bool
is_H8onlineOnly
(
const
HWIdentifier
id
)
const
;
53
54
55
56
private
:
57
/*==== */
58
59
// Test of Em EC special / standard
60
bool
isLArCalibOnline
(
const
HWIdentifier
id
)
const
;
61
62
// Check methods
63
int
init_H8Hashes
();
64
int
init_H6Hashes
();
65
};
66
67
68
//using the macro below we can assign an identifier (and a version)
69
//This is required and checked at compile time when you try to record/retrieve
70
CLASS_DEF
(
LArOnlineID
, 158698068 , 1 )
71
SG_BASES
(
LArOnlineID
,
LArOnlineID_Base
);
72
73
/* TEST BEAM dictionaries */
74
75
inline
bool
LArOnlineID
::
is_H8
(
const
HWIdentifier
Id )
const
76
/*=======================================================================*/
77
{
78
return
(
79
m_bec_impl
.unpack(Id)== 0 &&
m_side_impl
.unpack(Id)== 1 &&
80
m_feedthrough_impl
.unpack(Id) < 2
81
);
82
}
83
inline
bool
LArOnlineID::is_H8onlineOnly
(
const
HWIdentifier
Id )
const
84
/*=======================================================================*/
85
{
86
return
(
87
m_bec_impl
.unpack(Id)== 0 &&
m_side_impl
.unpack(Id)==1 &&
88
(
m_feedthrough_impl
.unpack(Id)==0 ||
m_feedthrough_impl
.unpack(Id) == 1 )
89
&&
m_slot_impl
.unpack(Id) == 14 &&
m_channel_in_slot_impl
.unpack(Id) > 63
90
);
91
}
92
inline
bool
LArOnlineID::is_H8crack
(
const
HWIdentifier
Id )
const
93
/*=======================================================================*/
94
{
95
return
(
96
m_bec_impl
.unpack(Id)== 0 &&
m_side_impl
.unpack(Id)==1 &&
97
(
98
(
m_feedthrough_impl
.unpack(Id)==0
99
&& (
m_slot_impl
.unpack(Id) == 1 ||
m_slot_impl
.unpack(Id)== 5 ||
100
m_slot_impl
.unpack(Id) == 6 ||
m_slot_impl
.unpack(Id)== 7 ||
101
m_slot_impl
.unpack(Id) == 9 ||
m_slot_impl
.unpack(Id)== 10||
102
m_slot_impl
.unpack(Id) == 12||
m_slot_impl
.unpack(Id)== 13 )
103
)
104
||
105
(
m_feedthrough_impl
.unpack(Id) ==1
106
&& (
m_slot_impl
.unpack(Id) == 1 ||
m_slot_impl
.unpack(Id)== 5 ||
107
m_slot_impl
.unpack(Id) == 6 ||
m_slot_impl
.unpack(Id)== 7 ||
108
m_slot_impl
.unpack(Id) == 9 ||
m_slot_impl
.unpack(Id)== 10||
109
m_slot_impl
.unpack(Id) == 12 ||
m_slot_impl
.unpack(Id)== 13 )
110
)
111
)
112
);
113
}
114
115
inline
bool
LArOnlineID::is_H8low
(
const
HWIdentifier
Id )
const
116
/*=======================================================================*/
117
{
118
return
(
119
m_bec_impl
.unpack(Id)== 0 &&
m_side_impl
.unpack(Id)==1 &&
120
(
121
(
m_feedthrough_impl
.unpack(Id)==0
122
&& (
m_slot_impl
.unpack(Id) == 1 ||
m_slot_impl
.unpack(Id)== 2 ||
123
m_slot_impl
.unpack(Id) == 3 ||
m_slot_impl
.unpack(Id)== 4 ||
124
m_slot_impl
.unpack(Id) == 5 ||
m_slot_impl
.unpack(Id)== 9 ||
125
m_slot_impl
.unpack(Id) == 11||
m_slot_impl
.unpack(Id)== 12 )
126
)
127
||
128
(
m_feedthrough_impl
.unpack(Id) ==1
129
&& (
m_slot_impl
.unpack(Id) == 1 ||
m_slot_impl
.unpack(Id)== 2 ||
130
m_slot_impl
.unpack(Id) == 3 ||
m_slot_impl
.unpack(Id)== 4 ||
131
m_slot_impl
.unpack(Id) == 5 ||
m_slot_impl
.unpack(Id)== 9 ||
132
m_slot_impl
.unpack(Id) == 11 ||
m_slot_impl
.unpack(Id)== 12 )
133
)
134
)
135
);
136
}
137
138
inline
bool
LArOnlineID::is_H8high
(
const
HWIdentifier
Id )
const
139
/*=======================================================================*/
140
{
141
return
(
142
m_bec_impl
.unpack(Id)== 0 &&
m_side_impl
.unpack(Id)==1 &&
143
(
144
(
m_feedthrough_impl
.unpack(Id) == 0
145
&& (
m_slot_impl
.unpack(Id) == 1 ||
m_slot_impl
.unpack(Id)== 6 ||
146
m_slot_impl
.unpack(Id) == 7 ||
m_slot_impl
.unpack(Id)== 8 ||
147
m_slot_impl
.unpack(Id) == 10 ||
m_slot_impl
.unpack(Id)== 13||
148
m_slot_impl
.unpack(Id) == 14 )
149
)
150
||
151
(
m_feedthrough_impl
.unpack(Id) == 1
152
&& (
m_slot_impl
.unpack(Id) == 1 ||
m_slot_impl
.unpack(Id)== 6 ||
153
m_slot_impl
.unpack(Id) == 7 ||
m_slot_impl
.unpack(Id)== 8 ||
154
m_slot_impl
.unpack(Id) == 10 ||
m_slot_impl
.unpack(Id)== 13||
155
m_slot_impl
.unpack(Id) == 14 )
156
)
157
)
158
);
159
}
160
161
inline
bool
LArOnlineID::is_H6
(
const
HWIdentifier
Id )
const
162
/*=======================================================================*/
163
{
164
return
(
165
m_bec_impl
.unpack(Id)==1 &&
m_side_impl
.unpack(Id)==1 &&
166
(
167
(
m_feedthrough_impl
.unpack(Id) == 0 && (
m_slot_impl
.unpack(Id) == 5 ||
168
m_slot_impl
.unpack(Id) == 7 ||
169
m_slot_impl
.unpack(Id) == 9 ||
170
m_slot_impl
.unpack(Id) == 11 ) )
171
||
172
(
m_feedthrough_impl
.unpack(Id) == 1 && (
m_slot_impl
.unpack(Id) == 3 ||
173
m_slot_impl
.unpack(Id) == 4 ||
174
m_slot_impl
.unpack(Id) == 5 ||
175
m_slot_impl
.unpack(Id) == 6 ) )
176
)
177
);
178
}
179
180
inline
bool
LArOnlineID::is_H6FT
(
const
HWIdentifier
Id )
const
181
/*=======================================================================*/
182
{
183
return
(
184
m_bec_impl
.unpack(Id)==1 &&
m_side_impl
.unpack(Id)==1 &&
185
(
186
m_feedthrough_impl
.unpack(Id) == 0
187
||
188
m_feedthrough_impl
.unpack(Id) == 1
189
)
190
);
191
}
192
inline
bool
LArOnlineID::is_H6fcal
(
const
HWIdentifier
Id )
const
193
/*=======================================================================*/
194
{
195
return
(
196
m_bec_impl
.unpack(Id)==1 &&
m_side_impl
.unpack(Id)==1 &&
197
(
198
m_feedthrough_impl
.unpack(Id) == 1 && (
m_slot_impl
.unpack(Id) == 4 ||
199
m_slot_impl
.unpack(Id) == 5 ||
200
m_slot_impl
.unpack(Id) == 6 )
201
)
202
);
203
}
204
inline
bool
LArOnlineID::is_H6hec
(
const
HWIdentifier
Id )
const
205
/*=======================================================================*/
206
{
207
return
(
208
m_bec_impl
.unpack(Id)==1 &&
m_side_impl
.unpack(Id)==1 &&
209
(
m_feedthrough_impl
.unpack(Id) == 0 && (
m_slot_impl
.unpack(Id) == 5 ||
210
m_slot_impl
.unpack(Id) == 7 ||
211
m_slot_impl
.unpack(Id) == 9 ||
212
m_slot_impl
.unpack(Id) == 11 )
213
)
214
);
215
}
216
inline
bool
LArOnlineID::is_H6emec
(
const
HWIdentifier
Id )
const
217
/*=======================================================================*/
218
{
219
return
(
220
m_bec_impl
.unpack(Id)==1 &&
m_side_impl
.unpack(Id)==1 &&
221
(
222
m_feedthrough_impl
.unpack(Id) == 1 &&
m_slot_impl
.unpack(Id) == 3
223
)
224
);
225
}
226
227
228
229
#endif
// LARONLINE_ID_H
230
231
232
BaseInfo.h
Provide an interface for finding inheritance information at run time.
SG_BASES
#define SG_BASES(D,...)
Declare the base classes from which D derives.
Definition
Control/AthenaKernel/AthenaKernel/BaseInfo.h:224
CLASS_DEF
#define CLASS_DEF(NAME, CID, VERSION)
associate a clid and a version to a type eg
Definition
Control/AthenaKernel/AthenaKernel/CLASS_DEF.h:67
LArOnlineID_Base.h
HWIdentifier
Definition
HWIdentifier.h:13
IdDictMgr
Definition
IdDictMgr.h:17
IdentifierHash
This is a "hash" representation of an Identifier.
Definition
IdentifierHash.h:25
LArOnlineID_Base
Helper for the Liquid Argon Calorimeter cell identifiers.
Definition
LArOnlineID_Base.h:97
LArOnlineID_Base::m_channel_in_slot_impl
IdDictFieldImplementation m_channel_in_slot_impl
Definition
LArOnlineID_Base.h:510
LArOnlineID_Base::LArOnlineID_Base
LArOnlineID_Base(const std::string &name, const std::string &group, bool is_slar)
Default constructor.
Definition
LArOnlineID_Base.cxx:49
LArOnlineID_Base::m_feedthrough_impl
IdDictFieldImplementation m_feedthrough_impl
Definition
LArOnlineID_Base.h:508
LArOnlineID_Base::m_slot_impl
IdDictFieldImplementation m_slot_impl
Definition
LArOnlineID_Base.h:509
LArOnlineID_Base::m_side_impl
IdDictFieldImplementation m_side_impl
Definition
LArOnlineID_Base.h:507
LArOnlineID_Base::m_bec_impl
IdDictFieldImplementation m_bec_impl
Definition
LArOnlineID_Base.h:506
LArOnlineID
Definition
LArOnlineID.h:21
LArOnlineID::is_H6FT
bool is_H6FT(const HWIdentifier feedthroughId) const
Definition
LArOnlineID.h:180
LArOnlineID::is_H8onlineOnly
bool is_H8onlineOnly(const HWIdentifier id) const
Definition
LArOnlineID.h:83
LArOnlineID::~LArOnlineID
~LArOnlineID()
Default destructor.
LArOnlineID::isEMECOW
bool isEMECOW(const HWIdentifier id) const override final
Definition
LArOnlineID.cxx:554
LArOnlineID::is_H6hec
bool is_H6hec(const HWIdentifier id) const
Definition
LArOnlineID.h:204
LArOnlineID::LArOnlineID
LArOnlineID()
Default constructor.
Definition
LArOnlineID.cxx:19
LArOnlineID::is_H8crack
bool is_H8crack(const HWIdentifier channelId) const
Definition
LArOnlineID.h:92
LArOnlineID::isLArCalibOnline
bool isLArCalibOnline(const HWIdentifier id) const
LArOnlineID::isEMECIW
bool isEMECIW(const HWIdentifier id) const override final
Definition
LArOnlineID.cxx:544
LArOnlineID::is_H8high
bool is_H8high(const HWIdentifier channelId) const
Definition
LArOnlineID.h:138
LArOnlineID::init_H6Hashes
int init_H6Hashes()
Definition
LArOnlineID.cxx:407
LArOnlineID::is_H6fcal
bool is_H6fcal(const HWIdentifier id) const
Definition
LArOnlineID.h:192
LArOnlineID::init_H8Hashes
int init_H8Hashes()
Definition
LArOnlineID.cxx:285
LArOnlineID::is_H8
bool is_H8(const HWIdentifier channelId) const
Definition
LArOnlineID.h:75
LArOnlineID::isHECchannel
bool isHECchannel(const HWIdentifier id) const override final
Definition
LArOnlineID.cxx:533
LArOnlineID::size_type
Identifier::size_type size_type
Definition
LArOnlineID.h:24
LArOnlineID::initialize_from_dictionary
int initialize_from_dictionary(const IdDictMgr &) override final
initialization from the identifier dictionary
Definition
LArOnlineID.cxx:28
LArOnlineID::is_H6
bool is_H6(const HWIdentifier channelId) const
Definition
LArOnlineID.h:161
LArOnlineID::isEMECchannel
bool isEMECchannel(const HWIdentifier id) const override final
Definition
LArOnlineID.cxx:573
LArOnlineID::is_H6emec
bool is_H6emec(const HWIdentifier id) const
Definition
LArOnlineID.h:216
LArOnlineID::is_H8low
bool is_H8low(const HWIdentifier channelId) const
Definition
LArOnlineID.h:115
Range
A Range describes the possible ranges for the field values of an ExpandedIdentifier.
Definition
DetectorDescription/Identifier/Identifier/Range.h:31
const
Generated on
for ATLAS Offline Software by
1.17.0