ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
Trigger
TrigT1
TrigT1TGC
src
TGCBIS78.cxx
Go to the documentation of this file.
1
/*
2
Copyright (C) 2002-2025 CERN for the benefit of the ATLAS collaboration
3
*/
4
5
#include "
TrigT1TGC/TGCBIS78.h
"
6
#include "
TrigT1TGC/BIS78TrigOut.h
"
7
8
#include "
AthenaBaseComps/AthCheckMacros.h
"
9
10
11
namespace
LVL1TGC
{
12
13
TGCBIS78::TGCBIS78
()
14
:
AthMessaging
(
"LVL1TGC::TGCBIS78"
) {
15
for
(
int
PadBoard=0; PadBoard <
kNPadBoards
; PadBoard++) {
16
m_buffer
[PadBoard] = std::make_shared<BIS78TrigOut>(std::vector<int>{PadBoard});
17
}
18
}
19
20
21
StatusCode
TGCBIS78::retrieve
(
const
SG::ReadHandleKey<Muon::RpcBis78_TrigRawDataContainer>
& key,
22
const
EventContext& ctx) {
23
ATH_MSG_DEBUG
(
"retrieve"
);
24
25
this->
eraseOutput
();
26
27
//The following part will be available when RPC BIS78 Trigger Output is available.
28
SG::ReadHandle<Muon::RpcBis78_TrigRawDataContainer>
readBIS78_TrigRawDataContainer(key, ctx);
29
ATH_CHECK
( readBIS78_TrigRawDataContainer.
isValid
() );
30
31
for
(
const
Muon::RpcBis78_TrigRawData
* bis78_sector : *readBIS78_TrigRawDataContainer){
32
if
( bis78_sector->sideId() != 1 )
continue
;
// BIS78 is only in A side!
33
for
(
const
Muon::RpcBis78_TrigRawDataSegment
* bis78_hit : *bis78_sector){
34
this->
setOutput
(bis78_sector->sectorId(),
35
bis78_hit->etaIndex(),
// Eta-index
36
bis78_hit->phiIndex(),
// Phi-index
37
bis78_hit->deltaEta(),
// Delta eta
38
bis78_hit->deltaPhi(),
// Delta phi
39
bis78_hit->flag3over3Eta(),
//
40
bis78_hit->flag3over3Phi() );
41
}
42
}
43
44
return
StatusCode::SUCCESS;
45
}
46
47
48
std::shared_ptr<const BIS78TrigOut>
TGCBIS78::getOutput
(
int
TGC_TriggerSector)
const
49
{
50
auto
trigBIS78_output = std::make_shared<BIS78TrigOut>();
51
if
( TGC_TriggerSector<0 || TGC_TriggerSector>47 )
return
0;
52
int
BIS78_TriggerSect = (TGC_TriggerSector - 2)/6;
53
if
(TGC_TriggerSector < 2) BIS78_TriggerSect=7;
54
if
(BIS78_TriggerSect>=0 && BIS78_TriggerSect<=7){
55
*trigBIS78_output+=*
m_buffer
[BIS78_TriggerSect];
56
}
57
58
return
trigBIS78_output;
59
}
60
61
void
TGCBIS78::setOutput
(
unsigned
int
BIS78PadBoard, uint8_t BIS78eta_6bit, uint8_t BIS78phi_6bit, uint8_t BIS78Deta_3bit, uint8_t BIS78Dphi_3bit, uint8_t BIS78flag3over3eta_1bit, uint8_t BIS78flag3over3phi_1bit) {
62
63
if
(BIS78PadBoard >=
kNPadBoards
)
return
;
64
m_buffer
[BIS78PadBoard]->setBIS78PadBoard(BIS78PadBoard);
65
m_buffer
[BIS78PadBoard]->setEta(BIS78eta_6bit);
66
m_buffer
[BIS78PadBoard]->setPhi(BIS78phi_6bit);
67
m_buffer
[BIS78PadBoard]->setDeta(BIS78Deta_3bit);
68
m_buffer
[BIS78PadBoard]->setDphi(BIS78Dphi_3bit);
69
m_buffer
[BIS78PadBoard]->setflag3over3eta(BIS78flag3over3eta_1bit);
70
m_buffer
[BIS78PadBoard]->setflag3over3phi(BIS78flag3over3phi_1bit);
71
}
72
73
74
void
TGCBIS78::eraseOutput
()
75
{
76
for
(
size_t
idx=0; idx <
kNPadBoards
; idx++){
77
m_buffer
[idx]->clear();
78
}
79
}
80
81
void
TGCBIS78::print
()
const
82
{
83
for
(
size_t
idx=0; idx <
kNPadBoards
; idx++){
84
m_buffer
[idx]->print();
85
}
86
}
87
88
89
}
// end of namespace
AthCheckMacros.h
ATH_CHECK
#define ATH_CHECK
Evaluate an expression and check for errors.
Definition
AthCheckMacros.h:40
ATH_MSG_DEBUG
#define ATH_MSG_DEBUG(x)
Definition
AthMsgStreamMacros.h:29
BIS78TrigOut.h
TGCBIS78.h
AthMessaging::AthMessaging
AthMessaging(IMessageSvc *msgSvc, const std::string &name)
Constructor.
Definition
AthMessaging.cxx:13
LVL1TGC::TGCBIS78::print
void print() const
Definition
TGCBIS78.cxx:81
LVL1TGC::TGCBIS78::kNPadBoards
static constexpr int kNPadBoards
Definition
TGCBIS78.h:41
LVL1TGC::TGCBIS78::getOutput
std::shared_ptr< const BIS78TrigOut > getOutput(int TGC_TriggerSector) const
Definition
TGCBIS78.cxx:48
LVL1TGC::TGCBIS78::m_buffer
std::shared_ptr< BIS78TrigOut > m_buffer[kNPadBoards]
Definition
TGCBIS78.h:44
LVL1TGC::TGCBIS78::setOutput
void setOutput(unsigned int BIS78PadBoard, uint8_t BIS78eta_6bit, uint8_t BIS78phi_6bit, uint8_t BIS78Deta_3bit, uint8_t BIS78Dphi_3bit, uint8_t BIS78flag3over3eta_1bit, uint8_t BIS78flag3over3phi_1bit)
Definition
TGCBIS78.cxx:61
LVL1TGC::TGCBIS78::TGCBIS78
TGCBIS78()
Definition
TGCBIS78.cxx:13
LVL1TGC::TGCBIS78::eraseOutput
void eraseOutput()
Definition
TGCBIS78.cxx:74
LVL1TGC::TGCBIS78::retrieve
StatusCode retrieve(const SG::ReadHandleKey< Muon::RpcBis78_TrigRawDataContainer > &key, const EventContext &ctx)
Definition
TGCBIS78.cxx:21
Muon::RpcBis78_TrigRawDataSegment
Definition
RpcBis78_TrigRawDataSegment.h:21
Muon::RpcBis78_TrigRawData
Definition
RpcBis78_TrigRawData.h:22
SG::ReadHandleKey
Property holding a SG store/key/clid from which a ReadHandle is made.
Definition
StoreGate/StoreGate/ReadHandleKey.h:40
SG::ReadHandle
Definition
StoreGate/StoreGate/ReadHandle.h:67
SG::ReadHandle::isValid
virtual bool isValid() override final
Can the handle be successfully dereferenced?
LVL1TGC
Definition
BigWheelCoincidenceLUT.cxx:20
Generated on
for ATLAS Offline Software by
1.17.0