ATLAS Offline Software
RpcRdoToPrepDataToolMT.cxx
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
3 */
4 
6 
7 #include "GaudiKernel/ThreadLocalContext.h"
13 #include "TrkSurfaces/Surface.h"
16 #include "GeoModelKernel/throwExcept.h"
17 using namespace MuonGM;
18 using namespace Trk;
19 namespace Muon{
22  m_idHelperSvc{idHelperSvc} {
23  const IdentifierHash hashMax = m_idHelperSvc->rpcIdHelper().module_hash_max();
24  rpcPrepDataCollections.resize(hashMax);
25  rpcCoinDataCollections.resize(hashMax);
26 }
28 
29  const IdentifierHash rpdModHash = m_idHelperSvc->moduleHash(chanId);
30  std::unique_ptr<RpcPrepDataCollection>& coll = rpcPrepDataCollections[rpdModHash];
31  if (!coll) {
32  coll = std::make_unique<RpcPrepDataCollection>(rpdModHash);
33  coll->setIdentifier(m_idHelperSvc->chamberId(chanId));
34  }
35  return coll.get();
36 }
38  const IdentifierHash rpdModHash = m_idHelperSvc->moduleHash(chanId);
39  std::unique_ptr<RpcCoinDataCollection>& coll = rpcCoinDataCollections[rpdModHash];
40  if (!coll) {
41  coll = std::make_unique<RpcCoinDataCollection>(rpdModHash);
42  coll->setIdentifier(m_idHelperSvc->chamberId(chanId));
43  }
44  return coll.get();
45 }
46 
49  const std::string& name,
50  const IInterface* parent)
51  : base_class(type, name, parent) {}
52 
53 //___________________________________________________________________________
55  // perform necessary one-off initialization
56 
57  ATH_MSG_INFO("properties are ");
58  ATH_MSG_INFO("produceRpcCoinDatafromTriggerWords " << m_producePRDfromTriggerWords);
59  ATH_MSG_INFO("reduceCablingOverlap " << m_reduceCablingOverlap);
60  ATH_MSG_INFO("solvePhiAmbiguities " << m_solvePhiAmbiguities);
61  ATH_MSG_INFO("timeShift " << m_timeShift);
64  "Inconsistent setting of properties (solvePhiAmbiguities entails "
65  "reduceCablingOverlap)");
66  ATH_MSG_WARNING("Resetting reduceCablingOverlap to true");
68  }
69  ATH_MSG_INFO("etaphi_coincidenceTime "
71  ATH_MSG_INFO("overlap_timeTolerance "
73  ATH_MSG_INFO("Correct prd time from cool db " << m_RPCInfoFromDb);
74  ATH_CHECK(m_rpcRdoDecoderTool.retrieve());
75  ATH_CHECK(m_idHelperSvc.retrieve());
80  ATH_CHECK(m_nRpcCablingKey.initialize(!m_rdoNrpcContainerKey.empty()));
81  // If we don't configure the NRPC RDO
82  // key, the cabling is needed either.
89  ATH_CHECK(m_xAODKey.initialize(!m_xAODKey.empty()));
90  return StatusCode::SUCCESS;
91 }
93  const EventContext& ctx, State& state) const {
94  if (!m_prdContainerCacheKey.key().empty()) {
96  ctx};
97  if (!update.isValid()) {
98  ATH_MSG_FATAL("Invalid UpdateHandle " << m_prdContainerCacheKey.key());
99  return StatusCode::FAILURE;
100  }
101  state.prepDataCont =
102  std::make_unique<RpcPrepDataContainer>(update.ptr());
103  for (const RpcPrepDataCollection* coll : *state.prepDataCont) {
104  state.m_decodedOfflineHashIds.insert(coll->identifyHash());
105  }
106  } else
107  state.prepDataCont = std::make_unique<RpcPrepDataContainer>(
108  m_idHelperSvc->rpcIdHelper().module_hash_max());
109 
110  if (m_coindataContainerCacheKey.key().empty()) {
111  // without the cache we just record the container
112  state.coinDataCont = std::make_unique<RpcCoinDataContainer>(
113  m_idHelperSvc->rpcIdHelper().module_hash_max());
114  } else {
115  // use the cache to get the container
118  if (!update.isValid()) {
119  ATH_MSG_FATAL("Invalid UpdateHandle "
120  << m_coindataContainerCacheKey.key());
121  return StatusCode::FAILURE;
122  }
123  state.coinDataCont =
124  std::make_unique<RpcCoinDataContainer>(update.ptr());
125  for (const RpcCoinDataCollection* coll : *state.coinDataCont) {
126  state.m_decodedOfflineHashIds.insert(coll->identifyHash());
127  }
128  }
129 
130  return StatusCode::SUCCESS;
131 }
135  const std::vector<IdentifierHash>& idVect) const {
136  ATH_MSG_DEBUG("Calling Core decode function from MT decode function (hash vector)");
137  State state{m_idHelperSvc.get()};
138  ATH_CHECK(loadProcessedChambers(ctx, state));
139 
140  ATH_CHECK(decodeImpl(ctx, state, idVect, true));
141  ATH_CHECK(processNrpcRdo(ctx, state));
142  ATH_MSG_DEBUG("Core decode processed in MT decode (hash vector)");
143 
146 
147  return StatusCode::SUCCESS;
148 }
149 
153  const std::vector<uint32_t>& robIds) const {
155  "Calling Core decode function from MT decode function (ROB vector)");
156  State state{m_idHelperSvc.get()};
157  ATH_CHECK(loadProcessedChambers(ctx, state));
158 
159  ATH_CHECK(decodeImpl(ctx, state, robIds, true));
160  ATH_CHECK(processNrpcRdo(ctx, state));
161  ATH_MSG_DEBUG("Core decode processed in MT decode (ROB vector)");
162 
165 
166  return StatusCode::SUCCESS;
167 }
169  State state{m_idHelperSvc.get()};
170  ATH_CHECK(loadProcessedChambers(ctx, state));
173  return StatusCode::SUCCESS;
174 }
175 
177 
179  if (!m_xAODKey.empty()) {
180  writeHandleXAOD = SG::WriteHandle{m_xAODKey, ctx};
181  ATH_CHECK(writeHandleXAOD.record(std::make_unique<xAOD::RpcStripContainer>(),
182  std::make_unique<xAOD::RpcStripAuxContainer>()));
183  }
184  const RpcIdHelper& idHelper{m_idHelperSvc->rpcIdHelper()};
185  for (std::unique_ptr<RpcPrepDataCollection>& collection : state.rpcPrepDataCollections) {
186  if (!collection || collection->empty()) {
187  continue;
188  }
189  if (!m_xAODKey.empty()) {
192  std::vector<const RpcPrepData*> sortMe{collection->begin(), collection->end()};
193  std::ranges::sort(sortMe, IdentifierByDetElSorter{m_idHelperSvc.get()});
194  for (const RpcPrepData* prd : sortMe) {
195  const Identifier id = prd->identify();
196  xAOD::RpcStrip* strip = writeHandleXAOD->push_back(std::make_unique<xAOD::RpcStrip>());
197  strip->setDoubletPhi(idHelper.doubletPhi(id));
198  strip->setGasGap(idHelper.gasGap(id));
199  strip->setMeasuresPhi(idHelper.measuresPhi(id));
200  strip->setStripNumber(idHelper.channel(id));
201  strip->setAmbiguityFlag(prd->ambiguityFlag());
202  strip->setTimeOverThreshold(prd->timeOverThreshold());
203  strip->setTime(prd->time());
204  strip->setTimeCovariance(std::pow(m_stripTimeResolution, 2));
205  strip->setTriggerInfo(prd->triggerInfo());
206  xAOD::MeasVector<1> locPos{prd->localPosition().x()};
207  xAOD::MeasMatrix<1> locCov{prd->localCovariance()(0,0)};
208  strip->setMeasurement(m_idHelperSvc->detElementHash(id), std::move(locPos), std::move(locCov));
209  }
210  }
211 
212  const IdentifierHash hash = collection->identifyHash();
213  // If not present, get a write lock for the hash and move collection
214  RpcPrepDataContainer::IDC_WriteHandle lock = state.prepDataCont->getWriteHandle(hash);
215  if (lock.alreadyPresent()) {
216  ATH_MSG_DEBUG("RpcPrepDataCollection already contained in IDC "
217  << m_idHelperSvc->toString(collection->identify()));
218  continue;
219  }
220  ATH_CHECK(lock.addOrDelete(std::move(collection)));
221  ATH_MSG_DEBUG("PRD hash " << hash << " has been moved to cache container");
222  }
223  state.rpcPrepDataCollections.clear();
224 
225  if (msgLvl(MSG::DEBUG)) {
226  for (const auto& [hash, ptr] : state.prepDataCont->GetAllHashPtrPair()) {
227  ATH_MSG_DEBUG("Contents of CONTAINER in this view : " << hash);
228  }
229  }
231  ATH_CHECK(rpcPRDHandle.record(std::move(state.prepDataCont)));
232  ATH_MSG_DEBUG("Created container " << m_rpcPrepDataContainerKey.key());
233 
234  return StatusCode::SUCCESS;
235 }
236 
238  const EventContext& ctx, State& state) const {
240  return StatusCode::SUCCESS;
241  }
242 
243  // Take localContainer and transfer contents to rpcCoinHandle
244  for (std::unique_ptr<RpcCoinDataCollection>& collection : state.rpcCoinDataCollections) {
245  if (!collection || collection->empty()) {
246  continue;
247  }
248  const IdentifierHash hash = collection->identifyHash();
249  // If not present, get a write lock for the hash and move collection
250  RpcCoinDataContainer::IDC_WriteHandle lock = state.coinDataCont->getWriteHandle(hash);
251  if (lock.alreadyPresent()) {
252  ATH_MSG_DEBUG("RpcCoinDataCollection already contained in IDC "
253  << m_idHelperSvc->toString(collection->identify()));
254  continue;
255  }
256  ATH_CHECK(lock.addOrDelete(std::move(collection)));
257  ATH_MSG_DEBUG("Coin hash " << hash << " has been moved to cache container");
258  }
259  state.rpcCoinDataCollections.clear();
260  if (msgLvl(MSG::DEBUG)) {
261  for (const auto& [hash, ptr] : state.coinDataCont->GetAllHashPtrPair()) {
262  ATH_MSG_DEBUG("Contents of LOCAL in this view : " << hash);
263  }
264  }
267  ATH_CHECK(rpcCoinHandle.record(std::move(state.coinDataCont)));
268 
269  ATH_MSG_DEBUG("Created container " << m_rpcCoinDataContainerKey.key());
270  // For additional information on the contents of the cache-based container,
271  // this function can be used printMTCoinData (*rpcCoinHandle);
272 
273  return StatusCode::SUCCESS;
274 }
275 
276 //___________________________________________________________________________
278  State& state,
279  const std::vector<IdentifierHash>& idVect,
280  bool firstTimeInTheEvent) const {
281  int sizeVectorRequested = idVect.size();
282  ATH_MSG_DEBUG("Decode method called for " << sizeVectorRequested
283  << " offline collections");
284  if (sizeVectorRequested == 0)
285  ATH_MSG_DEBUG("Decoding the entire event");
286 
287  // create an empty vector of hash ids to be decoded (will be filled if
288  // RoI-based and left empty if full-scan)
289  std::vector<IdentifierHash> idVectToBeDecoded;
290  idVectToBeDecoded.reserve(idVect.size());
291 
292  if (firstTimeInTheEvent) {
293  state.m_fullEventDone = sizeVectorRequested == 0;
294  } else {
295  if (state.m_fullEventDone) {
296  ATH_MSG_DEBUG("Whole event has already been decoded; nothing to do.");
297  return StatusCode::SUCCESS;
298  }
299  if (sizeVectorRequested == 0)
300  state.m_fullEventDone = true;
301  }
302 
303  if (sizeVectorRequested != 0) {
304  // the program goes in here only if RoI-based decoding has been called and
305  // the full event is not already decoded this code ensures decoding of every
306  // offline hash id is called only once
307  for (const IdentifierHash& itHashId : idVect) {
308  if (state.m_decodedOfflineHashIds.insert(itHashId).second)
309  idVectToBeDecoded.push_back(itHashId);
310  }
311  if (idVectToBeDecoded.empty()) {
313  "All requested offline collections have already been decoded; "
314  "nothing to do.");
315  return StatusCode::SUCCESS;
316  } else {
317  ATH_MSG_DEBUG(idVectToBeDecoded.size()
318  << " offline collections have not yet been decoded and "
319  "will be decoded now.");
320  if (msgLvl(MSG::VERBOSE)) {
322  "The list of offline collection hash ids to be decoded:");
323  for (const IdentifierHash& itHashId : idVectToBeDecoded)
324  ATH_MSG_VERBOSE(itHashId << " ");
325  }
326  }
327  }
328 
329  // if RPC decoding is switched off stop here
330  if (!m_decodeData) {
332  "Stored empty container. Decoding RPC RDO into RPC PrepRawData is "
333  "switched off");
334  return StatusCode::SUCCESS;
335  }
336 
337  ATH_MSG_DEBUG("Decoding RPC RDO into RPC PrepRawData");
338 
339  SG::ReadCondHandle cablingCondData{m_rpcReadKey, ctx};
340  const RpcCablingCondData* rpcCabling{*cablingCondData};
341 
342  // if the vector requested has size 0, we need to perform a scan of the entire
343  // RDO container otherwise select the pads to be decoded
344  std::vector<IdentifierHash> rdoHashVec;
345  if (sizeVectorRequested != 0) {
347  "Looking for pads IdHash to be decoded for the requested collection "
348  "Ids");
349  ATH_CHECK(rpcCabling->giveRDO_fromPRD(idVectToBeDecoded, rdoHashVec));
350  }
351 
353  IdContext rpcContext = m_idHelperSvc->rpcIdHelper().module_context();
354 
355  // we come here if the rdo container is already in SG (for example in MC RDO!)
356  ATH_MSG_DEBUG("Retrieving Rpc PAD container from the store");
357  auto rdoContainerHandle = SG::makeHandle(m_rdoContainerKey, ctx);
358  if (!rdoContainerHandle.isValid()) {
359  ATH_MSG_ERROR("Retrieval of RPC RDO container failed !");
360  return StatusCode::FAILURE;
361  }
362 
365  if (rdoContainerHandle->numberOfCollections() == 0) {
366  // empty pad container - no rpc rdo in this event
367  ATH_MSG_DEBUG("Empty pad container - no rpc rdo in this event ");
368  return StatusCode::SUCCESS;
369  }
370  ATH_MSG_DEBUG("Not empty pad container in this event ");
371 
372  // start here to process the RDO (for the full event of for a fraction of it)
373  bool processingetaview{true}, processingphiview{false};
375  processingetaview = false;
376  bool doingSecondLoopAmbigColls = false;
377  while (processingetaview || processingphiview || (!m_solvePhiAmbiguities)) {
378  int ipad{0}, nPrepRawData{0}, nPhiPrepRawData{0}, nEtaPrepRawData{0};
379  if (processingphiview)
380  state.m_ambiguousCollections.clear();
381  if (msgLvl(MSG::DEBUG)) {
382  if (processingetaview)
383  ATH_MSG_DEBUG("*** Processing eta view ");
384  else
385  ATH_MSG_DEBUG("*** Processing phi view ");
386  }
387  // seeded decoding
388  if (sizeVectorRequested != 0) {
389  ATH_MSG_DEBUG("Start loop over pads hashes - seeded mode ");
390  for (const IdentifierHash& iPadHash : rdoHashVec) {
391  const RpcPad* rdoColl = rdoContainerHandle->indexFindPtr(iPadHash);
392  if (!rdoColl) {
393  ATH_MSG_DEBUG("Requested pad with online id "
394  << iPadHash << " not found in the rdoContainerHandle.");
395  continue;
396  }
397  ++ipad;
398 
399  ATH_MSG_DEBUG("A new pad here n. " << ipad << ", online id "
400  << (int)(rdoColl->identifyHash())
401  << ", with " << rdoColl->size()
402  << " CM inside ");
403  ATH_CHECK(processPad(ctx, state, rdoColl, processingetaview,
404  processingphiview, nPrepRawData, idVectToBeDecoded, doingSecondLoopAmbigColls));
405 
406  } // end loop over requested pads hashes
407  } else { // unseeded // whole event
408  ATH_MSG_DEBUG("Start loop over pads - unseeded mode ");
409  for (const RpcPad* rdoColl : *rdoContainerHandle) {
410  // loop over all elements of the pad container
411  if (rdoColl->empty())
412  continue;
413  ++ipad;
414  ATH_MSG_DEBUG("A new pad here n. " << ipad << ", online id "
415  << (int)(rdoColl->identifyHash())
416  << ", with " << rdoColl->size()
417  << " CM inside ");
418 
419  ATH_CHECK(processPad(ctx, state, rdoColl, processingetaview,
420  processingphiview, nPrepRawData, idVectToBeDecoded, doingSecondLoopAmbigColls));
421  } // end loop over pads
422  }
423 
424  if (processingetaview) {
425  processingetaview = false;
426  processingphiview = true;
427  nEtaPrepRawData = nPrepRawData;
428  ATH_MSG_DEBUG("*** " << nEtaPrepRawData << " eta PrepRawData registered");
429  } else {
430  processingphiview = false;
431  nPhiPrepRawData = nPrepRawData - nEtaPrepRawData;
432  ATH_MSG_DEBUG("*** " << nPhiPrepRawData << " phi PrepRawData registered");
433  if (!state.m_ambiguousCollections.empty()) {
434  // loop again for unrequested collections stored with ambiguous phi hits
435  doingSecondLoopAmbigColls = true;
436  processingetaview = true;
438  << " ambiguous collections were stored:");
439  idVectToBeDecoded.clear();
440  rdoHashVec.clear();
441  for (const IdentifierHash& itAmbiColl : state.m_ambiguousCollections) {
442  ATH_MSG_DEBUG((int)itAmbiColl << " ");
443  idVectToBeDecoded.push_back(itAmbiColl);
444  state.m_decodedOfflineHashIds.insert(itAmbiColl);
445  }
446  ATH_CHECK(rpcCabling->giveRDO_fromPRD(idVectToBeDecoded, rdoHashVec));
447  }
448  }
449  if (!m_solvePhiAmbiguities) {
450  ATH_MSG_DEBUG("*** " << nPrepRawData << " PrepRawData registered");
451  break;
452  }
453  }
454 
455  ATH_MSG_DEBUG("*** Final Cleanup ");
456  return StatusCode::SUCCESS;
457 }
458 
459 //___________________________________________________________________________
461  const EventContext& ctx, State& state, const std::vector<uint32_t>& robIds,
462  bool firstTimeInTheEvent) const {
463  // ROB-based decoding is only applied in seeded mode. Full scan should use the
464  // hashId-based method with empty requested collections vector.
465 
466  int sizeVectorRequested = robIds.size();
467  ATH_MSG_DEBUG("Decode method called for " << sizeVectorRequested << " ROBs");
468 
469  std::vector<uint32_t> robIdsToBeDecoded;
470  robIdsToBeDecoded.reserve(robIds.size());
471 
472  if (firstTimeInTheEvent) {
473  state.m_fullEventDone = false;
474  } else {
475  if (state.m_fullEventDone) {
476  ATH_MSG_DEBUG("Whole event has already been decoded; nothing to do.");
477  return StatusCode::SUCCESS;
478  }
479  }
480 
481  // check which of the requested robs are not yet decoded
482  for (uint32_t robid : robIds) {
483  if (state.m_decodedRobIds.insert(robid).second)
484  robIdsToBeDecoded.push_back(robid);
485  }
486 
487  if (robIdsToBeDecoded.empty()) {
489  "All requested ROBs have already been decoded; nothing to do.");
490  return StatusCode::SUCCESS;
491  }
492  ATH_MSG_DEBUG(robIdsToBeDecoded.size()
493  << " ROBs have not yet been decoded and will be decoded now.");
494  if (msgLvl(MSG::VERBOSE)) {
495  ATH_MSG_VERBOSE("The list of ROB Ids to be decoded:");
496  for (uint32_t robid : robIdsToBeDecoded)
497  ATH_MSG_VERBOSE("0x" << MSG::hex << robid << MSG::dec << " ");
498  }
499 
500  SG::ReadCondHandle cablingCondData{m_rpcReadKey, ctx};
501  const RpcCablingCondData* rpcCabling{*cablingCondData};
502 
503  // if all robs will be decoded after the current execution of the method, set
504  // the flag m_fullEventDone
505  if (state.m_decodedRobIds.size() == rpcCabling->giveFullListOfRobIds().size())
506  state.m_fullEventDone = true;
507 
508  // if RPC decoding is switched off stop here
509  if (!m_decodeData) {
511  "Stored empty container. Decoding RPC RDO into RPC PrepRawData is "
512  "switched off");
513  return StatusCode::SUCCESS;
514  }
515 
516  ATH_MSG_DEBUG("Decoding RPC RDO into RPC PrepRawData");
517 
518  // we come here if the rdo container is already in SG (for example in MC RDO!)
519  ATH_MSG_DEBUG("Retrieving Rpc PAD container from the store");
520  auto rdoContainerHandle = SG::makeHandle(m_rdoContainerKey, ctx);
521  if (!rdoContainerHandle.isValid()) {
522  ATH_MSG_WARNING("Retrieval of RPC RDO container failed !");
523  return StatusCode::SUCCESS;
524  }
525 
526  // here the RDO container is retrieved and filled -whatever input type we
527  // start with- => check the size
528  if (rdoContainerHandle->empty()) {
529  // empty pad container - no rpc rdo in this event
530  ATH_MSG_DEBUG("Empty pad container - no rpc rdo in this event ");
531  return StatusCode::SUCCESS;
532  }
533  ATH_MSG_DEBUG("Not empty pad container in this event ");
534 
535  // obtain a list of PADs (RDOs) to be processed
536  std::vector<IdentifierHash> rdoHashVec;
537  rdoHashVec.reserve(
538  13 * robIdsToBeDecoded.size()); // most ROBs have 13 RDOs, some have less
539  ATH_CHECK(rpcCabling->giveRDO_fromROB(robIdsToBeDecoded, rdoHashVec));
540 
541  // start here to process the RDOs
542  bool processingetaview = true;
543  bool processingphiview = false;
545  processingetaview = false;
546  while (processingetaview || processingphiview || (!m_solvePhiAmbiguities)) {
547  int ipad{0}, nPrepRawData{0}, nPhiPrepRawData{0}, nEtaPrepRawData{0};
548  if (processingphiview)
549  state.m_ambiguousCollections.clear();
550 
551  if (processingetaview)
552  ATH_MSG_DEBUG("*** Processing eta view ");
553  else
554  ATH_MSG_DEBUG("*** Processing phi view ");
555 
556  // seeded decoding (for full scan, use the hashId-based method)
557  ATH_MSG_DEBUG("Start loop over pads hashes - seeded mode ");
558 
559  for (const IdentifierHash& padHashId : rdoHashVec) {
560  const RpcPad* rdoColl = rdoContainerHandle->indexFindPtr(padHashId);
561  if (!rdoColl) {
562  ATH_MSG_DEBUG("Requested pad with online id "
563  << (unsigned int)padHashId
564  << " not found in the rdoContainerHandle.");
565  continue;
566  }
567  ++ipad;
568  ATH_MSG_DEBUG("A new pad here n."
569  << ipad << ", online id " << (int)(rdoColl->identifyHash())
570  << ", with " << rdoColl->size() << " CM inside ");
571  CHECK(processPad(ctx, state, rdoColl, processingetaview,
572  processingphiview, nPrepRawData, rdoHashVec, false));
573  }
574 
575  if (processingetaview) {
576  processingetaview = false;
577  processingphiview = true;
578  nEtaPrepRawData = nPrepRawData;
579  ATH_MSG_DEBUG("*** " << nEtaPrepRawData << " eta PrepRawData registered");
580  } else {
581  processingphiview = false;
582  nPhiPrepRawData = nPrepRawData - nEtaPrepRawData;
583  ATH_MSG_DEBUG("*** " << nPhiPrepRawData << " phi PrepRawData registered");
584  }
585  if (!m_solvePhiAmbiguities) {
586  ATH_MSG_DEBUG("*** " << nPrepRawData << " PrepRawData registered");
587  break;
588  }
589  }
590 
591  ATH_MSG_DEBUG("*** Final Cleanup ");
592 
593  return StatusCode::SUCCESS;
594 
595 }
596 
598  const EventContext& ctx, State& state, const RpcPad* rdoColl,
599  bool& processingetaview, bool& processingphiview, int& nPrepRawData,
600  const std::vector<IdentifierHash>& idVect,
601  bool doingSecondLoopAmbigColls) const {
602 
603  const RpcIdHelper& idHelper = m_idHelperSvc->rpcIdHelper();
604 
605  std::unordered_set<IdentifierHash>& ambiguousCollections{state.m_ambiguousCollections};
606  ATH_MSG_DEBUG("***************** Start of processPad eta/phiview "
607  << processingetaview << "/" << processingphiview);
608  //{processPad
609  // Get pad online id and sector id
610  uint16_t padId = rdoColl->onlineId();
611  uint16_t sectorId = rdoColl->sector();
612  ATH_MSG_DEBUG("***************** for Pad online Id "
613  << padId << " m_logic sector ID " << sectorId);
614 
615  // Create an RPC PrepDataCollection
616  Identifier oldId{0}, oldIdTrg{0};
617  ATH_MSG_VERBOSE("Init pointer to RpcPrepDataCollection ");
618  RpcPrepDataCollection* collection{nullptr};
619  RpcCoinDataCollection* collectionTrg{nullptr};
620  IdentifierHash rpcHashId{0};
621 
622  SG::ReadCondHandle rpcCabling{m_rpcReadKey, ctx};
623 
624  // For each pad, loop on the coincidence matrices
625  RpcPad::const_iterator itCM = rdoColl->begin();
626  RpcPad::const_iterator itCM_e = rdoColl->end();
627  int icm = 0;
628  SG::ReadHandle evtInfo{m_eventInfo, ctx};
629  for (; itCM != itCM_e; ++itCM) {
630  icm++;
631  bool etaview = false;
632  if (!evtInfo->eventType(xAOD::EventInfo::IS_SIMULATION))
633  etaview = true;
634  bool highPtCm = false;
635  // Get CM online Id
636  uint16_t cmaId = (*itCM)->onlineId();
637  ATH_MSG_DEBUG("A new CM here n. "
638  << icm << " CM online ID " << cmaId
639  << " with n. of hits = " << (*itCM)->size());
640  if (cmaId < 4) {
641  ATH_MSG_DEBUG(" low pt ");
642  if (cmaId < 2) {
643  etaview = true;
644  if (!evtInfo->eventType(xAOD::EventInfo::IS_SIMULATION)) {
645  etaview = false;
646  }
647  ATH_MSG_DEBUG(" eta view = " << etaview);
648  }
649 
650  else {
651  ATH_MSG_DEBUG(" eta view = " << etaview);
652  }
653  } else {
654  ATH_MSG_DEBUG(" high pt ");
655  highPtCm = true;
656  if (cmaId < 6) {
657  etaview = true;
658  if (!evtInfo->eventType(xAOD::EventInfo::IS_SIMULATION)) {
659  etaview = false;
660  }
661  ATH_MSG_DEBUG(" eta view = " << etaview);
662  } else {
663  ATH_MSG_DEBUG(" eta view = " << etaview);
664  }
665  }
666 
667  if (processingetaview && (!etaview))
668  continue;
669  if (processingphiview && etaview)
670  continue;
671 
672  // For each CM, loop on the fired channels
673  RpcCoinMatrix::const_iterator itD = (*itCM)->begin();
674  RpcCoinMatrix::const_iterator itD_e = (*itCM)->end();
675  int idata = 0;
676  if (itD == itD_e) {
677  ATH_MSG_DEBUG("Empty CM");
678  }
679  for (; itD != itD_e; ++itD) {
680  idata++;
681  // trigger related quantities
682  unsigned short threshold = 99;
683  unsigned short overlap = 99;
684 
685  // flags defining the processing mode of this hit
686  bool solvePhiAmb_thisHit = m_solvePhiAmbiguities;
687  bool reduceCablOvl_thisHit = m_reduceCablingOverlap;
688 
689  ATH_MSG_DEBUG("A new CM Hit " << idata);
690  const RpcFiredChannel* rpcChan = (*itD);
691  if (msgLvl(MSG::DEBUG)) {
692  ATH_MSG_DEBUG("RpcFiredChannel: bcid " << rpcChan->bcid() << " time "
693  << rpcChan->time() << " ijk "
694  << rpcChan->ijk());
695  if (rpcChan->ijk() < 7)
696  ATH_MSG_DEBUG(" ch " << rpcChan->channel());
697  }
698 
699  // check if trigger hit
700  // select the cases: ijk = 0 and high p, ijk= 6, ijk=7
701  bool triggerHit = false;
702  bool toSkip = false;
703  processTriggerHitHypothesis(itD, itD_e, highPtCm, triggerHit, threshold,
704  overlap, toSkip);
705  if (toSkip)
706  continue;
707  if (triggerHit) {
708  // here ijk = 6 or ijk = 0 in high pt cm
709  // keep all pivot + trigger info (even if duplicated [should never
710  // happen, for pivot hits])
711  solvePhiAmb_thisHit = false;
712  reduceCablOvl_thisHit = false;
714  "RpcFiredChannel: it's a triggerHit or a lowPt coinc. in a high pt "
715  "CM \n"
716  << " ijk = " << rpcChan->ijk() << " isHighPtCM " << highPtCm
717  << " thr/ovl = " << threshold << "/" << overlap);
718  }
719 
720  // here decode (get offline ids for the online indices of this hit)
721  double time = 0.;
722  std::vector<Identifier> digitVec{m_rpcRdoDecoderTool->getOfflineData(
723  rpcChan, sectorId, padId, cmaId, time, rpcCabling.cptr())};
724  time += (double)m_timeShift;
725 
726  int nMatchingEtaHits = 0;
727  int nDuplicatePhiHits = 0;
728  bool unsolvedAmbiguity = false;
729  bool notFinished = true;
730  // allow for 2 iterations in case there are phi digits without matching
731  // eta (eta inefficiency) all eta digits, not already recorded, will be
732  // registered as PrepRawData and all phi digits, not yet recorded and with
733  // a eta digit in the same module and gap, will produce a PrepRawData. Phi
734  // digits without a eta match will not be recorded at the first iteration.
735  // If all phi digits do not have a eta match, they will be all recorded as
736  // PrepRawData in the second iteration (the ambiguity will remain
737  // unsolved)
738  while (notFinished) {
739  // Loop on the digits corresponding to the fired channel
741  "size of the corresponding list of ID = " << digitVec.size());
742  if (digitVec.empty()) {
743  ATH_MSG_DEBUG("going to next CM hit");
744  notFinished = false;
745  continue;
746  }
747  for (const Identifier& channelId : digitVec) {
748  // Prepare the prepdata for this identifier
749  // channel Id
750  rpcHashId = m_idHelperSvc->moduleHash(channelId);
751  const Identifier parentId = idHelper.parentID(channelId);
752 
753  // There is some ambiguity in the channel/sectorId's, so need to
754  // explicitly filter out hashIDs outside of the RoI in seeded decoding
755  // mode
756  if (!idVect.empty() &&
757  std::find(idVect.begin(), idVect.end(), rpcHashId) == idVect.end()) {
758  continue;
759  }
760  ATH_MSG_DEBUG("CM Hit decoded into offline Id "
761  << m_idHelperSvc->toString(channelId) << " time "
762  << time);
763  ATH_MSG_DEBUG(" oldID = " << m_idHelperSvc->toString(oldId) <<
764  " oldIDtrg = " << m_idHelperSvc->toString(oldIdTrg));
765  bool hasAMatchingEtaHit = 0;
766  // current collection has Id "parentId"; get it from the container !
767  if (triggerHit) {
768  if ((oldIdTrg != parentId) || !collectionTrg) {
769  // Get collection from IDC if it exists, or create it and add it
770  // if not.
771  ATH_MSG_DEBUG(" Looking/Creating a collection with ID = "
772  << m_idHelperSvc->toString(parentId) << " hash = "
773  << static_cast<unsigned int>(rpcHashId));
774  collectionTrg = state.getCoinCollection(parentId);
775  oldIdTrg = parentId;
776  ATH_MSG_DEBUG(" Resetting oldIDtrg to current parentID = "
777  << m_idHelperSvc->toString(oldIdTrg));
778  }
779  } else if ((oldId != parentId) || !collection) {
780  // Get collection from IDC if it exists, or create it and add it if
781  // not.
782  ATH_MSG_DEBUG(" Looking/Creating a collection with ID = "
783  << m_idHelperSvc->toString(parentId) << " hash = "
784  << static_cast<unsigned int>(rpcHashId));
785  collection = state.getPrepCollection(parentId);
786  oldId = parentId;
787  ATH_MSG_DEBUG(" Resetting oldID to current parentID = "
788  << m_idHelperSvc->toString(oldId));
789  }
790 
791  // check if the data has already been recorded
792  // (if you want to reduce the redundancy due to cabling overlap and if
793  // the collection is not empty)
794  bool duplicate = false;
795  if (reduceCablOvl_thisHit) {
796  if (collection->begin() != collection->end()) {
797  RpcPrepDataCollection::iterator it_rpcPrepData;
798  ATH_MSG_VERBOSE("Check for duplicates in coll. with size "
799  << collection->size());
800  int current_dbphi{0}, current_dbz{0}, current_gg{0};
801  if (processingphiview) {
802  current_dbphi =
803  m_idHelperSvc->rpcIdHelper().doubletPhi(channelId);
804  current_dbz = m_idHelperSvc->rpcIdHelper().doubletZ(channelId);
805  current_gg = m_idHelperSvc->rpcIdHelper().gasGap(channelId);
807  "Check also for eta hits matching dbz, dbphi, gg "
808  << current_dbz << " " << current_dbphi << " "
809  << current_gg);
810  }
811 
812  for (RpcPrepData* rpc : *collection) {
813  if (channelId == rpc->identify() &&
814  fabs(time - rpc->time()) < m_overlap_timeTolerance) {
815  duplicate = true;
816  hasAMatchingEtaHit = false; // we don't want to increment the
817  // number of strips with
818  // a matching eta due to a cabling overlap
819  ATH_MSG_VERBOSE("Duplicated RpcPrepData(not recorded) = "
820  << m_idHelperSvc->toString(channelId));
821  float previous_time = rpc->time();
822  // choose the smallest time within timeTolerance
823  if (time < previous_time) {
824  rpc->m_time = time;
826  "time of the prd previously stored is now updated with "
827  "current hit time: "
828  << previous_time << " -> " << rpc->time());
829  }
830  break; // this break is why we cannot have
831  // solvePhiAmb_thisHit = true and
832  // reduceCablOvl_thisHit= false
833  }
834  if (processingphiview) {
835  if (solvePhiAmb_thisHit) {
836  if (!unsolvedAmbiguity) {
837  if (m_idHelperSvc->rpcIdHelper().measuresPhi(
838  rpc->identify()) == 0) {
839  // check if there's a eta hit in the same gap
840  // of the RPC module (doubletZ, doubletPhi, gg)
841  if (current_dbz ==
842  m_idHelperSvc->rpcIdHelper().doubletZ(
843  rpc->identify())) {
844  if (current_dbphi ==
845  m_idHelperSvc->rpcIdHelper().doubletPhi(
846  rpc->identify())) {
847  if (current_gg ==
848  m_idHelperSvc->rpcIdHelper().gasGap(
849  rpc->identify())) {
850  if (fabs(time - rpc->time()) <
852  hasAMatchingEtaHit = true;
854  "There's a matching eta hit with id "
855  << m_idHelperSvc->toString(
856  rpc->identify()));
857  // here there can be a break ? NO, we need to
858  // keep looping in order to check
859  // if this preprawdata has been already
860  // recorded (due to cabling overlaps)
861  }
862  }
863  }
864  }
865  }
866  }
867  }
868  }
869  }
870  if (hasAMatchingEtaHit)
871  nMatchingEtaHits++; // Number of phi strips (possibly
872  // corresponding to this CM hit)
873  // with a matching eta
874  if (processingphiview && duplicate)
875  nDuplicatePhiHits++; // Number of phi strips (possibly
876  // corresponding to this CM hit)
877  // already in the collection
878  } // if collection is not empty
879  } // end of if reduceCablingOverlap
880 
881  if (msgLvl(MSG::VERBOSE)) {
882  if (solvePhiAmb_thisHit && (!etaview))
883  ATH_MSG_VERBOSE("nMatchingEtaHits = " << nMatchingEtaHits
884  << " hasAMatchingEtaHit = "
885  << hasAMatchingEtaHit);
886  }
887 
888  if (!duplicate) {
890  " solvePhiAmb_thisHit, processingetaview, processingphiview, "
891  "hasAMatchingEtaHit, unsolvedAmbiguity "
892  << solvePhiAmb_thisHit << " " << processingetaview << " "
893  << processingphiview << " " << hasAMatchingEtaHit << " "
894  << unsolvedAmbiguity);
895  if ((!solvePhiAmb_thisHit) || processingetaview ||
896  (processingphiview &&
897  (hasAMatchingEtaHit || unsolvedAmbiguity))) {
898  if (unsolvedAmbiguity) {
899  if (idVect.empty()) { // full-scan mode
900  ATH_MSG_DEBUG("storing data even if unsolvedAmbiguity");
901  } else {
902  // if in RoI mode and the collection was not requested in this
903  // event, add it to ambiguousCollections
905  "unsolvedAmbiguity is true, adding collection with hash "
906  "= "
907  << (int)rpcHashId << " to ambiguous collections vector");
908  if (!state.m_decodedOfflineHashIds.empty() &&
909  state.m_decodedOfflineHashIds.find(rpcHashId) ==
910  state.m_decodedOfflineHashIds.end()) {
911  ambiguousCollections.insert(rpcHashId);
913  "collection not yet processed; added to ambiguous "
914  "collection vector; going to the next offline "
915  "channel ID");
916  continue; // go to the next possible offline channel ID
917  } else if (!doingSecondLoopAmbigColls) {
918  ambiguousCollections.insert(rpcHashId);
920  "collection already processed and "
921  "doingSecondLoopAmbigColls=false; added to ambiguous "
922  "collection vector; going to the next offline channel "
923  "ID");
924  continue;
925  } else {
927  "collection already processed and "
928  "doingSecondLoopAmbigColls=true; trying to store data "
929  "even if unsolvedAmbiguity");
930  }
931  }
932  }
933  SG::ReadCondHandle muDetMgr{m_muDetMgrKey, ctx};
934  const RpcReadoutElement* descriptor = muDetMgr->getRpcReadoutElement(channelId);
935 
936  // here check validity
937  // if invalid, reset flags
938  if (!descriptor) {
939  hasAMatchingEtaHit = false;
940  duplicate = false;
942  "Detector Element not found for Identifier from the "
943  "cabling service <"
944  << m_idHelperSvc->toString(channelId)
945  << "> =>>ignore this hit");
946  continue;
947  } else if (!descriptor->containsId(channelId)) {
948  hasAMatchingEtaHit = false;
949  duplicate = false;
950  if (m_idHelperSvc->rpcIdHelper().stationNameString(
951  m_idHelperSvc->rpcIdHelper().stationName(channelId)) ==
952  "BOG")
954  "Identifier from the cabling service <"
955  << m_idHelperSvc->toString(channelId)
956  << "> inconsistent with the geometry of detector element "
957  "<"
958  << m_idHelperSvc->toString(descriptor->identify())
959  << "> =>>ignore this hit /// there are unmasked "
960  "channels in BOG");
961  else
963  "Identifier from the cabling service <"
964  << m_idHelperSvc->toString(channelId)
965  << "> inconsistent with the geometry of detector element "
966  "<"
967  << m_idHelperSvc->toString(descriptor->identify())
968  << "> =>>ignore this hit");
969  continue;
970  }
971 
972  //
973  // Global position
974  Amg::Vector3D tempGlobalPosition =
975  descriptor->stripPos(channelId);
976  ATH_MSG_VERBOSE("RPC RDO->PrepRawdata: global position ("
977  << tempGlobalPosition.x() << ", "
978  << tempGlobalPosition.y() << ", "
979  << tempGlobalPosition.z() << ") ");
980  // Local position
981  Amg::Vector2D pointLocPos{Amg::Vector2D::Zero()};
982  descriptor->surface(channelId).globalToLocal(
983  tempGlobalPosition, tempGlobalPosition, pointLocPos);
984 
985  // List of Digits in the cluster (self)
986  std::vector<Identifier> identifierList{channelId};
987 
988  // width of the cluster (self)
989  float stripWidth = descriptor->StripWidth(
990  m_idHelperSvc->rpcIdHelper().measuresPhi(channelId));
991 
992  // Error matrix
993  double errPos = stripWidth / std::sqrt(12.0);
994  Amg::MatrixX mat(1, 1);
995  mat.setIdentity();
996  mat *= errPos * errPos;
997  // check if this is a triggerINFO rather then a real hit
998  // Create a new PrepData
999  int ambiguityFlag = 0;
1000  if (solvePhiAmb_thisHit) {
1001  if (processingetaview)
1002  ambiguityFlag = 1;
1003  if (unsolvedAmbiguity)
1004  ambiguityFlag = digitVec.size();
1005  else if (hasAMatchingEtaHit)
1006  ambiguityFlag = nMatchingEtaHits;
1007  }
1008 
1009  // correct prd time from cool db
1010  if (m_RPCInfoFromDb) {
1011  SG::ReadCondHandle readHandle{m_readKey, ctx};
1012  std::optional<double> StripTimeFromCool = readHandle->getStripTime(channelId);
1013  if (StripTimeFromCool) {
1014  time -= (*StripTimeFromCool);
1015  }
1016  }
1017 
1018  if (triggerHit) {
1019  ATH_MSG_DEBUG("producing a new RpcCoinData");
1020 
1021  RpcCoinData* newCoinData = new RpcCoinData(
1022  channelId, rpcHashId, pointLocPos, identifierList,
1023  Amg::MatrixX(mat), descriptor, (float)time, ambiguityFlag,
1024  rpcChan->ijk(), threshold, overlap, cmaId, padId, sectorId,
1025  !(highPtCm));
1026 
1027  // record the new data in the collection
1028  ATH_MSG_DEBUG(
1029  " Adding RpcCoinData @ "
1030  << newCoinData << " to collection "
1031  << m_idHelperSvc->toString(collectionTrg->identify()));
1032 
1033  newCoinData->setHashAndIndex(collectionTrg->identifyHash(),
1034  collectionTrg->size());
1035  collectionTrg->push_back(newCoinData);
1036  } // end of to be stored now for RpcCoinData
1037  else {
1038  ATH_MSG_DEBUG("producing a new RpcPrepData with "
1039  << "ambiguityFlag = " << ambiguityFlag);
1040 
1041  RpcPrepData* newPrepData = new RpcPrepData(
1042  channelId, rpcHashId, pointLocPos, identifierList,
1043  Amg::MatrixX(mat), descriptor, (float)time, ambiguityFlag);
1044 
1045  // record the new data in the collection
1046  ATH_MSG_DEBUG(
1047  " Adding digit @ "
1048  << newPrepData << " to collection "
1049  << m_idHelperSvc->toString(collection->identify()));
1050 
1051  newPrepData->setHashAndIndex(collection->identifyHash(),
1052  collection->size());
1053  collection->push_back(newPrepData);
1054  // here one should reset ambiguityFlag for the prepdata
1055  // registered before the current one (from the same RDO hit) if
1056  // nMatchingEtaHits > 1
1057  nPrepRawData++;
1058  }
1059  } // end of to be stored now
1060  } // this hit was not yet recorded
1061  else {
1062  // this hit was already recorded
1063  ATH_MSG_DEBUG("digit already in the collection ");
1064  }
1065  } // end loop over possible offline identifiers corresponding to this
1066  // CM hit
1068  "processingphiview, nMatchingEtaHits, nDuplicatePhiHits, "
1069  "unsolvedAmbiguity, solvePhiAmb_thisHit : "
1070  << processingphiview << ", " << nMatchingEtaHits << ", "
1071  << nDuplicatePhiHits << ", " << unsolvedAmbiguity << ", "
1072  << solvePhiAmb_thisHit);
1073  if ((processingphiview && (nMatchingEtaHits == 0)) &&
1074  (nDuplicatePhiHits == 0) && (!unsolvedAmbiguity) &&
1075  (solvePhiAmb_thisHit)) {
1076  unsolvedAmbiguity = true;
1077  // no eta hits matching any phi digit
1078  // loop once again and store all phi digits potentially generating
1079  // this CM hit
1080  ATH_MSG_DEBUG(
1081  "No eta prepData matching any phi hit from this CM hit \n"
1082  << "loop once again and store all phi digits potentially "
1083  "generating this CM hit");
1084  } else if (unsolvedAmbiguity)
1085  notFinished = false;
1086  else
1087  notFinished = false;
1088  } // end of not finished
1089  } // end loop over CM hits
1090  } // end loop over CMs
1091 
1092  ATH_MSG_DEBUG("***************** Stop of processPad eta/phiview "
1093  << processingetaview << "/" << processingphiview
1094  << "***************** for Pad online Id " << padId
1095  << " m_logic sector ID " << sectorId);
1096 
1097  return StatusCode::SUCCESS;
1098 }
1099 
1101  State& state) const {
1102  if (m_rdoNrpcContainerKey.empty()) {
1103  ATH_MSG_DEBUG("The NRPC processing is disabled.");
1104  return StatusCode::SUCCESS;
1105  }
1106 
1107  ATH_MSG_DEBUG("Retrieving Nrpc RDO container from the store");
1108  SG::ReadHandle rdoNrpcContainerHandle{m_rdoNrpcContainerKey, ctx};
1109  if (!rdoNrpcContainerHandle.isPresent()) {
1110  ATH_MSG_ERROR("Retrieval of NRPC RDO " << m_rdoNrpcContainerKey.fullKey()
1111  << " container failed !");
1112  return StatusCode::FAILURE;
1113  }
1114 
1115  if (rdoNrpcContainerHandle->empty()) {
1116  // empty NRPC RDO container - no nrpc rdo in this event
1117  ATH_MSG_DEBUG("Empty NRPC RDO container - no nrpc rdo in this event ");
1118  return StatusCode::SUCCESS;
1119  }
1120  ATH_MSG_DEBUG("Not empty NRPC RDO container in this event ");
1121 
1122  SG::ReadCondHandle readCdo{m_nRpcCablingKey, ctx};
1123  if (!readCdo.isValid()) {
1124  ATH_MSG_ERROR("Could not retrieve " << m_nRpcCablingKey.fullKey()
1125  << " from the conditions store");
1126  return StatusCode::FAILURE;
1127  }
1129  SG::ReadCondHandle muDetMgr{m_muDetMgrKey, ctx};
1130 
1131  for (const xAOD::NRPCRDO* nrpcrdo : *rdoNrpcContainerHandle) {
1133  RpcCablingData translateCache{};
1134  translateCache.subDetector = nrpcrdo->subdetector();
1135  translateCache.tdcSector = nrpcrdo->tdcsector();
1136  translateCache.tdc = nrpcrdo->tdc();
1137  translateCache.channelId = nrpcrdo->channel();
1138  Identifier chanId{};
1139  if (!readCdo->getOfflineId(translateCache, msgStream()) ||
1140  !readCdo->convert(translateCache, chanId, false)) {
1141  ATH_MSG_FATAL("Failed to retrieve the offline Identifier");
1142  return StatusCode::FAILURE;
1143  }
1144 
1145  RpcPrepDataCollection* collection = state.getPrepCollection(chanId);
1146 
1147  const RpcReadoutElement* descriptor =
1148  muDetMgr->getRpcReadoutElement(chanId);
1149 
1150  // List of Digits in the cluster (self)
1151  std::vector<Identifier> identifierList{chanId};
1152  // Global position
1153  const Amg::Vector3D stripPos{descriptor->stripPos(chanId)};
1154  ATH_MSG_DEBUG("RPC RDO->PrepRawdata " << m_idHelperSvc->toString(chanId)
1155  << " global position "
1156  << Amg::toString(stripPos, 2));
1157  // Local position
1158  Amg::Vector2D pointLocPos{Amg::Vector2D::Zero()};
1159  descriptor->surface(chanId).globalToLocal(stripPos, stripPos, pointLocPos);
1160  // width of the cluster (self)
1161 
1162  const double stripWidth = descriptor->StripWidth(
1163  m_idHelperSvc->rpcIdHelper().measuresPhi(chanId));
1164  // Error matrix
1165  const double errPos = stripWidth / std::sqrt(12.0);
1166  Amg::MatrixX mat(1, 1);
1167  mat.setIdentity();
1168  mat *= errPos * errPos;
1169 
1170  int ambiguityFlag = 0; // Ambiguity flag not checked for BIS RPCs
1171 
1172  const float time = nrpcrdo->time();
1174  const float timeoverthr = nrpcrdo->timeoverthr();
1175 
1176  const IdentifierHash rpcHashId = m_idHelperSvc->moduleHash(chanId);
1177  RpcPrepData* newPrepData =
1178  new RpcPrepData(chanId, rpcHashId, pointLocPos, identifierList, mat,
1179  descriptor, time, timeoverthr, 0, ambiguityFlag);
1180 
1181  newPrepData->setHashAndIndex(collection->identifyHash(),
1182  collection->size());
1183  collection->push_back(newPrepData);
1184  }
1185  return StatusCode::SUCCESS;
1186 }
1187 
1190  bool highPtCm,
1191  // the previous arg.s are inputs
1192  bool& triggerHit, unsigned short& threshold, unsigned short& overlap,
1193  bool& toSkip) const {
1194  toSkip = false;
1195  const RpcFiredChannel* rpcChan = (*itD);
1196  if ((highPtCm && rpcChan->ijk() < 2) || (rpcChan->ijk() > 5)) {
1197  ATH_MSG_VERBOSE("RpcFiredChannel: it's a trigger hit");
1198  triggerHit = true;
1199 
1200  // triggerHit
1202  // skip if not storing the trigger info
1203  toSkip = true;
1204  return;
1205  }
1206  if (rpcChan->ijk() == 7) {
1207  // the info in ijk 7 refer to the previous CM hit with ijk 6 => skip
1208  toSkip = true;
1209  return;
1210  }
1211  if (rpcChan->ijk() == 6) {
1212  std::string cmtype;
1213  // look for the subsequent ijk 7 to define threshold and overlap
1214  if (msgLvl(MSG::VERBOSE)) {
1215  cmtype = " in low pT CM ";
1216  if (highPtCm)
1217  cmtype = " in high pT CM ";
1218  ATH_MSG_VERBOSE("This hit: ijk = " << rpcChan->ijk() << cmtype
1219  << " bcid is " << rpcChan->bcid()
1220  << " time is " << rpcChan->time()
1221  << " ch " << rpcChan->channel());
1222  }
1223  RpcCoinMatrix::const_iterator itDnext = itD + 1;
1224  while (itDnext != itD_end) {
1225  const RpcFiredChannel* rpcChanNext = (*itDnext);
1226  if (msgLvl(MSG::VERBOSE)) {
1227  ATH_MSG_VERBOSE("Next hit: ijk = " << rpcChanNext->ijk() << cmtype
1228  << " bcid is " << rpcChan->bcid()
1229  << " time is "
1230  << rpcChanNext->time());
1231  if (rpcChanNext->ijk() < 7)
1232  ATH_MSG_VERBOSE(" ch " << rpcChanNext->channel());
1233  }
1234  if (rpcChanNext->ijk() == 7) {
1235  ATH_MSG_VERBOSE("next has ijk=7 ");
1236  if (rpcChanNext->bcid() == rpcChan->bcid() &&
1237  rpcChanNext->time() == rpcChan->time()) {
1238  ATH_MSG_VERBOSE("bdid/tick match; assigning thr/overlap = "
1239  << rpcChanNext->thr() << "/" << rpcChanNext->ovl());
1240  threshold = rpcChanNext->thr();
1241  overlap = rpcChanNext->ovl();
1242  } else {
1244  "ijk =7 after a ijk = 6 BUT bdid/tick don't match - will not "
1245  "assign threshold/overlap ");
1246  }
1247  break;
1248  } else {
1249  // std::cout<<"processing trigger hit with ijk = 6; next is not ijk
1250  // 7"<<std::endl;
1251  if (rpcChanNext->ijk() == 6) {
1252  ++itDnext;
1253  // std::cout<<"next has ijk 6; try next to next"<<std::endl;
1254  } else {
1256  "RPC cm hit with ijk = 6 not followed by ijk = 6 or 7 - will "
1257  "not assign threshold / overlap");
1258  break;
1259  }
1260  }
1261  }
1262  }
1263  } else {
1264  triggerHit = false;
1265  return;
1266  }
1267  ATH_MSG_VERBOSE("RPC trigger hit; ijk = "
1268  << rpcChan->ijk() << " threshold / overlap = " << threshold
1269  << "/" << overlap);
1270 }
1271 }
Muon::RpcRdoToPrepDataToolMT::m_rpcCoinDataContainerKey
SG::WriteHandleKey< Muon::RpcCoinDataContainer > m_rpcCoinDataContainerKey
RpcCoinData containers.
Definition: RpcRdoToPrepDataToolMT.h:156
RpcFiredChannel::ijk
ubit16 ijk() const
Definition: RpcFiredChannel.h:56
IRPC_RDO_Decoder.h
RpcCoinDataContainer.h
Trk::PlaneSurface::globalToLocal
virtual bool globalToLocal(const Amg::Vector3D &glob, const Amg::Vector3D &mom, Amg::Vector2D &loc) const override final
Specified for PlaneSurface: GlobalToLocal method without dynamic memory allocation - boolean checks i...
Definition: PlaneSurface.cxx:213
RpcIdHelper::parentID
Identifier parentID(const Identifier &id) const
Definition: RpcIdHelper.cxx:997
RpcFiredChannel::time
ubit16 time() const
Definition: RpcFiredChannel.h:54
Muon::RpcRdoToPrepDataToolMT::State::rpcPrepDataCollections
std::vector< std::unique_ptr< Muon::RpcPrepDataCollection > > rpcPrepDataCollections
Definition: RpcRdoToPrepDataToolMT.h:61
ATH_MSG_FATAL
#define ATH_MSG_FATAL(x)
Definition: AthMsgStreamMacros.h:34
DataModel_detail::const_iterator
Const iterator class for DataVector/DataList.
Definition: DVLIterator.h:82
Muon::RpcRdoToPrepDataToolMT::m_reduceCablingOverlap
Gaudi::Property< bool > m_reduceCablingOverlap
Definition: RpcRdoToPrepDataToolMT.h:134
MuonGM
Ensure that the Athena extensions are properly loaded.
Definition: GeoMuonHits.h:27
RpcFiredChannel::ovl
ubit16 ovl() const
Definition: RpcFiredChannel.h:61
Amg::MatrixX
Eigen::Matrix< double, Eigen::Dynamic, Eigen::Dynamic > MatrixX
Dynamic Matrix - dynamic allocation.
Definition: EventPrimitives.h:27
RpcFiredChannel::thr
ubit16 thr() const
Definition: RpcFiredChannel.h:65
SG::ReadCondHandle
Definition: ReadCondHandle.h:44
Muon::RpcCablingOnlineID::subDetector
int16_t & subDetector
Identifier of the subdetector region in the readout BA / BC etc.
Definition: RpcCablingData.h:80
ATH_MSG_INFO
#define ATH_MSG_INFO(x)
Definition: AthMsgStreamMacros.h:31
find
std::string find(const std::string &s)
return a remapped string
Definition: hcg.cxx:135
Surface.h
RpcFiredChannel::channel
ubit16 channel() const
Definition: RpcFiredChannel.h:58
xAOD::uint32_t
setEventNumber uint32_t
Definition: EventInfo_v1.cxx:127
Amg::Vector2D
Eigen::Matrix< double, 2, 1 > Vector2D
Definition: GeoPrimitives.h:48
SG::ReadHandle
Definition: StoreGate/StoreGate/ReadHandle.h:70
Muon::RpcRdoToPrepDataToolMT::provideEmptyContainer
virtual StatusCode provideEmptyContainer(const EventContext &ctx) const override
Definition: RpcRdoToPrepDataToolMT.cxx:168
Muon::RpcRdoToPrepDataToolMT::State::m_fullEventDone
bool m_fullEventDone
Definition: RpcRdoToPrepDataToolMT.h:71
mat
GeoMaterial * mat
Definition: LArDetectorConstructionTBEC.cxx:55
Muon::RpcRdoToPrepDataToolMT::m_idHelperSvc
ServiceHandle< Muon::IMuonIdHelperSvc > m_idHelperSvc
Definition: RpcRdoToPrepDataToolMT.h:149
Muon::RpcRdoToPrepDataToolMT::processPad
StatusCode processPad(const EventContext &ctx, State &state, const RpcPad *rdoColl, bool &processingetaview, bool &processingphiview, int &nPrepRawData, const std::vector< IdentifierHash > &idVect, bool doingSecondLoopAmbigColls) const
Definition: RpcRdoToPrepDataToolMT.cxx:597
Muon::MuonCoinDataCollection
Definition: MuonCoinDataCollection.h:25
Muon::RpcRdoToPrepDataToolMT::initialize
virtual StatusCode initialize() override
Definition: RpcRdoToPrepDataToolMT.cxx:54
Muon::RpcRdoToPrepDataToolMT::m_stripTimeResolution
Gaudi::Property< double > m_stripTimeResolution
Definition: RpcRdoToPrepDataToolMT.h:192
checkFileSG.toSkip
def toSkip(inpName)
Definition: checkFileSG.py:22
Muon::RpcRdoToPrepDataToolMT::m_eventInfo
SG::ReadHandleKey< xAOD::EventInfo > m_eventInfo
Definition: RpcRdoToPrepDataToolMT.h:173
MuonGM::RpcReadoutElement
An RpcReadoutElement corresponds to a single RPC module; therefore typicaly a barrel muon station con...
Definition: MuonDetDescr/MuonReadoutGeometry/MuonReadoutGeometry/RpcReadoutElement.h:55
Muon::RpcRdoToPrepDataToolMT::m_rdoNrpcContainerKey
SG::ReadHandleKey< xAOD::NRPCRDOContainer > m_rdoNrpcContainerKey
Definition: RpcRdoToPrepDataToolMT.h:162
Muon::RpcRdoToPrepDataToolMT::m_RPCInfoFromDb
Gaudi::Property< bool > m_RPCInfoFromDb
correct time prd from cool db
Definition: RpcRdoToPrepDataToolMT.h:141
xAOD::NRPCRDO_v1
Definition: NRPCRDO_v1.h:14
Muon::RpcRdoToPrepDataToolMT::decode
virtual StatusCode decode(const EventContext &ctx, const std::vector< IdentifierHash > &idVect) const override
This code is thread-safe as we will propagate local thread collection contents to a thread-safe one.
Definition: RpcRdoToPrepDataToolMT.cxx:134
IdentifiableContainerMT::IDC_WriteHandle::alreadyPresent
bool alreadyPresent()
Definition: IdentifiableContainerMT.h:59
MuonPrepDataContainer.h
ATH_MSG_VERBOSE
#define ATH_MSG_VERBOSE(x)
Definition: AthMsgStreamMacros.h:28
dbg::ptr
void * ptr(T *p)
Definition: SGImplSvc.cxx:74
Muon::RpcRdoToPrepDataToolMT::State::getPrepCollection
Muon::RpcPrepDataCollection * getPrepCollection(const Identifier &id)
Definition: RpcRdoToPrepDataToolMT.cxx:27
Muon
NRpcCablingAlg reads raw condition data and writes derived condition data to the condition store.
Definition: TrackSystemController.h:45
xAOD::RpcStrip_v1
Definition: RpcStrip_v1.h:11
Muon::RpcRdoToPrepDataToolMT::State::coinDataCont
std::unique_ptr< Muon::RpcCoinDataContainer > coinDataCont
Pointer of the coin container stored in store gate.
Definition: RpcRdoToPrepDataToolMT.h:67
xAOD::EventInfo_v1::IS_SIMULATION
@ IS_SIMULATION
true: simulation, false: data
Definition: EventInfo_v1.h:151
Muon::RpcRdoToPrepDataToolMT::decodeImpl
StatusCode decodeImpl(const EventContext &ctx, State &state, const std::vector< IdentifierHash > &idVect, bool firstTimeInTheEvent) const
Definition: RpcRdoToPrepDataToolMT.cxx:277
MuonGM::MuonClusterReadoutElement::surface
virtual const Trk::PlaneSurface & surface() const override
access to chamber surface (phi orientation), uses the first gas gap
Definition: MuonClusterReadoutElement.h:123
RpcIdHelper
Definition: RpcIdHelper.h:51
Muon::RpcCoinData
Definition: RpcCoinData.h:25
RpcFiredChannel
Definition: RpcFiredChannel.h:20
Muon::RpcRdoToPrepDataToolMT::m_xAODKey
SG::WriteHandleKey< xAOD::RpcStripContainer > m_xAODKey
Definition: RpcRdoToPrepDataToolMT.h:187
RpcCablingCondData
Definition: RpcCablingCondData.h:21
SG::makeHandle
SG::ReadCondHandle< T > makeHandle(const SG::ReadCondHandleKey< T > &key, const EventContext &ctx=Gaudi::Hive::currentContext())
Definition: ReadCondHandle.h:270
Muon::RpcRdoToPrepDataToolMT::m_coindataContainerCacheKey
SG::UpdateHandleKey< RpcCoinDataCollection_Cache > m_coindataContainerCacheKey
Definition: RpcRdoToPrepDataToolMT.h:183
Muon::RpcRdoToPrepDataToolMT::m_timeShift
Gaudi::Property< float > m_timeShift
Definition: RpcRdoToPrepDataToolMT.h:136
Muon::RpcRdoToPrepDataToolMT::m_rpcReadKey
SG::ReadCondHandleKey< RpcCablingCondData > m_rpcReadKey
Definition: RpcRdoToPrepDataToolMT.h:171
Muon::RpcRdoToPrepDataToolMT::RpcRdoToPrepDataToolMT
RpcRdoToPrepDataToolMT(const std::string &, const std::string &, const IInterface *)
Definition: RpcRdoToPrepDataToolMT.cxx:48
Muon::RpcRdoToPrepDataToolMT::State
Definition: RpcRdoToPrepDataToolMT.h:52
Muon::MuonPrepDataCollection::identifyHash
virtual IdentifierHash identifyHash() const override final
Amg::toString
std::string toString(const Translation3D &translation, int precision=4)
GeoPrimitvesToStringConverter.
Definition: GeoPrimitivesToStringConverter.h:40
ATH_MSG_ERROR
#define ATH_MSG_ERROR(x)
Definition: AthMsgStreamMacros.h:33
Muon::RpcRdoToPrepDataToolMT::m_prdContainerCacheKey
SG::UpdateHandleKey< RpcPrepDataCollection_Cache > m_prdContainerCacheKey
This is the key for the cache for the MDT PRD containers, can be empty.
Definition: RpcRdoToPrepDataToolMT.h:180
Muon::RpcRdoToPrepDataToolMT::State::m_decodedRobIds
std::unordered_set< uint32_t > m_decodedRobIds
Definition: RpcRdoToPrepDataToolMT.h:82
xAOD::uint16_t
setWord1 uint16_t
Definition: eFexEMRoI_v1.cxx:93
DataModel_detail::iterator
(Non-const) Iterator class for DataVector/DataList.
Definition: DVLIterator.h:184
Muon::RpcRdoToPrepDataToolMT::processTriggerHitHypothesis
void processTriggerHitHypothesis(RpcCoinMatrix::const_iterator itD, RpcCoinMatrix::const_iterator itD_end, bool highptpad, bool &triggerHit, unsigned short &threshold, unsigned short &overlap, bool &toSkip) const
Definition: RpcRdoToPrepDataToolMT.cxx:1188
Muon::RpcPrepData
Class to represent RPC measurements.
Definition: RpcPrepData.h:35
Muon::RpcRdoToPrepDataToolMT::State::rpcCoinDataCollections
std::vector< std::unique_ptr< Muon::RpcCoinDataCollection > > rpcCoinDataCollections
Definition: RpcRdoToPrepDataToolMT.h:62
Trk::PrepRawData::setHashAndIndex
void setHashAndIndex(unsigned short collHash, unsigned short objIndex)
TEMP for testing: might make some classes friends later ...
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
ATH_MSG_DEBUG
#define ATH_MSG_DEBUG(x)
Definition: AthMsgStreamMacros.h:29
MuonR4::State
CalibratedSpacePoint::State State
Definition: SpacePointCalibrator.cxx:24
IdentifiableContainerMT::IDC_WriteHandle
Definition: IdentifiableContainerMT.h:34
test_pyathena.parent
parent
Definition: test_pyathena.py:15
ATH_CHECK
#define ATH_CHECK
Definition: AthCheckMacros.h:40
CHECK
#define CHECK(...)
Evaluate an expression and check for errors.
Definition: Control/AthenaKernel/AthenaKernel/errorcheck.h:422
SG::VarHandleKey::initialize
StatusCode initialize(bool used=true)
If this object is used as a property, then this should be called during the initialize phase.
Definition: AthToolSupport/AsgDataHandles/Root/VarHandleKey.cxx:103
xAOD::double
double
Definition: CompositeParticle_v1.cxx:159
Muon::MuonPrepDataCollection
Template to hold collections of MuonPrepRawData objects.
Definition: MuonPrepDataCollection.h:46
Muon::RpcRdoToPrepDataToolMT::m_rpcPrepDataContainerKey
SG::WriteHandleKey< Muon::RpcPrepDataContainer > m_rpcPrepDataContainerKey
RpcPrepData containers.
Definition: RpcRdoToPrepDataToolMT.h:153
CaloCondBlobAlgs_fillNoiseFromASCII.channelId
channelId
Definition: CaloCondBlobAlgs_fillNoiseFromASCII.py:122
Muon::RpcRdoToPrepDataToolMT::m_muDetMgrKey
SG::ReadCondHandleKey< MuonGM::MuonDetectorManager > m_muDetMgrKey
Definition: RpcRdoToPrepDataToolMT.h:145
RpcPad::onlineId
ubit16 onlineId() const
Definition: RpcPad.h:107
Muon::RpcRdoToPrepDataToolMT::State::prepDataCont
std::unique_ptr< Muon::RpcPrepDataContainer > prepDataCont
Pointer of the prep container stored in store gate.
Definition: RpcRdoToPrepDataToolMT.h:65
xAOD::MeasVector
Eigen::Matrix< float, N, 1 > MeasVector
Abrivation of the Matrix & Covariance definitions.
Definition: MeasurementDefs.h:52
Muon::RpcRdoToPrepDataToolMT::transferAndRecordPrepData
StatusCode transferAndRecordPrepData(const EventContext &ctx, State &state) const
Stores the PrepData container into store gate.
Definition: RpcRdoToPrepDataToolMT.cxx:176
Trk
Ensure that the ATLAS eigen extensions are properly loaded.
Definition: FakeTrackBuilder.h:9
Muon::RpcCablingData
Helper struct that is parsed to the cabling map to translate between the offline & online Identifiers...
Definition: RpcCablingData.h:94
IDC_Helper.h
MuonGM::RpcReadoutElement::containsId
virtual bool containsId(const Identifier &id) const override
function to be used to check whether a given Identifier is contained in the readout element
Definition: MuonDetDescr/MuonReadoutGeometry/src/RpcReadoutElement.cxx:423
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:228
Muon::RpcRdoToPrepDataToolMT::m_readKey
SG::ReadCondHandleKey< RpcCondDbData > m_readKey
Definition: RpcRdoToPrepDataToolMT.h:169
Muon::RpcRdoToPrepDataToolMT::m_etaphi_coincidenceTime
Gaudi::Property< float > m_etaphi_coincidenceTime
3 ns is the resolution of the RPC readout electronics
Definition: RpcRdoToPrepDataToolMT.h:122
Muon::RpcRdoToPrepDataToolMT::transferAndRecordCoinData
StatusCode transferAndRecordCoinData(const EventContext &ctx, State &state) const
Stores the CoinData container into store gate.
Definition: RpcRdoToPrepDataToolMT.cxx:237
Muon::RpcRdoToPrepDataToolMT::State::m_ambiguousCollections
std::unordered_set< IdentifierHash > m_ambiguousCollections
Definition: RpcRdoToPrepDataToolMT.h:79
Muon::RpcRdoToPrepDataToolMT::m_producePRDfromTriggerWords
Gaudi::Property< bool > m_producePRDfromTriggerWords
Definition: RpcRdoToPrepDataToolMT.h:128
MuonGM::RpcReadoutElement::stripPos
Amg::Vector3D stripPos(const Identifier &id) const
Definition: MuonDetDescr/MuonReadoutGeometry/src/RpcReadoutElement.cxx:177
threshold
Definition: chainparser.cxx:74
SG::UpdateHandle
Definition: UpdateHandle.h:94
DataVector::push_back
value_type push_back(value_type pElem)
Add an element to the end of the collection.
SG::CondHandleKey::initialize
StatusCode initialize(bool used=true)
RpcPad::identifyHash
IdentifierHash identifyHash() const
Returns the OFFLINE identifier hash for this collection.
Definition: RpcPad.h:103
Muon::RpcRdoToPrepDataToolMT::m_decodeData
Gaudi::Property< bool > m_decodeData
toggle on/off the decoding of RPC RDO into RpcPerpData
Definition: RpcRdoToPrepDataToolMT.h:138
Amg::Vector3D
Eigen::Matrix< double, 3, 1 > Vector3D
Definition: GeoPrimitives.h:47
RpcPad
Definition: RpcPad.h:21
IdentifiableContainerMT::IDC_WriteHandle::addOrDelete
StatusCode addOrDelete(std::unique_ptr< T > ptr)
Definition: IdentifiableContainerMT.h:53
Muon::MuonCoinDataCollection::identifyHash
IdentifierHash identifyHash() const
DataVector::end
const_iterator end() const noexcept
Return a const_iterator pointing past the end of the collection.
MuonGM::RpcReadoutElement::StripWidth
double StripWidth(bool measphi) const
returns the strip width for the phi or eta plane
SG::WriteHandle
Definition: StoreGate/StoreGate/WriteHandle.h:76
Muon::RpcRdoToPrepDataToolMT::m_overlap_timeTolerance
Gaudi::Property< float > m_overlap_timeTolerance
Definition: RpcRdoToPrepDataToolMT.h:125
RpcFiredChannel::bcid
ubit16 bcid() const
Definition: RpcFiredChannel.h:52
RpcPad::sector
int sector() const
Definition: RpcPad.h:112
CaloCondBlobAlgs_fillNoiseFromASCII.hash
dictionary hash
Definition: CaloCondBlobAlgs_fillNoiseFromASCII.py:109
xAOD::parentId
@ parentId
Definition: TrackingPrimitives.h:516
ATH_MSG_WARNING
#define ATH_MSG_WARNING(x)
Definition: AthMsgStreamMacros.h:32
python.CaloScaleNoiseConfig.type
type
Definition: CaloScaleNoiseConfig.py:78
DEBUG
#define DEBUG
Definition: page_access.h:11
MuonGM::MuonReadoutElement::identify
Identifier identify() const override final
Returns the ATLAS Identifier of the MuonReadOutElement.
Definition: MuonDetDescr/MuonReadoutGeometry/MuonReadoutGeometry/MuonReadoutElement.h:184
Muon::RpcRdoToPrepDataToolMT::State::getCoinCollection
Muon::RpcCoinDataCollection * getCoinCollection(const Identifier &id)
Definition: RpcRdoToPrepDataToolMT.cxx:37
Muon::IMuonIdHelperSvc
Interface for Helper service that creates muon Identifiers and can be used to print Identifiers.
Definition: IMuonIdHelperSvc.h:27
Muon::RpcRdoToPrepDataToolMT::loadProcessedChambers
StatusCode loadProcessedChambers(const EventContext &ctx, State &state) const
Load the hashes of the processed chambers.
Definition: RpcRdoToPrepDataToolMT.cxx:92
IdentifierByDetElSorter.h
Muon::RpcRdoToPrepDataToolMT::m_rpcRdoDecoderTool
ToolHandle< Muon::IRPC_RDO_Decoder > m_rpcRdoDecoderTool
Definition: RpcRdoToPrepDataToolMT.h:166
xAOD::MeasMatrix
Eigen::Matrix< float, N, N > MeasMatrix
Definition: MeasurementDefs.h:54
Muon::IdentifierByDetElSorter
Definition: IdentifierByDetElSorter.h:17
python.Constants.VERBOSE
int VERBOSE
Definition: Control/AthenaCommon/python/Constants.py:14
Muon::RpcRdoToPrepDataToolMT::State::m_decodedOfflineHashIds
std::unordered_set< IdentifierHash > m_decodedOfflineHashIds
Definition: RpcRdoToPrepDataToolMT.h:75
RpcRdoToPrepDataToolMT.h
Muon::RpcRdoToPrepDataToolMT::m_nRpcCablingKey
SG::ReadCondHandleKey< RpcCablingMap > m_nRpcCablingKey
Definition: RpcRdoToPrepDataToolMT.h:175
pow
constexpr int pow(int base, int exp) noexcept
Definition: ap_fixedTest.cxx:15
SG::AllowEmpty
@ AllowEmpty
Definition: StoreGate/StoreGate/VarHandleKey.h:30
RpcStripAuxContainer.h
Muon::RpcRdoToPrepDataToolMT::m_rdoContainerKey
SG::ReadHandleKey< RpcPadContainer > m_rdoContainerKey
Definition: RpcRdoToPrepDataToolMT.h:159
IdContext
This class saves the "context" of an expanded identifier (ExpandedIdentifier) for compact or hash ver...
Definition: IdContext.h:26
DataVector::size
size_type size() const noexcept
Returns the number of elements in the collection.
Muon::RpcRdoToPrepDataToolMT::processNrpcRdo
StatusCode processNrpcRdo(const EventContext &ctx, State &state) const
15 ns should be the max.diff.
Definition: RpcRdoToPrepDataToolMT.cxx:1100
WriteBchToCool.update
update
Definition: WriteBchToCool.py:67
Muon::RpcRdoToPrepDataToolMT::m_solvePhiAmbiguities
Gaudi::Property< bool > m_solvePhiAmbiguities
Definition: RpcRdoToPrepDataToolMT.h:131
DataVector::begin
const_iterator begin() const noexcept
Return a const_iterator pointing at the beginning of the collection.
generate::Zero
void Zero(TH1D *hin)
Definition: generate.cxx:32
RpcReadoutElement.h
Identifier
Definition: IdentifierFieldParser.cxx:14