8#include "GaudiKernel/PhysicalConstants.h"
32 for (
const std::string& statName :
m_convStat){
35 return StatusCode::SUCCESS;
44 return StatusCode::FAILURE;
47 if (!cabling.isValid()) {
49 return StatusCode::FAILURE;
55 ATH_CHECK(nrpcRdoData.
record(std::make_unique<xAOD::NRPCRDOContainer>(),
56 std::make_unique<xAOD::NRPCRDOAuxContainer>()));
63 ATH_MSG_DEBUG(
"RPC Digit -> Pad loop :: digitCollection at " << rpcCollection);
68 if (
m_idHelperSvc->rpcIdHelper().get_id(moduleHash, moduleId, &rpcContext)) {
69 ATH_MSG_WARNING(
"Failed to translate the "<<moduleHash<<
" to a valid identifier");
75 <<
" is not considered to be a small gap RPC");
80 for (
const RpcDigit* rpcDigit : *rpcCollection) {
81 const Identifier channelId = rpcDigit->identify();
87 if (!cabling->convert(channelId, translateCache, rpcDigit->
stripSide())) {
89 return StatusCode::FAILURE;
92 if (!cabling->getOnlineId(translateCache, msgStream())) {
93 ATH_MSG_ERROR(
"Offline to Online Id conversion for NRPC chamber.");
94 return StatusCode::FAILURE;
97 const float rdo_time = rpcDigit->time();
99 const float the_timeoverthr = rpcDigit->ToT();
100 uint32_t the_bcid= rdo_time / 25.;
102 xAOD::NRPCRDO* NrpcRdo = nrpcRdoData->push_back(std::make_unique<xAOD::NRPCRDO>());
112 return StatusCode::SUCCESS;
#define ATH_CHECK
Evaluate an expression and check for errors.
#define ATH_MSG_VERBOSE(x)
#define ATH_MSG_WARNING(x)
This class saves the "context" of an expanded identifier (ExpandedIdentifier) for compact or hash ver...
This is a "hash" representation of an Identifier.
virtual StatusCode execute(const EventContext &ctx) const override final
SG::WriteHandleKey< xAOD::NRPCRDOContainer > m_NrpcContainerKey
SG::ReadHandleKey< RpcDigitContainer > m_digitContainerKey
ServiceHandle< IMuonIdHelperSvc > m_idHelperSvc
SG::ReadCondHandleKey< RpcCablingMap > m_cablingKey
std::unordered_set< int > m_selectedStations
virtual StatusCode initialize() override final
Gaudi::Property< std::vector< std::string > > m_convStat
StatusCode record(std::unique_ptr< T > data)
Record a const object to the store.
void setBoardsector(uint16_t Boardsector)
Set the sector of the board within the subdetector.
void setBoard(uint16_t Board)
Set the number of the TDC channel.
void setTimeoverthr(float Timeoverthr)
Set the time over threshold.
void setSubdetector(uint16_t SubDet)
Set the sub detector.
void setChannel(uint16_t Channel)
Set the fire channel number.
void setTime(float Time)
Set the trigger time [ns].
void setBcid(uint32_t Bcid)
Set the bunch crossing identifier.
NRpcCablingAlg reads raw condition data and writes derived condition data to the condition store.
NRPCRDO_v1 NRPCRDO
Define the version of the NRPC RDO class.
Helper struct that is parsed to the cabling map to translate between the offline & online Identifiers...
uint8_t channelId
Online board channel number.
bool stripSide() const
: Is the strip readout on the opposite side
int16_t & board
Unique identifier of the tdc chip.
int16_t & boardSector
Unique Identifier of the Rpc chamber from an online perspective.
int16_t & subDetector
Identifier of the subdetector region in the readout BA / BC etc.