ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
MuonSpectrometer
MuonCnv
MuonRPC_CnvTools
src
RpcRDO_Decoder.cxx
Go to the documentation of this file.
1
/*
2
Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
3
*/
4
5
#include "
RpcRDO_Decoder.h
"
6
#include "
RPC_CondCabling/RpcCablingCondData.h
"
7
#include "
MuonDigitContainer/RpcDigit.h
"
8
#include "
MuonRDO/RpcFiredChannel.h
"
9
#include "
MuonReadoutGeometry/RpcReadoutElement.h
"
10
11
Muon::RpcRDO_Decoder::RpcRDO_Decoder
(
const
std::string&
type
,
const
std::string& name,
const
IInterface* parent) :
12
base_class(
type
, name, parent) {}
13
14
StatusCode
Muon::RpcRDO_Decoder::initialize
() {
15
ATH_MSG_DEBUG
(
"initialize"
);
16
ATH_CHECK
(
m_idHelperSvc
.retrieve());
17
return
StatusCode::SUCCESS;
18
}
19
20
std::vector<std::unique_ptr<RpcDigit>>
Muon::RpcRDO_Decoder::getDigit
(
const
RpcFiredChannel
* fChan, uint16_t& sectorID, uint16_t& padId, uint16_t& cmaId,
21
const
RpcCablingCondData
* rpcCab)
const
{
22
std::vector<std::unique_ptr<RpcDigit>> rpcDigitVec{};
23
24
uint16_t side = (sectorID < 32) ? 0 : 1;
25
uint16_t slogic = sectorID - side * 32;
26
uint16_t ijk = fChan->
ijk
();
27
uint16_t channel = fChan->
channel
();
28
29
float
time = (fChan->
bcid
() -
m_bczero
) * 25 + (fChan->
time
() + 0.5 - 2) * 3.125;
30
31
// skip the trigger hits
32
if
(ijk == 7) {
return
rpcDigitVec; }
33
34
// Get the list of offline channels corresponding to the
35
// online identifier
36
std::list<Identifier> idList = rpcCab->
give_strip_id
(side, slogic, padId, cmaId, ijk, channel, &
m_idHelperSvc
->rpcIdHelper());
37
38
rpcDigitVec.reserve(idList.size());
39
for
(
const
Identifier
& stripOfflineId: idList) {
40
// and add the digit to the collection
41
std::unique_ptr<RpcDigit> rpcDigit = std::make_unique<RpcDigit>(stripOfflineId, time, -1.,
false
);
42
rpcDigitVec.push_back(std::move(rpcDigit));
43
}
44
45
return
rpcDigitVec;
46
}
47
48
std::vector<Identifier>
Muon::RpcRDO_Decoder::getOfflineData
(
const
RpcFiredChannel
* fChan, uint16_t& sectorID, uint16_t& padId,
49
uint16_t& cmaId,
double
& time,
const
RpcCablingCondData
* rpcCab)
const
{
50
std::vector<Identifier> rpcIdVec{};
51
52
uint16_t side = (sectorID < 32) ? 0 : 1;
53
uint16_t slogic = sectorID - side * 32;
54
uint16_t ijk = fChan->
ijk
();
55
uint16_t channel = fChan->
channel
();
56
57
time = (fChan->
bcid
() -
m_bczero
) * 25 + (fChan->
time
() + 0.5 - 2) * 3.125;
58
59
// skip the trigger hits
60
if
(ijk == 7) {
return
rpcIdVec; }
61
62
// Get the list of offline channels corresponding to the
63
// online identifier
64
std::list<Identifier> idList = rpcCab->
give_strip_id
(side, slogic, padId, cmaId, ijk, channel, &
m_idHelperSvc
->rpcIdHelper());
65
66
rpcIdVec.assign(idList.begin(), idList.end());
67
68
return
rpcIdVec;
69
}
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
RpcReadoutElement.h
RpcCablingCondData.h
RpcDigit.h
RpcFiredChannel.h
RpcRDO_Decoder.h
Muon::RpcRDO_Decoder::m_idHelperSvc
ServiceHandle< Muon::IMuonIdHelperSvc > m_idHelperSvc
Definition
RpcRDO_Decoder.h:43
Muon::RpcRDO_Decoder::getDigit
virtual std::vector< std::unique_ptr< RpcDigit > > getDigit(const RpcFiredChannel *fChan, uint16_t §orID, uint16_t &padId, uint16_t &cmaId, const RpcCablingCondData *rpcCab) const override
Definition
RpcRDO_Decoder.cxx:20
Muon::RpcRDO_Decoder::RpcRDO_Decoder
RpcRDO_Decoder(const std::string &type, const std::string &name, const IInterface *parent)
Definition
RpcRDO_Decoder.cxx:11
Muon::RpcRDO_Decoder::initialize
virtual StatusCode initialize() override
Definition
RpcRDO_Decoder.cxx:14
Muon::RpcRDO_Decoder::getOfflineData
virtual std::vector< Identifier > getOfflineData(const RpcFiredChannel *fChan, uint16_t §orID, uint16_t &padId, uint16_t &cmaId, double &time, const RpcCablingCondData *rpcCab) const override
Definition
RpcRDO_Decoder.cxx:48
Muon::RpcRDO_Decoder::m_bczero
Gaudi::Property< int > m_bczero
Definition
RpcRDO_Decoder.h:44
RpcCablingCondData
Definition
RpcCablingCondData.h:23
RpcCablingCondData::give_strip_id
std::list< Identifier > give_strip_id(unsigned short int SubsystemId, unsigned short int SectorId, unsigned short int PADId, unsigned short int CMAId, unsigned short ijk, unsigned short int Channel, const RpcIdHelper *rpcId) const
Definition
RpcCablingCondData.cxx:269
RpcFiredChannel
Definition
RpcFiredChannel.h:20
RpcFiredChannel::bcid
ubit16 bcid() const
Definition
RpcFiredChannel.h:52
RpcFiredChannel::channel
ubit16 channel() const
Definition
RpcFiredChannel.h:58
RpcFiredChannel::ijk
ubit16 ijk() const
Definition
RpcFiredChannel.h:56
RpcFiredChannel::time
ubit16 time() const
Definition
RpcFiredChannel.h:54
Identifier
Definition
IdentifierFieldParser.cxx:14
type
Generated on
for ATLAS Offline Software by
1.17.0