 |
ATLAS Offline Software
|
#include <RpcRdoToPrepDataToolMT.h>
|
| virtual StatusCode | initialize () override |
| |
| virtual StatusCode | finalize () override |
| |
| 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. More...
|
| |
| virtual StatusCode | decode (const EventContext &ctx, const std::vector< uint32_t > &robIds) const override |
| | This code is thread-safe as we will propagate local thread collection contents to a thread-safe one. More...
|
| |
| virtual StatusCode | provideEmptyContainer (const EventContext &ctx) const override |
| |
|
| StatusCode | transferAndRecordPrepData (const EventContext &ctx, State &state) const |
| | Stores the PrepData container into store gate. More...
|
| |
| StatusCode | transferAndRecordCoinData (const EventContext &ctx, State &state) const |
| | Stores the CoinData container into store gate. More...
|
| |
| StatusCode | loadProcessedChambers (const EventContext &ctx, State &state) const |
| | Load the hashes of the processed chambers. More...
|
| |
| void | printMTPrepData (const RpcPrepDataContainer &prepData) const |
| |
| void | printMTCoinData (const RpcCoinDataContainer &prepData) const |
| |
| StatusCode | decodeImpl (const EventContext &ctx, State &state, const std::vector< IdentifierHash > &idVect, bool firstTimeInTheEvent) const |
| |
| StatusCode | decodeImpl (const EventContext &ctx, State &state, const std::vector< uint32_t > &robIds, bool firstTimeInTheEvent) const |
| |
| StatusCode | processPad (const EventContext &ctx, State &state, const RpcPad *rdoColl, bool &processingetaview, bool &processingphiview, int &nPrepRawData, const std::vector< IdentifierHash > &idVect, bool doingSecondLoopAmbigColls) const |
| |
| void | processTriggerHitHypothesis (RpcCoinMatrix::const_iterator itD, RpcCoinMatrix::const_iterator itD_end, bool highptpad, bool &triggerHit, unsigned short &threshold, unsigned short &overlap, bool &toSkip) const |
| |
| StatusCode | processNrpcRdo (const EventContext &ctx, State &state) const |
| | 15 ns should be the max.diff. More...
|
| |
Definition at line 31 of file RpcRdoToPrepDataToolMT.h.
◆ decode() [1/2]
| StatusCode Muon::RpcRdoToPrepDataToolMT::decode |
( |
const EventContext & |
ctx, |
|
|
const std::vector< IdentifierHash > & |
idVect |
|
) |
| const |
|
overridevirtual |
This code is thread-safe as we will propagate local thread collection contents to a thread-safe one.
Definition at line 121 of file RpcRdoToPrepDataToolMT.cxx.
123 ATH_MSG_DEBUG(
"Calling Core decode function from MT decode function (hash vector)");
129 ATH_MSG_DEBUG(
"Core decode processed in MT decode (hash vector)");
134 return StatusCode::SUCCESS;
◆ decode() [2/2]
| StatusCode Muon::RpcRdoToPrepDataToolMT::decode |
( |
const EventContext & |
ctx, |
|
|
const std::vector< uint32_t > & |
robIds |
|
) |
| const |
|
overridevirtual |
This code is thread-safe as we will propagate local thread collection contents to a thread-safe one.
Definition at line 139 of file RpcRdoToPrepDataToolMT.cxx.
141 ATH_MSG_DEBUG(
"Calling Core decode function from MT decode function (ROB vector)");
147 ATH_MSG_DEBUG(
"Core decode processed in MT decode (ROB vector)");
152 return StatusCode::SUCCESS;
◆ decodeImpl() [1/2]
| StatusCode Muon::RpcRdoToPrepDataToolMT::decodeImpl |
( |
const EventContext & |
ctx, |
|
|
State & |
state, |
|
|
const std::vector< IdentifierHash > & |
idVect, |
|
|
bool |
firstTimeInTheEvent |
|
) |
| const |
|
protected |
RPC context
here the RDO container is retrieved and filled -whatever input type we start with- => check the size
Definition at line 262 of file RpcRdoToPrepDataToolMT.cxx.
265 int sizeVectorRequested = idVect.size();
266 ATH_MSG_DEBUG(
"Decode method called for " << sizeVectorRequested <<
" offline collections");
267 if (sizeVectorRequested == 0){
272 std::vector<IdentifierHash> idVectToBeDecoded;
273 idVectToBeDecoded.reserve(idVect.size());
275 if (firstTimeInTheEvent) {
276 state.m_fullEventDone = sizeVectorRequested == 0;
278 if (state.m_fullEventDone) {
279 ATH_MSG_DEBUG(
"Whole event has already been decoded; nothing to do.");
280 return StatusCode::SUCCESS;
282 if (sizeVectorRequested == 0) {
283 state.m_fullEventDone =
true;
287 if (sizeVectorRequested != 0) {
291 for (
const IdentifierHash& itHashId : idVect) {
292 if (state.m_decodedOfflineHashIds.insert(itHashId).second)
293 idVectToBeDecoded.push_back(itHashId);
296 if (idVectToBeDecoded.empty()) {
297 ATH_MSG_DEBUG(
"All requested offline collections have already been decoded; nothing to do.");
298 return StatusCode::SUCCESS;
301 <<
" offline collections have not yet been decoded and will be decoded now.");
302 ATH_MSG_VERBOSE(
"The list of offline collection hash ids to be decoded:"<<std::endl<<idVectToBeDecoded);
308 ATH_MSG_DEBUG(
"Stored empty container. Decoding RPC RDO into RPC PrepRawData is switched off");
309 return StatusCode::SUCCESS;
317 std::vector<IdentifierHash> rdoHashVec;
318 if (sizeVectorRequested != 0) {
319 ATH_MSG_DEBUG(
"Looking for pads IdHash to be decoded for the requested collection Ids");
320 ATH_CHECK(rpcCabling->giveRDO_fromPRD(idVectToBeDecoded, rdoHashVec));
327 ATH_MSG_DEBUG(
"Retrieving Rpc PAD container from the store");
329 if (!rdoContainerHandle.isValid()) {
331 return StatusCode::FAILURE;
336 if (rdoContainerHandle->numberOfCollections() == 0) {
338 ATH_MSG_DEBUG(
"Empty pad container - no rpc rdo in this event ");
339 return StatusCode::SUCCESS;
345 bool doingSecondLoopAmbigColls =
false;
347 int ipad{0}, nPrepRawData{0}, nPhiPrepRawData{0}, nEtaPrepRawData{0};
348 if (processingphiview) {
349 state.m_ambiguousCollections.clear();
351 ATH_MSG_DEBUG(
"*** Processing "<<(processingetaview ?
"eta" :
"phi")<<
" view ");
353 if (sizeVectorRequested != 0) {
355 for (
const IdentifierHash& iPadHash : rdoHashVec) {
356 const RpcPad* rdoColl = rdoContainerHandle->indexFindPtr(iPadHash);
358 ATH_MSG_DEBUG(
"Requested pad with online id "<< iPadHash <<
" not found in the rdoContainerHandle.");
364 <<
", with " << rdoColl->
size() <<
" CM inside ");
366 processingphiview, nPrepRawData, idVectToBeDecoded, doingSecondLoopAmbigColls));
371 for (
const RpcPad* rdoColl : *rdoContainerHandle) {
373 if (rdoColl->
empty()){
378 <<
", with " << rdoColl->
size() <<
" CM inside ");
381 processingphiview, nPrepRawData, idVectToBeDecoded, doingSecondLoopAmbigColls));
385 if (processingetaview) {
386 processingetaview =
false;
387 processingphiview =
true;
388 nEtaPrepRawData = nPrepRawData;
389 ATH_MSG_DEBUG(
"*** " << nEtaPrepRawData <<
" eta PrepRawData registered");
391 processingphiview =
false;
392 nPhiPrepRawData = nPrepRawData - nEtaPrepRawData;
393 ATH_MSG_DEBUG(
"*** " << nPhiPrepRawData <<
" phi PrepRawData registered");
394 if (!state.m_ambiguousCollections.empty()) {
396 doingSecondLoopAmbigColls =
true;
397 processingetaview =
true;
398 ATH_MSG_DEBUG(state.m_ambiguousCollections.size() <<
" ambiguous collections were stored:");
399 idVectToBeDecoded.clear();
401 for (
const IdentifierHash& itAmbiColl : state.m_ambiguousCollections) {
403 idVectToBeDecoded.push_back(itAmbiColl);
404 state.m_decodedOfflineHashIds.insert(itAmbiColl);
406 ATH_CHECK(rpcCabling->giveRDO_fromPRD(idVectToBeDecoded, rdoHashVec));
410 ATH_MSG_DEBUG(
"*** " << nPrepRawData <<
" PrepRawData registered");
416 return StatusCode::SUCCESS;
◆ decodeImpl() [2/2]
| StatusCode Muon::RpcRdoToPrepDataToolMT::decodeImpl |
( |
const EventContext & |
ctx, |
|
|
State & |
state, |
|
|
const std::vector< uint32_t > & |
robIds, |
|
|
bool |
firstTimeInTheEvent |
|
) |
| const |
|
protected |
Definition at line 420 of file RpcRdoToPrepDataToolMT.cxx.
425 int sizeVectorRequested = robIds.size();
426 ATH_MSG_DEBUG(
"Decode method called for " << sizeVectorRequested <<
" ROBs");
428 std::vector<uint32_t> robIdsToBeDecoded{};
429 robIdsToBeDecoded.reserve(robIds.size());
431 if (firstTimeInTheEvent) {
432 state.m_fullEventDone =
false;
434 if (state.m_fullEventDone) {
435 ATH_MSG_DEBUG(
"Whole event has already been decoded; nothing to do.");
436 return StatusCode::SUCCESS;
442 if (state.m_decodedRobIds.insert(robid).second) {
443 robIdsToBeDecoded.push_back(robid);
447 if (robIdsToBeDecoded.empty()) {
448 ATH_MSG_DEBUG(
"All requested ROBs have already been decoded; nothing to do.");
449 return StatusCode::SUCCESS;
451 ATH_MSG_DEBUG(robIdsToBeDecoded.size()<<
" ROBs have not yet been decoded and will be decoded now.");
454 for (
uint32_t robid : robIdsToBeDecoded)
462 if (state.m_decodedRobIds.size() == rpcCabling->giveFullListOfRobIds().size())
463 state.m_fullEventDone =
true;
467 ATH_MSG_DEBUG(
"Stored empty container. Decoding RPC RDO into RPC PrepRawData is switched off");
468 return StatusCode::SUCCESS;
474 ATH_MSG_DEBUG(
"Retrieving Rpc PAD container from the store");
476 if (!rdoContainerHandle.isValid()) {
478 return StatusCode::SUCCESS;
483 if (rdoContainerHandle->empty()) {
485 ATH_MSG_DEBUG(
"Empty pad container - no rpc rdo in this event ");
486 return StatusCode::SUCCESS;
491 std::vector<IdentifierHash> rdoHashVec;
492 rdoHashVec.reserve(13 * robIdsToBeDecoded.size());
493 ATH_CHECK(rpcCabling->giveRDO_fromROB(robIdsToBeDecoded, rdoHashVec));
496 bool processingetaview =
true;
497 bool processingphiview =
false;
499 processingetaview =
false;
502 int ipad{0}, nPrepRawData{0}, nPhiPrepRawData{0}, nEtaPrepRawData{0};
503 if (processingphiview){
504 state.m_ambiguousCollections.clear();
506 ATH_MSG_DEBUG(
"*** Processing "<<(processingetaview?
"eta" :
"phi")<<
" view ");
511 for (
const IdentifierHash& padHashId : rdoHashVec) {
512 const RpcPad* rdoColl = rdoContainerHandle->indexFindPtr(padHashId);
514 ATH_MSG_DEBUG(
"Requested pad with online id "<< padHashId <<
" not found in the rdoContainerHandle.");
519 <<
", with " << rdoColl->
size() <<
" CM inside ");
521 processingphiview, nPrepRawData, rdoHashVec,
false));
524 if (processingetaview) {
525 processingetaview =
false;
526 processingphiview =
true;
527 nEtaPrepRawData = nPrepRawData;
528 ATH_MSG_DEBUG(
"*** " << nEtaPrepRawData <<
" eta PrepRawData registered");
530 processingphiview =
false;
531 nPhiPrepRawData = nPrepRawData - nEtaPrepRawData;
532 ATH_MSG_DEBUG(
"*** " << nPhiPrepRawData <<
" phi PrepRawData registered");
535 ATH_MSG_DEBUG(
"*** " << nPrepRawData <<
" PrepRawData registered");
542 return StatusCode::SUCCESS;
◆ finalize()
| StatusCode Muon::RpcRdoToPrepDataToolMT::finalize |
( |
| ) |
|
|
overridevirtual |
◆ initialize()
| StatusCode Muon::RpcRdoToPrepDataToolMT::initialize |
( |
| ) |
|
|
overridevirtual |
◆ loadProcessedChambers()
| StatusCode Muon::RpcRdoToPrepDataToolMT::loadProcessedChambers |
( |
const EventContext & |
ctx, |
|
|
State & |
state |
|
) |
| const |
|
protected |
Load the hashes of the processed chambers.
Definition at line 87 of file RpcRdoToPrepDataToolMT.cxx.
88 const int modHashMax =
m_idHelperSvc->rpcIdHelper().module_hash_max();
93 return StatusCode::FAILURE;
95 state.prepDataCont = std::make_unique<RpcPrepDataContainer>(
update.ptr());
97 state.m_decodedOfflineHashIds.insert(coll->identifyHash());
100 state.prepDataCont = std::make_unique<RpcPrepDataContainer>(modHashMax);
104 state.coinDataCont = std::make_unique<RpcCoinDataContainer>(modHashMax);
110 return StatusCode::FAILURE;
112 state.coinDataCont = std::make_unique<RpcCoinDataContainer>(
update.ptr());
114 state.m_decodedOfflineHashIds.insert(coll->identifyHash());
117 return StatusCode::SUCCESS;
◆ printMTCoinData()
◆ printMTPrepData()
◆ processNrpcRdo()
| StatusCode Muon::RpcRdoToPrepDataToolMT::processNrpcRdo |
( |
const EventContext & |
ctx, |
|
|
State & |
state |
|
) |
| const |
|
protected |
15 ns should be the max.diff.
in prop.time in phi and eta strips
No need to check for its validity. It's done at other places for sure
Convert from online to offline cabling
That needs to be parsed to the constructor of the PRD somehow...
Definition at line 912 of file RpcRdoToPrepDataToolMT.cxx.
916 return StatusCode::SUCCESS;
919 ATH_MSG_DEBUG(
"Retrieving Nrpc RDO container from the store");
921 if (!rdoNrpcContainerHandle.isPresent()) {
923 <<
" container failed !");
924 return StatusCode::FAILURE;
927 if (rdoNrpcContainerHandle->empty()) {
929 ATH_MSG_DEBUG(
"Empty NRPC RDO container - no nrpc rdo in this event ");
930 return StatusCode::SUCCESS;
932 ATH_MSG_DEBUG(
"Not empty NRPC RDO container in this event ");
935 if (!readCdo.isValid()) {
937 <<
" from the conditions store");
938 return StatusCode::FAILURE;
943 for (
const xAOD::NRPCRDO* nrpcrdo : *rdoNrpcContainerHandle) {
945 RpcCablingData translateCache{};
946 translateCache.subDetector = nrpcrdo->subdetector();
947 translateCache.boardSector = nrpcrdo->boardsector();
948 translateCache.board = nrpcrdo->board();
949 translateCache.channelId = nrpcrdo->channel();
951 if (!readCdo->getOfflineId(translateCache, msgStream()) ||
952 !readCdo->convert(translateCache, chanId,
false)) {
963 std::vector<Identifier> identifierList{chanId};
967 <<
" global position "
974 const double stripWidth = descriptor->
StripWidth(
977 const double errPos = stripWidth / std::sqrt(12.0);
980 mat *= errPos * errPos;
982 int ambiguityFlag = 0;
984 const float time = nrpcrdo->time();
986 const float timeoverthr = nrpcrdo->timeoverthr();
988 const IdentifierHash rpcHashId =
m_idHelperSvc->moduleHash(chanId);
989 auto newPrepData = std::make_unique<RpcPrepData>(chanId, rpcHashId, pointLocPos, identifierList,
mat,
990 descriptor,
time, timeoverthr, 0, ambiguityFlag);
992 newPrepData->setHashAndIndex(collection->identifyHash(),
994 collection->push_back(std::move(newPrepData));
996 return StatusCode::SUCCESS;
◆ processPad()
| StatusCode Muon::RpcRdoToPrepDataToolMT::processPad |
( |
const EventContext & |
ctx, |
|
|
State & |
state, |
|
|
const RpcPad * |
rdoColl, |
|
|
bool & |
processingetaview, |
|
|
bool & |
processingphiview, |
|
|
int & |
nPrepRawData, |
|
|
const std::vector< IdentifierHash > & |
idVect, |
|
|
bool |
doingSecondLoopAmbigColls |
|
) |
| const |
|
protected |
Definition at line 546 of file RpcRdoToPrepDataToolMT.cxx.
553 std::unordered_set<IdentifierHash>& ambiguousCollections{state.m_ambiguousCollections};
554 ATH_MSG_DEBUG(
"***************** Start of processPad eta/phiview "<< processingetaview <<
"/" << processingphiview);
559 ATH_MSG_DEBUG(
"***************** for Pad online Id "<< padId <<
" m_logic sector ID " << sectorId);
566 IdentifierHash rpcHashId{0};
575 bool highPtCm =
false;
577 uint16_t cmaId = coinMat->onlineId();
578 ATH_MSG_DEBUG(
"A new CM here n. "<< icm <<
" CM online ID " << cmaId<<
" with n. of hits = " << coinMat->size()
579 <<
", empty: "<<coinMat->empty());
583 }
else if (cmaId >=4) {
589 ATH_MSG_DEBUG(
" eta view = " << etaview<<
", processingetaview: "<<processingetaview
590 <<
", processingphiview: "<<processingphiview);
592 if (processingetaview && !etaview){
594 }
else if (processingphiview && etaview) {
597 if (coinMat->empty()) {
607 unsigned short overlap = 99;
614 ATH_MSG_DEBUG(
"RpcFiredChannel: bcid " << rpcChan->bcid() <<
" time " << rpcChan->time()
615 <<
" ijk "<< rpcChan->ijk() <<
" ch " << ( rpcChan->ijk() < 7 ? rpcChan->channel() : -1));
618 bool triggerHit =
false;
628 solvePhiAmb_thisHit =
false;
629 reduceCablOvl_thisHit =
false;
630 ATH_MSG_DEBUG(
"RpcFiredChannel: it's a triggerHit or a lowPt coinc. in a high pt CM \n"
631 <<
" ijk = " << rpcChan->ijk() <<
" isHighPtCM " << highPtCm
632 <<
" thr/ovl = " <<
threshold <<
"/" << overlap);
637 std::vector<Identifier> digitVec{
m_rpcRdoDecoderTool->getOfflineData(rpcChan, sectorId, padId,
638 cmaId,
time, rpcCabling.cptr())};
641 int nMatchingEtaHits{0}, nDuplicatePhiHits{0};
642 bool unsolvedAmbiguity{
false}, notFinished{
true};
651 while (notFinished) {
653 ATH_MSG_DEBUG(
"size of the corresponding list of ID = " << digitVec.size());
654 if (digitVec.empty()) {
668 if (!idVect.empty() &&
std::find(idVect.begin(), idVect.end(), rpcHashId) == idVect.end()) {
673 bool hasAMatchingEtaHit = 0;
676 if ((oldIdTrg !=
parentId) || !collectionTrg) {
680 <<
" hash = " << rpcHashId);
681 collectionTrg = state.getCoinCollection(
parentId);
685 }
else if ((oldId !=
parentId) || !collection) {
689 collection = state.getPrepCollection(
parentId);
697 bool duplicate =
false;
698 if (reduceCablOvl_thisHit) {
699 ATH_MSG_VERBOSE(
"Check for duplicates in coll. with size "<< collection->size());
700 for (RpcPrepData* rpc : *collection) {
705 hasAMatchingEtaHit =
false;
709 float previous_time = rpc->time();
711 if (
time < previous_time) {
713 ATH_MSG_DEBUG(
"time of the prd previously stored is now updated with "
714 <<
"current hit time: "<< previous_time <<
" -> " << rpc->time());
722 if (processingphiview && solvePhiAmb_thisHit && !unsolvedAmbiguity && !idHelper.
measuresPhi(existId) &&
725 hasAMatchingEtaHit =
true;
733 if (hasAMatchingEtaHit)
737 if (processingphiview && duplicate)
743 if (solvePhiAmb_thisHit && !etaview){
745 <<
" hasAMatchingEtaHit = "<< hasAMatchingEtaHit);
752 ATH_MSG_VERBOSE(
" solvePhiAmb_thisHit: "<<solvePhiAmb_thisHit<<
", processingetaview:"<<processingetaview
753 <<
", processingphiview: "<<processingphiview<<
", hasAMatchingEtaHit: "<<hasAMatchingEtaHit
754 <<
", unsolvedAmbiguity: "<< unsolvedAmbiguity);
755 if ( !solvePhiAmb_thisHit || processingetaview ||
756 (processingphiview && (hasAMatchingEtaHit || unsolvedAmbiguity))) {
757 if (unsolvedAmbiguity) {
758 if (idVect.empty()) {
763 ATH_MSG_DEBUG(
"unsolvedAmbiguity is true, adding collection with hash = "
764 << rpcHashId <<
" to ambiguous collections vector");
765 const auto&
decode{state.m_decodedOfflineHashIds};
767 ambiguousCollections.insert(rpcHashId);
768 ATH_MSG_DEBUG(
"collection not yet processed; added to ambiguous "
769 <<
"collection vector; going to the next offline channel ID");
771 }
else if (!doingSecondLoopAmbigColls) {
772 ambiguousCollections.insert(rpcHashId);
773 ATH_MSG_DEBUG(
"collection already processed and doingSecondLoopAmbigColls=false; added to ambiguous "
774 <<
"collection vector; going to the next offline channel ID");
777 ATH_MSG_DEBUG(
"collection already processed and doingSecondLoopAmbigColls=true; trying to store data even if unsolvedAmbiguity");
787 hasAMatchingEtaHit =
false;
791 <<
"> inconsistent with the geometry of detector element <"
793 <<
"> =>>ignore this hit /// there are unmasked channels in BOG");
796 <<
"> inconsistent with the geometry of detector element <"
811 std::vector<Identifier> identifierList{
channelId};
817 double errPos = stripWidth / std::sqrt(12.0);
820 mat *= errPos * errPos;
823 int ambiguityFlag = 0;
824 if (solvePhiAmb_thisHit) {
825 if (processingetaview){
828 if (unsolvedAmbiguity){
829 ambiguityFlag = digitVec.size();
830 }
else if (hasAMatchingEtaHit){
831 ambiguityFlag = nMatchingEtaHits;
838 std::optional<double> StripTimeFromCool = readHandle->getStripTime(
channelId);
839 if (StripTimeFromCool) {
840 time -= (*StripTimeFromCool);
847 auto newCoinData = std::make_unique<RpcCoinData>(
channelId, rpcHashId,
848 std::move(pointLocPos), std::move(identifierList),
849 std::move(
mat), descriptor,
time,
850 ambiguityFlag, rpcChan->ijk(),
threshold, overlap, cmaId, padId, sectorId,
854 ATH_MSG_DEBUG(
" Adding RpcCoinData @ "<< newCoinData.get() <<
" to collection "
857 newCoinData->setHashAndIndex(collectionTrg->identifyHash(),
858 collectionTrg->size());
859 collectionTrg->push_back(std::move(newCoinData));
863 <<
"ambiguityFlag = " << ambiguityFlag);
865 auto newPrepData = std::make_unique<RpcPrepData>(
channelId, rpcHashId,std::move(pointLocPos),
866 std::move(identifierList),
867 std::move(
mat), descriptor,
time, ambiguityFlag);
870 ATH_MSG_DEBUG(
" Adding digit @ "<< newPrepData.get() <<
" to collection "
873 newPrepData->setHashAndIndex(collection->identifyHash(),
875 collection->push_back(std::move(newPrepData));
884 ATH_MSG_VERBOSE(
"processingphiview:"<<processingphiview<<
", nMatchingEtaHits:"<<nMatchingEtaHits
885 <<
", nDuplicatePhiHits, unsolvedAmbiguity: "<<unsolvedAmbiguity<<
", solvePhiAmb_thisHit : "
886 << solvePhiAmb_thisHit);
887 if ((processingphiview && (nMatchingEtaHits == 0)) && (nDuplicatePhiHits == 0) &&
888 (!unsolvedAmbiguity) && (solvePhiAmb_thisHit)) {
889 unsolvedAmbiguity =
true;
893 ATH_MSG_DEBUG(
"No eta prepData matching any phi hit from this CM hit \n"
894 <<
"loop once again and store all phi digits potentially "
895 "generating this CM hit");
896 }
else if (unsolvedAmbiguity)
904 ATH_MSG_DEBUG(
"***************** Stop of processPad eta/phiview "
905 << processingetaview <<
"/" << processingphiview
906 <<
"***************** for Pad online Id " << padId
907 <<
" m_logic sector ID " << sectorId);
909 return StatusCode::SUCCESS;
◆ processTriggerHitHypothesis()
Definition at line 999 of file RpcRdoToPrepDataToolMT.cxx.
1006 if ((highPtCm && rpcChan->
ijk() < 2) || (rpcChan->
ijk() > 5)) {
1016 if (rpcChan->
ijk() == 7) {
1021 if (rpcChan->
ijk() == 6) {
1023 ATH_MSG_VERBOSE(
"This hit: ijk = " << rpcChan->
ijk() <<
"in "<<(highPtCm ?
"high" :
"low")
1024 <<
" pT CM, bcid is " << rpcChan->
bcid()<<
" time is " << rpcChan->
time()
1025 <<
" ch " << rpcChan->
channel());
1027 while (itDnext != itD_end) {
1029 ATH_MSG_VERBOSE(
"Next hit: ijk = " << rpcChanNext->
ijk() <<
"in "<<(highPtCm ?
"high" :
"low")
1030 <<
" pT CM, bcid is " << rpcChan->
bcid() <<
" time is " << rpcChanNext->
time()
1031 <<
", ch: "<<( rpcChanNext->
ijk() < 7? rpcChanNext->
channel() : -1));
1033 if (rpcChanNext->
ijk() == 7) {
1034 if (rpcChanNext->
bcid() == rpcChan->
bcid() && rpcChanNext->
time() == rpcChan->
time()) {
1035 ATH_MSG_VERBOSE(
"bdid/tick match; assigning thr/overlap = " << rpcChanNext->
thr() <<
"/" << rpcChanNext->
ovl());
1037 overlap = rpcChanNext->
ovl();
1039 ATH_MSG_WARNING(
"ijk =7 after a ijk = 6 BUT bdid/tick don't match - will not assign threshold/overlap ");
1043 if (rpcChanNext->
ijk() == 6) {
1047 ATH_MSG_WARNING(
"RPC cm hit with ijk = 6 not followed by ijk = 6 or 7 - will not assign threshold / overlap");
1058 << rpcChan->
ijk() <<
" threshold / overlap = " <<
threshold
◆ provideEmptyContainer()
| StatusCode Muon::RpcRdoToPrepDataToolMT::provideEmptyContainer |
( |
const EventContext & |
ctx | ) |
const |
|
overridevirtual |
◆ transferAndRecordCoinData()
| StatusCode Muon::RpcRdoToPrepDataToolMT::transferAndRecordCoinData |
( |
const EventContext & |
ctx, |
|
|
State & |
state |
|
) |
| const |
|
protected |
Stores the CoinData container into store gate.
Definition at line 223 of file RpcRdoToPrepDataToolMT.cxx.
225 return StatusCode::SUCCESS;
229 for (std::unique_ptr<RpcCoinDataCollection>& collection : state.rpcCoinDataCollections) {
230 if (!collection || collection->empty()) {
233 const IdentifierHash
hash = collection->identifyHash();
236 if (
lock.alreadyPresent()) {
237 ATH_MSG_DEBUG(
"RpcCoinDataCollection already contained in IDC "
244 state.rpcCoinDataCollections.clear();
246 for (
const auto& [
hash,
ptr] : state.coinDataCont->GetAllHashPtrPair()) {
252 ATH_CHECK(rpcCoinHandle.record(std::move(state.coinDataCont)));
258 return StatusCode::SUCCESS;
◆ transferAndRecordPrepData()
| StatusCode Muon::RpcRdoToPrepDataToolMT::transferAndRecordPrepData |
( |
const EventContext & |
ctx, |
|
|
State & |
state |
|
) |
| const |
|
protected |
Stores the PrepData container into store gate.
Before converting the PrepData into the xAOD container, sort them by detectorElement allowing for ChamberView accesses layer
Definition at line 162 of file RpcRdoToPrepDataToolMT.cxx.
167 ATH_CHECK(writeHandleXAOD.record(std::make_unique<xAOD::RpcStripContainer>(),
168 std::make_unique<xAOD::RpcStripAuxContainer>()));
171 for (std::unique_ptr<RpcPrepDataCollection>& collection : state.rpcPrepDataCollections) {
172 if (!collection || collection->empty()) {
178 std::vector<const RpcPrepData*> sortMe{collection->begin(), collection->end()};
179 std::ranges::sort(sortMe, IdentifierByDetElSorter{
m_idHelperSvc.get()});
180 for (
const RpcPrepData* prd : sortMe) {
183 strip->setDoubletPhi(idHelper.doubletPhi(
id));
184 strip->setGasGap(idHelper.gasGap(
id));
185 strip->setMeasuresPhi(idHelper.measuresPhi(
id));
186 strip->setStripNumber(idHelper.channel(
id));
187 strip->setAmbiguityFlag(prd->ambiguityFlag());
188 strip->setTimeOverThreshold(prd->timeOverThreshold());
189 strip->setTime(prd->time());
191 strip->setTriggerInfo(prd->triggerInfo());
194 strip->setMeasurement(
m_idHelperSvc->detElementHash(
id), std::move(locPos), std::move(locCov));
198 const IdentifierHash
hash = collection->identifyHash();
201 if (
lock.alreadyPresent()) {
202 ATH_MSG_DEBUG(
"RpcPrepDataCollection already contained in IDC "
209 state.rpcPrepDataCollections.clear();
212 for (
const auto& [
hash,
ptr] : state.prepDataCont->GetAllHashPtrPair()) {
217 ATH_CHECK(rpcPRDHandle.record(std::move(state.prepDataCont)));
220 return StatusCode::SUCCESS;
◆ m_coindataContainerCacheKey
Initial value:{
this, "RpcCoinDataContainerCacheKey", "",
"Optional external cache for the RPC coin data container"}
Definition at line 176 of file RpcRdoToPrepDataToolMT.h.
◆ m_decodeData
| Gaudi::Property<bool> Muon::RpcRdoToPrepDataToolMT::m_decodeData |
|
protected |
Initial value:{
this, "DecodeData",
true}
toggle on/off the decoding of RPC RDO into RpcPerpData
Definition at line 134 of file RpcRdoToPrepDataToolMT.h.
◆ m_etaphi_coincidenceTime
| Gaudi::Property<float> Muon::RpcRdoToPrepDataToolMT::m_etaphi_coincidenceTime |
|
protected |
Initial value:{
this, "etaphi_coincidenceTime", 20., "time for phi*eta coincidence"}
3 ns is the resolution of the RPC readout electronics
Definition at line 118 of file RpcRdoToPrepDataToolMT.h.
◆ m_idHelperSvc
Initial value:{
this, "MuonIdHelperSvc", "Muon::MuonIdHelperSvc/MuonIdHelperSvc"}
Definition at line 145 of file RpcRdoToPrepDataToolMT.h.
◆ m_isMC
| Gaudi::Property<bool> Muon::RpcRdoToPrepDataToolMT::m_isMC {this, "isMC", false} |
|
protected |
◆ m_muDetMgrKey
Initial value:{
this, "DetectorManagerKey", "MuonDetectorManager",
"Key of input MuonDetectorManager condition data"}
Definition at line 141 of file RpcRdoToPrepDataToolMT.h.
◆ m_nRpcCablingKey
Initial value:{this, "NrpcCablingKey","MuonNRPC_CablingMap",
"Key of MuonNRPC_CablingMap"}
Definition at line 169 of file RpcRdoToPrepDataToolMT.h.
◆ m_overlap_timeTolerance
| Gaudi::Property<float> Muon::RpcRdoToPrepDataToolMT::m_overlap_timeTolerance |
|
protected |
Initial value:{
this, "overlap_timeTolerance", 10.,
"tolerance of the timing calibration"}
Definition at line 121 of file RpcRdoToPrepDataToolMT.h.
◆ m_prdContainerCacheKey
Initial value:{
this, "RpcPrdContainerCacheKey", "",
"Optional external cache for the RPC PRD container"}
This is the key for the cache for the MDT PRD containers, can be empty.
Definition at line 173 of file RpcRdoToPrepDataToolMT.h.
◆ m_producePRDfromTriggerWords
| Gaudi::Property<bool> Muon::RpcRdoToPrepDataToolMT::m_producePRDfromTriggerWords |
|
protected |
Initial value:{
this, "produceRpcCoinDatafromTriggerWords", true,
"tore as prd the trigger hits"}
Definition at line 124 of file RpcRdoToPrepDataToolMT.h.
◆ m_rdoContainerKey
◆ m_rdoNrpcContainerKey
◆ m_readKey
◆ m_reduceCablingOverlap
| Gaudi::Property<bool> Muon::RpcRdoToPrepDataToolMT::m_reduceCablingOverlap |
|
protected |
Initial value:{
this, "reduceCablingOverlap", true, "toggle on/off the overlap removal"}
Definition at line 130 of file RpcRdoToPrepDataToolMT.h.
◆ m_rpcCoinDataContainerKey
◆ m_RPCInfoFromDb
| Gaudi::Property<bool> Muon::RpcRdoToPrepDataToolMT::m_RPCInfoFromDb {this, "RPCInfoFromDb", false} |
|
protected |
◆ m_rpcPrepDataContainerKey
◆ m_rpcRdoDecoderTool
◆ m_rpcReadKey
Initial value:{
this, "RpcCablingKey", "RpcCablingCondData", "Key of RpcCablingCondData"}
Definition at line 167 of file RpcRdoToPrepDataToolMT.h.
◆ m_solvePhiAmbiguities
| Gaudi::Property<bool> Muon::RpcRdoToPrepDataToolMT::m_solvePhiAmbiguities |
|
protected |
Initial value:{
this, "solvePhiAmbiguities", true,
"toggle on/off the removal of phi ambiguities"}
Definition at line 127 of file RpcRdoToPrepDataToolMT.h.
◆ m_spuriousHitCounter
| std::atomic_int Muon::RpcRdoToPrepDataToolMT::m_spuriousHitCounter |
|
mutableprivate |
◆ m_stripTimeResolution
| Gaudi::Property<double> Muon::RpcRdoToPrepDataToolMT::m_stripTimeResolution |
|
protected |
◆ m_timeShift
| Gaudi::Property<float> Muon::RpcRdoToPrepDataToolMT::m_timeShift |
|
protected |
◆ m_xAODKey
Initial value:{
this, "xAODKey", "",
"If empty, do not produce xAOD, otherwise this is the key of the output "
"xAOD MDT PRD container"}
Definition at line 180 of file RpcRdoToPrepDataToolMT.h.
The documentation for this class was generated from the following files:
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...
Identifier parentID(const Identifier &id) const
Const iterator class for DataVector/DataList.
Eigen::Matrix< double, Eigen::Dynamic, Eigen::Dynamic > MatrixX
Dynamic Matrix - dynamic allocation.
friend class IDC_WriteHandle
std::string find(const std::string &s)
return a remapped string
Eigen::Matrix< double, 2, 1 > Vector2D
MuonPrepDataCollection< RpcPrepData > RpcPrepDataCollection
bool measuresPhi(const Identifier &id) const override
An RpcReadoutElement corresponds to a single RPC module; therefore typicaly a barrel muon station con...
int stationName(const Identifier &id) const
#define ATH_MSG_VERBOSE(x)
virtual const Trk::PlaneSurface & surface() const override
access to chamber surface (phi orientation), uses the first gas gap
SG::ReadCondHandle< T > makeHandle(const SG::ReadCondHandleKey< T > &key, const EventContext &ctx=Gaudi::Hive::currentContext())
std::string toString(const Translation3D &translation, int precision=4)
GeoPrimitvesToStringConverter.
MuonCoinDataCollection< RpcCoinData > RpcCoinDataCollection
CalibratedSpacePoint::State State
StatusCode initialize(bool used=true)
If this object is used as a property, then this should be called during the initialize phase.
Eigen::Matrix< float, N, 1 > MeasVector
Abrivation of the Matrix & Covariance definitions.
const std::string & stationNameString(const int &index) const
virtual bool containsId(const Identifier &id) const override
function to be used to check whether a given Identifier is contained in the readout element
Amg::Vector3D stripPos(const Identifier &id) const
StatusCode initialize(bool used=true)
IdentifierHash identifyHash() const
Returns the OFFLINE identifier hash for this collection.
Eigen::Matrix< double, 3, 1 > Vector3D
double StripWidth(bool measphi) const
returns the strip width for the phi or eta plane
def time(flags, cells_name, *args, **kw)
#define ATH_MSG_WARNING(x)
Identifier identify() const override final
Returns the ATLAS Identifier of the MuonReadOutElement.
Eigen::Matrix< float, N, N > MeasMatrix
constexpr int pow(int base, int exp) noexcept
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.
bool empty() const noexcept
Returns true if the collection is empty.