|
ATLAS Offline Software
|
Go to the documentation of this file.
11 #include "GaudiKernel/PhysicalConstants.h"
19 constexpr
unsigned int rpcRawHitWordLength = 7;
43 return StatusCode::FAILURE;
52 for (
const std::string& statName :
m_exclStat) {
58 ATH_MSG_ERROR(
"Readout of more than 8 BCs is not supported by the simulation");
59 return StatusCode::FAILURE;
62 return StatusCode::SUCCESS;
72 ATH_CHECK(padContainer.
record((std::make_unique<RpcPadContainer>(600))));
73 ATH_MSG_DEBUG(
"Recorded RpcPadContainer called " << padContainer.
name() <<
" in store " << padContainer.
store());
92 unsigned long int debug;
99 ATH_MSG_DEBUG(
"CMApatterns created from RPC digits:" << std::endl
112 std::vector<RpcPad*> rpcpads;
116 for (
auto& padro : padReadout) {
119 rpcpads.push_back(newpad);
121 ATH_MSG_DEBUG(
"Total number of pads in this event is " << rpcpads.size());
123 for (
const auto& pad : rpcpads) {
124 const int elementHash1 = pad->identifyHash();
130 return StatusCode::SUCCESS;
134 std::string space =
" ";
142 ATH_MSG_ERROR(
"Could not find RpcDigitContainer called " << container.
name() <<
" in store " << container.
store());
143 return StatusCode::SUCCESS;
145 ATH_MSG_DEBUG(
"Found RpcDigitContainer called " << container.
name() <<
" in store " << container.
store());
147 if (!muonDetMgr.isValid()) {
148 ATH_MSG_FATAL(
"Failed to retrieve the readout geometry "<<muonDetMgr.fullKey());
149 return StatusCode::FAILURE;
152 ATH_MSG_DEBUG(
"RPC Digit -> Pad loop :: digitCollection at " << rpcCollection);
156 if (
m_idHelperSvc->rpcIdHelper().get_id(moduleHash, moduleId, &rpcContext)) {
158 return StatusCode::FAILURE;
165 for (
const RpcDigit* rpcDigit : *rpcCollection) {
168 std::string StationName =
m_idHelperSvc->rpcIdHelper().stationNameString(stationType);
179 ATH_MSG_DEBUG(
"RPC Digit Type, Eta, Phi, dbR, dbZ, dbP, gg, mPhi, Strip "
180 << stationType <<
" " << StationEta <<
" " << StationPhi <<
" " << DoubletR <<
" " << DoubletZ <<
" "
181 << DoubletP <<
" " << GasGap <<
" " << MeasuresPhi <<
" " << Strip);
188 unsigned long int strip_code_cab = readCdo->
strip_code_fromOffId(StationName, StationEta, StationPhi, DoubletR,
189 DoubletZ, DoubletP, GasGap, MeasuresPhi, Strip);
191 ATH_MSG_DEBUG(
"From RPC Cabling Layout, strip_code = " << strip_code_cab);
193 if (strip_code_cab) {
196 double tp =
pos.mag() * inverseSpeedOfLight;
203 int param[3] = {0, 0, 0};
205 ATH_MSG_DEBUG(
"Digit with strip_code = " << strip_code_cab <<
" passed to RDO/LVL1 Simulation (RPCsimuDigit)");
211 return StatusCode::SUCCESS;
223 std::string cablingType =
"MuonRPC_Cabling";
224 StatusCode sc = tagInfoMgr->addTag(
"RPC_CablingType", cablingType);
225 if (
sc.isFailure()) {
226 ATH_MSG_WARNING(
"RPC_CablingType " << cablingType <<
" not added to TagInfo ");
229 ATH_MSG_DEBUG(
"RPC_CablingType " << cablingType <<
" is Added TagInfo ");
232 return StatusCode::SUCCESS;
247 int measures_phi = 0;
253 int sector = pad.
sector();
254 int pad_id = pad.
PAD();
256 int side = (sector < 32) ? 0 : 1;
257 int logic_sector = sector % 32;
259 int key =
side * 10000 + logic_sector * 100 + pad_id;
261 ATH_MSG_DEBUG(
"Pad: Side " <<
side <<
" Sector logic" << logic_sector <<
" Id " << pad_id);
267 index.offline_indexes(
name,
eta,
phi, doublet_r, doublet_z, doublet_phi, gas_gap, measures_phi,
strip);
276 ATH_MSG_DEBUG(
"Doublet r " << doublet_r <<
" Doublet_z " << doublet_z <<
" Doublet_phi " << doublet_phi);
277 ATH_MSG_DEBUG(
"Gas gap " << gas_gap <<
" Measures_phi " << measures_phi <<
" Strip " <<
strip);
283 if(!pad_header.
isHeader()) std::abort();
284 if(!pad_footer.
isFooter()) std::abort();
286 unsigned int hashId =
index.hash();
287 unsigned int onlineId = pad_id;
289 unsigned int errorCode = pad_footer.
errorCode();
316 if(!matrix_header.
isHeader()) std::abort();
318 if(!matrix_footer.
isFooter()) std::abort();
326 for (
int j = 0; j <
matrix->numberOfBodyWords(); ++j) {
327 cm_hit =
matrix->getCMAHit(j);
328 if(!cm_hit.
isBody()) std::abort();
331 if (cm_hit.
ijk() < rpcRawHitWordLength) {
333 }
else if (cm_hit.
ijk() == rpcRawHitWordLength) {
IntegerProperty m_sl_rostruct_debug
char data[hepevt_bytes_allocation_ATLAS]
StatusCode fill_RPCdata(RPCsimuData &data, const EventContext &ctx, const RpcCablingCondData *) const
Scalar phi() const
phi method
virtual StatusCode addCollection(const T *coll, IdentifierHash hashId) override final
insert collection into container with id hash if IDC should not take ownership of collection,...
Scalar eta() const
pseudorapidity method
std::vector< std::string > patterns
const std::string & name() const
Return the StoreGate ID for the referenced object.
IntegerProperty m_pad_ro_debug
IntegerProperty m_rx_rostruct_debug
SG::WriteHandleKey< RpcPadContainer > m_padContainerKey
Gaudi::Property< int > m_bczero
SG::ReadCondHandleKey< RpcCablingCondData > m_readKey
Athena::TPCnvVers::Old Athena::TPCnvVers::Current Athena::TPCnvVers::Old Athena::TPCnvVers::Current Athena::TPCnvVers::Old Athena::TPCnvVers::Current Athena::TPCnvVers::Current Athena::TPCnvVers::Current RpcPad
An RpcReadoutElement corresponds to a single RPC module; therefore typicaly a barrel muon station con...
#define ATH_MSG_VERBOSE(x)
PadReadOutStructure getFooter()
IntegerProperty m_pad_rostruct_debug
std::map< int, PADreadout, std::less< int > > PAD_Readout
An algorithm that can be simultaneously executed in multiple threads.
BooleanProperty m_detailed_algo
const PAD_Readout & pad_readout(void) const
virtual StatusCode execute(const EventContext &ctx) const override final
IntegerProperty m_cma_rostruct_debug
::StatusCode StatusCode
StatusCode definition for legacy code.
std::string store() const
Return the name of the store holding the object we are proxying.
RpcDigitToRpcRDO(const std::string &name, ISvcLocator *pSvcLocator)
std::map< int, RDOindex, std::less< int > > RDOmap
IntegerProperty m_rx_ro_debug
StatusCode initialize(bool used=true)
If this object is used as a property, then this should be called during the initialize phase.
RpcPad * decodePad(PADreadout &pad, const RpcCablingCondData *readCdo) const
virtual bool isValid() override final
Can the handle be successfully dereferenced?
MatrixReadOut * matrices_readout(int) const
virtual StatusCode initialize() override final
Amg::Vector3D stripPos(const Identifier &id) const
IntegerProperty m_cma_debug
Gaudi::Property< int > m_nobxs
value_type push_back(value_type pElem)
Add an element to the end of the collection.
StatusCode initialize(bool used=true)
Eigen::Matrix< double, 3, 1 > Vector3D
SG::ReadCondHandleKey< MuonGM::MuonDetectorManager > m_DetectorManagerKey
unsigned long int strip_code_fromOffId(const std::string &stationName, int stationEta, int stationPhi, int doubletR, int doubletZ, int doubletPhi, int gasGap, int measuresPhi, int strip) const
IntegerProperty m_fast_debug
Athena::TPCnvVers::Old Athena::TPCnvVers::Current Athena::TPCnvVers::Old Athena::TPCnvVers::Current Athena::TPCnvVers::Old Athena::TPCnvVers::Current Athena::TPCnvVers::Current RpcCoinMatrix
RpcCoinMatrix * decodeMatrix(MatrixReadOut *matrix, Identifier &id) const
ubit16 numberOfCMROFragments()
StatusCode record(std::unique_ptr< T > data)
Record a const object to the store.
#define ATH_MSG_WARNING(x)
PadReadOutStructure getHeader()
IntegerProperty m_sl_ro_debug
BooleanProperty m_patch_for_rpc_time
ServiceHandle< Muon::IMuonIdHelperSvc > m_idHelperSvc
SG::ReadHandleKey< RpcDigitContainer > m_digitContainerKey
std::set< int > m_exclStatNames
This is a "hash" representation of an Identifier. This encodes a 32 bit index which can be used to lo...
StringProperty m_bytestream_file
Gaudi::Property< std::vector< std::string > > m_exclStat
IntegerProperty m_cma_ro_debug
StatusCode fillTagInfo() const
This class saves the "context" of an expanded identifier (ExpandedIdentifier) for compact or hash ver...
size_type size() const noexcept
Returns the number of elements in the collection.
BooleanProperty m_data_detail
PadReadOut * give_pad_readout(void)
const RDOmap & give_RDOs(void) const