ATLAS Offline Software
Public Member Functions | Private Attributes | List of all members
Muon::RpcRDO_Decoder Class Reference

#include <RpcRDO_Decoder.h>

Inheritance diagram for Muon::RpcRDO_Decoder:
Collaboration diagram for Muon::RpcRDO_Decoder:

Public Member Functions

 RpcRDO_Decoder (const std::string &type, const std::string &name, const IInterface *parent)
 
 ~RpcRDO_Decoder ()=default
 
virtual StatusCode initialize () override
 
virtual std::vector< std::unique_ptr< RpcDigit > > getDigit (const RpcFiredChannel *fChan, uint16_t &sectorID, uint16_t &padId, uint16_t &cmaId, const RpcCablingCondData *rpcCab) const override
 
virtual std::vector< IdentifiergetOfflineData (const RpcFiredChannel *fChan, uint16_t &sectorID, uint16_t &padId, uint16_t &cmaId, double &time, const RpcCablingCondData *rpcCab) const override
 

Private Attributes

ServiceHandle< Muon::IMuonIdHelperSvcm_idHelperSvc {this, "MuonIdHelperSvc", "Muon::MuonIdHelperSvc/MuonIdHelperSvc"}
 
Gaudi::Property< int > m_bczero { this, "BCZERO", 3, "Nominal BC for RPC readout"}
 

Detailed Description

Definition at line 22 of file RpcRDO_Decoder.h.

Constructor & Destructor Documentation

◆ RpcRDO_Decoder()

Muon::RpcRDO_Decoder::RpcRDO_Decoder ( const std::string &  type,
const std::string &  name,
const IInterface *  parent 
)

Definition at line 11 of file RpcRDO_Decoder.cxx.

11  :
12  base_class(type, name, parent) {}

◆ ~RpcRDO_Decoder()

Muon::RpcRDO_Decoder::~RpcRDO_Decoder ( )
default

Member Function Documentation

◆ getDigit()

std::vector< std::unique_ptr< RpcDigit > > Muon::RpcRDO_Decoder::getDigit ( const RpcFiredChannel fChan,
uint16_t &  sectorID,
uint16_t &  padId,
uint16_t &  cmaId,
const RpcCablingCondData rpcCab 
) const
overridevirtual

Definition at line 20 of file RpcRDO_Decoder.cxx.

21  {
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 }

◆ getOfflineData()

std::vector< Identifier > Muon::RpcRDO_Decoder::getOfflineData ( const RpcFiredChannel fChan,
uint16_t &  sectorID,
uint16_t &  padId,
uint16_t &  cmaId,
double &  time,
const RpcCablingCondData rpcCab 
) const
overridevirtual

Definition at line 48 of file RpcRDO_Decoder.cxx.

49  {
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 }

◆ initialize()

StatusCode Muon::RpcRDO_Decoder::initialize ( )
overridevirtual

Definition at line 14 of file RpcRDO_Decoder.cxx.

14  {
15  ATH_MSG_DEBUG("initialize");
16  ATH_CHECK(m_idHelperSvc.retrieve());
17  return StatusCode::SUCCESS;
18 }

Member Data Documentation

◆ m_bczero

Gaudi::Property<int> Muon::RpcRDO_Decoder::m_bczero { this, "BCZERO", 3, "Nominal BC for RPC readout"}
private

Definition at line 37 of file RpcRDO_Decoder.h.

◆ m_idHelperSvc

ServiceHandle<Muon::IMuonIdHelperSvc> Muon::RpcRDO_Decoder::m_idHelperSvc {this, "MuonIdHelperSvc", "Muon::MuonIdHelperSvc/MuonIdHelperSvc"}
private

Definition at line 36 of file RpcRDO_Decoder.h.


The documentation for this class was generated from the following files:
RpcFiredChannel::ijk
ubit16 ijk() const
Definition: RpcFiredChannel.h:56
RpcFiredChannel::time
ubit16 time() const
Definition: RpcFiredChannel.h:54
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
plotting.yearwise_efficiency.channel
channel
Definition: yearwise_efficiency.py:28
RpcFiredChannel::channel
ubit16 channel() const
Definition: RpcFiredChannel.h:58
TRT::Hit::side
@ side
Definition: HitInfo.h:83
xAOD::uint16_t
setWord1 uint16_t
Definition: eFexEMRoI_v1.cxx:88
Identifier
Definition: DetectorDescription/Identifier/Identifier/Identifier.h:32
ATH_MSG_DEBUG
#define ATH_MSG_DEBUG(x)
Definition: AthMsgStreamMacros.h:29
test_pyathena.parent
parent
Definition: test_pyathena.py:15
ATH_CHECK
#define ATH_CHECK
Definition: AthCheckMacros.h:40
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:192
RpcFiredChannel::bcid
ubit16 bcid() const
Definition: RpcFiredChannel.h:52
CaloSwCorrections.time
def time(flags, cells_name, *args, **kw)
Definition: CaloSwCorrections.py:242
python.CaloScaleNoiseConfig.type
type
Definition: CaloScaleNoiseConfig.py:78
Muon::RpcRDO_Decoder::m_idHelperSvc
ServiceHandle< Muon::IMuonIdHelperSvc > m_idHelperSvc
Definition: RpcRDO_Decoder.h:36
Muon::RpcRDO_Decoder::m_bczero
Gaudi::Property< int > m_bczero
Definition: RpcRDO_Decoder.h:37